Exception: Rex::Post::Meterpreter::RequestError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Rex::Post::Meterpreter::RequestError
- Defined in:
- lib/rex/post/meterpreter/packet_dispatcher.rb
Overview
Exception thrown when a request fails.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
The error result that occurred, typically a windows error code.
-
#method ⇒ Object
readonly
The method that failed.
-
#result ⇒ Object
readonly
The error result that occurred, typically a windows error message.
Instance Method Summary collapse
-
#initialize(command_id, einfo, ecode = nil) ⇒ RequestError
constructor
A new instance of RequestError.
- #to_s ⇒ Object
Constructor Details
#initialize(command_id, einfo, ecode = nil) ⇒ RequestError
Returns a new instance of RequestError.
18 19 20 21 22 23 24 |
# File 'lib/rex/post/meterpreter/packet_dispatcher.rb', line 18 def initialize(command_id, einfo, ecode=nil) command_name = Rex::Post::Meterpreter::CommandMapper.get_command_name(command_id) @method = command_name || "##{command_id}" @result = einfo @code = ecode || einfo end |
Instance Attribute Details
#code ⇒ Object (readonly)
The error result that occurred, typically a windows error code.
37 38 39 |
# File 'lib/rex/post/meterpreter/packet_dispatcher.rb', line 37 def code @code end |
#method ⇒ Object (readonly)
The method that failed.
31 32 33 |
# File 'lib/rex/post/meterpreter/packet_dispatcher.rb', line 31 def method @method end |
#result ⇒ Object (readonly)
The error result that occurred, typically a windows error message.
34 35 36 |
# File 'lib/rex/post/meterpreter/packet_dispatcher.rb', line 34 def result @result end |
Instance Method Details
#to_s ⇒ Object
26 27 28 |
# File 'lib/rex/post/meterpreter/packet_dispatcher.rb', line 26 def to_s "#{@method}: Operation failed: #{@result}" end |