コード例 #1
0
ファイル: w8ay.py プロジェクト: ClayAndMore/py_scanner
def main():
    root = "https://www.shiyanlou.com/"
    threadNum = 10
    # CDN Check
    print "CDN check...."
    msg,iscdn =  fun_until.checkCDN(root)
    print msg
    if iscdn:
        #IP Ports Scan
        ip = common.gethostbyname(root)
        print "IP:",ip
        print "START Port Scan:"
        pp = PortScan.PortScan(ip)
        pp.work()
    
    # DIR Fuzz
    dd = webdir.webdir(root,threadNum)    
    dd.work()
    dd.output()
    
    #webcms
    ww = webcms.webcms(root,threadNum)
    ww.run()
    
    #spider
    w8 = SpiderMain(root,threadNum)
    w8.craw()
コード例 #2
0
ファイル: w8ay.py プロジェクト: ClayAndMore/py_scanner
def main():
    root = "https://shiyanlou.com"
    threadNum = 10
    ip = common.gethostbyname(root)
    print "IP:", ip
    print "Start Port Scan:"
    pp = PortScan.PortScan(ip)
    pp.work()

    #webcms
    ww = webcms.webcms(root, threadNum)
    ww.run()

    #spider
    w8 = SpiderMain(root, threadNum)
    w8.craw()
コード例 #3
0
def main():
    #root = "http://www.shiyanlou.com/"
    root = "http://ctf5.shiyanbar.com/423/web/?id=1"
    threadNum = 10
    ip = common.gethostbyname(root)
    print("IP:", ip)
    print("Start Port Scan:")
    pp = PortScan.PortScan(ip)
    pp.work()

    #webcms
    ww = webcms_check.webcms()
    ww.run()

    #spider
    sbs = SpiderMain(root, threadNum)
    sbs.craw()
コード例 #4
0
ファイル: webfind.py プロジェクト: luckxiao520/Y-WebFind
def main():
    options = get_options()
    domain = options.domain
    domains_file_path = options.domains_file_path
    webinfo = options.webinfo
    port_scan = options.port_scan
    net_c = options.net_c
    all_ports = options.all_ports
    weak_scan = options.weak_scan
    debug = options.debug
    webinfos_dict = None
    ip_port_names_dict = None
    if debug:
        logger.setLevel(logging.DEBUG)
    if webinfo or not webinfo and not port_scan:  # 默认只进行webinfo获取
        logger.info("web scan\n")
        webinfos_dict = WebInfoScan(domain=domain,
                                    domains_file_path=domains_file_path).run()
    if port_scan:
        ip_port_names_dict = PortScan(domain=domain,
                                      domains_file_path=domains_file_path,
                                      net_c=net_c,
                                      all_ports=all_ports).run()
        if webinfo:  # 对端口扫描后的进行web服务探测
            webinfos_dict = WebInfoScan(
                ip_port_names_dict=ip_port_names_dict).run()

    wout = WriteOutput(domain=domain,
                       domains_file_path=domains_file_path,
                       webinfos_dict=webinfos_dict,
                       ip_port_names_dict=ip_port_names_dict)
    # 写数据
    wout.save()
    # 弱口令
    if weak_scan:
        port_and_weak_info = WeakPassword(ip_port_names_dict).run()


# 这里重新写把弱口令也写进去
    wout = WriteOutput(domain=domain,
                       domains_file_path=domains_file_path,
                       webinfos_dict=webinfos_dict,
                       ip_port_names_dict=port_and_weak_info)
    wout.save()
コード例 #5
0
def main():
    root = "http://www.sunbridgegroup.com"
    # root = "http://www.china-zmc.com"
    threadNum = 10

    domain = urlparse(root).netloc

    # CDN_Scan
    print("CDN检查中")
    msg, iscdn = CDN_Scan.checkCDN(root)
    print(msg)
    output.add("CDN", msg)
    if iscdn:
        # IP Port Scan
        ip = common.gethostbyname(root)
        print("IP:", ip)
        print("Start Port Scan:")
        pp = PortScan.PortScan(ip)
        pp.work()
        output.build_html(domain)
コード例 #6
0
def main():
    root = "https://www.shiyanlou.com/"
    threadNum = 10
    ip = common.gethostbyname(root)
    print('IP:', ip)
    print("start Port Scan:")

    # portscan
    pp = PortScan.PortScan(ip)
    pp.work()

    # DIR Fuzz
    dd = webdir.WebDir(root, threadNum)
    dd.work()
    dd.output()

    # webcms
    ww = webcms.webcms(root, threadNum)
    ww.run()

    # spider
    sm = SpiderMain(root, threadNum)
    sm.craw()
コード例 #7
0
def main():
    root = "https://www.shiyanlou.com/"
    domain = common.w8urlparse(root)
    threadNum = 10
    output = outputer.outputer()
    # CDN Check
    print "CDN check...."
    iscdn = True
    try:
        msg, iscdn = fun_until.checkCDN(root)
        output.add("cdn", msg)
        output.build_html(domain)
        print msg
    except:
        print "[Error]:CDN check error"

    if iscdn:
        #IP Ports Scan
        ip = common.gethostbyname(root)
        print "IP:", ip
        print "START Port Scan:"
        pp = PortScan.PortScan(ip)
        pp.work()
        output.build_html(domain)

    # DIR Fuzz
    dd = webdir.webdir(root, threadNum)
    dd.work()
    dd.output()
    output.build_html(domain)
    #webcms
    ww = webcms.webcms(root, threadNum)
    ww.run()
    output.build_html(domain)
    #spider
    w8 = SpiderMain(root, threadNum)
    w8.craw()
コード例 #8
0
def main():
    checkEnvironment()  #检测环境
    common.setPaths(modulePath())  # 为一些目录和文件设置了绝对路径

    #目标url,一些参数设置
    parser = argparse.ArgumentParser(description="Ajatar scan must a url")
    parser.add_argument("-u", "--url", help="url")
    args = parser.parse_args()
    root = args.url
    #root = "http://www.imufe.edu.cn/"

    #判断是否为Windows
    if IS_WIN:
        #Windows界面颜色
        windowsColorInit()
    #Banner()

    try:
        configFileParser(os.path.join(paths.Ajatar_ROOT_PATH, "config.conf"))
        #线程数
        threadNum = initOption(args)
    except Exception as e:
        raise e

    #拆解url 得到netloc
    domain = common.Ajurlparse(root)
    #输出报告对象
    output = outputer.outputer()

    # CDN Check
    print "CDN check...."
    iscdn = True
    try:
        msg, iscdn = fun_until.checkCDN(root)
        #获取数据生成报告
        output.add("cdn", msg)
        #build html
        output.build_html(domain)
        print msg
    except:
        print "[Error]:CDN check error"

    if iscdn:
        #IP Ports Scan
        #获取ip
        ip = common.gethostbyname(root)
        print "IP:", ip
        print "Start Port Scan:"
        #ip端口扫描
        pp = PortScan.PortScan(ip)
        pp.work()
        output.build_html(domain)

    # DIR Fuzz
    dd = webdir.webdir(root, threadNum)
    dd.work()
    dd.output()
    output.build_html(domain)

    #webcms
    ww = webcms.webcms(root, threadNum)
    ww.run()
    output.build_html(domain)

    #spider
    Aj = SpiderMain(root, threadNum)
    Aj.craw()
コード例 #9
0
ファイル: test.py プロジェクト: ClayAndMore/py_scanner
import sys
import urlparse
from script import bak_check
from lib.core import webcms, PortScan
reload(sys)
sys.setdefaultencoding('utf-8')

if __name__ == "__main__":
    ww = PortScan.PortScan()
    ww.work()