Created
January 20, 2021 15:19
-
-
Save BoboTiG/de0cef9f2ca135b997c23b6d95fa81e8 to your computer and use it in GitHub Desktop.
Medium - The Mystery of the Endless HTTPS Call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
url = "https://<HOST>/nuxeo/api/v1/upload/<BATCH_ID>/0/execute/FileManager.Import" | |
headers = {"X-Batch-No-Drop": "true", "Content-Type": "application/json"} | |
cookies = {"X-Authentication-Token": "<TOKEN>"} | |
params = {"context": {"currentDocument": "/default-domain/UserWorkspaces/<USER>"}} | |
try: | |
req = requests.post(url, headers=headers, cookies=cookies, json=params) | |
except KeyboardInterrupt: | |
print("CTRL+C hit!") | |
else: | |
print(req.json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment