scan

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2022 License: GPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPorts = []int{21, 22, 23, 25, 80, 443, 8080, 110, 135, 139, 445, 389, 489, 587, 1433, 1434, 1521, 1522, 1723, 2121, 3000, 3306, 3389, 4899, 5631, 5632, 5800, 5900, 7071, 43958, 65500, 4444, 8888, 6789, 4848, 5985, 5986, 8081, 8089, 8443, 10000, 6379, 7001, 7002}

Functions

func CheckPort

func CheckPort(ip net.IP, port int)

func ConvertToString

func ConvertToString(src string, srcCode string, tagCode string) string

func DecodeData

func DecodeData(s string) ([]byte, error)

func DecodePattern

func DecodePattern(s string) ([]byte, error)

func GetProbes

func GetProbes(aliveHosts []string)

func NewSizeWG

func NewSizeWG(size int) *sizeWG

func PortCheck

func PortCheck(host string, port int) (result bool)

func PortIsOpen

func PortIsOpen(ip net.IP, port int) (result bool, err error)

func Scan

func Scan(host []string)

func ScanAllPort

func ScanAllPort(host string) []string

func ScanPort2

func ScanPort2(host string)

func TaskPort

func TaskPort(ip string, debugLog *log.Logger)

func TcpPort

func TcpPort(host string, port int) bool

func Worker

func Worker(tasksCh <-chan int, wg *sync.WaitGroup, ips string)

func WriteResult

func WriteResult(host []string)

Types

type Directive

type Directive struct {
	DirectiveName string
	Flag          string
	Delimiter     string
	DirectiveStr  string
}

type Extras

type Extras struct {
	VendorProduct   string
	Version         string
	Info            string
	Hostname        string
	OperatingSystem string
	DeviceType      string
	CPE             string
	Sign            string
	StatusCode      int
	ServiceURL      string
}

type HttpInfo

type HttpInfo struct {
	ServiceURL   string
	StatusCode   int
	ServerBanner string
	ServerSign   string
}

type Match

type Match struct {
	IsSoft bool

	Service     string
	Pattern     string
	VersionInfo string

	PatternCompiled *regexp.Regexp
}

func (*Match) MatchPattern

func (m *Match) MatchPattern(response []byte) (matched bool)

func (*Match) ParseVersionInfo

func (m *Match) ParseVersionInfo(response []byte) Extras

type Probe

type Probe struct {
	Name     string
	Data     string
	Protocol string

	Ports    string
	SSLPorts string

	TotalWaitMS  int
	TCPWrappedMS int
	Rarity       int
	Fallback     string

	Matchs *[]Match
}

func (*Probe) ContainsPort

func (p *Probe) ContainsPort(testPort int) bool

type ProbesRarity

type ProbesRarity []Probe

func (ProbesRarity) Len

func (ps ProbesRarity) Len() int

func (ProbesRarity) Less

func (ps ProbesRarity) Less(i, j int) bool

func (ProbesRarity) Swap

func (ps ProbesRarity) Swap(i, j int)

type Result

type Result struct {
	Target
	Service

	Error string
}

type Service

type Service struct {
	Name   string
	Banner string

	Extras
}

type Target

type Target struct {
	IP       string
	Port     int
	Protocol string
}

func (*Target) GetAddress

func (t *Target) GetAddress() string

type VScan

type VScan struct {
	Exclude string

	Probes []Probe

	ProbesMapKName map[string]Probe
}

服務識別主程序

func (*VScan) Explore

func (v *VScan) Explore(addr string) (Result, error)

func (*VScan) Init

func (v *VScan) Init()

func (*VScan) Tagetsacn

func (v *VScan) Tagetsacn(addr []string, thread int)

type Workdist

type Workdist struct {
	Host string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL