We have already learned how to sniff packets with Scapy in the previous recipes. Now we can use Scapy to sniff and extract the content in the packets. This can be used to get the details of many protocols. We can try to get the credentials from these sniffed packets. We can bind this sniffer with our ARP poisoning attack to get the details from other machines on the network.
Password sniffer with Python over LAN
How to do it...
Here are the steps to write a password sniffer over LAN:
- Create a pass-sniffer.py file and open it in your editor.
- Import the required modules:
from scapy.all import * from urllib import parse
- Now declare the variables for the interface:
iface = "en0" conf.verb=0
- Create a method to...