files
This commit is contained in:
15
client.py
Normal file
15
client.py
Normal 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)
|
||||
Reference in New Issue
Block a user