import requests
url = "https://webhacking.kr/challenge/web-18/"
headers = {"Cookie":"PHPSESSID=세션 값"}
# (filename, data, content_type, headers)
files = {'upfile':(filename, '', "text/plain")}
r = requests.post(url, files=files, headers=headers)
Python
복사