parser

package
v0.0.0-...-400795e Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

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