File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
modules/auxiliary/scanner/http Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -35,18 +35,22 @@ def run_host(ip)
35
35
'method' => 'GET' ,
36
36
} , 25 )
37
37
38
- hsts = res . headers [ 'Strict-Transport-Security' ]
39
-
40
- if res and hsts
41
- print_good ( "#{ ip } :#{ rport } - Strict-Transport-Security:#{ hsts } " )
42
- report_note ( {
43
- :data => hsts ,
44
- :type => "hsts.data" ,
45
- :host => ip ,
46
- :port => rport
47
- } )
38
+ if res
39
+ hsts = res . headers [ 'Strict-Transport-Security' ]
40
+
41
+ if hsts
42
+ print_good ( "#{ ip } :#{ rport } - Strict-Transport-Security:#{ hsts } " )
43
+ report_note ( {
44
+ :data => hsts ,
45
+ :type => "hsts.data" ,
46
+ :host => ip ,
47
+ :port => rport
48
+ } )
49
+ else
50
+ print_error ( "#{ ip } :#{ rport } No HSTS found." )
51
+ end
48
52
else
49
- print_error ( "#{ ip } :#{ rport } No HSTS found ." )
53
+ print_error ( "#{ ip } :#{ rport } No headers were returned ." )
50
54
end
51
55
52
56
rescue ::Timeout ::Error , ::Errno ::EPIPE
You can’t perform that action at this time.
0 commit comments