Skip to content

Commit

Permalink
🚧 taskprogress element
Browse files Browse the repository at this point in the history
  • Loading branch information
zrquan committed Aug 6, 2024
1 parent 2bff95d commit ae84b2a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nmass/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ class HostHint(BaseXmlModel, tag="hosthint"):
hostnames: Hostnames = element(default=None)


class TaskProgress(BaseXmlModel, tag="taskprogress"):
task: str = attr()
time: str = attr()
percent: float = attr()
remaining: int = attr(default=None)
etc: str = attr(default=None)


class NmapRun(BaseXmlModel, tag="nmaprun"):
"""
This is the data model that maps with the Nmap (also Masscan) XML output.
Expand All @@ -136,5 +144,6 @@ class Stats(BaseXmlModel, tag="runstats"):
verbose: dict[str, int] = element(default=None) # None for masscan
debugging: dict[str, int] = element(default=None) # None for masscan
hosthint: HostHint = element(default=None)
taskprogress: list[TaskProgress] = element(default=None)
hosts: list[Host]
stats: Stats

0 comments on commit ae84b2a

Please sign in to comment.