Class: Buby::IntruderPayloadGenerator
- Includes:
- Java::Burp::IIntruderPayloadGenerator, Java::Burp::IIntruderPayloadGeneratorFactory
- Defined in:
- lib/buby/intruder_payload_generator.rb
Overview
This interface is used for custom Intruder payload generators. Extensions that have registered an IIntruderPayloadGeneratorFactory
must return a new instance of this interface when required as part of a new Intruder attack.
Class Method Summary collapse
-
.createNewInstance(attack) ⇒ Buby
This method is used by Burp when the user starts an Intruder attack that uses this payload generator.
-
.getGeneratorName ⇒ String
This method is used by Burp to obtain the name of the payload generator.
Instance Method Summary collapse
-
#getNextPayload(baseValue) ⇒ Array<byte>
abstract
deprecated
Deprecated.
This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.
-
#hasMorePayloads ⇒ Boolean
abstract
This method is used by Burp to determine whether the payload generator is able to provide any further payloads.
-
#initialize(attack) ⇒ IntruderPayloadGenerator
constructor
A new instance of IntruderPayloadGenerator.
-
#more_payloads? ⇒ Boolean
abstract
This method is used by Burp to determine whether the payload generator is able to provide any further payloads.
-
#reset ⇒ Object
abstract
This method is used by Burp to reset the state of the payload generator so that the next call to #getNextPayload returns the first payload again.
Constructor Details
#initialize(attack) ⇒ IntruderPayloadGenerator
Returns a new instance of IntruderPayloadGenerator.
22 23 24 |
# File 'lib/buby/intruder_payload_generator.rb', line 22 def initialize(attack) @attack = attack end |
Class Method Details
.createNewInstance(attack) ⇒ Buby
16 17 18 19 |
# File 'lib/buby/intruder_payload_generator.rb', line 16 def self.createNewInstance(attack) Buby::Implants::IntruderAttack.implant(attack) self.new(attack) end |
.getGeneratorName ⇒ String
This method is used by Burp to obtain the name of the payload generator. This will be displayed as an option within the Intruder UI when the user selects to use extension-generated payloads.
11 |
# File 'lib/buby/intruder_payload_generator.rb', line 11 def self.getGeneratorName; self.name.to_java_string; end |
Instance Method Details
#getNextPayload(baseValue) ⇒ Array<byte>
This will become a raw version/proxied version pair like ContextMenuFactory#createMenuItems in 2.0.
Call super to get baseValue
as a String
. Implementation’s responsibility to return byte array.
This method is used by Burp to obtain the value of the next payload.
47 48 49 50 51 |
# File 'lib/buby/intruder_payload_generator.rb', line 47 def getNextPayload(baseValue) ret = baseValue baseValue = String.from_java_bytes(baseValue) if baseValue ret end |
#hasMorePayloads ⇒ Boolean
This method is used by Burp to determine whether the payload generator is able to provide any further payloads.
33 |
# File 'lib/buby/intruder_payload_generator.rb', line 33 def hasMorePayloads; end |
#more_payloads? ⇒ Boolean
This method is used by Burp to determine whether the payload generator is able to provide any further payloads.
35 |
# File 'lib/buby/intruder_payload_generator.rb', line 35 def more_payloads?; hasMorePayloads; end |
#reset ⇒ Object
This method is used by Burp to reset the state of the payload generator so that the next call to #getNextPayload returns the first payload again. This method will be invoked when an attack uses the same payload generator for more than one payload position, for example in a sniper attack.
59 |
# File 'lib/buby/intruder_payload_generator.rb', line 59 def reset; end |