Module: Ronin::Payloads::Helpers::Rpc
- Defined in:
- lib/ronin/payloads/helpers/rpc.rb
Instance Method Summary collapse
-
#call_method(method, *arguments) ⇒ Object
Calls a specific method with additional arguments.
-
#eval(code) ⇒ Object
Evaluates code.
-
#exit(status = 0) ⇒ Object
Exits the process.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *arguments, &block) ⇒ Object (protected)
Provides transparent access to remote methods using the specified name and given arguments.
81 82 83 84 85 86 87 88 89 |
# File 'lib/ronin/payloads/helpers/rpc.rb', line 81 def method_missing(name,*arguments,&block) name = name.to_s if (name[-1..-1] != '=' && block.nil?) return call_method(name,*arguments) end return super(name,*arguments,&block) end |
Instance Method Details
#call_method(method, *arguments) ⇒ Object
Calls a specific method with additional arguments.
42 43 44 |
# File 'lib/ronin/payloads/helpers/rpc.rb', line 42 def call_method(method,*arguments) raise(NotImplemented,"the call method is unimplemented",caller) end |
#eval(code) ⇒ Object
Evaluates code.
57 58 59 |
# File 'lib/ronin/payloads/helpers/rpc.rb', line 57 def eval(code) call_method(:eval,code) end |
#exit(status = 0) ⇒ Object
Exits the process.
69 70 71 |
# File 'lib/ronin/payloads/helpers/rpc.rb', line 69 def exit(status=0) call_method(:exit,status) end |