Exception: Msf::PayloadItemSizeError
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Msf::PayloadItemSizeError
- Includes:
- Exception
- Defined in:
- lib/msf/core/exception.rb
Overview
This exception is raised if a payload option string exceeds the maximum allowed size during the payload generation.
Instance Attribute Summary collapse
-
#item ⇒ Object
readonly
The content of the payload option (for example a URL).
-
#max_size ⇒ Object
readonly
The maximum allowed size of the payload option.
Instance Method Summary collapse
-
#initialize(item = nil, max_size = nil) ⇒ PayloadItemSizeError
constructor
A new instance of PayloadItemSizeError.
- #to_s ⇒ Object
Constructor Details
#initialize(item = nil, max_size = nil) ⇒ PayloadItemSizeError
Returns a new instance of PayloadItemSizeError.
311 312 313 314 |
# File 'lib/msf/core/exception.rb', line 311 def initialize(item = nil, max_size = nil) @item = item @max_size = max_size end |
Instance Attribute Details
#item ⇒ Object (readonly)
The content of the payload option (for example a URL)
320 321 322 |
# File 'lib/msf/core/exception.rb', line 320 def item @item end |
#max_size ⇒ Object (readonly)
The maximum allowed size of the payload option
321 322 323 |
# File 'lib/msf/core/exception.rb', line 321 def max_size @max_size end |
Instance Method Details
#to_s ⇒ Object
316 317 318 |
# File 'lib/msf/core/exception.rb', line 316 def to_s "Option value: #{item.slice(0..30)} is too big (Current length: #{item.length}, Maximum length: #{max_size})." end |