Documentation ¶
Index ¶
- Constants
- Variables
- func AddressesFromCIDR(cidr string, o chan<- string)
- func IPv4Range2CIDRs(s_ip string, e_ip string) ([]string, error)
- func IPv4UIntRange2CIDRs(s_i uint32, e_i uint32) []string
- func IPv4_to_UInt(ips string) (uint32, error)
- func Info(target string)
- func PrintVersion(app string)
- func TrimName(name string) string
- func UInt_to_IPv4(ipi uint32) string
- type NetbiosInfo
- type NetbiosReplyAddress
- type NetbiosReplyHeader
- type NetbiosReplyName
- type NetbiosReplyStatus
- type Probe
- func (this *Probe) AddTarget(t string)
- func (this *Probe) CheckRateLimit()
- func (this *Probe) CloseInput()
- func (this *Probe) Initialize()
- func (this *Probe) SetLimiter(limiter *rate.Limiter)
- func (this *Probe) SetOutput(c_out chan<- ScanResult)
- func (this *Probe) Setup()
- func (this *Probe) String() string
- func (this *Probe) Wait()
- type ProbeNetbios
- func (this *ProbeNetbios) CreateNameRequest(name string) []byte
- func (this *ProbeNetbios) CreateStatusRequest() []byte
- func (this *ProbeNetbios) DecodeNetbiosName(name [32]byte) [16]byte
- func (this *ProbeNetbios) EncodeNetbiosName(name [16]byte) [32]byte
- func (this *ProbeNetbios) Initialize()
- func (this *ProbeNetbios) ParseReply(buff []byte) NetbiosReplyStatus
- func (this *ProbeNetbios) ProcessReplies()
- func (this *ProbeNetbios) ReportIncompleteResults()
- func (this *ProbeNetbios) ReportResult(ip string)
- func (this *ProbeNetbios) ResultFromIP(ip string) ScanResult
- func (this *ProbeNetbios) SendNameRequest(ip string)
- func (this *ProbeNetbios) SendRequest(ip string, req []byte)
- func (this *ProbeNetbios) SendStatusRequest(ip string)
- type Prober
- type ScanResult
Constants ¶
View Source
const MaxPendingReplies int = 256
View Source
const MaxProbeResponseTime time.Duration = time.Second * 2
Variables ¶
View Source
var IPv4_Mask_Sizes = []uint32{
2147483648,
1073741824,
536870912,
268435456,
134217728,
67108864,
33554432,
16777216,
8388608,
4194304,
2097152,
1048576,
524288,
262144,
131072,
65536,
32768,
16384,
8192,
4096,
2048,
1024,
512,
256,
128,
64,
32,
16,
8,
4,
2,
1,
}
View Source
var IPv4_Masks = map[uint32]uint32{
1: 32,
2: 31,
4: 30,
8: 29,
16: 28,
32: 27,
64: 26,
128: 25,
256: 24,
512: 23,
1024: 22,
2048: 21,
4096: 20,
8192: 19,
16384: 18,
32768: 17,
65536: 16,
131072: 15,
262144: 14,
524288: 13,
1048576: 12,
2097152: 11,
4194304: 10,
8388608: 9,
16777216: 8,
33554432: 7,
67108864: 6,
134217728: 5,
268435456: 4,
536870912: 3,
1073741824: 2,
2147483648: 1,
}
View Source
var Match_IPv4 = regexp.MustCompile(`^(?:(?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2})[.](?:25[0-5]|2[0-4][0-9]|[0-1]?[0-9]{1,2}))$`)
View Source
var Match_IPv6 = regexp.MustCompile(`^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?$`)
Functions ¶
func AddressesFromCIDR ¶
func IPv4UIntRange2CIDRs ¶
func IPv4_to_UInt ¶
func PrintVersion ¶
func PrintVersion(app string)
func UInt_to_IPv4 ¶
Types ¶
type NetbiosInfo ¶
type NetbiosInfo struct {
// contains filtered or unexported fields
}
type NetbiosReplyAddress ¶
type NetbiosReplyHeader ¶
type NetbiosReplyName ¶
type NetbiosReplyStatus ¶
type NetbiosReplyStatus struct { Header NetbiosReplyHeader HostName [15]byte UserName [15]byte Names []NetbiosReplyName Addresses []NetbiosReplyAddress HWAddr string }
type Probe ¶
type Probe struct {
// contains filtered or unexported fields
}
func (*Probe) CheckRateLimit ¶
func (this *Probe) CheckRateLimit()
func (*Probe) CloseInput ¶
func (this *Probe) CloseInput()
func (*Probe) Initialize ¶
func (this *Probe) Initialize()
func (*Probe) SetLimiter ¶
func (*Probe) SetOutput ¶
func (this *Probe) SetOutput(c_out chan<- ScanResult)
type ProbeNetbios ¶
type ProbeNetbios struct { Probe // contains filtered or unexported fields }
func (*ProbeNetbios) CreateNameRequest ¶
func (this *ProbeNetbios) CreateNameRequest(name string) []byte
func (*ProbeNetbios) CreateStatusRequest ¶
func (this *ProbeNetbios) CreateStatusRequest() []byte
func (*ProbeNetbios) DecodeNetbiosName ¶
func (this *ProbeNetbios) DecodeNetbiosName(name [32]byte) [16]byte
func (*ProbeNetbios) EncodeNetbiosName ¶
func (this *ProbeNetbios) EncodeNetbiosName(name [16]byte) [32]byte
func (*ProbeNetbios) Initialize ¶
func (this *ProbeNetbios) Initialize()
func (*ProbeNetbios) ParseReply ¶
func (this *ProbeNetbios) ParseReply(buff []byte) NetbiosReplyStatus
func (*ProbeNetbios) ProcessReplies ¶
func (this *ProbeNetbios) ProcessReplies()
func (*ProbeNetbios) ReportIncompleteResults ¶
func (this *ProbeNetbios) ReportIncompleteResults()
func (*ProbeNetbios) ReportResult ¶
func (this *ProbeNetbios) ReportResult(ip string)
func (*ProbeNetbios) ResultFromIP ¶
func (this *ProbeNetbios) ResultFromIP(ip string) ScanResult
func (*ProbeNetbios) SendNameRequest ¶
func (this *ProbeNetbios) SendNameRequest(ip string)
func (*ProbeNetbios) SendRequest ¶
func (this *ProbeNetbios) SendRequest(ip string, req []byte)
func (*ProbeNetbios) SendStatusRequest ¶
func (this *ProbeNetbios) SendStatusRequest(ip string)
Click to show internal directories.
Click to hide internal directories.