Documentation
¶
Index ¶
- func EnableDebug() func(*Scanner)
- func SetConfigPath(config string) func(*Scanner)
- func SetParamExclude(excludes ...string) func(*Scanner)
- func SetParamInterface(eth string) func(*Scanner)
- func SetParamPorts(ports ...string) func(*Scanner)
- func SetParamRate(maxRate int) func(*Scanner)
- func SetParamTargets(targets ...string) func(*Scanner)
- func SetParamTopPorts() func(*Scanner)
- func SetParamWait(delay int) func(*Scanner)
- func SetSeed(x int) func(*Scanner)
- func SetShard(x int, y int) func(*Scanner)
- type Option
- type Scanner
- func (s *Scanner) GetPid() int
- func (s *Scanner) GetStderr() bufio.Scanner
- func (s *Scanner) GetStdout() bufio.Scanner
- func (s *Scanner) PauseAsync(resumefp string) error
- func (s *Scanner) ResumeAsync(resumefp string) error
- func (s *Scanner) Run() (result *tools.MasscanResult, warnings []string, err error)
- func (s *Scanner) RunAsync() error
- func (s *Scanner) Wait() error
- type ScannerResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableDebug ¶
func EnableDebug() func(*Scanner)
EnableDebug set debug mode is true eg:C:\masscan\masscan.exe 146.56.202.100/24 -p 80,8000-8100 --rate=10000 -oJ -
func SetConfigPath ¶
SetConfigPath set the scanner config-file path eg: --conf /etc/masscan/masscan.conf
func SetParamExclude ¶
SetParamExclude sets the targets which to exclude from the scan, this also allows scanning of range 0.0.0.0/0 eg: 127.0.0.1,255.255.255.255
func SetParamInterface ¶
SetParamPorts sets the ports which the scanner should scan on each host. eg: -p 80,8000-8100
func SetParamPorts ¶
SetParamPorts sets the ports which the scanner should scan on each host. eg: -p 80,8000-8100
func SetParamRate ¶
SetParamRate set the rate masscan -p80,8000-8100 10.0.0.0/8 --rate=10000 scan some web ports on 10.x.x.x at 10kpps
func SetParamTargets ¶
SetParamTargets set the target of a scanner eg: 192.168.88.0/24 192.168.88.0-255 192.168.88.0.255-192.168.88.255
func SetParamWait ¶
SetParamWait The waiting time after sending the packet, the default is 10 seconds --wait=10s default is 10 seconds
Types ¶
type Option ¶
type Option func(*Scanner)
func WithContext ¶
WithContext adds a context to a scanner, to make it cancellable and able to timeout.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner ...
func NewScanner ¶
NewScanner Create a new Scanner, and can take options to apply to the scanner
func (*Scanner) PauseAsync ¶
Pauses the masscan proccess by sending a control-c signal to the proccess the proccess can then be resumed by calling Resume
func (*Scanner) ResumeAsync ¶
NB: there is a bug in the latest release of masscan that will lead to this feature not working but if you build masscan from source, you shouldn't experience any issues.
type ScannerResult ¶
func ParseResult ¶
func ParseResult(content []byte) (sr ScannerResult)