示例#1
0
文件: Medusa.py 项目: wcxxxxx/Medusa
async def MedusaScan(city: str) -> str:
    Url = city
    #设置一个时间搓这样可以直接用时间搓查
    ThreadPool = ClassCongregation.ThreadPool()  #定义一个线程池
    Values = ClassCongregation.AgentHeader().result("None")
    San(ThreadPool, Url, Values, ProxyIp=None, Module=None)
    return ""
示例#2
0
async def MedusaScan(url: str, token: str) -> str:
    ThreadPool = ClassCongregation.ThreadPool()  #定义一个线程池
    Values = ClassCongregation.AgentHeader().result("None")
    BotScan(ThreadPool, url, Values, token)
    ThreadPool.Start(30)  # 启动多线程
    number_of_scan_results = ClassCongregation.BotNumberOfLoopholes()  #输出个数
    return number_of_scan_results
示例#3
0
async def MedusaScan(Url: str, token: str) -> str:
    ThreadPool = ClassCongregation.ThreadPool()  #定义一个线程池
    Values = ClassCongregation.AgentHeader().result("None")
    San(ThreadPool, Url, Values, token, Module=None)
    ThreadPool.Start(30)  # 启动多线程
    return ""
示例#4
0
    if PortListInformation == None and PortRangeInformation == None:  # 默认默认扫描端口信息
        print("\033[32m[ + ] Use default port detection module \033[0m")
        Pool.PortAppend(Port,Url=Url,PortInformation="",PortType=3,ActiveScanId=ActiveScanId,Uid=Uid)
    elif PortListInformation != None and PortRangeInformation != None:  # 都不等于空的情况
        print("\033[31m[ ! ] Only one format port can be entered, please use -h to view the help file!\033[0m")
        os._exit(0)  # 直接退出整个函数
    elif PortListInformation == None and PortRangeInformation != None:  # 输入范围型端口
        PortType = 1
        Pool.PortAppend(Port,Url=Url ,PortInformation=PortRangeInformation, PortType=1, ActiveScanId=ActiveScanId, Uid=Uid)
        print("\033[32m[ + ] The scan range is: "+"\033[0m"+"\033[35m"+PortRangeInformation+"\033[0m")
    elif PortListInformation != None and PortRangeInformation == None:  # 输入字典型端口
        PortType = 2
        Pool.PortAppend(Port, Url=Url,PortInformation=PortListInformation, PortType=2, ActiveScanId=ActiveScanId, Uid=Uid)
        print("\033[32m[ + ] The scanned dictionary is"+"\033[0m"+"\033[35m"+ PortListInformation+ "\033[0m")


    if not user_agent_randomization:  # 如果值为Ture
        headers["User-Agent"] = ClassCongregation.AgentHeader().result()  # 传入随机头
    InitialScan(Pool,InputFileName, Module,ActiveScanId,Uid,headers,Url)#最后启动主扫描函数,这样如果多个IP的话优化速度,里面会做url或者url文件的判断
    print("\033[31m[ ! ] Scan is complete, please see the ScanResult file\033[0m")


#Url和proxies写到kwargs中
#Headers写到配置文件中
# from IPy import IP
# ip = IP('192.168.0.0/28')#后面批量生成C段扫描会用到
# print(ip.len())#IP个数有多少
# for x in ip:
#     print(x)