简体   繁体   English

我如何将此 html POST 请求转换为 python

[英]How would I translate this html POST request into python

I am having difficulty translating this specific HTML POST request into Python - I am attempting to exploit a security vulnerability on a test server.我很难将这个特定的 HTML POST 请求转换为 Python - 我正在尝试利用测试服务器上的安全漏洞。

 director= <form action="http://127.0.0.1:8000/card/0" method="POST"> <input type="hidden" name="amount" value="8000" /> <input type="hidden" name="username" value="hacker" /> <input type="submit" value="View my photos" /> </form>

Before you run the code below.在运行下面的代码之前。 Run pip install requests.运行 pip 安装请求。

import requests

response = requests.get("http://api.open-notify.org/astros.json")
print(response)

>>>> Response<200>

See more details in the URL below.在下面的 URL 中查看更多详细信息。

https://www.nylas.com/blog/use-python-requests-module-rest-apis/ https://www.nylas.com/blog/use-python-requests-module-rest-apis/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM