Run ifconfig locally and select the ip you want to test range for
To run the script please provide arguments in the following format. From the command line, inside the "Change_Mac" Project Folder, run.
eg, $ python network_scanner.py -i 192.168.1.254/24
OR, $ python network_scanner.py --iprange 192.168.1.254/24
- Create ARP request directed to broadcast MAC asking for IP.
/24 shows clients in the full range
- Send packet and receive result.
- Parse the response
- Print Result
There are three versions of the script
- utils: contains separate functions, executed in network_scanner.py, to demonstrate the relationships, and reduce a single outcome to a functional components.
- network_scanner_single_function: what it says on the box
- network_scanner_uncommented: the bare bones, what you should use if you want to make this script part of your project.
$ sudo python(#) network_scanner.py
import logging
logging.getLogger("scapy").setLevel(logging.CRITICAL)
## This ensures Scapy does not print warnings or informational messages.
Use before running scapy functions like sniff() or sent() ##
Are JavaScript JSON