Module: Msf::Payload::Java::PayloadOptions
- Included in:
- BindTcp, ReverseHttp, ReverseTcp
- Defined in:
- lib/msf/core/payload/java/payload_options.rb
Instance Method Summary collapse
- #initialize(info = {}) ⇒ Object
-
#stager_config(opts = {}) ⇒ Object
Generate default configuration that is to be included in the stager.
Instance Method Details
#initialize(info = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/msf/core/payload/java/payload_options.rb', line 7 def initialize(info = {}) super(info) ( [ Msf::OptBool.new('JavaMeterpreterDebug', [ false, "Run the payload in debug mode, with logging enabled" ]), Msf::OptInt.new('Spawn', [true, "Number of subprocesses to spawn", 2]) ] ) end |
#stager_config(opts = {}) ⇒ Object
Generate default configuration that is to be included in the stager.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/msf/core/payload/java/payload_options.rb', line 20 def stager_config(opts={}) ds = opts[:datastore] || datastore spawn = ds["Spawn"] || 2 c = "" if ds["JavaMeterpreterDebug"] spawn = 0 c << "StageParameters=NoRedirect\n" end c << "Spawn=#{spawn}\n" c end |