mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Set user-agent to opwngrid.xyz
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -13,7 +13,7 @@ def is_connected():
|
|||||||
try:
|
try:
|
||||||
# check DNS
|
# check DNS
|
||||||
host = 'https://api.opwngrid.xyz/api/v1/uptime'
|
host = 'https://api.opwngrid.xyz/api/v1/uptime'
|
||||||
headers = {'user-agent': 'pwnagotchi/%s' % pwnagotchi.__version__}
|
headers = {'user-agent': f'pwnagotchi/{pwnagotchi.__version__}'}
|
||||||
r = requests.get(host, headers=headers, timeout=(30.0, 60.0))
|
r = requests.get(host, headers=headers, timeout=(30.0, 60.0))
|
||||||
if r.json().get('isUp'):
|
if r.json().get('isUp'):
|
||||||
return True
|
return True
|
||||||
|
Reference in New Issue
Block a user