netcmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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