Skip to content

okieLoki/Network-Scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Network Scanner 🌐

Network Scanner is a simple ARP scanner which can be used to scan for live hosts in a network. It basically returns the MAC address and IP address of the devices of the same network. It can scan for multiple subnets also. It simply produces the output in a List format. This can be used in the first phases of a pentest where you have access to a network.

Usage 🚀

Clone the github repository and change the directory

$ git clone https://github.com/okieLoki/Network-Scanner
$ cd Network-Scanner

Run python3 to executive the file

$ python3 network_scanner.py -t (target ip)
$ python3 network_scanner.py --target (target ip)

You can also scan subnets using the same command. To know more about subnets visit this link

To get help about the commands use the help command

$ python3 network_scanner.py -h
$ python3 network_scanner.py -help

Gathering MAC and IP addresses 💻

If we are connected on IP Address: 192.168.20.230 and the Route IP is: 192.168.20.1 and our Subnet mask is 255.255.255.0 then the 0 simply means that that block 1-254 is available to the client, while the rest of the blocks are available to the host.

Now keep that in mind and look at this image below:

As you can see the Mask length for the 255.255.255.0 is 24, you can calculate this yourself by converting the Subnet Mask into binary and then counting all the ones. Example: 255.255.255.0 into binary: 1111 1111 . 1111 1111 . 1111 1111 . 0000 0000 So the number of ones are 24.

Note: You can find out your mask length by typing ifconfig wlan0 or ifconfig eth0 or ifconfig usb0on your linux terminal for wireless network, ethernet network and usb network respectievely.

The same can be done on windows terminal using ipconfig command and specifying the network type as mentioned above.

Your can now specify your target subnet by using --target 192.168.20.20/24 or -t 192.168.20.20/24. For your case the number might not be 24, please check it using the above steps.

Screenshots 📸

Python Libraries used 📚

  • scapy
  • optscanner

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages