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}
5777def 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