File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
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 )
You can’t perform that action at this time.
0 commit comments