parser

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2022 License: GPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package parser is a package for parsing massdns output format. Massdns writes output in a dig style format containing complete information about the resolved names.

Only a subset of information, more specifically Name and IP address is parsed from the output. It correctly handles CNAME record entries outputting the first name and the subsequent A records. NS records are ignored in the current implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(reader io.Reader, callback Callback) error

Parse parses the massdns output returning the found domain and ip pair to a callback function.

It's a pretty hacky solution. In future, it can and should be rewritten to handle more edge cases and stuff.

Types

type Callback

type Callback func(domain string, ip []string)

Callback is a callback function that is called by the parser returning the results found. NOTE: Callbacks are not thread safe and are blocking in nature and should be used as such.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL