dimanche 3 juillet 2016

Python ARP injector on windows


I am working on a mini project on making an ARP injector and have successfully created the linux one but I am having problem with the windows ARP injector. I am stuck and I am not getting any proper solution on internet. This is my code sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP) sock.bind(("192.168.235.1", 0)) sock.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 1) sock.ioctl(socket.SIO_RCVALL, socket.RCVALL_ON) try: packt = struct.pack("!6s6s2s2s2s1s1s2s6s4s6s4s", "xffxffxffxffxffxff", "xbbxbbxbbxbbxbbxbb", "x08x06","x00x01", "x08x00", "x06", "x04", "x00x01", binascii.unhexlify('000c29294d5e'),socket.inet_aton('192.168.235.1'), "x00x00x00x00x00x00",socket.inet_aton('192.168.235.130')) sock.send(packt) except Exception as ex: print str(ex) sock.close() I am getting the following error. [Errno 10057] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was suppliedloling

Aucun commentaire:

Enregistrer un commentaire