diff options
Diffstat (limited to 'check_token.patch')
-rw-r--r-- | check_token.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/check_token.patch b/check_token.patch new file mode 100644 index 000000000000..afdbe0d92076 --- /dev/null +++ b/check_token.patch @@ -0,0 +1,41 @@ +From 34b6ce697429892141ad511d5e8e4b95e40abb98 Mon Sep 17 00:00:00 2001 +From: zecoj <zecoj@users.noreply.github.com> +Date: Wed, 8 Mar 2017 11:24:10 +1100 +Subject: [PATCH] Update check_token to reflect url change + +--- + vipaccess/utils.py | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/vipaccess/utils.py b/vipaccess/utils.py +index f91b615..4ced9c9 100644 +--- a/vipaccess/utils.py ++++ b/vipaccess/utils.py +@@ -254,15 +254,21 @@ def generate_qr_code(uri): + def check_token(token_id, secret): + '''Check the validity of the generated token.''' + otp = totp(binascii.b2a_hex(secret).decode('utf-8')) +- test_url = 'https://idprotect.vip.symantec.com/testtoken.v' ++ test_url = 'https://vip.symantec.com/otpCheck' + token_check = requests.post( + test_url, +- data=dict( +- tokenID=token_id, +- firstOTP=otp +- ) ++ data={ ++ 'cr1':otp[0], ++ 'cr2':otp[1], ++ 'cr3':otp[2], ++ 'cr4':otp[3], ++ 'cr5':otp[4], ++ 'cr6':otp[5], ++ 'cred':token_id, ++ 'continue':'otp_check' ++ } + ) +- if "Your credential is functioning properly and is ready for use" in token_check.text: ++ if "Your VIP Credential is working correctly" in token_check.text: + return True + else: + return False |