@@ -146,7 +146,7 @@ def parse_files
146
146
#Parse the testssl.sh format file and populate the hashes for the report
147
147
#Remember one file only ever contains one host
148
148
def parse_file ( doc )
149
- address = doc [ 0 ] [ 'ip' ]
149
+ address = doc [ 0 ] [ 'ip' ] + ':' + doc [ 0 ] [ 'port' ]
150
150
@host_results [ address ] = Hash . new
151
151
152
152
@@ -393,7 +393,7 @@ def excel_report
393
393
row_count = 1
394
394
@host_results . each do |host , vulns |
395
395
host_name = host . split ( ':' ) [ 0 ]
396
- cert_sheet . add_cell ( row_count , 0 , host . split ( '/' ) [ 1 ] )
396
+ cert_sheet . add_cell ( row_count , 0 , host . split ( '/' ) [ 1 ] . split ( ':' ) [ 0 ] )
397
397
cert_sheet . add_cell ( row_count , 1 , host . split ( '/' ) [ 0 ] )
398
398
cert_sheet . add_cell ( row_count , 2 , vulns [ 'port' ] )
399
399
cert_sheet . add_cell ( row_count , 3 , vulns [ 'self_signed' ] )
@@ -417,7 +417,7 @@ def excel_report
417
417
end
418
418
end
419
419
420
- cipher_sheet . add_cell ( row_count , 0 , host . split ( '/' ) [ 1 ] )
420
+ cipher_sheet . add_cell ( row_count , 0 , host . split ( '/' ) [ 1 ] . split ( ':' ) [ 0 ] )
421
421
cipher_sheet . add_cell ( row_count , 1 , host . split ( '/' ) [ 0 ] )
422
422
cipher_sheet . add_cell ( row_count , 2 , vulns [ 'port' ] )
423
423
cipher_sheet . add_cell ( row_count , 3 , vulns [ 'anonymous_ciphers' ] )
@@ -436,7 +436,7 @@ def excel_report
436
436
end
437
437
end
438
438
439
- protocol_sheet . add_cell ( row_count , 0 , host . split ( '/' ) [ 1 ] )
439
+ protocol_sheet . add_cell ( row_count , 0 , host . split ( '/' ) [ 1 ] . split ( ':' ) [ 0 ] )
440
440
protocol_sheet . add_cell ( row_count , 1 , host . split ( '/' ) [ 0 ] )
441
441
protocol_sheet . add_cell ( row_count , 2 , vulns [ 'port' ] )
442
442
protocol_sheet . add_cell ( row_count , 3 , vulns [ 'sslv2_supported' ] )
0 commit comments