Skip to content

Commit 7e15788

Browse files
committed
Auxiliary::Web: updated form of vuln storage in parent
#log_fingerprint and #log_resource now create a key in the parent's #vulns attribute with the name of the vuln type and store the details of each such vuln under it.
1 parent ac6065d commit 7e15788

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/msf/core/auxiliary/web.rb

Lines changed: 6 additions & 4 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

0 commit comments

Comments
 (0)