def main(self):
detail = None
website = self.require["website"][0]["value"]
if "://" in self.get_options('website'):
website = self.get_options('website').split('://')[1]
try:
whois_information = pythonwhois.get_whois(website)
detail = whois_information['contacts']['registrant']
except:
print Fore.RED + "Please use correct name without http(s)://" + Style.RESET_ALL
export = []
total = ""
if detail != None:
for element in detail:
print Fore.BLUE + "* " + Style.RESET_ALL + element + " : " + str(detail[element])
total = element + " : "+ str(detail[element])
self.export.append(total)
else:
print Fore.RED + "Can't get whois information for : " +self.get_options('website') + Style.RESET_ALL
评论列表
文章目录