Skip to content

Commit eb2fe7b

Browse files
feat: update version to 0.4.0 and add new services to SERVICES dictionary
1 parent 65bbba2 commit eb2fe7b

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

blhawk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import argparse
33

44
def main():
5-
parser = argparse.ArgumentParser(prog='BLHawk', description='Dead links aren\'t always dead!', epilog='version: 0.3.0')
5+
parser = argparse.ArgumentParser(prog='BLHawk', description='Dead links aren\'t always dead!', epilog='version: 0.4.0')
66
parser.add_argument('-u', '--url', type=str, help='example: https://www.target.com')
77
#parser.add_argument('-l','--list', type=str, help='File containing URLs to check')
88
#parser.add_argument('-t', '--thread', type=int, default=10, help='Number of threads to use (default: 10)')

modules/scan.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,26 @@
5353
"domains": ["cafebazaar.ir"],
5454
"check": lambda resp: resp.status_code == 404,
5555
},
56+
"DEV Community": {
57+
"domains": ["dev.to"],
58+
"check": lambda resp: resp.status_code == 404 and 'page not found' in resp.text
59+
},
60+
"Vimeo": {
61+
"domains": ["vimeo.com"],
62+
"check": lambda resp: resp.status_code == 404,
63+
},
64+
"twitch": {
65+
"domains": ["twitch.tv"],
66+
"check": lambda resp: resp.status_code == 404,
67+
},
68+
"GitLab": {
69+
"domains": ["gitlab.com"],
70+
"check": lambda resp: resp.status_code in [301, 302, 303, 307, 308] and 'https://gitlab.com/users/sign_in' in resp.headers.get('Location', ''),
71+
},
72+
"Pinterest": {
73+
"domains": ["pinterest.com","www.pinterest.com"],
74+
"check": lambda resp: "User not found." in resp.text,
75+
}
5676
}
5777
def get_service_by_host(host):
5878
for service_name, service_info in SERVICES.items():
@@ -70,7 +90,7 @@ def check_vulnerability(url):
7090
try:
7191
#response = requests.get(url, timeout=5)
7292
headers = {"User-Agent": "Mozilla/5.0 (compatible; BLHawk/0.3.0)"}
73-
response = requests.get(url, timeout=5, headers=headers)
93+
response = requests.get(url, timeout=5, headers=headers, allow_redirects=False)
7494
is_vuln = service_info["check"](response)
7595

7696
if is_vuln:

0 commit comments

Comments
 (0)