Module: Ronin::Exploits::Helpers::FormatString

Defined in:
lib/ronin/exploits/helpers/format_string.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(obj) ⇒ Object



30
31
32
33
34
# File 'lib/ronin/exploits/helpers/format_string.rb', line 30

def self.extended(obj)
  obj.instance_eval do
    extend Ronin::Exploits::Helpers::Binary
  end
end

Instance Method Details

#format_stringString

Returns The format string of the exploit.

Returns:

  • (String)

    The format string of the exploit.



40
41
42
# File 'lib/ronin/exploits/helpers/format_string.rb', line 40

def format_string
  @format_string ||= ''
end

#targeting(attributes = {}) {|target| ... } ⇒ Object

Adds a new target to the exploit.

Parameters:

  • attributes (Hash) (defaults to: {})

    Additioanl attributes to create the target with.

Yields:

  • (target)

    If a block is given, it will be passed the newly created target.

Yield Parameters:



56
57
58
# File 'lib/ronin/exploits/helpers/format_string.rb', line 56

def targeting(attributes={},&block)
  self.targets << Targets::FormatString.new(attributes,&block)
end

#use_payload_classPayloads::Shellcode

Returns The model which will be searched for acceptable payloads.

Returns:

Since:

  • 0.3.0



66
67
68
# File 'lib/ronin/exploits/helpers/format_string.rb', line 66

def use_payload_class
  Payload::Shellcode
end