Skip to content

Commit

Permalink
Remove wappalyzer because free account does not allow anymore access …
Browse files Browse the repository at this point in the history
…to the API - #110
  • Loading branch information
drighetto committed Oct 24, 2023
1 parent 0ff0318 commit e81344a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 58 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ intelx=xxx
azure-cognitive-services-bing-web-search=xxx
;See https://buckets.grayhatwarfare.com/docs/api/v1
grayhatwarfare=xxx
;See https://www.wappalyzer.com/api
wappalyzer=xxx
;See https://viewdns.info/api/
viewdns=xxx
```
Expand Down Expand Up @@ -131,6 +129,4 @@ $ python wpr.py -d righettod.eu -a api_keys.ini -n 8.8.8.8 -p http://5.196.132.1

# 📺 Demonstration

https://user-images.githubusercontent.com/1573775/203140192-bf75a1a6-cddd-4f7c-8da9-5e931e6a3f21.mp4


<https://user-images.githubusercontent.com/1573775/203140192-bf75a1a6-cddd-4f7c-8da9-5e931e6a3f21.mp4>
54 changes: 1 addition & 53 deletions wpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,45 +805,6 @@ def get_grayhatwarfare_infos(domain, api_key, http_proxy):
return infos


def get_wappalyzer_infos(domain, api_key, http_proxy):
infos = {"DATA": [], "ERROR": None}
# See https://www.wappalyzer.com/docs/api/v2/basics/
# Use HTTPS by default and explicitly specify to leverage the cache to prevent as maximim a live scan
# Accept data with a age of maximum 6 month old
# See https://www.wappalyzer.com/docs/api/v2/lookup/#parameters
service_url = f"https://api.wappalyzer.com/v2/lookup/?urls=https://{domain}&live=false&recursive=false&denoise=true&max_age={WAPPALYZER_MAX_MONTHS_RESULT_OLD}&squash=true"
try:
web_proxies = configure_proxy(http_proxy)
req_session = requests.Session()
req_session.headers.update(
{"User-Agent": USER_AGENT, "x-api-key": api_key})
req_session.proxies.update(web_proxies)
req_session.verify = (http_proxy is None)
# Extract data for files
response = req_session.get(service_url)
if response.status_code != 200:
infos["ERROR"] = f"HTTP response code {response.status_code} received!"
infos["DATA"].clear()
return infos
results = response.json()
if len(results) > 0:
for result in results:
if len(result["technologies"]) > 0:
for technology in result["technologies"]:
tech_name = technology["name"]
if len(technology["versions"]) > 0:
tech_versions = ",".join(technology["versions"])
else:
tech_versions = "NA"
infos["DATA"].append(
f"'{tech_name}' version(s): {tech_versions}")
infos["DATA"].sort()
except Exception as e:
infos["ERROR"] = f"Error during web call: {str(e)}"
infos["DATA"].clear()
return infos


def get_wayback_machine_infos(domain, http_proxy):
infos = {"DATA": [], "ERROR": None}
# See https://archive.org/help/wayback_api.php
Expand Down Expand Up @@ -1221,27 +1182,14 @@ def get_leakix_info(field_type, field_value, http_proxy):
api_key = api_key_config["API_KEYS"]["grayhatwarfare"]
domain_no_tld = get_main_domain_without_tld(args.domain_name)
print(colored(f"{domain_no_tld}", "yellow", attrs=["bold"]))
informations = get_grayhatwarfare_infos(
domain_no_tld, api_key, http_proxy_to_use)
informations = get_grayhatwarfare_infos(domain_no_tld, api_key, http_proxy_to_use)
if informations["ERROR"] is not None:
print(f" {informations['ERROR']}")
else:
print_infos(informations["DATA"], prefix=" ")
else:
print(colored(f"Skipped because no API key was specified!",
"red", attrs=["bold"]))
print(colored(f"[WAPPALYZER] Retrieve technologies used on the domain with a age of maximum {WAPPALYZER_MAX_MONTHS_RESULT_OLD} months old...", "blue", attrs=["bold"]))
if "wappalyzer" in api_key_config["API_KEYS"]:
api_key = api_key_config["API_KEYS"]["wappalyzer"]
print(colored(f"{args.domain_name}", "yellow", attrs=["bold"]))
informations = get_wappalyzer_infos(
args.domain_name, api_key, http_proxy_to_use)
if informations["ERROR"] is not None:
print(f" {informations['ERROR']}")
else:
print_infos(informations["DATA"], prefix=" ")
else:
print(colored(f"Skipped because no API key was specified!", "red", attrs=["bold"]))
print(colored(f"[GOOGLE PLAY + APPLE APP STORE] Verify if the company provide mobile apps on official stores...", "blue", attrs=["bold"]))
print(colored("[i]", "green") + f" Searches were performed into application stores for the country code '{MOBILE_APP_STORE_COUNTRY_STORE_CODE}'.")
print(colored(f"{args.domain_name}", "yellow", attrs=["bold"]))
Expand Down

0 comments on commit e81344a

Please sign in to comment.