Skip to main content

Python-based tool which helps to scan the network

Project description

Network Scanner

Hi! I'm Network Scanner. I am a python-based tool which helps to scan the network and check for active hosts within a network by pinging them. I am very fast as I implement concepts of asyncio for concurrent processing.

Installation Instructions

For installing the tool we can use pip installer.

pip install Network-Scanner

Getting Started

This tool accepts command line arguments to perform a "ping-based" concurrent scan.

The tool accepts three command line argument:

  1. Network ID: the network which needs to be scanned.

Syntax: X.X.X.X/subnet_prefix

Example: 192.168.100.0/24

  1. Concurrency level: number of concurrent hosts that are pinged at the same time (accepts int value) (default level 1). The recommeded concurrency level is from 1 to 500. The tool can crash with the concurrency level of the more than 500.

  2. Timeout: number of seconds after giving up on pinging a host (accepts int/ float)(default 5s).

Let's start with a simple example:

In this example we would be scanning the network 8.8.8.0/24 with the concurrency level of 500 at the timeout of 1s.

Run the following command in the terminal to test above example:

$ net_scan 8.8.8.0/24 --concurrent 500 --timeout 1

An output.txt file will be created in the same directory from where the command was executed, which would contain the output of network scan.

How it works?

Lets summarize the working of tool in steps:

  1. The journey of the tool starts with taking the command line inputs for Network_ID, Concurrency_Level and Timeout.

  2. Once the inputs are taken, we fetch the IP addresses of all the hosts within the mentioned Network using ipaddress python package.

  3. Then we have used Semaphores to maintain the concurrency in the tool. We have assigned the input of Concurrency_Level to semaphores.

  4. After setting up the concurrency level we have created tasks to ping the ip addresses. We have individual tasks for all the ip addresses in the network.

  5. Once the tasks are created we have kept those tasks on the event_loop to execute then concurrently.

  6. After the execution of pings to all the hosts, the ping-reply is printed in a text file named "output.txt".

This repository is licensed under the MIT license. See LICENSE for details.

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

Network-Scanner-1.0.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Network_Scanner-1.0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file Network-Scanner-1.0.2.tar.gz.

File metadata

  • Download URL: Network-Scanner-1.0.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for Network-Scanner-1.0.2.tar.gz
Algorithm Hash digest
SHA256 cc38beeeb86a1215a8c3147a273eedd31ff555c5814cf4797ddd4f6abc6526d4
MD5 8c1221f3bbc85137736bf84a45fc63ba
BLAKE2b-256 8e6705a57d8d8ae938b4f196e5b1483130d8862bd4b1000778501ba2a09a01f8

See more details on using hashes here.

File details

Details for the file Network_Scanner-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: Network_Scanner-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for Network_Scanner-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4cc628a3f43733db7a7d0dada77e358a44166272b495aaefba0394aa1ceb3c1c
MD5 c66ce38975b7124c61332609aae70051
BLAKE2b-256 108c04ca5040840c2f0df27134fc2e4474dab7f0b971f3a174275ec7b3249435

See more details on using hashes here.

Supported by

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