pkg

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckResult

type CheckResult struct {
	Success      bool
	ProtocolType ProtocolType
	Host         string
	Port         string
}

type DeliveryInfo

type DeliveryInfo struct {
	ProtocolType       ProtocolType
	Host               string
	Port               string
	User               string
	Password           string
	PrivateKeyFullPath string
	Detector           *Detector
	CheckResultChan    chan CheckResult
	Wg                 *sync.WaitGroup
}

type Detector

type Detector struct {
	// contains filtered or unexported fields
}

func NewDetector

func NewDetector(timeOut time.Duration) *Detector

func (Detector) CommonPortCheck

func (d Detector) CommonPortCheck(host, port string) error

func (Detector) FTPCheck

func (d Detector) FTPCheck(host, port string) error

func (Detector) RDPCheck

func (d Detector) RDPCheck(host, port string) error

func (Detector) SFTPCheck

func (d Detector) SFTPCheck(host, port, user, password, privateKeyFullPath string) error

func (Detector) SSHCheck

func (d Detector) SSHCheck(host, port string) error

func (Detector) TelnetCheck

func (d Detector) TelnetCheck(host, port string) error

func (Detector) VNCCheck

func (d Detector) VNCCheck(host, port string) error

type IPRangeInfo

type IPRangeInfo struct {
	Begin         net.IP
	CountNextTime int
	CICR          *cidr.CIDR
}

type InputInfo

type InputInfo struct {
	Host               string // 192.168.50.123-200
	Port               string // 80,90,100,101-120
	User               string
	Password           string
	PrivateKeyFullPath string
}

type OutputInfo

type OutputInfo struct {
	ProtocolType     ProtocolType
	SuccessMapString map[string][]string
	FailedMapString  map[string][]string
}

type ProtocolType

type ProtocolType int
const (
	RDP ProtocolType = iota + 1
	SSH
	FTP
	SFTP
	Telnet
	VNC
	Common
)

func String2ProcotolType added in v0.8.0

func String2ProcotolType(input string) ProtocolType

func (ProtocolType) String

func (p ProtocolType) String() string

type ScanTools

type ScanTools struct {
	// contains filtered or unexported fields
}

func NewScanTools

func NewScanTools(threads int, timeOut time.Duration) *ScanTools

func (ScanTools) Scan

func (s ScanTools) Scan(protocolType ProtocolType, inputInfo InputInfo, showProgressStep bool) (*OutputInfo, error)

Jump to

Keyboard shortcuts

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