Documentation
¶
Index ¶
- Constants
- Variables
- func Add2Naabubuffer(target string)
- func DefaultResumeFilePath() string
- func ParsePorts(options *Options) ([]int, error)
- func WriteCsvOutput(host, ip string, ports map[int]struct{}, header bool, writer io.Writer) error
- func WriteHostOutput(host string, ports map[int]struct{}, writer io.Writer) error
- func WriteJSONOutput(host, ip string, ports map[int]struct{}, writer io.Writer) error
- type OnResultCallback
- type Options
- type Result
- type ResumeCfg
- type Runner
- func (r *Runner) AddTarget(target string) error
- func (r *Runner) BackgroundWorkers()
- func (r *Runner) Close()
- func (r *Runner) ConnectVerification()
- func (r *Runner) DoDns(target string)
- func (r *Runner) DoDns2Ips(target string) []string
- func (r *Runner) DoSsl(target string) []string
- func (r *Runner) DoTargets() (bool, error)
- func (r *Runner) Httpxrun() error
- func (r *Runner) Load() error
- func (r *Runner) MergeToFile() (string, error)
- func (r *Runner) PickIP(targets []*net.IPNet, index int64) string
- func (r *Runner) PickPort(index int) int
- func (r *Runner) PickSubnetIP(network *net.IPNet, index int64) string
- func (r *Runner) PreProcessTargets() error
- func (r *Runner) RawSocketEnumeration(ip string, port int)
- func (r *Runner) RunEnumeration() error
- func (r *Runner) SetSourceIPAndInterface() error
- func (r *Runner) ShowScanResultOnExit()
Constants ¶
const ( DefaultPortTimeoutSynScan = 1000 DefaultPortTimeoutConnectScan = 3000 DefaultRateSynScan = 1000 DefaultRateConnectScan = 2000 DefaultRetriesSynScan = 3 DefaultRetriesConnectScan = 3 ExternalTargetForTune = "8.8.8.8" SynScan = "s" ConnectScan = "c" DefautStatsInterval = 5 )
const ( Full = "1-65535" Httpports = "" /* 375-byte string literal not displayed */ NmapTop100 = "" /* 393-byte string literal not displayed */ NmapTop1000 = "" /* 3813-byte string literal not displayed */ )
List of default ports
Variables ¶
var Naabubuffer = bytes.Buffer{}
var NumberOfCsvFieldsErr = errors.New("exported fields don't match csv tags")
Functions ¶
func Add2Naabubuffer ¶
func Add2Naabubuffer(target string)
func DefaultResumeFilePath ¶
func DefaultResumeFilePath() string
func ParsePorts ¶
ParsePorts parses the list of ports and creates a port map
func WriteCsvOutput ¶
WriteCsvOutput writes the output list of subdomain in csv format to an io.Writer
func WriteHostOutput ¶
WriteHostOutput writes the output list of host ports to an io.Writer
Types ¶
type OnResultCallback ¶
OnResultCallback (hostname, ip, ports)
type Options ¶
type Options struct {
Verbose bool // Verbose flag indicates whether to show verbose output or not
NoColor bool // No-Color disables the colored output
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
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
Debug bool // Prints out debug information
ExcludeCDN bool // Excludes ip of knows CDN ranges for full port scan
Nmap bool // Invoke nmap detailed scan on results
InterfacesList bool // InterfacesList show interfaces list
Retries int // Retries is the number of retries for the port
Rate int // Rate is the rate of port scan requests
Timeout int // Timeout is the seconds to wait for ports to respond
WarmUpTime int // WarmUpTime between scan phases
Host goflags.NormalizedStringSlice // Host is the single host or comma-separated list of hosts 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.
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
ExcludeIps string // Ips or cidr to be excluded from the scan
ExcludeIpsFile string // File containing Ips or cidr to exclude from the scan
TopPorts string // Tops ports to scan
SourceIP string // SourceIP to use in TCP packets
Interface string // Interface to use for TCP packets
ConfigFile string // Config file contains a scan configuration
NmapCLI string // Nmap command (has priority over config file)
Threads int // Internal worker threads
EnableProgressBar bool // Enable progress bar
ScanAllIPS bool // Scan all the ips
ScanType string // Scan Type
Proxy string // Socks5 proxy
Resolvers string // Resolvers (comma separated or file)
OnResult OnResultCallback // OnResult callback
CSV bool
StatsInterval int // StatsInterval is the number of seconds to display stats after
Resume bool
ResumeCfg *ResumeCfg
Stream bool
Passive bool
//
CeyeApi string
CeyeDomain string
NoPOC bool
// 更新
Update bool
// contains filtered or unexported fields
}
Options contains the configuration options for tuning the port enumeration process. nolint:maligned // just an option structure
func ParseOptions ¶
func ParseOptions() *Options
ParseOptions parses the command line flags provided by a user
func (*Options) ShouldLoadResume ¶
ShouldLoadResume resume file
type Result ¶
type Result struct {
Host string `json:"host,omitempty" csv:"host"`
IP string `json:"ip,omitempty" csv:"ip"`
Port int `json:"port" csv:"port"`
TimeStamp time.Time `json:"timestamp" csv:"timestamp"`
}
Result contains the result for a host
func (*Result) CSVHeaders ¶
type ResumeCfg ¶
type ResumeCfg struct {
sync.RWMutex
Retry int `json:"retry"`
Seed int64 `json:"seed"`
Index int64 `json:"index"`
}
ResumeCfg contains the scan progression
func NewResumeCfg ¶
func NewResumeCfg() *ResumeCfg
NewResumeCfg creates a new scan progression structure
func (*ResumeCfg) CleanupResumeConfig ¶
func (resumeCfg *ResumeCfg) CleanupResumeConfig()
CleanupResumeConfig cleaning up the config file
func (*ResumeCfg) ConfigureResume ¶
ConfigureResume read the resume config file
func (*ResumeCfg) SaveResumeConfig ¶
SaveResumeConfig to file
func (*ResumeCfg) ShouldSaveResume ¶
ShouldSaveResume file
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) BackgroundWorkers ¶
func (r *Runner) BackgroundWorkers()
func (*Runner) ConnectVerification ¶
func (r *Runner) ConnectVerification()
func (*Runner) MergeToFile ¶
func (*Runner) PreProcessTargets ¶
func (*Runner) RawSocketEnumeration ¶
func (*Runner) RunEnumeration ¶
RunEnumeration runs the ports enumeration flow on the targets specified
func (*Runner) SetSourceIPAndInterface ¶
func (*Runner) ShowScanResultOnExit ¶
func (r *Runner) ShowScanResultOnExit()