Documentation ¶
Index ¶
- Variables
- func CustomPscan(host string, timeout time.Duration, gt int64, rgscan []int, udpmsg []byte, ...)
- func DetectWeb(addr string, port int) (string, error)
- func GetHosts(cidr string) ([]string, error)
- func PingHost(addr string, blackout int) (*net.IPAddr, time.Duration, error)
- func SendARP(ip net.IP) (net.HardwareAddr, error)
- type CustomScanTCP
- type CustomScanUDP
- type PortType
- type PoutComming
- type ScanResults
- type Weighted
Constants ¶
This section is empty.
Variables ¶
var ( // StopChan stop all procces StopChan = make(chan struct{}, 8) // PauseChan pause all goroutins PauseChan = make(chan struct{}, 16) // ContChan makes all goroutins continue ContChan = make(chan struct{}, 16) )
Functions ¶
func CustomPscan ¶
func CustomPscan(host string, timeout time.Duration, gt int64, rgscan []int, udpmsg []byte, contype bool, ch chan<- ScanResults)
CustomPscan start port scanning tcp or udp (or both) for port mapper tool
Types ¶
type CustomScanTCP ¶
CustomScanTCP struct type for tcp scan
func (CustomScanTCP) SigPort ¶
func (CustomScanTCP) SigPort() string
SigPort return port protocol type
func (CustomScanTCP) StatInfo ¶
func (p CustomScanTCP) StatInfo() (bool, int)
StatInfo returns stat and port number
type CustomScanUDP ¶
CustomScanUDP struct type for udp scan
func (CustomScanUDP) SigPort ¶
func (CustomScanUDP) SigPort() string
SigPort return port protocol type
func (CustomScanUDP) StatInfo ¶
func (p CustomScanUDP) StatInfo() (bool, int)
StatInfo returns stat and port number
type PoutComming ¶
PoutComming struct to return scanning resualts
func StartPscan ¶
StartPscan start port scanning tcp or udp (or both)
type ScanResults ¶
ScanResults implement CustomScanTCP and CustomScanUDP
type Weighted ¶
type Weighted struct {
// contains filtered or unexported fields
}
Weighted provides a way to bound concurrent access to a resource. The callers can request access with a given weight.
func NewWeighted ¶
NewWeighted creates a new weighted semaphore with the given maximum combined weight for concurrent access.
func (*Weighted) Acquire ¶
Acquire acquires the semaphore with a weight of n, blocking until resources are available or ctx is done. On success, returns nil. On failure, returns ctx.Err() and leaves the semaphore unchanged.
If ctx is already done, Acquire may still succeed without blocking.
func (*Weighted) AcquireSnix ¶
AcquireSnix same as Acquire but with a custom channel to puase runing opration Change By Snix.IR, for orginal package please see golang.org/x/sync/semaphore
func (*Weighted) TryAcquire ¶
TryAcquire acquires the semaphore with a weight of n without blocking. On success, returns true. On failure, returns false and leaves the semaphore unchanged.