Socket Win32 IO

jose maria scasjos at
Mon Jul 7 16:47:42 CEST 2003

Hi all I´m a newbie in python Im try to modify in win32 IOTCL of file
handle socket to set parameter 0x98000001 but i have error
(api_error:(1, 'DeviceIoControl', 'Incorrect function.'))
and I dont know how continue.
the porpuse of this code its to make a simple sniffer

This is my code  

from socket import * 
import win32api
import win32file 

Sock.bind(ip)# bind scoket to port 
fh=Sock.fileno() # Get file handle
test=win32file.DeviceIoControl(fh,SIO_RCVALL,'',0) # Failed

Thanks in advance

More information about the Python-list mailing list