Module: Buby::Implants::IntruderAttack

Defined in:
lib/buby/implants/intruder_attack.rb

Overview

This interface is used to hold details about an Intruder attack.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.implant(attack) ⇒ Object

Install ourselves into the current IIntruderAttack java class

Parameters:

  • attack (IIntruderAttack)


18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/buby/implants/intruder_attack.rb', line 18

def self.implant(attack)
  unless attack.implanted? || attack.nil?
    pp [:implanting, attack, attack.class] if $DEBUG
    attack.class.class_exec(attack) do |attack|
      a_methods = %w{
        getRequestTemplate
      }
      a_methods.each do |meth|
        alias_method "__"+meth.to_s, meth
      end
      include Buby::Implants::IntruderAttack
      a_methods.each do |meth|
        java_class.ruby_names_for_java_method(meth).each do |ruby_meth|
          define_method ruby_meth, Buby::Implants::IntruderAttack.instance_method(meth)
        end
      end
      include Buby::Implants::Proxy
    end
  end
  attack
end

Instance Method Details

#getRequestTemplateString

This method is used to retrieve the request template for the attack.

Returns:

  • (String)

    The request template for the attack.



10
11
12
13
# File 'lib/buby/implants/intruder_attack.rb', line 10

def getRequestTemplate
  pp [:got_getRequestTemplate] if $DEBUG
  String.from_java_bytes __getRequestTemplate
end