Learn Python & Ethical Hacking From Scratch-Network Scanner

Hello,

I had the network scanner working perfectly, then my kali linux VM stopped working and I had to reinstall. After that I have been unable to get my network scanner to work at almost every step. I’ll attached some screenshots to help explain my issue.

Here is my current code:

and here is the error I receive when trying to run it:

I am not 100% sure but seems like python version issue. Were you running python3 in your old Kali? The new one seems to be running python 2. Just try running the script using python3 instead of python.

Hello Apurv,

I am unfortunately getting the error with both commands. I think there is an additional issue with ARP/Ether as pycharm is saying it’s unable to pull them from scapy.all?

Hello Apruv,

Just to update - I’ve tried uninstalling Kali, scapy, and pycharm, then reinstalling and I’m still running into the same issue. I also tried following the recommendations on the following link with no success:

Any idea on what I’m doing wrong?

To debug, you can put print statement after every call under scan() function. This way you can see which command is giving error. Also stop running this script in pycharm and run it in terminal

In case anyone else struggles this was what resolved my issue:

FYI this solved both the network_scanner and arp_apoof

1 Like