zoukankan      html  css  js  c++  java
  • [python]扫描网站后台脚本

    #!/usr/bin/python
    """<--             The scanner to scan the admin/login path
       
                                                        by co1d7urt -->"""
    import sys,httplib
    from optparse import OptionParser
    usageString = "Usage: %prog [options] hostname"
    parser = OptionParser(usage=usageString)
    (opts,args) = parser.parse_args()
    if len(args) < 1:
        parser.error("Hostname is required")
    print __doc__
    website = args[0]
    #login path
    dirs = ["admin","login","admin_index","admin/admin","admin/login","admin/index","admin/user"]
    
    for line in dirs:
        conn = httplib.HTTPConnection(website)
        conn.request('GET','/'+line)
        r1 = conn.getresponse()
        if r1.status == 200 or r1.status == 301:
            print "********************************Lucky?*************************************"
        print website+'/'+line,r1.status,r1.reason
        conn.close()
        conn = httplib.HTTPConnection(website)
        conn.request('GET','/'+line+'.asp')
        r1 = conn.getresponse()
        if r1.status == 200 or r1.status == 301:
            print "********************************Lucky?*************************************"
        print website+'/'+line+'.asp',r1.status,r1.reason
        conn.close()
        conn = httplib.HTTPConnection(website)
        conn.request('GET','/'+line+'.php')
        r1 = conn.getresponse()
        if r1.status == 200 or r1.status == 301:
            print "********************************Lucky?*************************************"
        print website+'/'+line+'.php',r1.status,r1.reason
        conn.close()
    f.close()
  • 相关阅读:
    棋盘格渲染
    openvino踩坑之Data type is unsupported
    [video super resolution] ESPCN论文笔记
    tensorflow fp16训练
    openvino安装踩坑记
    python numpy中astype使用不当导致图像出现artifact
    Python~字典
    Django~待解决的问题
    正则表达式应用
    GitLab使用
  • 原文地址:https://www.cnblogs.com/co1d7urt/p/2763226.html
Copyright © 2011-2022 走看看