File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -16,18 +16,20 @@ def printer(url):
16
16
sys .stdout .flush ()
17
17
return True
18
18
19
-
20
19
def check (out , url ):
21
20
#print("hell")
22
21
printer ("Testing: " + url )
23
- link = 'https ://' + url
22
+ link = 'http ://' + url
24
23
try :
25
24
req = requests .head (link , timeout = 10 )
26
25
scode = str (req .status_code )
27
26
if scode .startswith ("2" ):
28
27
print (blue + "[" + bold + green + str (scode )+ end + blue + "]" + end + " | " + str (url ))
29
28
elif scode .startswith ("3" ):
30
- print (blue + "[" + bold + yellow + str (scode )+ end + blue + "]" + end + " | " + str (url ))
29
+ if req .headers ['Location' ].startswith ("https://" + url ):
30
+ print (blue + "[" + bold + yellow + str (scode )+ end + blue + "]" + end + " | " + str (url )+ " - HTTPS" )
31
+ else :
32
+ print (blue + "[" + bold + yellow + str (scode )+ end + blue + "]" + end + " | " + str (url )+ " | " + req .headers ['Location' ])
31
33
elif scode .startswith ("4" ):
32
34
print (blue + "[" + bold + red + str (scode )+ end + blue + "]" + end + " | " + str (url ))
33
35
else :
@@ -73,6 +75,5 @@ def main():
73
75
with executor (max_workers = int (threads )) as exe :
74
76
[exe .submit (check , out , url .strip ('\n ' )) for url in urls ]
75
77
76
-
77
78
if __name__ == '__main__' :
78
79
main ()
You can’t perform that action at this time.
0 commit comments