You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ClosestHostEvent assigns the inherited port, then discards it #3445
ifparent.host:
self.data["host"] =str(parent.host)
self._port=parent.port# we do this to refresh the hashself.data=self.data# re-derives everything from data; _port is lostbreak
The data setter re-parses the event from data, which holds no port, so the
assignment on the line above never survives.
Reproduction: a FINDING whose parent is OPEN_TCP_PORT("8.8.8.8:53"). parent.port is 53; the resulting finding.port is None.
Swapping the two lines — refresh the hash first, then assign _port — looks
like the fix. Worth noting in the docstring either way that the inheritance only
runs for events that declare no host of their own.
Activity
Keep inherited port on ClosestHostEvent and restore port from JSON (#…