Class: Msf::Nop
- Inherits:
-
Module
- Object
- Module
- Msf::Nop
- Defined in:
- lib/msf/core/nop.rb
Overview
This class acts as the base class for all nop generators.
Class Method Summary collapse
-
.type ⇒ Object
Returns MODULE_NOP to indicate that this is a NOP module.
Instance Method Summary collapse
-
#generate_sled(length, opts) ⇒ Object
Stub method for generating a sled with the provided arguments.
-
#initialize(info = {}) ⇒ Nop
constructor
Initializes the NOP generator, defaulting it to being usable on all platforms.
-
#nop_repeat_threshold ⇒ Object
Default repetition threshold when finding nop characters.
-
#type ⇒ Object
Returns MODULE_NOP to indicate that this is a NOP module.
Constructor Details
#initialize(info = {}) ⇒ Nop
Initializes the NOP generator, defaulting it to being usable on all platforms.
30 31 32 33 34 |
# File 'lib/msf/core/nop.rb', line 30 def initialize(info = {}) super({ 'Platform' => '' # All platforms by default }.update(info)) end |
Class Method Details
.type ⇒ Object
Returns MODULE_NOP to indicate that this is a NOP module.
15 16 17 |
# File 'lib/msf/core/nop.rb', line 15 def self.type return Msf::MODULE_NOP end |
Instance Method Details
#generate_sled(length, opts) ⇒ Object
Stub method for generating a sled with the provided arguments. Derived Nop implementations must supply a length and can supply one or more of the following options:
- Random (true/false)
Indicates that the caller desires random NOPs (if supported).
- SaveRegisters (array)
The list of registers that should not be clobbered by the NOP
generator.
- BadChars (string)
The list of characters that should be avoided by the NOP
generator.
50 51 52 |
# File 'lib/msf/core/nop.rb', line 50 def generate_sled(length, opts) return nil end |
#nop_repeat_threshold ⇒ Object
Default repetition threshold when finding nop characters.
57 58 59 |
# File 'lib/msf/core/nop.rb', line 57 def nop_repeat_threshold return 10000 end |
#type ⇒ Object
Returns MODULE_NOP to indicate that this is a NOP module.
22 23 24 |
# File 'lib/msf/core/nop.rb', line 22 def type return Msf::MODULE_NOP end |