Exemplo n.º 1
0
    def run(self):
        t1 = time.time()
        self._fetch_domains()
        logger.info("start {} AltDNS {}  dict {}".format(self.base_domain,
                                                         len(self.domains), len(self.dicts)))

        out = services.altdns(self.domains, self.base_domain, self.dicts)

        elapse = time.time() - t1
        logger.info("end AltDNS result {}, elapse {}".format(len(out), elapse))

        return out
Exemplo n.º 2
0
    def test_altdns(self):
        c = ['www.baidu.com', 'map.baidu.com', 'test.baidu.com']
        w = ['private', 'api-docs', 'lc']

        data = services.altdns(c, "baidu.com", w)
        self.assertTrue(len(data) >= 1)