Skip to content

Commit a8b4c4b

Browse files
author
HD Moore
committed
Merge pull request rapid7#1567 from tasos-r7/bug/web-vuln-logging
Web vuln proof forced #to_s
2 parents 0a9b00e + 7e15788 commit a8b4c4b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/msf/core/auxiliary/web.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ def log_fingerprint( opts = {} )
160160
vhash = [target.to_url, opts[:fingerprint], mode, opts[:location]].
161161
map { |x| x.to_s }.join( '|' ).hash
162162

163-
return if parent.vulns.include?( vhash )
163+
parent.vulns[mode] ||= {}
164+
return if parent.vulns[mode].include?( vhash )
164165

165166
location = opts[:location] ?
166167
page.url.merge( URI( opts[:location].to_s )) : page.url
@@ -182,7 +183,7 @@ def log_fingerprint( opts = {} )
182183
}
183184

184185
info[:confidence] = calculate_confidence( info )
185-
parent.vulns[vhash] = info
186+
parent.vulns[mode][vhash] = info
186187

187188
report_web_vuln( info )
188189

@@ -195,7 +196,8 @@ def log_resource( opts = {} )
195196
vhash = [target.to_url, mode, opts[:location]].
196197
map { |x| x.to_s }.join( '|' ).hash
197198

198-
return if parent.vulns.include?( vhash )
199+
parent.vulns[mode] ||= {}
200+
return if parent.vulns[mode].include?( vhash )
199201

200202
location = URI( opts[:location].to_s )
201203
info = {
@@ -215,7 +217,7 @@ def log_resource( opts = {} )
215217
}
216218

217219
info[:confidence] = calculate_confidence( info )
218-
parent.vulns[vhash] = info
220+
parent.vulns[mode][vhash] = info
219221

220222
report_web_vuln( info )
221223

@@ -237,7 +239,7 @@ def process_vulnerability( element, proof, opts = {} )
237239
:params => element.params.to_a,
238240
:mode => mode,
239241
:pname => element.altered,
240-
:proof => proof,
242+
:proof => proof.to_s,
241243
:form => element.model,
242244
:risk => details[:risk],
243245
:name => details[:name],
@@ -266,7 +268,7 @@ def process_vulnerability( element, proof, opts = {} )
266268
:method => element.method.to_s.upcase,
267269
:params => element.params.to_a,
268270
:pname => element.altered,
269-
:proof => proof,
271+
:proof => proof.to_s,
270272
:risk => details[:risk],
271273
:name => details[:name],
272274
:blame => details[:blame],

0 commit comments

Comments
 (0)