Ejemplo n.º 1
0
 def test_generate_general_dicts(self):
     esd = EnumSubDomain('feei.cn')
     subs = esd.generate_general_dicts('{letter}{letter}{letter}')
     # print(subs)
     assert 'c-r' in subs
     assert '-ab' not in subs
     assert 'cd-' not in subs
     assert '--e' not in subs
Ejemplo n.º 2
0
def subDomainBrute(domain):
    dm = Domain()
    dm.dName = domain
    dm.save()
    domains = EnumSubDomain(domain=domain).run()
    sdm = SubDomain()
    for key, value in domains.items():
        sdm.dName = domain
        sdm.sdName = key
        sdm.ip = value
        sdm.save()

    print(domains)
Ejemplo n.º 3
0
 def esd_search():
     try:
         Esddomains = []
         for key in EnumSubDomain(self.url).run():
             Esddomains.append(key)
         self.url1 = Esddomains
     except Exception:
         print('ESD error!')
Ejemplo n.º 4
0
    def main(self):
        threads = []
        self.remove()

        with open('domain.txt', 'r') as f:
            for sub in f.readlines():
                try:
                    domains = EnumSubDomain(sub.strip()).run()
                    for i in domains.keys():
                        if domains[i][0] == "0.0.0.1" or domains[i][
                                0] == '127.0.0.1':
                            continue
                        else:
                            self.save(i)
                except Exception as e:
                    print(e)
                    pass

        self.filter()
Ejemplo n.º 5
0
def test_generate_general_dict():
    start_time = time.time()
    esd = EnumSubDomain('feei.cn')
    rules = {
        '{letter}': 26,
        '{letter}{number}': 260,
        '{letter}{letter}': 676,
        '{letter}{letter}{number}': 6760,
        '{letter}{letter}{number}{number}': 67600,
        '{letter}{letter}{letter}': 17576,
        '{letter}{letter}{letter}{number}{number}': 1757600,
        '{number}': 10,
        '{number}{number}': 100,
        '{number}{number}{number}': 1000,
    }

    for k, v in rules.items():
        esd.general_dicts = []
        dicts = esd.generate_general_dicts(k)
        print(len(dicts), k)
        assert len(dicts) == v
    print(time.time() - start_time)
Ejemplo n.º 6
0
def test_load_sub_domain_dict():
    esd = EnumSubDomain('feei.cn')
    assert 'www' in esd.load_sub_domain_dict()
Ejemplo n.º 7
0
<script src='https://s10.mogucdn.com/__/mfp/meili-base-logger/assets/1.3.6/logger.min.js'></script>
<!--[if (IE gte 9)|(!IE)]><!--><script src="https://s10.mogucdn.com/__/mfp/meili-m/assets/1.6.1/m.mgj.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/jquery.2.1.1.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/jquery.migrate.1.2.1.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-image-lazyload/assets/2.0.0/imageLazyloadUndepend.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-mgj-top-nav-side-bar/assets/0.1.10/TopNavSideBar.js"></script><!--<![endif]--><!--[if lt IE 9]><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/es5-shim.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/es5-sham.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/console-polyfill.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/json2.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-m/assets/1.6.1/m.mgj.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/jquery.1.7.2.js"></script><![endif]--><script type="text/javascript">  (function(){ var wWidth = $(window).width(); if(wWidth < 1212){ $('body').addClass('media_screen_960'); } else { $('body').addClass('media_screen_1200'); }  window.MoGu && $.isFunction(MoGu.set) && MoGu.set('initTime', (new Date()).getTime()); var ua = navigator.userAgent;  var is_plat_ipad = ua.match(/(iPad).*OS\s([\d_]+)/); if(is_plat_ipad) { $('body').addClass('media_ipad'); }  var is_plat_ipadApp = ua.indexOf('MogujieHD') >= 0 || ua.indexOf('Mogujie4iPad') >= 0 || location.href.indexOf('_atype=ipad') >= 0; if(is_plat_ipadApp) { $('body').addClass('media_ipad_app');  $('body').append('<style type="text/css">.header_2015,.header_nav,.foot .foot_wrap{display: none;}.foot{height: 0;background: none;}.back2top_wrap{height:0;width:0;overflow:hidden;opacity:0;}</style>');  setTimeout(function(){ $('.back2top_wrap').remove(); },1000) } })();</script><script src="https://s10.mogucdn.com/__/mfp/meili-trace/assets/1.2.5/trace.min.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-mgj-pc-header/assets/0.0.17/header.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-mgj-pc-new-sidebar/assets/0.0.17/sidebar.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-mgj-pc-footer/assets/0.0.9/footer.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-mgj-ie67-upgrade/assets/0.1.8/ie67upgrade.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-base-mwp-js-sdk/assets/3.1.3/mwp.all.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-shoppc-header/assets/0.1.17/shopHeader.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-behavior-trace/assets/1.3.4/index.min.js"></script><script src="https://s10.mogucdn.com/__/newtown/mogu-global/assets/pc/common/im/index.js-b05a6f12.js,newtown/mogu-global/assets/pc/common/im/newcinfo.js-47757010.js"></script> <script type="text/javascript" src="https://s10.mogucdn.com/__/mfp/meili-all-libs-base/assets/2.1.0/vue.js"></script> <script type="text/javascript" src="https://s10.mogucdn.com/__/mfp/meili-all-libs-base/assets/2.1.0/vue-resource.js"></script> <script src="https://s10.mogucdn.com/__/mfp/meili-shoppc-module-itemwall/assets/0.0.8/index.all.min.js"></script><script src="//static.mogujie.com/__/mfp/mgj-shop/assets/1.1.70/pages/pc/index/index.js"></script><script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-25590490-1', 'auto');
    ga('send', 'pageview');
</script>
</body></html>"""
    ratio = SequenceMatcher(None, a_html, b_html).real_quick_ratio()
    assert ratio > 0.8

root_domain = 'python.org'
subs = ['planet.python.org', 'dinsdale.python.org', 'wiki', 'discuss.python.org', 'front', 'bugs']


def test_dns_query():
    before = time.time()
    enum = DNSQuery(root_domain,subs, root_domain)
    res = enum.dns_query()
    now = time.time()
    print(now - before)
    print(res)


test_dns_query()'''
domain_fuzz = EnumSubDomain('ivte.feei.cn', debug=True)
a = domain_fuzz.run()
def main(domain):
    try:
        domains = EnumSubDomain(domain).run()
        return domains
    except:
        return False
Ejemplo n.º 9
0
 def test_load_sub_domain_dict(self):
     esd = EnumSubDomain('feei.cn')
     subs = esd.load_sub_domain_dict()
     assert len(subs) == 661593
Ejemplo n.º 10
0
<script src='https://s10.mogucdn.com/__/mfp/meili-base-logger/assets/1.3.6/logger.min.js'></script>
<!--[if (IE gte 9)|(!IE)]><!--><script src="https://s10.mogucdn.com/__/mfp/meili-m/assets/1.6.1/m.mgj.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/jquery.2.1.1.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/jquery.migrate.1.2.1.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-image-lazyload/assets/2.0.0/imageLazyloadUndepend.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-mgj-top-nav-side-bar/assets/0.1.10/TopNavSideBar.js"></script><!--<![endif]--><!--[if lt IE 9]><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/es5-shim.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/es5-sham.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/console-polyfill.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/json2.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-m/assets/1.6.1/m.mgj.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-lib/assets/0.0.6/jquery.1.7.2.js"></script><![endif]--><script type="text/javascript">  (function(){ var wWidth = $(window).width(); if(wWidth < 1212){ $('body').addClass('media_screen_960'); } else { $('body').addClass('media_screen_1200'); }  window.MoGu && $.isFunction(MoGu.set) && MoGu.set('initTime', (new Date()).getTime()); var ua = navigator.userAgent;  var is_plat_ipad = ua.match(/(iPad).*OS\s([\d_]+)/); if(is_plat_ipad) { $('body').addClass('media_ipad'); }  var is_plat_ipadApp = ua.indexOf('MogujieHD') >= 0 || ua.indexOf('Mogujie4iPad') >= 0 || location.href.indexOf('_atype=ipad') >= 0; if(is_plat_ipadApp) { $('body').addClass('media_ipad_app');  $('body').append('<style type="text/css">.header_2015,.header_nav,.foot .foot_wrap{display: none;}.foot{height: 0;background: none;}.back2top_wrap{height:0;width:0;overflow:hidden;opacity:0;}</style>');  setTimeout(function(){ $('.back2top_wrap').remove(); },1000) } })();</script><script src="https://s10.mogucdn.com/__/mfp/meili-trace/assets/1.2.5/trace.min.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-mgj-pc-header/assets/0.0.17/header.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-mgj-pc-new-sidebar/assets/0.0.17/sidebar.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-mgj-pc-footer/assets/0.0.9/footer.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-mgj-ie67-upgrade/assets/0.1.8/ie67upgrade.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-base-mwp-js-sdk/assets/3.1.3/mwp.all.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-shoppc-header/assets/0.1.17/shopHeader.js"></script><script src="https://s10.mogucdn.com/__/mfp/meili-behavior-trace/assets/1.3.4/index.min.js"></script><script src="https://s10.mogucdn.com/__/newtown/mogu-global/assets/pc/common/im/index.js-b05a6f12.js,newtown/mogu-global/assets/pc/common/im/newcinfo.js-47757010.js"></script> <script type="text/javascript" src="https://s10.mogucdn.com/__/mfp/meili-all-libs-base/assets/2.1.0/vue.js"></script> <script type="text/javascript" src="https://s10.mogucdn.com/__/mfp/meili-all-libs-base/assets/2.1.0/vue-resource.js"></script> <script src="https://s10.mogucdn.com/__/mfp/meili-shoppc-module-itemwall/assets/0.0.8/index.all.min.js"></script><script src="//static.mogujie.com/__/mfp/mgj-shop/assets/1.1.70/pages/pc/index/index.js"></script><script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-25590490-1', 'auto');
    ga('send', 'pageview');
</script>
</body></html>"""
    ratio = SequenceMatcher(None, a_html, b_html).real_quick_ratio()
    assert ratio > 0.8

root_domain = 'python.org'
subs = ['planet.python.org', 'dinsdale.python.org', 'wiki', 'discuss.python.org', 'front', 'bugs']


def test_dns_query():
    before = time.time()
    enum = DNSQuery(root_domain,subs, root_domain)
    res = enum.dns_query()
    now = time.time()
    print(now - before)
    print(res)


test_dns_query()'''
domain_fuzz = EnumSubDomain('python.org', debug=True)
a = domain_fuzz.run()