From 5978d13bfea10b51c7af32ea1a5fb299e792a99c Mon Sep 17 00:00:00 2001 From: Anant Shrivastava Date: Tue, 3 May 2022 16:32:58 +0530 Subject: [PATCH] fix error when phone number starts with 91 91 is india code however india also has mobile number series of 91 available for public consumption. --- upi-recon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upi-recon.py b/upi-recon.py index 121c8d7..0c16f87 100644 --- a/upi-recon.py +++ b/upi-recon.py @@ -76,7 +76,7 @@ def address_discovery(vpa, api_url): # set variables and normalize input API_URL = 'https://api.razorpay.com/v1/payments/validate/account?key_id=' api_key_id = config.get('main', 'api_key_id') - phone = arguments.phone[2:] if arguments.phone[0:2] == '91' else arguments.phone + phone = arguments.phone[2:] if arguments.phone[0:2] == '91' and len(arguments.phone) > 10 else arguments.phone # check if api_key_id is correct if api_key_id and not api_key_id[0:3] == 'rzp': quit('[!] invalid api_key_id') @@ -112,4 +112,4 @@ def address_discovery(vpa, api_url): print('\n[!] interrupted! stopping threads...') exit(1) print('[i] finished at ' + datetime.now().strftime("%d/%m/%Y %H:%M:%S")) - exit(1) \ No newline at end of file + exit(1)