Crates.io | port_open |
lib.rs | port_open |
version | 0.1.0 |
source | src |
created_at | 2023-06-02 08:52:49.14933 |
updated_at | 2023-06-02 08:52:49.14933 |
description | Get the open status of an ipv4 port |
homepage | https://github.com/GD-GK/port_open |
repository | https://github.com/GD-GK/port_open |
max_upload_size | |
id | 880680 |
size | 3,732 |
Get the open status of an ipv4 port
Add this to your Cargo.toml
[dependencies]
port_open="0.1.0"
use port_open::get_port_isopen;
fn main() {
let result = get_port_isopen(&[127, 0, 0, 1], &[80, 5037, 22]);
for port in result {
println!("{:?}", res);
}
}
print-out: PortOpen { ip: 127.0.0.1, port: 80, is_open: false } PortOpen { ip: 127.0.0.1, port: 5037, is_open: true } PortOpen { ip: 127.0.0.1, port: 22, is_open: false }
MIT