Class: Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::MockMagic::MockRailgunClient
- Inherits:
-
Object
- Object
- Rex::Post::Meterpreter::Extensions::Stdapi::Railgun::MockMagic::MockRailgunClient
- Defined in:
- lib/rex/post/meterpreter/extensions/stdapi/railgun/mock_magic.rb
Instance Attribute Summary collapse
-
#check_request ⇒ Object
readonly
Returns the value of attribute check_request.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#response_tlvs ⇒ Object
readonly
Returns the value of attribute response_tlvs.
Instance Method Summary collapse
-
#initialize(platform, response_tlvs, check_request) ⇒ MockRailgunClient
constructor
A new instance of MockRailgunClient.
- #send_request(request) ⇒ Object
Constructor Details
#initialize(platform, response_tlvs, check_request) ⇒ MockRailgunClient
Returns a new instance of MockRailgunClient.
29 30 31 32 33 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/mock_magic.rb', line 29 def initialize(platform, response_tlvs, check_request) @check_request = check_request @response_tlvs = response_tlvs @platform = platform end |
Instance Attribute Details
#check_request ⇒ Object (readonly)
Returns the value of attribute check_request.
27 28 29 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/mock_magic.rb', line 27 def check_request @check_request end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
27 28 29 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/mock_magic.rb', line 27 def platform @platform end |
#response_tlvs ⇒ Object (readonly)
Returns the value of attribute response_tlvs.
27 28 29 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/mock_magic.rb', line 27 def response_tlvs @response_tlvs end |
Instance Method Details
#send_request(request) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rex/post/meterpreter/extensions/stdapi/railgun/mock_magic.rb', line 35 def send_request(request) check_request.call(request) (Class.new do def initialize(response_tlvs) @response_tlvs = response_tlvs end def get_tlv_value(type) return @response_tlvs[type] end end).new(@response_tlvs) end |