Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- import scapy.all as scapy
- from scapy.layers import http
- def sniff(interface):
- scapy.sniff(iface=interface, store=False, prn=p_s_p)
- def p_s_p(packet):
- if packet.haslayer(http.HTTPRequest):
- print(packet.show())
- if packet.haslayer(scapy.Raw):
- print(packet[scapy.Raw].load)
- sniff('eth0')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement