Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dns_zone_parser

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dns_zone_parser

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

dns_zone_parser

About

This CLI-driven gem parses DNS Zone files in two ways:

  • Parses all records into an array of DNS Record objects
  • Outputs a CSV file

Zone file must be formatted in the following fashion:

domain_name		time_out	IN		record_type		ip_address

For example, zone files provided by GoDaddy are listed in the above-mentioed format.

Release Notes (v1.0.0)

  • Initial Release

Installation

gem 'dns_zone_parser'

Terminal Execution

ruby cli_rb path_to_zone_file

Methods

Initializaiton
dns_zone_parser = IdmeDNSZoneParser.new(ARGV[0])

Write to CSV File

A CSV output named parsed_dns_zone.csv can be obtained by running the following command:

dns_zone_parser = IdmeDNSZoneParser.new(ARGV[0])
dns_zone_parser.write_csv_file

Obtain an Array of Records

This gem defines a model known as a Record. The record has five attributes:

  attr_accessor :domain
  attr_accessor :time_out
  attr_accessor :class_type
  attr_accessor :record_type
  attr_accessor :ip_address

To obtain an array of all the records as Record objects in your project, run the following command

dns_zone_parser = IdmeDNSZoneParser.new(ARGV[0])
records = dns_zone_parser.parse

Credit

Created by Arthur Ariel Sabintsev for ID.me

FAQs

Package last updated on 08 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc