Decoding the IP Layer by using Python
Decoding the IP Layer by using Python import socket import os import struct from ctypes import * # host to listen on host = “192.168.0.187” # our IP header class IP(Structure): _fields_ = [ (“ihl”, c_ubyte, 4), (“version”, c_ubyte, 4), (“tos”, c_ubyte), (“len”, c_ushort), (“id”, c_ushort), (“offset”, c_ushort), (“ttl”, c_ubyte), (“protocol_num”, c_ubyte), (“sum”, c_ushort), (“src”, c_ulong), (“d..
2016. 7. 11.