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.
$ git clone https://github.com/okieLoki/Network-Scanner
$ cd Network-Scanner
$ 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
$ python3 network_scanner.py -h
$ python3 network_scanner.py -help
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 usb0
on 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.
- scapy
- optscanner