You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
260 B
Python

from time import sleep
import yaml
import requests
with open("wg-p2p-client.conf") as f:
cfg = yaml.safe_load(f)
last_hash = ""
url = f"{cfg['url']}/hash/{cfg['remote_wg']}"
while True:
new_hash = requests.get(url).text
print(new_hash)
sleep(5)