DS: FLK-E501
This commit is contained in:
parent
e37d1d64ea
commit
5fbcb5e89b
@ -44,13 +44,13 @@ def main():
|
|||||||
as_number = get_autonomous_system_number(ip_info.get("as"))
|
as_number = get_autonomous_system_number(ip_info.get("as"))
|
||||||
|
|
||||||
# Assemble list for table generation
|
# Assemble list for table generation
|
||||||
|
country = ip_info.get("country")
|
||||||
|
region = ip_info.get("regionName")
|
||||||
|
city = ip_info.get("city")
|
||||||
table_data = [
|
table_data = [
|
||||||
["IP Address", ip_info.get("query")],
|
["IP Address", ip_info.get("query")],
|
||||||
["Organization", ip_info.get("org")],
|
["Organization", ip_info.get("org")],
|
||||||
[
|
["Location", f"{country}/{region}/{city}"],
|
||||||
"Location",
|
|
||||||
f"{ip_info.get('country')}/{ip_info.get('regionName')}/{ip_info.get('city')}",
|
|
||||||
],
|
|
||||||
["Timezone", ip_info.get("timezone")],
|
["Timezone", ip_info.get("timezone")],
|
||||||
["Internet Service Provider", ip_info.get("isp")],
|
["Internet Service Provider", ip_info.get("isp")],
|
||||||
["Autonomous System", as_number],
|
["Autonomous System", as_number],
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
"""MODULE: Provides functions that ensure an IP address is available to query the APIs for."""
|
"""MODULE: Provides functions that ensure an IP address is
|
||||||
|
available to query the APIs for."""
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
import ipaddress
|
import ipaddress
|
||||||
|
Loading…
x
Reference in New Issue
Block a user