On Fri, Feb 10, 2012 at 3:12 PM, daedae11 wrote:
> The example is the third example in (Python2.7's doc)->(Python Library
> Reference)->17.2.2.
> The code of the example is:
>
> import socket
>
> # the public network interface
> HOST = socket.gethostbyname(socket.gethostname())
>
> # create a raw
Hi,
On 10 February 2012 14:12, daedae11 wrote:
> Traceback (most recent call last):
> File "E:\c language\Eclipse\example\src\sniffer.py", line 12, in
> s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
> File "D:\Python27\lib\socket.py", line 187, in __init__
> _
The example is the third example in (Python2.7's doc)->(Python Library
Reference)->17.2.2.
The code of the example is:
import socket
# the public network interface
HOST = socket.gethostbyname(socket.gethostname())
# create a raw socket and bind it to the public interface
s = socket.socket(socke