Skip to content

Commit

Permalink
Fixed script that adds metadata to each IP address within spreadsheet…
Browse files Browse the repository at this point in the history
…_tools.py. Improved logic and decision points. Fixed error in default values for inventory that didn't have a assigned vendor or mac address. Bumped version to 3.3.2.
  • Loading branch information
Dbones202 committed Nov 17, 2023
1 parent 338728c commit d2a8143
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/navv/spreadsheet_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,12 @@ def handle_ip(ip_to_check, dns_data, inventory, segments, ext_IPs, unk_int_IPs):
* DHCP Broadcasting
* Multicast
* Within Segments identified
* Within Inventory, not within an Identified Segment
* Resolution by DNS, then Inventory, and then Unknown
* Appends name if External IP
* Private Network
* Resolution by DNS, Inventory, then Unknown
* External (Public IP space) or Internet
* Resolution by DNS, Unknown
This will capture the name description and the color coding identified within the worksheet.
"""
Expand Down Expand Up @@ -305,10 +308,6 @@ def handle_ip(ip_to_check, dns_data, inventory, segments, ext_IPs, unk_int_IPs):
resolution,
segments[x].color,
)

# elif ip_to_check in inventory:
# desc_to_change = (inventory[ip_to_check].name, inventory[ip_to_check].color)

elif netaddr.IPAddress(ip_to_check).is_private():
if ip_to_check in dns_data:
desc_to_change = (dns_data[ip_to_check], INTERNAL_NETWORK_CELL_COLOR)
Expand Down

0 comments on commit d2a8143

Please sign in to comment.