def main(self):
domain_list = []
load_name = self.get_options("enterprise")
print Style.BRIGHT + Fore.BLUE + "Search domain name for "+load_name + Style.RESET_ALL
start_with = ["www.","http://","https://"]
end_with = [".com",".fr",".org",".de",".eu"]
for line in start_with:
for end_line in end_with:
domain = line + str(load_name) + end_line
try:
return_code = urllib.urlopen(domain).getcode()
return_code = str(return_code)
if return_code != "404":
domain_list.append(domain)
print Fore.GREEN + "- "+Style.RESET_ALL + domain
except:
Back.YELLOW + Fore.BLACK + "Can't get return code" + Style.RESET_ALL
if len(domain_list) > 0:
for domain in domain_list:
self.export.append(domain)
else:
print Fore.RED + "No domain found" + Style.RESET_ALL
评论列表
文章目录