whois_domain.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:operative-framework 作者: graniet 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号