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.

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 latest version via pip.

pip install netscan-td4b

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 an 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()

Additionally you can scan for only a specific set of ports or service(s) via an optional secondary argument, like so.

>>> 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"],[80,443])
>>> ['10.0.0.1:80', '10.0.0.1:443']
>>> 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 Distribution

netscan_TD4B-1.0.4.tar.gz (33.9 kB view details)

Uploaded Source

Built Distributions

netscan_TD4B-1.0.4-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view details)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.4-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view details)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.4-cp310-none-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.10 Windows x86-64

netscan_TD4B-1.0.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.4-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (3.8 MB view details)

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

netscan_TD4B-1.0.4-cp39-none-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.9 Windows x86-64

netscan_TD4B-1.0.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.4-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (3.8 MB view details)

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

netscan_TD4B-1.0.4-cp38-none-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

netscan_TD4B-1.0.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

netscan_TD4B-1.0.4-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (3.8 MB view details)

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

netscan_TD4B-1.0.4-cp37-none-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.7 Windows x86-64

netscan_TD4B-1.0.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (3.3 MB view details)

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

netscan_TD4B-1.0.4-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (3.8 MB view details)

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

File details

Details for the file netscan_TD4B-1.0.4.tar.gz.

File metadata

  • Download URL: netscan_TD4B-1.0.4.tar.gz
  • Upload date:
  • Size: 33.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for netscan_TD4B-1.0.4.tar.gz
Algorithm Hash digest
SHA256 ae91000192c4c33775ee5b442f32af11b73dd9894ec1a6bd26295ee66bcc1e89
MD5 ba6d222645bb5b137c8d5c131fd43cbc
BLAKE2b-256 224d1f7416baccda0045c4076001ceb2362701815d6391af57f1a196aa309385

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 57adcfc4bd46993493823f9c9c88b596b8144282d068f0dc362dafb2967882b1
MD5 69be9a30eb8f2d8311711a6731fb656c
BLAKE2b-256 22e890bb59ddbea63d7082ebc32efdfe78e1fa476b604cc7fa0114c62aa8171d

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 57f735732365056fce8a3b935f3ab9b4e218f20e4650f3e7b4d98185e03bd03e
MD5 9bf5592e952026c21ae88c5084a714de
BLAKE2b-256 c344bedf5f474b4421cde13b92c201080d9aae3f3d9b585e7835f610735c2440

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 3f427d09a6561352725e678b9940708854cb1c709d37abb502fb16fccdbc0788
MD5 a1fa97a8b55a25b4c81bb2a32ce79bef
BLAKE2b-256 01d85b957f283bf50dab93096e19b6584e198c5d0a2d2496d29a541828cd2ce4

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4da5e500d03ae5f92897a4097720c4a088b0837dcccafb433d0e14923117883a
MD5 83e9b83a075a65663828f845a13639e3
BLAKE2b-256 f5069cb6fe4b467c3f5e8ce22b5af7b9d88b9274d436b05b0aecbf017817c26f

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4cede8b130411730744844febf98dc9dc6489136197355a0403e3d62af4d96a2
MD5 cee0977362181dfecd21dcc717354e13
BLAKE2b-256 62c9d0d212fe886dada622be5a54ec9eac6722aa404192913972fc5c32e60537

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 956469388bc28baa50a0bb8e46654ba212ed84f8b2909292a7961b9af0384769
MD5 5d69f9044dce10f949d146c9655a329d
BLAKE2b-256 39193ec5916ab39d2232993b7253c0569dd68896ac18b2c79f0f942bfdad3e34

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 df3439701bb56be14943009107ec759c53ff955527a16f5b3dcf6669e6488aa7
MD5 7e832f49e5e1c67bf7cad301cdd2a8d7
BLAKE2b-256 02629c297d68cf79cfcc4ea00fa5dbaf9c7622add57d62b0c925b9068d4e664d

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 4f43093c49b3db5f74446c6c052723bf5176b7df1ed510f0baa506a09eba4f2d
MD5 908669b307ed7b14648c6b4b369b70f8
BLAKE2b-256 779fa459da27b279873b2b2279fe7488d84e1c2b65e2018464911460dbfcabda

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp38-none-win_amd64.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 d318b58376d519b12ccdac8c6b4e7dbde576c36ab1acf56ecb0bc33acb1d50f7
MD5 c0d1074cd8b48569571206c95fb0a769
BLAKE2b-256 d9d781742c6f908fe82ae88197b0d93c4ffee9c400bbc886ac6ad13d8541b608

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5e91cf19041bc3a9fe65333583296531fcfb7b2422c10ede70287de5f97e93ff
MD5 97013db28ef05d69fba9fe8ff8a981f3
BLAKE2b-256 2dba82862efd11b90b1f18ec6432f22d9ff400bcf3390059c4eaaf13ee19e6eb

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a0e5490c3efa9e251850b47685121e7c14622d18c0668edd403d5f0cc4261ca7
MD5 502cd2312cd388dd862638b7f3cd0cf0
BLAKE2b-256 7ce137035254ec62fd1203d620150ec19c33d6040260b515fd97bfa056294113

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp37-none-win_amd64.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 62eef23c9e4d13232a6b9ce2bca3a0a805c129cbf21b5e6504b4ee6329d4b012
MD5 cc984b0ecf73b4d364b91411289a82b9
BLAKE2b-256 a8c3f5b5cfbbb928a759bac0b4d7f14d4faa3dd4a459d5e77c16f49d6605f81a

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 efdaa90538960890b04a7b4c358e5661ec6598353949eb02c9e48e0daae1c054
MD5 38801810bfa7ba6c04f624556a143602
BLAKE2b-256 96b500aca86b0195953204d577f39141974f73cff5e166696bcc95133f7547a5

See more details on using hashes here.

File details

Details for the file netscan_TD4B-1.0.4-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for netscan_TD4B-1.0.4-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 40a82b7b220d969a05bbf22f870d6772571bd228a8e743c85718df1d820f9325
MD5 ddf10d5a95f5502d01ec846357426aa8
BLAKE2b-256 1e6d468febbbc7312166750eb8adeb04bc16ba1c080ddb3f2df119b9ac995895

See more details on using hashes here.

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