This commit is contained in:
alex
2021-12-11 17:58:32 +01:00
parent 93699e7c8a
commit dd14db2b46
10 changed files with 1653 additions and 0 deletions

15
client.py Normal file
View File

@@ -0,0 +1,15 @@
import requests
import socket
from pathlib import Path
url = "http://store.micouleau.info:4000/what_do_you_need/"
ROOT = "/home/alex/Medias/Micoustore/"
p = Path(ROOT)
data = {x.as_posix().replace(ROOT, ""): x.stat().st_size for x in p.rglob("*/*")}
# print(data)
data["host"] = socket.gethostname()
data["key"] = "SuperSecretKeyMicou!"
r = requests.post(url, json=data)
print(r.text)