gnc

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

gnc

golang nc tool implement nc

下载

go install github.com/jaronnie/gnc@latest

Usage

gnc -h

检查端口冲突

gnc -p 9102,3000,9100

如果存在端口冲突输出如下

$ gnc -lp 9102,3000,9100     
conflict ports: 3000,9100

检查端口冲突并且未冲突时监听端口

gnc -lp 3000,8000

gnc -lp 3000/tcp,8000/udp

curl localhost:3000
# output: success

nc -u 127.0.0.1 8000

设置存活时间(单位秒)

gnc -lp 3000,8000 -t 5

# 5s 后输出如下
get a signal quit
close network successfully

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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