Skip to content

Commit 4f49412

Browse files
committed
Create testssl_scanner.py
1 parent 9e182a7 commit 4f49412

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Scanner/testssl_scanner.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from EXECUTE_COMMAND import *
2+
3+
#wget -O testssl.sh https://testssl.sh
4+
#chmod a+x testssl.sh
5+
#or
6+
#sudo apt-get install testssl.sh
7+
8+
9+
#testssl -h --jsonfile out.json -U wrong.host.badssl.com:443
10+
#testssl -h --csvfile out.csv -U wrong.host.badssl.com:443
11+
12+
#Initiate TestSSL Scan for the target
13+
def ssl_vuln_scan_initialize(hostname,port):
14+
dest_server=hostname+":"+str(port)
15+
output_file=dest_server+"_.csv"
16+
cmd="testssl --openssl-timeout 120 --csvfile "+output_file+" -U "+dest_server
17+
return_code=execute_command(cmd,'testssl')
18+
status = "Failed"
19+
if os.path.isfile(output_file):
20+
status = "Success"
21+
else:
22+
status = "Failed"
23+
return status
24+
25+
26+
hostname="wrong.host.badssl.com"
27+
port = 443
28+
status=ssl_vuln_scan_initialize(hostname,port)
29+
print(status)

0 commit comments

Comments
 (0)