netcmd

package
v0.0.0-...-10fbe9a Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NetCmd = &gcli.Command{
	Name: "net",
	Desc: "Network related commands. ping, telnet ... etc.",
	Subs: []*gcli.Command{
		NewPingCmd(),
		NewNMapCmd(),
		NewNetcatCmd(),
		NewTelnetClientCmd(),
		NewTelnetServerCmd(),
		sshcmd.NewSshExecCmd(),
		sshcmd.NewSshClientCmd(),
	},
}

NetCmd 网络工具命令

Functions

func NewNMapCmd

func NewNMapCmd() *gcli.Command

NewNMapCmd 实现nmap扫描 tcp 工具命令

func NewNetcatCmd

func NewNetcatCmd() *gcli.Command

NewNetcatCmd 实现linux nc(netcat) 工具命令

Linux nc:

# 监听TCP端口
nc -l 8080
# 监听UDP端口
nc -ul 53

# 连接到远程TCP端口
nc example.com 80
# 连接到远程UDP端口
nc -u example.com 53

func NewPingCmd

func NewPingCmd() *gcli.Command

NewPingCmd 实现ping工具命令,增强支持多个IP和网段检测

func NewTelnetClientCmd

func NewTelnetClientCmd() *gcli.Command

NewTelnetClientCmd creates a new Telnet client cmd

func NewTelnetServerCmd

func NewTelnetServerCmd() *gcli.Command

NewTelnetServerCmd creates a new TelnetServerCmd

Types

type NetcatOptions

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

NetcatOptions netcat命令选项

type PortScanResult

type PortScanResult struct {
	Port    int
	State   string
	Service string
	Reason  string
}

PortScanResult 端口扫描结果

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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