From 56f4adb6238e07b8a34aeb400519523541d4d986 Mon Sep 17 00:00:00 2001 From: ANISH M <58029804+Anish-M-code@users.noreply.github.com> Date: Tue, 26 Jan 2021 10:38:31 +0530 Subject: [PATCH] Fix For Detect Technologies Not Working. --- plugins/detectTech.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/plugins/detectTech.py b/plugins/detectTech.py index e842b76..a7f6eb7 100644 --- a/plugins/detectTech.py +++ b/plugins/detectTech.py @@ -4,10 +4,25 @@ def detectTech(url): - data = get('https://api.wappalyzer.com/lookup-basic/beta/?url=' + url).text + api='' + + # wappalyzer.txt will store API key for future use. + try: + + with open('wappalyzer_api_key.txt') as f: + api=f.read() + + except FileNotFoundError: + + api=input('\nPlease Enter Wappalyzer API KEY:') + with open('wappalyzer_api_key.txt','w') as w: + w.write(api) + + data=get('https://api.wappalyzer.com/lookup/v2/?urls='+url,headers={'x-api-key':api}).text jsoned_data = json.loads(data) technologies = [] - for one in jsoned_data: + for one in jsoned_data[0]['technologies']: technologies.append(one['name']) for tech in technologies: - sys.stdout.write(tech) + sys.stdout.write(tech+'\n') +