Skip to content

Commit

Permalink
Merge pull request #780 from blacklanternsecurity/asset-inventory-sta…
Browse files Browse the repository at this point in the history
…ts-bugfix

Asset Inventory Stats Bugfix
  • Loading branch information
TheTechromancer authored Oct 18, 2023
2 parents 93bd1be + 6b4a321 commit bb80806
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bbot/modules/output/asset_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def sort_key(asset):
ports = getattr(asset, "ports", set())
ports = [str(p) for p in sorted([int(p) for p in asset.ports])]
ips = sorted([str(i) for i in getattr(asset, "ip_addresses", [])])
host = getattr(asset, "host", "")
host = self.helpers.make_ip_type(getattr(asset, "host", ""))
if host and isinstance(host, str):
_, domain = self.helpers.split_domain(host)
if domain:
Expand Down Expand Up @@ -197,7 +197,7 @@ def __init__(self, host):

def absorb_csv_row(self, row):
# host
host = row.get("Host", "").strip()
host = make_ip_type(row.get("Host", "").strip())
if host and not is_ip(host):
self.host = host
# ips
Expand Down

0 comments on commit bb80806

Please sign in to comment.