https://github.com/FMotalleb/nu_plugin_port_scan
A nushell plugin for scanning ports on a target.
https://github.com/FMotalleb/nu_plugin_port_scan
nushell-plugin port-scanner
Last synced: 19 days ago
JSON representation
A nushell plugin for scanning ports on a target.
- Host: GitHub
- URL: https://github.com/FMotalleb/nu_plugin_port_scan
- Owner: FMotalleb
- License: mit
- Archived: true
- Created: 2023-11-06T08:51:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T16:33:27.000Z (2 months ago)
- Last Synced: 2025-04-01T16:27:14.740Z (20 days ago)
- Topics: nushell-plugin, port-scanner
- Language: Rust
- Homepage:
- Size: 83 KB
- Stars: 14
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nu - nu_plugin_port_scan
README
# nu_plugin_port_scan (Now Deprecated)
Latest version of nushell supported: 0.102.0
Deprecated in favor of [nu_plugin_port_extension](https://github.com/FMotalleb/nu_plugin_port_extension.git)
which will be a mix of this plugin and port list plugin
cli signature is not changedA [nushell](https://www.nushell.sh/) plugin for scanning ports on a target
Similar to `nc -vz {ip} {port} -w {timeout}` the parameters are mapped to `port scan {ip} {port} -t {timeout}`
## Examples
```bash
~> port scan 8.8.8.8 53
╭─────────┬───────────────────╮
│ address │ 8.8.8.8 │
│ port │ 53 │
│ result │ Open │
│ is_open │ true │
│ elapsed │ 140ms 965µs 400ns │
╰─────────┴───────────────────╯
``````bash
~> 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 │
╰───┴─────────┴──────┴────────┴─────────┴──────────────────╯
``````bash
~> [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 │
╰───┴─────────┴──────┴────────┴─────────┴──────────────────╯
```## Installing
* using [nupm](https://github.com/nushell/nupm)
```bash
git clone https://github.com/FMotalleb/nu_plugin_port_scan.git
nupm install --path nu_plugin_port_scan -f
```* or compile manually
```bash
git clone https://github.com/FMotalleb/nu_plugin_port_scan.git
cd nu_plugin_port_scan
cargo build
plugin add target/debug/nu_plugin_port_scan
```* or using cargo
```bash
cargo install nu_plugin_port_scan
plugin add ~/.cargo/bin/nu_plugin_port_scan
```