GithubHelp home page GithubHelp logo

Comments (5)

AabyssZG avatar AabyssZG commented on July 24, 2024

好的,已经收到反馈了,非常感谢师傅的建议😍

from springboot-scan.

AabyssZG avatar AabyssZG commented on July 24, 2024

但是我没有理解,你写的代码当中,为什么还要多Get请求一次?
直接整体请求一次拿到需要的数据就行了,这样会更好吧。。

                    try:
                        requests.packages.urllib3.disable_warnings()
                        r = requests.get(url=url, headers=newheader, timeout=6, allow_redirects=False, verify=False)  # 设置超时6秒
                        sleep(int(float(sleeps)))
                        if r.text != None:
                            if ((r.status_code == 200) and ('need login' not in r.text) and ('禁止访问' not in r.text) and (len(r.content) != 3318) and ('无访问权限' not in r.text) and ('认证失败' not in r.text)):
                                cprint("[+] 状态码%d" % r.status_code + ' ' + "信息泄露URL为:" + u + '    ' + "页面长度为:" + str(len(r.content)),"red")
                                f2 = open("output.txt", "a")
                                f2.write(u + '\n')
                                f2.close()
                            elif(r.status_code == 200):
                                cprint("[+] 状态码%d" % r.status_code + ' ' + "但无法获取信息 URL为:" + u + '    ' + "页面长度为:" + str(len(r.content)),"magenta")
                        else:
                            cprint("[-] 状态码%d" % r.status_code + ' ' + "无法访问URL为:" + u ,"yellow")
                    except KeyboardInterrupt:
                        print("Ctrl + C 手动终止了进程")
                        sys.exit()
                    except Exception as e:
                        cprint("[-] URL为 " + u + " 的目标积极拒绝请求,予以跳过!", "magenta")
                        break

from springboot-scan.

aba666666 avatar aba666666 commented on July 24, 2024

但是我没有理解,你写的代码当中,为什么还要多Get请求一次? 直接整体请求一次拿到需要的数据就行了,这样会更好吧。。

                    try:
                        requests.packages.urllib3.disable_warnings()
                        r = requests.get(url=url, headers=newheader, timeout=6, allow_redirects=False, verify=False)  # 设置超时6秒
                        sleep(int(float(sleeps)))
                        if r.text != None:
                            if ((r.status_code == 200) and ('need login' not in r.text) and ('禁止访问' not in r.text) and (len(r.content) != 3318) and ('无访问权限' not in r.text) and ('认证失败' not in r.text)):
                                cprint("[+] 状态码%d" % r.status_code + ' ' + "信息泄露URL为:" + u + '    ' + "页面长度为:" + str(len(r.content)),"red")
                                f2 = open("output.txt", "a")
                                f2.write(u + '\n')
                                f2.close()
                            elif(r.status_code == 200):
                                cprint("[+] 状态码%d" % r.status_code + ' ' + "但无法获取信息 URL为:" + u + '    ' + "页面长度为:" + str(len(r.content)),"magenta")
                        else:
                            cprint("[-] 状态码%d" % r.status_code + ' ' + "无法访问URL为:" + u ,"yellow")
                    except KeyboardInterrupt:
                        print("Ctrl + C 手动终止了进程")
                        sys.exit()
                    except Exception as e:
                        cprint("[-] URL为 " + u + " 的目标积极拒绝请求,予以跳过!", "magenta")
                        break

别动源代码,添加break即可
image

from springboot-scan.

AabyssZG avatar AabyssZG commented on July 24, 2024

收到,已经加上了,感谢师傅的反馈😘

from springboot-scan.

AabyssZG avatar AabyssZG commented on July 24, 2024

那应该没问题了哈哈,如果还有问题,欢迎师傅继续提Issues,感谢师傅😍

from springboot-scan.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.