Skip to content

Commit

Permalink
small bugfix for asset_inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Oct 13, 2023
1 parent e4f2617 commit 6b4a321
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 6b4a321

Please sign in to comment.