From 15fd5b01ef9861f6fbdfb7fad9f6fef2cf92753a Mon Sep 17 00:00:00 2001 From: mb Date: Tue, 29 Jan 2019 08:20:39 -0500 Subject: [PATCH] Changed c_ulong to c_uint in IP packet structure definition due to obvious reasons. --- networks/host-scanner-via-udp.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) mode change 100644 => 100755 networks/host-scanner-via-udp.py diff --git a/networks/host-scanner-via-udp.py b/networks/host-scanner-via-udp.py old mode 100644 new mode 100755 index d19c8d1..4e45b7b --- a/networks/host-scanner-via-udp.py +++ b/networks/host-scanner-via-udp.py @@ -78,8 +78,8 @@ class IP(ctypes.Structure): ('ttl', ctypes.c_ubyte), ('protocol_num', ctypes.c_ubyte), ('sum', ctypes.c_ushort), - ('src', ctypes.c_ulong), - ('dst', ctypes.c_ulong) + ('src', ctypes.c_uint), + ('dst', ctypes.c_uint) ] def __new__(self, socketBuffer = None): @@ -109,8 +109,17 @@ class IP(ctypes.Structure): } # Human readable IP addresses. - self.src_address = socket.inet_ntoa(struct.pack('