parser

package
v0.0.0-...-4b843af Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "0.2.1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ProjectsPath string `yaml:"projects_path"`
	PortsXMLFile string `yaml:"ports_xml,omitempty"`
	HostMapping  string `yaml:"host_mapping,omitempty"`
}

type Host

type Host struct {
	IP              string    `json:"ip"`
	Name            string    `json:"hostname"`
	Services        []Service `json:"services"`
	AssociatedNames []string  `json:"associatedNames"`
}

func GetAllHostEntries

func GetAllHostEntries(document *xmlquery.Node, key string) []Host

type NmapParser

type NmapParser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(options *Options) (*NmapParser, error)

func (*NmapParser) Parse

func (p *NmapParser) Parse() error

type Options

type Options struct {
	SettingsFile string
	Project      string
	ServiceJSON  bool
	HTTPDomains  bool
	All          bool
	BaseFolder   string
	Silent       bool
	Version      bool
	NoColor      bool
	Verbose      bool
}

func ParseOptions

func ParseOptions() *Options

ParseOptions parses the command line flags provided by a user

type Project

type Project struct {
	Name string `yaml:"name"`
}

type Service

type Service struct {
	Number      int    `json:"port"`
	Protocol    string `json:"protocol"`
	Name        string `json:"name"`
	State       string `json:"state"`
	Product     string `json:"product,omitempty"`
	Description string `json:"description,omitempty"`
	OS          string `json:"ostype,omitempty"`
}

Jump to

Keyboard shortcuts

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