![]() This is and image of the format of the IP protocol with the sized in bits of every header. To read an IP packet you need to analyze the received packet in binary according to the IP protocol. ![]() Raw socket is a socket the sends and receives data in binary.īinary in python is represented in a string which looks like this \x00\xff. You can sniff all of the IP packets using a raw socket. I sent a new defect ticket to the Scapy developers:, hope they can do something with it.Īnyways, just thought I'd let y'all know. I installed the original version of PyPcap (from Google's site), and Scapy started working fine (I didn't try many things, but at least it didn't crash as soon as I started sniffing). It was this modified PyPcap that was causing the problem, apparently, since the example in the answer also caused a hang. (If anyone is interested, I'm running Windows Vista, which might affect things).Īfter reading the answer telling me to install PyPcap, I messed around with it a bit and found out that Scapy, which I had tried using, was telling me to install PyPcap as well, except that it's a modified version for it's use. I would assume that it's just a problem with how I installed it, except that many other people have told me that it doesn't work particularly well on Windows. I've heard from several places that the best module for this is a module called Scapy, unfortunately, it makes python.exe crash on my system. ![]() What is the best way to sniff network packets using Python? ![]()
0 Comments
Leave a Reply. |