nerve_uri

Crates.ionerve_uri
lib.rsnerve_uri
version0.2.1
sourcesrc
created_at2021-02-21 14:05:54.179143
updated_at2021-02-27 09:02:34.590652
descriptionCross-platform uri scan library (for nerve ecosystem)
homepage
repositoryhttps://github.com/toref-sh/nerve
max_upload_size
id358513
size58,251
toref (toref-sh)

documentation

README

nerve Crates.io License

Security scan library with the aim of being lightweight and fast.
nerve provides a cross-platform API for network / security scan
(for security testing, network management, evaluation)
using Rust.
It is currently in alpha stage.

Features

  • PORT SCAN
  • HOST SCAN
  • URI SCAN
  • DOMAIN SCAN

Usage

Add nerve to your dependencies

[dependencies]
nerve = "0.2.1"
  • Structs that provide each function
    • PortScanner
    • HostScanner
    • UriScanner
    • DomainScanner
  • Basic usage of each struct
    • ::new() returns a Scanner.
    • Set up the scanner (see Examples)
    • ::run_scan() Run scan with current settings.
    • Results are stored in ::scan_result
    • ::get_result() returns a scan resut.

Example

Port Scan Example

extern crate nerve_port;
use nerve_port::PortScanner;
use nerve_port::PortScanType;
use nerve_port::ScanStatus;
use std::time::Duration;

fn main() {
    let mut port_scanner = match PortScanner::new(None, None) {
        Ok(scanner) => (scanner),
        Err(e) => panic!("Error creating scanner: {}", e),
    };
    port_scanner.set_target_ipaddr("192.168.1.92");
    port_scanner.set_range(1, 1000);
    port_scanner.set_scan_type(PortScanType::SynScan);
    port_scanner.set_timeout(Duration::from_millis(10000));
    port_scanner.run_scan();
    let result = port_scanner.get_result();
    print!("Status: ");
    match result.scan_status {
        ScanStatus::Done => {println!("Normal end")},
        ScanStatus::Timeout => {println!("Timed out")},
        _ => {println!("Error")},
    }
    println!("Open Ports:");
    for port in result.open_ports {
        println!("{}", port);
    }
    println!("Scan Time: {:?}", result.scan_time);
}

For more details see Examples

Supported platform

  • Linux
  • macOS(OS X)
  • Windows

Additional Notes

This library requires the ability to create raw sockets. Execute with root user privileges.

Commit count: 0

cargo fmt