File tree Expand file tree Collapse file tree 3 files changed +10
-23
lines changed Expand file tree Collapse file tree 3 files changed +10
-23
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ def match_and_log_fingerprint( fingerprint )
133
133
# Override it if you need more complex processing, but remember to return
134
134
# the proof as a String.
135
135
#
136
- # response - Net::HTTPResponse
136
+ # response - Auxiliary::Web::HTTP::Response
137
137
# element - the submitted element
138
138
#
139
139
def find_proof ( response , element )
Original file line number Diff line number Diff line change @@ -20,10 +20,14 @@ module Analysis::Taint
20
20
# opts - Options Hash (default: {})
21
21
#
22
22
def taint_analysis ( opts = { } )
23
- return if fuzzed? :type => :taint
24
- fuzzed :type => :taint
23
+ return if fuzzed? :type => :taint
24
+ fuzzed :type => :taint
25
25
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 |
27
31
next if !response || !( proof = fuzzer . find_proof ( response , permutation ) )
28
32
fuzzer . process_vulnerability ( permutation , proof )
29
33
end
Original file line number Diff line number Diff line change @@ -43,18 +43,15 @@ def fuzz_async( cfuzzer = nil, &callback )
43
43
end
44
44
45
45
def submit ( opts = { } )
46
- fuzzer . increment_request_counter
46
+ fuzzer . increment_request_counter if fuzzer
47
47
48
- resp = http . request_async ( *request ( opts ) )
49
- handle_response ( resp )
50
- resp
48
+ http . request ( *request ( opts ) )
51
49
end
52
50
53
51
def submit_async ( opts = { } , &callback )
54
52
fuzzer . increment_request_counter
55
53
56
54
http . request_async ( *request ( opts ) ) do |resp |
57
- handle_response ( resp )
58
55
callback . call resp if callback
59
56
end
60
57
@@ -89,20 +86,6 @@ def fuzz_wrapper( cfuzzer = nil, &block )
89
86
end
90
87
end
91
88
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
-
106
89
end
107
90
108
91
end
You can’t perform that action at this time.
0 commit comments