Skip to content

Instantly share code, notes, and snippets.

@JoyGhoshs
Created October 2, 2021 09:21
Show Gist options
  • Save JoyGhoshs/48b6a5223bf0fc5ab7f78a9596bb4f45 to your computer and use it in GitHub Desktop.
Save JoyGhoshs/48b6a5223bf0fc5ab7f78a9596bb4f45 to your computer and use it in GitHub Desktop.
import requests
import json
def asn_lookup(company):
headers = {
'User-Agent': 'ASNLookup PY/Client'
}
asn_db=requests.get(f'http://asnlookup.com/api/lookup?org={company}',headers).text
print(f'{Fore.GREEN}[+] {Fore.WHITE}ASN Lookup Result For {company}')
print('')
asndb_load=json.loads(asn_db)
for iprange in asndb_load:
print(iprange)
asn_lookup('company_name')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment