Documentation
¶
Index ¶
- Constants
- func AssertSiteName(config *Config) bool
- func CIDRToIPs(cidrAddress string, iparr *IPArray, wg *sync.WaitGroup)
- func Copy(srcPath, dstPath string) (err error)
- func GetIPs(config *Config) []string
- func Run(config *Config)
- type Config
- type IPArray
- type ScanRecord
- type ScanRecordArray
- type ScanResult
- type Site
Constants ¶
View Source
const ( ErrorConnRefused = "connection refused" ErrorTimeout = "connection timed out" )
Variables ¶
This section is empty.
Functions ¶
func AssertSiteName ¶ added in v0.2.0
Types ¶
type Config ¶
type Config struct {
General struct {
Site string
Debug bool
Workers int
ScannedLimit int
FoundLimit int
}
Ping struct {
Protocol string
Port uint16
Count int
Timeout time.Duration
// contains filtered or unexported fields
}
HTTP struct {
Port uint16
Count int
Timeout time.Duration
// contains filtered or unexported fields
}
Sites []Site
}
type ScanRecord ¶
type ScanRecord struct {
IP string `json:"ip"` // ip:port
Protocol string `json:"protocol"` // icmp, tcp, udp
PingRTT float64 `json:"pingrtt"` // response latency in milliseconds: 9999999 indicates timeout, -1 indicates unreachable, 0 general error.
HttpRTT float64 `json:"httprtt"` // response latency in milliseconds: 9999999 indicates timeout, -1 indicates unreachable, 0 general error.
}
type ScanRecordArray ¶
type ScanRecordArray []*ScanRecord
func (*ScanRecordArray) Len ¶
func (records *ScanRecordArray) Len() int
func (*ScanRecordArray) Less ¶
func (records *ScanRecordArray) Less(i, j int) bool
func (*ScanRecordArray) Swap ¶
func (records *ScanRecordArray) Swap(i, j int)
type ScanResult ¶
type ScanResult struct {
// contains filtered or unexported fields
}
func (*ScanResult) AddRecord ¶
func (result *ScanResult) AddRecord(record *ScanRecord)
func (*ScanResult) Found ¶
func (result *ScanResult) Found() int
func (*ScanResult) IncScanCounter ¶
func (result *ScanResult) IncScanCounter()
func (*ScanResult) Scanned ¶
func (result *ScanResult) Scanned() int
type Site ¶ added in v0.2.0
type Site struct {
Name string
IPRangesAPI string
IPRangesFile string
CustomIPRangesFile string
IPOutputFile string
WithIPv6 bool
HttpsURL string
Domains []string
}
func RetrieveSiteCfg ¶ added in v0.2.0
RetrieveSiteCfg assumed that the site name must exist in the configuration file and no error handling required
Click to show internal directories.
Click to hide internal directories.