#端口扫描 #nushell插件 #开放端口 #nushell #网络 #插件

app nu_plugin_port_scan

用于在目标上扫描端口的nushell插件

5个稳定版本

1.0.10 2024年2月12日
1.0.3 2023年11月15日
1.0.2 2023年11月6日

网络编程中排名第1746

每月下载量34

MIT许可和可能CC-PDDC

18KB
191 代码行

nu_plugin_port_scan

用于在目标上扫描端口的nushell插件

类似于nc -vz {ip} {port} -w {timeout},参数映射到port scan {ip} {port} -t {timeout}

示例

~> port scan 8.8.8.8 53
╭─────────┬───────────────────╮
 address │ 8.8.8.8           │
 port    │ 53                │
 result  │ Open              │
 is_open │ true              │
 elapsed │ 140ms 965µs 400ns │
╰─────────┴───────────────────╯
~> 50..60 | par-each { |it| port scan 8.8.8.8 $it -t 100ms } |  where is_open | collect { $in }
╭───┬─────────┬──────┬────────┬─────────┬──────────────────╮
# │ address │ port │ result │ is_open │     elapsed      │
├───┼─────────┼──────┼────────┼─────────┼──────────────────┤
│ 0 │ 8.8.8.8 │   53 │ Open   │ true    │ 39ms 704µs 200ns │
╰───┴─────────┴──────┴────────┴─────────┴──────────────────╯
~> [8.8.8.8, 1.1.1.1, 1.0.0.1, 4.2.2.4] | par-each { |it| port scan $it 53 -t 1sec } |  where is_open | collect { $in } | sort-by elapsed
╭───┬─────────┬──────┬────────┬─────────┬──────────────────╮
# │ address │ port │ result │ is_open │     elapsed      │
├───┼─────────┼──────┼────────┼─────────┼──────────────────┤
│ 0 │ 8.8.8.8 │   53 │ Open   │ true    │ 40ms 519µs 900ns │
│ 1 │ 1.0.0.1 │   53 │ Open   │ true    │ 93ms 471µs 500ns │
│ 2 │ 4.2.2.4 │   53 │ Open   │ true    │       97ms 130µs │
│ 3 │ 1.1.1.1 │   53 │ Open   │ true    │ 99ms 867µs 500ns │
╰───┴─────────┴──────┴────────┴─────────┴──────────────────╯

安装

git clone https://github.com/FMotalleb/nu_plugin_port_scan.git
nupm install --path nu_plugin_port_scan -f
  • 或手动编译
git clone https://github.com/FMotalleb/nu_plugin_port_scan.git
cd nu_plugin_port_scan
cargo build
register target/debug/nu_plugin_port_scan
  • 或使用cargo
cargo install nu_plugin_port_scan
register  ~/.cargo/bin/nu_plugin_port_scan

依赖项

~14–44MB
~676K SLoC