Skip to content

Commit 4b56e3c

Browse files
committed
Merge branch 'tasos-r7-web-modules'
2 parents 7602e6f + 62782f0 commit 4b56e3c

File tree

3 files changed

+10
-23
lines changed

3 files changed

+10
-23
lines changed

lib/msf/core/auxiliary/web.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def match_and_log_fingerprint( fingerprint )
133133
# Override it if you need more complex processing, but remember to return
134134
# the proof as a String.
135135
#
136-
# response - Net::HTTPResponse
136+
# response - Auxiliary::Web::HTTP::Response
137137
# element - the submitted element
138138
#
139139
def find_proof( response, element )

lib/msf/core/auxiliary/web/analysis/taint.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ module Analysis::Taint
2020
# opts - Options Hash (default: {})
2121
#
2222
def taint_analysis( opts = {} )
23-
return if fuzzed? :type => :taint
24-
fuzzed :type => :taint
23+
return if fuzzed? :type => :taint
24+
fuzzed :type => :taint
2525

26-
fuzz_async do |response, permutation|
26+
# if we get a result without injecting anything then bail out to avoid
27+
# an FP
28+
return if fuzzer.find_proof( submit, self )
29+
30+
fuzz_async do |response, permutation|
2731
next if !response || !(proof = fuzzer.find_proof( response, permutation ))
2832
fuzzer.process_vulnerability( permutation, proof )
2933
end

lib/msf/core/auxiliary/web/fuzzable.rb

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,15 @@ def fuzz_async( cfuzzer = nil, &callback )
4343
end
4444

4545
def submit( opts = {} )
46-
fuzzer.increment_request_counter
46+
fuzzer.increment_request_counter if fuzzer
4747

48-
resp = http.request_async( *request( opts ) )
49-
handle_response( resp )
50-
resp
48+
http.request( *request( opts ) )
5149
end
5250

5351
def submit_async( opts = {}, &callback )
5452
fuzzer.increment_request_counter
5553

5654
http.request_async( *request( opts ) ) do |resp|
57-
handle_response( resp )
5855
callback.call resp if callback
5956
end
6057

@@ -89,20 +86,6 @@ def fuzz_wrapper( cfuzzer = nil, &block )
8986
end
9087
end
9188

92-
def handle_response( resp )
93-
str = " #{fuzzer.shortname}: #{resp.code} - #{method.to_s.upcase}" +
94-
" #{action} #{params}"
95-
96-
case resp.code.to_i
97-
when 200,404,301,302,303
98-
#fuzzer.print_status str
99-
when 500,503,401,403
100-
fuzzer.print_good str
101-
else
102-
fuzzer.print_error str
103-
end
104-
end
105-
10689
end
10790

10891
end

0 commit comments

Comments
 (0)