Crates.io | nexuslab_port_sniffer |
lib.rs | nexuslab_port_sniffer |
version | 0.2.1 |
source | src |
created_at | 2023-08-24 04:43:39.308125 |
updated_at | 2024-03-31 07:34:50.124149 |
description | A port sniffer written in Rust |
homepage | |
repository | https://github.com/nexus-lab-org/port-sniffer |
max_upload_size | |
id | 953270 |
size | 38,888 |
Port Sniffer is a command-line tool built with Rust that helps you find all the open ports on a given host. It uses native OS threads to try all the ports concurrently, making it faster than sequential port scanning tools.
You can install Port Sniffer using Cargo, the Rust package manager. First, make sure you have Rust installed on your system. Then, run the following command:
cargo install nexuslab_port_sniffer --name port_sniffer
This will download the source code, compile it, and install the port-sniffer
binary in your system's binary directory (usually ~/.cargo/bin/
).
To use Port Sniffer, simply run the port_sniffer
command followed by the hostname or IP address you want to scan.
port_sniffer [OPTIONS] <IP_OR_DOMAIN>
Option | Short | Long | Description | Possible values | Default |
---|---|---|---|---|---|
Number of threads | -t |
--threads |
Number of threads | Any natural number | 10 |
Timeout | --timeout |
Timeout in seconds | Any positive number | 2 |
|
Ports | -p |
--ports |
Ports to scan | A hostname to resolve or whitespace-separated list or dash-separated (U+2010 ) range of valid port numbers |
All |
Log level | --log_level |
Log level | info or debug |
info |
Flag | Short | Long | Description |
---|---|---|---|
Bare | -b |
--bare |
Output plain port numbers (newline-separated) |
Help | -h |
--help |
Print help |
Version | -V |
--version |
Print version |
For example:
port-sniffer 127.0.0.1
This will scan all the ports on 127.0.0.1
and print the open ones to the console.
Guidelines for contributing can be found here.
Fork the repository. (What's that?)
Clone the forked repository locally with git
.
git clone https://github.com/nexus-lab-org/port-sniffer
# or use GitHub's CLI (https://cli.github.com/)
gh repo clone nexus-lab-org/port-sniffer
Create a new branch for your changes.
git checkout -b my-new-branch
Make your changes with your favourite editor.
Commit your changes.
git commit -m "Make Port Sniffer better than ever!"
Push your changes to your forked repository.
git push origin my-new-branch
Open a pull request and wait for us to review and merge it. (What's that?)
Port Sniffer is licensed under the MIT License.