diff --git a/docs/removed-sites.md b/docs/removed-sites.md index b44e520e7..608efb61a 100644 --- a/docs/removed-sites.md +++ b/docs/removed-sites.md @@ -129,6 +129,19 @@ NPM-Packages are not users. }, ``` +## NPM Users + +NPM uses cloudflare bot detection + +```json + "npm": { + "errorType": "status_code", + "url": "https://www.npmjs.com/~{}", + "urlMain": "https://www.npmjs.com/", + "username_claimed": "kennethsweezy" + }, +``` + ## Pexels As of 2020-01-21, all usernames are reported as not existing. diff --git a/sherlock_project/resources/data.json b/sherlock_project/resources/data.json index 4d35c9700..b12ad970a 100644 --- a/sherlock_project/resources/data.json +++ b/sherlock_project/resources/data.json @@ -2808,12 +2808,6 @@ "urlMain": "https://note.com/", "username_claimed": "blue" }, - "npm": { - "errorType": "status_code", - "url": "https://www.npmjs.com/~{}", - "urlMain": "https://www.npmjs.com/", - "username_claimed": "kennethsweezy" - }, "omg.lol": { "errorMsg": "\"available\": true", "errorType": "message", diff --git a/sherlock_project/sherlock.py b/sherlock_project/sherlock.py index 75b3e3d70..798685c92 100644 --- a/sherlock_project/sherlock.py +++ b/sherlock_project/sherlock.py @@ -8,6 +8,7 @@ """ import sys +from collections.abc import Mapping try: from sherlock_project.__init__ import import_error_test_var # noqa: F401 @@ -395,6 +396,14 @@ def sherlock( elif any(hitMsg in r.text for hitMsg in WAFHitMsgs): query_status = QueryStatus.WAF + + elif any(hitMsg in r.text for hitMsg in WAFHitMsgs): + query_status = QueryStatus.WAF + + elif isinstance(r.headers, Mapping) and r.headers.get('cf-mitigated') == 'challenge': + query_status = QueryStatus.WAF + + else: if any(errtype not in ["message", "status_code", "response_url"] for errtype in error_type): error_context = f"Unknown error type '{error_type}' for {social_network}"