Skip to main content

This is an API adaption to the Original RustScan, which extends it's functionality for use as a native Python module e.g. Extension Module.

Reason this release was yanked:

Not Functional, Use 1.0.3

Project description

netscan

This is an API adaption to the Original RustScan, which extends it's functionality for use as a native Python module e.g. Extension Module.

All Credits go to the original Authors which can be found here: https://github.com/RustScan/RustScan

As of this commit, the Wheels distribution is built via RustScan version: 2.1.0 Release.

How to Use.

Using the module is simple. Simply install the dependency via pip.

The default Batch Size is set to 10. The batch size is essentially the number of concurrent ports to check at a time e.g. check 10 ports at a time.

The default timeout (time to wait for a TCP timeout) is 1.5 seconds (1500 miliseconds).

Note that these are extremley conservative defaults and hence lead to low performance. To increase the performance for you're environment tweak these by setting the environment variables.

Here is a final example of how to use the NetScan extension module:

>>> import os, netscan
>>> # Sets the concurrent number of ports to check at a time to 1500!
>>> os.environ["SCAN_BATCH_SIZE"] = "1500"
>>> # Sets the TCP Timeout to 0.5 seconds
>>> os.environ["SCAN_TIMEOUT"] = "500"
>>> netscan.run_scan(["10.0.0.1","10.0.0.28"])
>>> ['10.0.0.1:53', '10.0.0.1:80', '10.0.0.28:135', '10.0.0.28:139', '10.0.0.28:445', '10.0.0.1:443', '10.0.0.28:3389', '10.0.0.28:7680', '10.0.0.1:8080', '10.0.0.1:8181', '10.0.0.1:21515', '10.0.0.28:27036', '10.0.0.1:49152', '10.0.0.1:49153', '10.0.0.1:49154', '10.0.0.28:49670', '10.0.0.28:57621']
>>> exit()

Cheers!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

netscan_TD4B-1.0.0-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.0-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.0-cp310-none-win_amd64.whl (1.6 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

netscan_TD4B-1.0.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (3.8 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

netscan_TD4B-1.0.0-cp39-none-win_amd64.whl (1.6 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

netscan_TD4B-1.0.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (3.8 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

netscan_TD4B-1.0.0-cp38-none-win_amd64.whl (1.6 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

netscan_TD4B-1.0.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (3.8 MB view hashes)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

netscan_TD4B-1.0.0-cp37-none-win_amd64.whl (1.6 MB view hashes)

Uploaded CPython 3.7 Windows x86-64

netscan_TD4B-1.0.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (3.8 MB view hashes)

Uploaded CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page