@@ -70,7 +70,6 @@ def execute_all(
7070 get_robots_txt ,
7171 get_dot_git ,
7272 get_dot_svn ,
73- get_dot_git ,
7473 get_intel ,
7574 get_dot_htaccess ,
7675 get_bitcoin_address ,
@@ -114,7 +113,8 @@ def get_robots_txt(client: httpx.Client, target: str, response: str) -> None:
114113 target = "{0.scheme}://{0.netloc}/" .format (urlsplit (url ))
115114 client .get (target + "robots.txt" )
116115 print (target + "robots.txt" )
117- matches = re .findall (r"Allow: (.*)|Disallow: (.*)" , response )
116+
117+ matches = re .findall (r"Allow: (.*)|Disallow: (.*)" , response .text )
118118 for match in matches :
119119 match = "" .join (match )
120120 if "*" not in match :
@@ -151,7 +151,7 @@ def get_dot_git(client: httpx.Client, target: str, response: str) -> None:
151151 url = target
152152 target = "{0.scheme}://{0.netloc}/" .format (urlsplit (url ))
153153 resp = client .get (target + "/.git/config" )
154- if not resp .text . __contains__ ( " 404" ) :
154+ if resp .status_code != 404 :
155155 cprint ("Alert!" , "red" )
156156 cprint (".git folder exposed publicly" , "red" )
157157 else :
@@ -181,8 +181,8 @@ def get_dot_svn(client: httpx.Client, target: str, response: str) -> None:
181181 cprint ("[*]Checking for .svn folder" , "yellow" )
182182 url = target
183183 target = "{0.scheme}://{0.netloc}/" .format (urlsplit (url ))
184- resp = httpx .get (target + "/.svn/entries" , proxies = "socks5://127.0.0.1:9050 " )
185- if not resp .text . __contains__ ( " 404" ) :
184+ resp = client .get (target + "/.svn/entries" )
185+ if resp .status_code != 404 :
186186 cprint ("Alert!" , "red" )
187187 cprint (".SVN folder exposed publicly" , "red" )
188188 else :
@@ -199,10 +199,10 @@ def get_dot_htaccess(client: httpx.Client, target: str, response: str) -> None:
199199 cprint ("[*]Checking for .htaccess" , "yellow" )
200200 url = target
201201 target = "{0.scheme}://{0.netloc}/" .format (urlsplit (url ))
202- resp = httpx .get (target + "/.htaccess" , proxies = "socks5://127.0.0.1:9050 " )
203- if resp .text . __contains__ ( " 403" ) :
202+ resp = client .get (target + "/.htaccess" )
203+ if resp .status_code == 403 :
204204 cprint ("403 Forbidden" , "blue" )
205- elif not resp .text . __contains__ ( " 404" ) or resp .text . __contains__ ( " 500" ) :
205+ elif resp .status_code != 404 and resp .status_code != 500 :
206206 cprint ("Alert!!" , "blue" )
207207 cprint (".htaccess file found!" , "blue" )
208208 else :
0 commit comments