mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-04-27 11:09:09 -04:00
28 lines
483 B
Python
28 lines
483 B
Python
#!/usr/bin/env python
|
|
|
|
__author__ = "bt3"
|
|
|
|
''' A class for the ICMP header'''
|
|
|
|
import ctypes
|
|
|
|
|
|
|
|
class ICMP(ctypes.Structure):
|
|
|
|
_fields_ = [
|
|
('type', ctypes.c_ubyte),
|
|
('code', ctypes.c_ubyte),
|
|
('checksum', ctypes.c_ushort),
|
|
('unused', ctypes.c_ushort),
|
|
('next_hop_mtu',ctypes.c_ushort)
|
|
]
|
|
|
|
def __new__(self, socket_buffer):
|
|
return self.from_buffer_copy(socket_buffer)
|
|
|
|
def __init__(self, socket_buffer):
|
|
pass
|
|
|
|
|