コード例 #1
0
ファイル: fuzz.py プロジェクト: CHORDZHUO/FuzSub
def fuzz_second_domain_pool(domain, ban_ip):
    global TOP_LEVEL
    print "[*] SECOND-LEVEL DOMAIN FUZZING..."
    file_handle = open("./dict/second-level.dict")
    content_dict = file_handle.read().split('\n')
    pool = Pool(THREADS_NUM)

    pool.map(get_ip_x, itertools.izip(
        (str(sub) + '.' + str(top)
         for sub in content_dict for top in TOP_LEVEL),
        itertools.repeat(ban_ip),
        itertools.repeat('SECOND-LEVEL'),
        itertools.repeat(domain)))
    pool.terminate()
    print "[*] SECOND-LEVEL DOMAIN FINISHED..."
コード例 #2
0
ファイル: fuzz.py プロジェクト: CHORDZHUO/FuzSub
def fuzz_top_domain_pool(domain, ban_ip):
    print "[*] TOP-LEVEL DOMAIN FUZZING..."
    file_handle = open("./dict/top-level.dict")
    content_dict = file_handle.read().split('\n')
    if content_dict[-1] == '':
        del content_dict[-1]

    pool = Pool(THREADS_NUM)
    results = pool.map(get_ip_x, itertools.izip(
        map(lambda x: x + '.' + domain, content_dict),
        itertools.repeat(ban_ip),
        itertools.repeat('TOP-LEVEL'),
        itertools.repeat(domain)))
    TOP_LEVEL.extend([r for r in results if r])
    pool.terminate()
    print "[*] TOP-LEVEL DOMAIN FINISHED..."