Versions in this module Expand all Collapse all v1 v1.0.0 Nov 30, 2019 Changes in this version + var ErrNmapNotInstalled = errors.New("nmap binary was not found") + var ErrParseOutput = errors.New("unable to parse nmap output, see warnings for details") + var ErrResolveName = errors.New("nmap could not resolve a name") + var ErrScanTimeout = errors.New("nmap scan timed out") + func WithACKDiscovery(ports ...string) func(*Scanner) + func WithACKScan() func(*Scanner) + func WithASCIIData(data string) func(*Scanner) + func WithAggressiveScan() func(*Scanner) + func WithAppendOutput() func(*Scanner) + func WithBadSum() func(*Scanner) + func WithBinaryPath(binaryPath string) func(*Scanner) + func WithConnectScan() func(*Scanner) + func WithConsecutivePortScanning() func(*Scanner) + func WithContext(ctx context.Context) func(*Scanner) + func WithCustomArguments(args ...string) func(*Scanner) + func WithCustomDNSServers(dnsServers ...string) func(*Scanner) + func WithDataDir(directoryPath string) func(*Scanner) + func WithDataLength(length int) func(*Scanner) + func WithDebugging(level int) func(*Scanner) + func WithDecoys(decoys ...string) func(*Scanner) + func WithDefaultScript() func(*Scanner) + func WithDisabledDNSResolution() func(*Scanner) + func WithFTPBounceScan(FTPRelayHost string) func(*Scanner) + func WithFastMode() func(*Scanner) + func WithFilterHost(hostFilter func(Host) bool) func(*Scanner) + func WithFilterPort(portFilter func(Port) bool) func(*Scanner) + func WithForcedDNSResolution() func(*Scanner) + func WithFragmentPackets() func(*Scanner) + func WithHexData(data string) func(*Scanner) + func WithHostTimeout(timeout time.Duration) func(*Scanner) + func WithICMPEchoDiscovery() func(*Scanner) + func WithICMPNetMaskDiscovery() func(*Scanner) + func WithICMPTimestampDiscovery() func(*Scanner) + func WithIPOptions(options string) func(*Scanner) + func WithIPProtocolPingDiscovery(protocols ...string) func(*Scanner) + func WithIPProtocolScan() func(*Scanner) + func WithIPTimeToLive(ttl int16) func(*Scanner) + func WithIPv6Scanning() func(*Scanner) + func WithIdleScan(zombieHost string, probePort int) func(*Scanner) + func WithInitialRTTTimeout(roundTripTime time.Duration) func(*Scanner) + func WithInterface(iface string) func(*Scanner) + func WithInterfaceList() func(*Scanner) + func WithListScan() func(*Scanner) + func WithMTU(offset int) func(*Scanner) + func WithMaimonScan() func(*Scanner) + func WithMaxHostgroup(size int) func(*Scanner) + func WithMaxParallelism(probes int) func(*Scanner) + func WithMaxRTTTimeout(roundTripTime time.Duration) func(*Scanner) + func WithMaxRate(packetsPerSecond int) func(*Scanner) + func WithMaxRetries(tries int) func(*Scanner) + func WithMaxScanDelay(timeout time.Duration) func(*Scanner) + func WithMinHostgroup(size int) func(*Scanner) + func WithMinParallelism(probes int) func(*Scanner) + func WithMinRTTTimeout(roundTripTime time.Duration) func(*Scanner) + func WithMinRate(packetsPerSecond int) func(*Scanner) + func WithMostCommonPorts(number int) func(*Scanner) + func WithNoStylesheet() func(*Scanner) + func WithOSDetection() func(*Scanner) + func WithOSScanGuess() func(*Scanner) + func WithOSScanLimit() func(*Scanner) + func WithOpenOnly() func(*Scanner) + func WithPacketTrace() func(*Scanner) + func WithPingScan() func(*Scanner) + func WithPortExclusions(ports ...string) func(*Scanner) + func WithPortRatio(ratio float32) func(*Scanner) + func WithPorts(ports ...string) func(*Scanner) + func WithPrivileged() func(*Scanner) + func WithProxies(proxies ...string) func(*Scanner) + func WithRandomTargets(randomTargets int) func(*Scanner) + func WithReason() func(*Scanner) + func WithResumePreviousScan(filePath string) func(*Scanner) + func WithSCTPCookieEchoScan() func(*Scanner) + func WithSCTPDiscovery(ports ...string) func(*Scanner) + func WithSCTPInitScan() func(*Scanner) + func WithSYNDiscovery(ports ...string) func(*Scanner) + func WithSYNScan() func(*Scanner) + func WithScanDelay(timeout time.Duration) func(*Scanner) + func WithScriptArguments(arguments map[string]string) func(*Scanner) + func WithScriptArgumentsFile(inputFilePath string) func(*Scanner) + func WithScriptTrace() func(*Scanner) + func WithScriptUpdateDB() func(*Scanner) + func WithScripts(scripts ...string) func(*Scanner) + func WithSendEthernet() func(*Scanner) + func WithSendIP() func(*Scanner) + func WithServiceInfo() func(*Scanner) + func WithSkipHostDiscovery() func(*Scanner) + func WithSourcePort(port int16) func(*Scanner) + func WithSpoofIPAddress(ip string) func(*Scanner) + func WithSpoofMAC(argument string) func(*Scanner) + func WithStatsEvery(interval string) func(*Scanner) + func WithStylesheet(stylesheetPath string) func(*Scanner) + func WithSystemDNS() func(*Scanner) + func WithTCPFINScan() func(*Scanner) + func WithTCPNullScan() func(*Scanner) + func WithTCPScanFlags(flags ...TCPFlag) func(*Scanner) + func WithTCPXmasScan() func(*Scanner) + func WithTargetExclusion(target string) func(*Scanner) + func WithTargetExclusionInput(inputFileName string) func(*Scanner) + func WithTargetInput(inputFileName string) func(*Scanner) + func WithTargets(targets ...string) func(*Scanner) + func WithTimingTemplate(timing Timing) func(*Scanner) + func WithTraceRoute() func(*Scanner) + func WithUDPDiscovery(ports ...string) func(*Scanner) + func WithUDPScan() func(*Scanner) + func WithUnprivileged() func(*Scanner) + func WithVerbosity(level int) func(*Scanner) + func WithVersionAll() func(*Scanner) + func WithVersionIntensity(intensity int16) func(*Scanner) + func WithVersionLight() func(*Scanner) + func WithVersionTrace() func(*Scanner) + func WithWebXML() func(*Scanner) + func WithWindowScan() func(*Scanner) + type Address struct + Addr string + AddrType string + Vendor string + func (a Address) String() string + type CPE string + type Debugging struct + Level int + type Distance struct + Value int + type Element struct + Key string + Value string + type ExtraPort struct + Count int + Reasons []Reason + State string + type Finished struct + Elapsed float32 + ErrorMsg string + Exit string + Summary string + Time Timestamp + TimeStr string + type Hop struct + Host string + IPAddr string + RTT string + TTL float32 + type Host struct + Addresses []Address + Comment string + Distance Distance + EndTime Timestamp + ExtraPorts []ExtraPort + HostScripts []Script + Hostnames []Hostname + IPIDSequence IPIDSequence + OS OS + Ports []Port + Smurfs []Smurf + StartTime Timestamp + Status Status + TCPSequence TCPSequence + TCPTSSequence TCPTSSequence + Times Times + Trace Trace + Uptime Uptime + type HostStats struct + Down int + Total int + Up int + type Hostname struct + Name string + Type string + func (h Hostname) String() string + type IPIDSequence Sequence + type OS struct + Fingerprints []OSFingerprint + Matches []OSMatch + PortsUsed []PortUsed + type OSClass struct + Accuracy int + CPEs []CPE + Family string + OSGeneration string + Type string + Vendor string + func (o OSClass) OSFamily() family.OSFamily + type OSFingerprint struct + Fingerprint string + type OSMatch struct + Accuracy int + Classes []OSClass + Line int + Name string + type Owner struct + Name string + func (o Owner) String() string + type Port struct + ID uint16 + Owner Owner + Protocol string + Scripts []Script + Service Service + State State + func (p Port) Status() PortStatus + type PortStatus string + const Closed + const Filtered + const Open + const Unfiltered + type PortUsed struct + ID int + Proto string + State string + type Reason struct + Count int + Reason string + type Run struct + Args string + Debugging Debugging + Hosts []Host + NmapErrors []string + PostScripts []Script + PreScripts []Script + ProfileName string + ScanInfo ScanInfo + Scanner string + Start Timestamp + StartStr string + Stats Stats + Targets []Target + TaskBegin []Task + TaskEnd []Task + TaskProgress []TaskProgress + Verbose Verbose + Version string + XMLName xml.Name + XMLOutputVersion string + func Parse(content []byte) (*Run, error) + func (r Run) ToFile(filePath string) error + func (r Run) ToReader() io.Reader + type ScanInfo struct + NumServices int + Protocol string + ScanFlags string + Services string + Type string + type ScanRunner interface + Run func() (result *Run, warnings []string, err error) + type Scanner struct + func NewScanner(options ...func(*Scanner)) (*Scanner, error) + func (s *Scanner) GetStderr() bufio.Scanner + func (s *Scanner) GetStdout() bufio.Scanner + func (s *Scanner) Run() (result *Run, warnings []string, err error) + func (s *Scanner) RunAsync() error + func (s *Scanner) Wait() error + type Script struct + Elements []Element + ID string + Output string + Tables []Table + type Sequence struct + Class string + Values string + type Service struct + CPEs []CPE + Configuration int + DeviceType string + ExtraInfo string + HighVersion string + Hostname string + LowVersion string + Method string + Name string + OSType string + Product string + Proto string + RPCNum string + ServiceFP string + Tunnel string + Version string + func (s Service) String() string + type Smurf struct + Responses string + type State struct + Reason string + ReasonIP string + ReasonTTL float32 + State string + func (s State) String() string + type Stats struct + Finished Finished + Hosts HostStats + type Status struct + Reason string + ReasonTTL float32 + State string + func (s Status) String() string + type TCPFlag int + const FlagACK + const FlagCWR + const FlagECE + const FlagFIN + const FlagNS + const FlagNULL + const FlagPSH + const FlagRST + const FlagSYN + const FlagURG + type TCPSequence struct + Difficulty string + Index int + Values string + type TCPTSSequence Sequence + type Table struct + Elements []Element + Key string + Tables []Table + type Target struct + Reason string + Specification string + Status string + type Task struct + ExtraInfo string + Task string + Time Timestamp + type TaskProgress struct + Etc Timestamp + Percent float32 + Remaining int + Task string + Time Timestamp + type Times struct + RTT string + SRTT string + To string + type Timestamp time.Time + func (t *Timestamp) ParseTime(s string) error + func (t *Timestamp) UnmarshalJSON(b []byte) error + func (t *Timestamp) UnmarshalXMLAttr(attr xml.Attr) (err error) + func (t Timestamp) FormatTime() string + func (t Timestamp) MarshalJSON() ([]byte, error) + func (t Timestamp) MarshalXMLAttr(name xml.Name) (xml.Attr, error) + type Timing int16 + const TimingAggressive + const TimingFastest + const TimingNormal + const TimingPolite + const TimingSlowest + const TimingSneaky + type Trace struct + Hops []Hop + Port int + Proto string + type Uptime struct + Lastboot string + Seconds int + type Verbose struct + Level int