Skip to content

Commit

Permalink
Don't add null masscan results in database
Browse files Browse the repository at this point in the history
  • Loading branch information
svkirillov committed Jun 14, 2020
1 parent a93b25b commit 6f871b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions grinder/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,10 @@ def __parse_masscan_results(self, hosts: dict, query: str, product_info: dict) -
:param product_info: information about current product
:return: None
"""

if len(hosts) == 0:
return

for host in hosts.keys():
ports = ",".join([str(p) for p in hosts.get(host, {}).get("tcp", {}).keys()])
host_info = HostInfo(
Expand Down

0 comments on commit 6f871b8

Please sign in to comment.