Documentation ¶
Overview ¶
Package netscan provides functionality for running network enumeration scans. currently the scanner provides two modes:
ModeHTTP: useful when the services needing enumeration are HTTP servers, and a traditional portscan would fail
ModeTCP: a traditional portscan using DialWithTimeout. this performs a full-connect scan of the target.
Index ¶
Constants ¶
const ( /* ModeHTTP refers to a scanning mode that uses HTTP requests/responses to determine if a port is open and serving HTTP content, useful in a situation (like we've run into here) where an IP may report all ports open, but you are interested in locating particular HTTP service. */ ModeHTTP = "http" /* ModeTCP refers to a more traditional mode of port scan that uses tcp connections to determine if a port is open */ ModeTCP = "tcp" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mode ¶
type Mode string
Mode is a string alias to refer to the currently supported scanner modes
type Option ¶
type Option func(*ScanJob)
Option is a type alias for a function that takes a ScanJob reference and modifies it
type ScanJob ¶
type ScanJob struct {
// contains filtered or unexported fields
}
ScanJob describes a run of a particular scanner. jobs can consist of multiple
hosts and ports and will produce a scan of all combinations.
func New ¶
New returns a *ScanJob configured with a list of hosts, ports, and any
additional options. for synchronization, a semaphore is initialized with the value 256, which is intended to govern the number of open file handles that a scanner can make at a time. this value was chosen by running a ulimit command on a macbook, and seemed okay to us...
type Scanner ¶
type Scanner interface { /* Scan accepts an address in the format of <host>:<port> and returns whether or not that port is open. the method by which it determines this is up to the implementation of the interface. */ Scan(addr string, timeout time.Duration) bool }
Scanner provides an abstraction for various network scanning methods.