Class: Msf::Auxiliary::Web::Fuzzable
- Inherits:
-
Object
- Object
- Msf::Auxiliary::Web::Fuzzable
- Defined in:
- lib/msf/core/auxiliary/web/fuzzable.rb
Instance Attribute Summary collapse
-
#fuzzer ⇒ Object
Returns the value of attribute fuzzer.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #dup ⇒ Object
- #fuzz(cfuzzer = nil, &callback) ⇒ Object
- #fuzz_async(cfuzzer = nil, &callback) ⇒ Object
- #fuzz_id(opts = {}) ⇒ Object
- #fuzzed(opts = {}) ⇒ Object
- #fuzzed?(opts = {}) ⇒ Boolean
- #hash ⇒ Object
- #http ⇒ Object
- #submit(opts = {}) ⇒ Object
- #submit_async(opts = {}, &callback) ⇒ Object
Instance Attribute Details
#fuzzer ⇒ Object
Returns the value of attribute fuzzer.
22 23 24 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 22 def fuzzer @fuzzer end |
Instance Method Details
#==(other) ⇒ Object
68 69 70 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 68 def ==( other ) hash == other.hash end |
#dup ⇒ Object
72 73 74 75 76 77 78 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 72 def dup cf = self.fuzzer self.fuzzer = nil ce = Marshal.load( Marshal.dump( self ) ) self.fuzzer = ce.fuzzer = cf ce end |
#fuzz(cfuzzer = nil, &callback) ⇒ Object
36 37 38 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 36 def fuzz( cfuzzer = nil, &callback ) fuzz_wrapper( cfuzzer ) { |p| callback.call( p.submit, p ) } end |
#fuzz_async(cfuzzer = nil, &callback) ⇒ Object
40 41 42 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 40 def fuzz_async( cfuzzer = nil, &callback ) fuzz_wrapper( cfuzzer ) { |p| p.submit_async { |res| callback.call( res, p ) } } end |
#fuzz_id(opts = {}) ⇒ Object
32 33 34 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 32 def fuzz_id( opts = {} ) "#{opts[:type]}:#{fuzzer.shortname}:#{method}:#{action}:#{params.keys.sort.to_s}:#{altered}=#{altered_value}" end |
#fuzzed(opts = {}) ⇒ Object
28 29 30 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 28 def fuzzed( opts = {} ) fuzzer.checked fuzz_id( opts ) end |
#fuzzed?(opts = {}) ⇒ Boolean
24 25 26 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 24 def fuzzed?( opts = {} ) fuzzer.checked? fuzz_id( opts ) end |
#hash ⇒ Object
64 65 66 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 64 def hash to_hash.hash end |
#http ⇒ Object
60 61 62 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 60 def http fuzzer.http end |
#submit(opts = {}) ⇒ Object
44 45 46 47 48 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 44 def submit( opts = {} ) fuzzer.increment_request_counter if fuzzer http.request( *request( opts ) ) end |
#submit_async(opts = {}, &callback) ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'lib/msf/core/auxiliary/web/fuzzable.rb', line 50 def submit_async( opts = {}, &callback ) fuzzer.increment_request_counter http.request_async( *request( opts ) ) do |resp| callback.call resp if callback end nil end |