From 5eead8c838664c04d696a95e1a76f9867e4c74ac Mon Sep 17 00:00:00 2001 From: B3i4hu <64459585+B3i4hu@users.noreply.github.com> Date: Mon, 15 Dec 2025 14:37:56 +0800 Subject: [PATCH] Move _add_hosts call to the end of the loop (#2791) The original location network port has not been obtained, which will cause the port information to remain empty. --- modules/processing/network.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/processing/network.py b/modules/processing/network.py index 5f1984421ed..149ced7d0e5 100644 --- a/modules/processing/network.py +++ b/modules/processing/network.py @@ -776,8 +776,6 @@ def run(self): offset = file.tell() continue - self._add_hosts(connection) - if ip.p == dpkt.ip.IP_PROTO_TCP: tcp = ip.data if not isinstance(tcp, dpkt.tcp.TCP): @@ -843,6 +841,7 @@ def run(self): self._icmp_dissect(connection, icmp) offset = file.tell() + self._add_hosts(connection) except AttributeError: continue except dpkt.dpkt.NeedData: