#network #security #scan

netscan-service

Service detection library for netscan

15 breaking releases

0.26.0 Dec 24, 2023
0.24.0 Dec 10, 2023
0.22.0 Nov 21, 2023
0.15.4 Jul 16, 2023
0.1.0 Nov 21, 2021

#1944 in Network programming

Download history 158/week @ 2023-10-29 197/week @ 2023-11-05 208/week @ 2023-11-12 143/week @ 2023-11-19 114/week @ 2023-11-26 252/week @ 2023-12-03 235/week @ 2023-12-10 185/week @ 2023-12-17 131/week @ 2023-12-24 165/week @ 2023-12-31 193/week @ 2024-01-07 187/week @ 2024-01-14 61/week @ 2024-01-21 116/week @ 2024-01-28 176/week @ 2024-02-04 543/week @ 2024-02-11

923 downloads per month
Used in netscan

MIT license

195KB
6.5K SLoC

netscan Crates.io License

Cross-platform network scan library
with the aim of being lightweight and fast.

Features

  • Port Scan (IPv4, IPv6)
    • TCP SYN scan
    • TCP CONNECT scan
  • Host Scan (IPv4, IPv6)
    • ICMP PING scan
    • TCP PING scan
    • UDP PING scan

Usage

Add netscan to your dependencies

[dependencies]
netscan = "0.26"

Example

See Examples

Feature flags

The following feature flags can be used to enable/disable specific features.

--feature service

Enable service detection.

--feature os

Enable TCP/IP Stack Fingerprinting.

--feature full

Enable all of the above.

For more details see Examples

Supported platform

  • Linux
  • macOS
  • Windows

Privileges

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

Note for Windows Users

If you are using Windows, please consider the following points before building and running:

  • Npcap or WinPcap Installation:
    • Ensure that you have Npcap or WinPcap installed on your system.
    • If using Npcap, make sure to install it with the "Install Npcap in WinPcap API-compatible Mode" option.
  • Build Dependencies:
    • Place the Packet.lib file from the Npcap SDK or WinPcap Developers pack in a directory named lib at the root of this repository.
    • You can use any of the locations listed in the %LIB% or $Env:LIB environment variables.
    • For the 64-bit toolchain, the Packet.lib is located in /Lib/x64/Packet.lib.
    • For the 32-bit toolchain, the Packet.lib is located in /Lib/Packet.lib.

Dependencies

~13–24MB
~447K SLoC