File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
lib/metasploit/framework/login_scanner
spec/lib/metasploit/framework/login_scanner Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,9 @@ def get_hidden_inputs(res)
257
257
noko . search ( "form" ) . each_entry do |form |
258
258
found_inputs = { }
259
259
form . search ( "input" ) . each_entry do |input |
260
+ input_type = input . attributes [ 'type' ] ? input . attributes [ 'type' ] . value : ''
261
+ next if input_type !~ /hidden/i
262
+
260
263
input_name = input . attributes [ 'name' ] ? input . attributes [ 'name' ] . value : ''
261
264
input_value = input . attributes [ 'value' ] ? input . attributes [ 'value' ] . value : ''
262
265
found_inputs [ input_name ] = input_value unless input_name . empty?
Original file line number Diff line number Diff line change 41
41
<input name="input_1" type="hidden" value="some_value_1" />
42
42
</form>
43
43
<form>
44
+ <input name="input_0" type="text" value="Not a hidden input" />
44
45
<input name="input_1" type="hidden" value="some_value_1" />
45
46
<INPUT name="input_2" type="hidden" value="" />
46
47
</form>
You can’t perform that action at this time.
0 commit comments