Skip to content

Commit

Permalink
Update ReverseIPLookup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BQBB authored Sep 14, 2019
1 parent ee0ff81 commit 269d8cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ReverseIPLookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ def extract(ip):
save = open('Sites.txt','a')
try:
i=socket.gethostbyaddr(str(ip))
save.write(i[0]+'\n')
save.write(i[0]+' | '+str(ip)+'\n')
except:
req=requests.get('https://api.viewdns.info/reverseip/?host='+str(ip)+'&apikey=API-KEY&output=json').text
js=json.loads(req)
count=int(js['response']['domain_count'])
for i in range(0,count):
save.write(js['response']['domains'][i]['name']+'\n')
save.write(js['response']['domains'][i]['name']+' | '+str(ip)+'\n')
print('''
////////////////////////////////////////
///////////////////////////////////////////
Expand Down

0 comments on commit 269d8cd

Please sign in to comment.