Hello all,
I'm trying to create a python network sniffing script that will grab certain traffic that I need to log.
So far I have not been able to sniff anything but ICMP packets which is strange since the same code works fine on linux.
Python version is 2.7.5
python code :
import socket
#create an INET, STREAMing socket
s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
s.bind(('', 0))
# receive a packet
while True:
print "Sniffing"
packet = s.recvfrom(65565)
print packet
any help would be greatly appreciated
I'm trying to create a python network sniffing script that will grab certain traffic that I need to log.
So far I have not been able to sniff anything but ICMP packets which is strange since the same code works fine on linux.
Python version is 2.7.5
python code :
import socket
#create an INET, STREAMing socket
s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
s.bind(('', 0))
# receive a packet
while True:
print "Sniffing"
packet = s.recvfrom(65565)
print packet
any help would be greatly appreciated