Class: Msf::Nop
Overview
This class acts as the base class for all nop generators.
Constant Summary
Constants inherited from Module
Module::REPLICANT_EXTENSION_DS_KEY
Constants included from Module::ModuleInfo
Module::ModuleInfo::UpdateableOptions
Instance Attribute Summary
Attributes inherited from Module
#error, #job_id, #license, #platform, #privileged, #references, #user_data
Attributes included from Framework::Offspring
Attributes included from Module::UUID
Attributes included from Rex::Ui::Subscriber::Input
Attributes included from Rex::Ui::Subscriber::Output
Attributes included from Module::Privileged
Attributes included from Module::Options
Attributes included from Module::ModuleStore
Attributes included from Module::ModuleInfo
Attributes included from Module::FullName
Attributes included from Module::DataStore
Attributes included from Module::Author
Attributes included from Module::Arch
Attributes included from Module::Alert
#alerts, #you_have_been_warned
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.
Methods inherited from Module
#adapted_refname, #adapter_refname, #black_listed_auth_filenames, cached?, #debugging?, #default_cred?, #default_options, #fail_with, #file_path, #framework, #has_check?, #orig_cls, #owner, #perform_extensions, #platform?, #platform_to_s, #post_auth?, #register_extensions, #register_parent, #replicant, #required_cred_options, #set_defaults, #stage_refname, #stager_refname, #workspace
Methods included from Module::Reliability
#reliability, #reliability_to_s
Methods included from Module::Stability
Methods included from Module::SideEffects
#side_effects, #side_effects_to_s
Methods included from Module::UUID
Methods included from Module::UI
Methods included from Module::UI::Message
#print_error, #print_good, #print_prefix, #print_status, #print_warning
Methods included from Module::UI::Message::Verbose
#vprint_error, #vprint_good, #vprint_status, #vprint_warning
Methods included from Module::UI::Line
#print_line, #print_line_prefix
Methods included from Module::UI::Line::Verbose
Methods included from Rex::Ui::Subscriber
Methods included from Rex::Ui::Subscriber::Input
Methods included from Rex::Ui::Subscriber::Output
#flush, #print, #print_blank_line, #print_error, #print_good, #print_line, #print_status, #print_warning
Methods included from Module::Type
#auxiliary?, #encoder?, #evasion?, #exploit?, #nop?, #payload?, #post?
Methods included from Module::Ranking
Methods included from Module::Privileged
Methods included from Module::Options
#deregister_option_group, #deregister_options, #register_advanced_options, #register_evasion_options, #register_option_group, #register_options, #validate
Methods included from Module::Network
#comm, #support_ipv6?, #target_host, #target_port
Methods included from Module::ModuleStore
Methods included from Module::ModuleInfo
#alias, #description, #disclosure_date, #info_fixups, #merge_check_key, #merge_info, #merge_info_advanced_options, #merge_info_alias, #merge_info_description, #merge_info_evasion_options, #merge_info_name, #merge_info_options, #merge_info_string, #merge_info_version, #name, #notes, #update_info
Methods included from Module::FullName
#aliases, #fullname, #promptname, #realname, #refname, #shortname
Methods included from Module::DataStore
#import_defaults, #import_target_defaults, #share_datastore
Methods included from Module::Compatibility
#compat, #compatible?, #init_compat
Methods included from Module::Author
Methods included from Module::Auth
Methods included from Module::Arch
#arch?, #arch_to_s, #each_arch
Methods included from Module::Alert
#add_alert, #add_error, #add_info, #add_warning, #alert_user, #errors, #get_alerts, included, #infos, #is_usable?, #warnings, #without_prompt
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 |