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.
 
 
 
 
 
 

16 lines
430 B

import requests
if __name__ == "__main__":
sess = requests.Session()
resp = sess.post("http://localhost:8888/api/v1/login", data={
"username": "admin",
"password": "admin"
})
print(resp.json())
sess.headers.update({
"Authorization": f"Bearer {resp.json()['access_token']}"
})
for _ in range(20):
print(sess.get("http://localhost:8888/api/v1/wg/generate_psk").json())