示例#1
0
def subScan(target, filename):
    '''
    调用四个子域名搜集模块,并将结果保存在 sub_queue 里面
    使用 queueDeduplication 进行子域名 -> 网址的转换 ,同时检测存活
    :param target:
    :param filename:
    :return:
    '''
    try:
        oneforallMain.OneForAllScan(target)
    except Exception as e:
        print(e)
        pass
    try:
        subDomainsBruteMain.subDomainsBruteScan(target, filename)
    except Exception as e:
        print(e)
        pass
    try:
        Sublist3rMain.Sublist3rScan(target)
    except Exception as e:
        print(e)
        pass
    try:
        subfinderMain.subfinderScan(target, filename)
    except Exception as e:
        print(e)
        pass
    try:
        queueDeduplication(filename)
    except Exception as e:
        print(e)
        pass
示例#2
0
def subScan(target, filename):
    '''
    调用四个子域名搜集模块,并将结果保存在 sub_queue 里面
    使用 queueDeduplication 进行子域名 -> 网址的转换 ,同时检测存活
    :param target:
    :param filename:
    :return:
    '''

    Sub_report_path = Hx_config.Sub_report_path + filename + ".txt"  # save_sub.txt
    if os.path.exists(Sub_report_path):
        print(
            f"{Hx_config.red}savesub/{filename}.txt文件存在, 跳过资产扫描{Hx_config.end}"
        )
        queueDeduplication(filename)
        return  # 存在subtxt文件则直接跳过以下扫描。

    try:
        oneforallMain.OneForAllScan(target)
        pass
    except Exception as e:
        print(f'{Hx_config.red}OneForAllScan error :{Hx_config.end}', e)
    try:
        subDomainsBruteMain.subDomainsBruteScan(target, filename)
        pass
    except Exception as e:
        print(f'{Hx_config.red}subDomainsBruteScan error :{Hx_config.end}', e)
    try:
        Sublist3rMain.Sublist3rScan(target)
        pass
    except Exception as e:
        print(f'{Hx_config.red}Sublist3rScan error :{Hx_config.end}', e)
        pass
    try:
        subfinderMain.subfinderScan(target, filename)
        pass
    except Exception as e:
        print(f'{Hx_config.red}subfinderScan error:{Hx_config.end}', e)
        pass
    try:
        queueDeduplication(filename)
        pass
    except Exception as e:
        print(f'{Hx_config.red}queueDeduplication error:{Hx_config.end}', e)
        pass