mirror of
https://github.com/nikdoof/aaisp2mqtt.git
synced 2025-12-17 12:49:22 +00:00
Encode login details in ASCII
This commit is contained in:
@@ -12,7 +12,7 @@ import requests
|
|||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
VERSION = '0.2.2'
|
VERSION = '0.2.3'
|
||||||
|
|
||||||
AAISP_INFO_URL = 'https://chaos2.aa.net.uk/broadband/info'
|
AAISP_INFO_URL = 'https://chaos2.aa.net.uk/broadband/info'
|
||||||
|
|
||||||
@@ -57,8 +57,8 @@ def main():
|
|||||||
# attempt to get details from aaisp
|
# attempt to get details from aaisp
|
||||||
LOG.info('Connecting to AAISP CHAOSv2 endpoint as %s/%s', aaisp_username, '*' * len(aaisp_password))
|
LOG.info('Connecting to AAISP CHAOSv2 endpoint as %s/%s', aaisp_username, '*' * len(aaisp_password))
|
||||||
response = requests.get(AAISP_INFO_URL, params={
|
response = requests.get(AAISP_INFO_URL, params={
|
||||||
'control_login': aaisp_username,
|
'control_login': aaisp_username.encode('ascii'),
|
||||||
'control_password': aaisp_password
|
'control_password': aaisp_password.encode('ascii')
|
||||||
})
|
})
|
||||||
if not response.status_code == requests.codes.ok:
|
if not response.status_code == requests.codes.ok:
|
||||||
LOG.error('Error connecting to AAISP CHAOSv2 endpoint: %s' % response.body)
|
LOG.error('Error connecting to AAISP CHAOSv2 endpoint: %s' % response.body)
|
||||||
|
|||||||
Reference in New Issue
Block a user