import requests import re from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) class take_over: def __init__(self, host): self.host = host self.results = "" self.totalresults = "" self.fingerprints = ["Squarespace - Domain Not Claimed" ,"www.herokucdn.com/error-pages/no-such-app.html", "Squarespace - No Such Account", "

If you're trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

", "

If you\'re trying to publish one, read the full documentation to learn how to set up GitHub Pages for your repository, organization, or user account.

", "Bummer. It looks like the help center that you are trying to reach no longer exists.", " The page you\'re looking for could not be found (404) ", "The specified bucket does not exist", "Bad Request: ERROR: The request could not be satisfied", "Fastly error: unknown domain:", "There isn't a Github Pages site here.", "No such app", "Unrecognized domain", "Sorry, this shop is currently unavailable.", "Whatever you were looking for doesn't currently exist at this address", "The requested URL was not found on this server.", "This UserVoice subdomain is currently available!", "Do you want to register *.wordpress.com?", "Help Center Closed"] def do_take(self): try: print("\t Searching takeovers for " + self.host) r = requests.get('https://' + self.host, verify=False) for x in self.fingerprints: take_reg = re.compile(x) self.temp = take_reg.findall(r.text) if self.temp != []: print("\t\033[91m Takeover detected! - " + self.host + "\033[1;32;40m ") except Exception as e: print(e) def process(self): self.do_take()