Category : packet-sniffers

i have the following code : import struct as st import socket import os if os.name == ‘nt’: socket_proto = socket.IPPROTO_IP else: socket_proto = socket.IPPROTO_ICMP sniff = socket.socket(socket.AF_INET,socket.SOCK_RAW,socket_proto) sniff.setsockopt(socket.IPPROTO_IP,socket.IP_HDRINCL,1) sniff.bind(("",0)) if os.name == ‘nt’: try: sniff.ioctl(socket.SIO_RCVALL,socket.RCVALL_ON) except OSError as e: print(f"Can’t set promiscuous mode : {str(e)}") buff = sniff.recvfrom(65535) prot_map = {1 : ‘ICMP’,6 : ..

Read more

example what i usually get and what i need always: {‘b’: {‘x’: ‘GameHandler’, ‘p’: {‘heroes’: [2008369, 4943029]}, ‘c’: ‘get.atm’, ‘r’: 1}, ‘t’: ‘xt’} what is this and what can i do with this?: {‘t’: ‘xt’, ‘b’: {‘r’: -1, ‘gz’: ‘eJx9VNtqI0cQ/RXRbwsdM32f0XNeFkJ+ICxmNOqRBHPRzoxsOUbg9YaQtyV5ylMgf+AsMTiw6/zCzB/lVI8uttmsJOzqqu5TVacu1+w8K+dsymZp1xX+LF9Vc8bZ0je1b9n0h2u2glXbRLpYclalpcfl/s/h9qz/Y/ipfxh+7u+HGzwpLgo2lQlnrd+yacRZVqRt+/pbNlWcXa4qoMnYGBiKusVBxZGGZe7bjBB/7z8D7nG46T/1dwB9GD5M+sf+r/5xAs3n/n7S/wvjw/BueD/c4u9t/3F4D9+3k+Fm+ND/jcufJsO7CRkg3/f/0MO7APcLHV+9ip5/EHRzieyuWR7SEpyl81YEYVXliNdZDluV1asK2h1n/u1mtQYtEZeCJ9wJrhMuFdc8eoOM66JuiDUR8wg6ga/kCvKLL+6mHTl+Rm5DjFMQXcmm3yQJQoTLtmvY1ApnDZEFao1NBG5frIBgpJWOsy4tfBWOSiDMERf3pHbqVLTfQMvH/m7S/xp4fgRnd4fCqegLhZOHwikpEnMqXKjiM+rUS+qU1P9LnbagTsZcGi4cF+I5dzpQZOgK6Ps6dccUv0KdSLRWB+4EMRTvyROJVS45sSe0i53ewUO1zk7Nb4FbbcqA312tfeBl3fxIQZR15a/Y1AGXv+wic4hAmyQmfkMEOk4Sqw/lUyZSTyIwRos43nP1Gr4T/YX6+LctTEJJZ6xVIJIt12vK9Cyi4GdFdsmmeVq0nrPzKuRx3j0JP0w3Cp8X6WKkrVksKRsiT1gV2STW6H1NVS67g84mmq6WF1BERoaGPRrjEEeTHxUuoQ5oSpRc2YiQ/Jr4p2LlJEWO0Ob7By6ScRhKeoNVtIdBryViVK1pf8R0YTw4Q/rmeBUUKzmqYLXKos3YeDABNj8FZ5UZNQQqxvDm3QiFOPAzdlSdvI4H8trmxFMS76OtR1i4NzaksKP9mc59c2hTp0GBflrKfd9YQc3YdmkTtqNI3LF5oiBJNo1HnaILNog6dAEEE4TGo9SwYiMBKisC4TFBtYHxRAm889t1aFz8/95vKWSB6eFss24DSldvV1mQVouq2x4b6LAALNVhXABWxOrY7cpgpBBNhsdds/EkbogQZ1wspIXNV75ZIFtJBUm3575qFpQNMFaLZTf6z7sSTiVJ+dF5KBlUi2ZsTenQ8iAT62L/rGsOTYsOMoI4rqkgUsbOoSZxCJoUWJpS05pdNDRZEosbIqbhO7/w1TxtriaNn3lQiaTJAPRLWl8hfaIWNYOsaQqyYjMjFDuKTwZH0T5Ou7qkyXKxdTTfZTkbF6FzCJLq77PlfjXq0NBhhaJbwzhib+Z1PQ/12svgLXibbygZRzwtSlCuXejM8HzeZeQzcbQrulU5q0aO/EVX0MDtdm92/wEZoVjx’}} code: from scapy.all import * import json while True: packet = sniff(count=1, filter=’host 91.225.236.166′) try: ..

Read more

I am capturing the ICMP packets from a specific IP address using: import scapy.all from * sniff(filter="icmp and src host 192.168.100.3 and dst host 192.168.100.2", prn=lambda x: x.sprintf("%IP.proto% packets from %IP.src% to %IP.dst%")) I am getting the following output: icmp packets from 192.168.100.3 to 192.168.100.2 icmp packets from 192.168.100.3 to 192.168.100.2 icmp packets from 192.168.100.3 ..

Read more

I use python 3 for my project. I use "KBestSelector" to select best features from CICISD2017 dataset. Result : Packet Length Variance Packet Length Std Bwd Packet Length Min Avg Bwd Segment Size Bwd Packet Length Mean Bwd Packet Length Max Min Packet Length Bwd Packet Length Std How can i get this parameters from ..

Read more

I have written a sniffer using scapy. It tries to get the probe request packets. My program runs fine for about 8-10 mins, then, it suddenly stops sniffing the probe requests after throwing socket closed warning. I didn’t find any information regarding this on google. Why am i getting this error? ERROR: WARNING: Socket <scapy.arch.linux.L2ListenSocket ..

Read more