Ok so I found this code online and though it looked interesting so I ran it but can someone tell me why it doesn't work? I have scapy installed btw

#!/usr/bin/env python

from scapy.all import *
from scapy.error import Scapy_Exception

m_iface="wlan0"
filter_message="http"
count=0

def pktTCP(pkt):
    global count
    if pkt.haslayer(TCP) and pkt.getlayer(TCP).dport == 80 and pkt.haslayer(Raw):
            count=count+1
            print pkt.getlayer(Raw).load

sniff(iface=m_iface,prn=pktTCP) 

I ran it but can someone tell me why it doesn't work?

Depends. Whats not working? We can't really help you if we don't know about the situation of how you know it doesn't work.

@Hiroshe CORRECTION: it only displays my own http requests and not others on the network. As in if I search something on another computer it doesn't appear on the program

Edited 2 Years Ago by QwertyFish

@Hiroshe I was thinking that myself. When I run it I do sudo python sniffer.py

And with my google sniffer I do sudo python google.py -i mon0. And that only displays my packets. How do I put it in monitor mode?

If it helps I'm using a raspberry pi and the wipi as a dongle/wifi card thing

Edited 2 Years Ago by QwertyFish

Depends if the card supports it. It's also dependant on the operating system. In unix, I think ifconfig can do it. Look it up in the info/man pages.

@Hiroshe I'm running linux Btw. Is there a way to do it to all cards like a command?
Edit: the wipi doesn't support monitor mode :(

Edited 2 Years Ago by QwertyFish

Strangely enough the WiPi does support monitor mode. I put it into monitor mode successfully but my google sniffer isn't getting any unencrypted google searches. I did make sure it was http. Any help?

Nothing. I will try it with a different sniffer though probably the one Chris suggested. See if that makes any difference.

Edited 2 Years Ago by QwertyFish

This article has been dead for over six months. Start a new discussion instead.