Skip to content

Commit

Permalink
XML parser: use endtime as starttime when starttime is missing (masscan)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-l- committed Nov 12, 2015
1 parent d0d319e commit 18e4ef8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ivre/xmlnmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,9 @@ def startElement(self, name, attrs):
self._curhost[field] = datetime.datetime.utcfromtimestamp(
int(self._curhost[field])
)
if 'starttime' not in self._curhost and 'endtime' in self._curhost:
# Masscan
self._curhost['starttime'] = self._curhost['endtime']
elif name == 'address' and self._curhost is not None:
if attrs['addrtype'] != 'ipv4':
self._curhost.setdefault(
Expand Down

0 comments on commit 18e4ef8

Please sign in to comment.