Last active
April 23, 2020 15:04
-
-
Save 0xInfection/c88d68deae9c7dd5f031d7a6ce0e84dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do reverse ip lookup via the yougetsignal.com API (illegally). | |
# No license, do whatever you want to do with this script. | |
import io | |
import json | |
import time | |
import requests | |
def request(webs: str): | |
url = "https://domains.yougetsignal.com/domains.php" | |
post = { | |
'remoteAddress' : webs, | |
} | |
request = requests.post(url, timeout=10, data=post).text | |
return request | |
def parse(content: str): | |
gotcha = json.loads(content) | |
stat = gotcha['status'] | |
ip = gotcha['remoteIpAddress'] | |
url = gotcha['remoteAddress'] | |
tot = gotcha['domainCount'] | |
domar = gotcha['domainArray'] | |
print("\n [+] Status: %s" % stat) | |
print(" [+] Total domains for %s: %s" % (url, tot)) | |
return (url, domar) | |
def output(dom, cont: str): | |
dx = dom+'.txt' | |
fx = io.open(dx, 'w+') | |
for i in cont: | |
fx.write(i[0]+'\n') | |
fx.close() | |
if __name__ == '__main__': | |
x = input(" [#] List of sites :> ") | |
try: | |
with io.open(x) as f: | |
sites = [i.strip() for i in f] | |
except FileNotFoundError: | |
print(" [-] File not found, enter a proper path.") | |
for i in sites: | |
di, da = parse(request(i)) | |
output(di, da) | |
time.sleep(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment