示例#1
0
    def fetch_org(self):
        for item in self.domain_info_list[:20]:
            if not utils.verify_cert("https://{}".format(item.domain)):
                continue

            cert = utils.get_cert(item.domain, 443)

            if not cert:
                continue

            subject = cert.get("subject", {})
            organizational = subject.get("organizational")

            if organizational:
                logger.info("get cert org {} {}".format(self.base_domain, organizational))
                self.organizational = organizational
                return
示例#2
0
 def work(self, target):
     ip, port = target.split(":")
     cert = utils.get_cert(ip, int(port))
     if cert:
         self.fetch_map[target] = cert