You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
290 B
15 lines
290 B
#!/usr/bin/python3
|
|
import requests
|
|
import sys
|
|
|
|
### print (sys.argv)
|
|
### print(len(sys.argv))
|
|
if len(sys.argv) < 3:
|
|
print("Invalid parameters\n")
|
|
exit
|
|
|
|
filename = sys.argv[2]
|
|
url = sys.argv[1]
|
|
|
|
files = {'file': open(filename, 'rb')}
|
|
final_resp = requests.post(url, files=files)
|