Documentation ¶
Index ¶
Constants ¶
const ( DefaultPortTimeoutSynScan = 700 DefaultPortTimeoutConnectScan = 10000 DefaultRateSynScan = 1000 DefaultRateConnectScan = 1500 DefaultResolverThreads = 10 DefaultRetriesSynScan = 1 DefaultRetriesConnectScan = 3 )
const ( Full = "1-65535" NmapTop100 = "" /* 393-byte string literal not displayed */ NmapTop1000 = "" /* 3813-byte string literal not displayed */ )
List of default ports
const Version = `1.1.4`
Version is the current version of naabu
Variables ¶
This section is empty.
Functions ¶
func ParsePorts ¶
ParsePorts parses the list of ports and creates a port map
func WriteHostOutput ¶
WriteHostOutput writes the output list of host ports to an io.Writer
Types ¶
type JSONResult ¶
JSONResult contains the result for a host in JSON format
type Options ¶
type Options struct { Retries int // Retries is the number of retries for the port Rate int // Rate is the rate of port scan requests Verbose bool // Verbose flag indicates whether to show verbose output or not NoColor bool // No-Color disables the colored output Threads int // Thread controls the number of parallel host to enumerate Timeout int // Timeout is the seconds to wait for ports to respond Host string // Host is the host to find ports for HostsFile string // HostsFile is the file containing list of hosts to find port for Output string // Output is the file to write found ports to. OutputDirectory string // OutputDirectory is the directory to write results to in case list of hosts is given JSON bool // JSON specifies whether to use json for output format or text file Silent bool // Silent suppresses any extra text and only writes found host:port to screen Ports string // Ports is the ports to use for enumeration PortsFile string // PortsFile is the file containing ports to use for enumeration ExcludePorts string // ExcludePorts is the list of ports to exclude from enumeration Stdin bool // Stdin specifies whether stdin input was given to the process Verify bool // Verify is used to check if the ports found were valid using CONNECT method Version bool // Version specifies if we should just show version and exit Ping bool // Ping uses ping probes to discover fastest active host and discover dead hosts ExcludeIps string // Ips or cidr to be excluded from the scan ExcludeIpsFile string // File containing Ips or cidr to exclude from the scan Debug bool // Prints out debug information }
Options contains the configuration options for tuning the port enumeration process.
func ParseOptions ¶
func ParseOptions() *Options
ParseOptions parses the command line flags provided by a user
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is an instance of the port enumeration client used to orchestrate the whole process.
func NewRunner ¶
NewRunner creates a new runner struct instance by parsing the configuration options, configuring sources, reading lists, etc
func (*Runner) EnumerateMultipleHosts ¶
EnumerateMultipleHosts enumerates hosts for ports. We keep enumerating ports for a given host until we reach an error
func (*Runner) EnumerateSingleHost ¶
EnumerateSingleHost performs port enumeration against a single host
func (*Runner) RunEnumeration ¶
RunEnumeration runs the ports enumeration flow on the targets specified