Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/lib/msf/core/nop.rb
Views: 11780
# -*- coding: binary -*-12module Msf34###5#6# This class acts as the base class for all nop generators.7#8###9class Nop < Msf::Module1011#12# Returns MODULE_NOP to indicate that this is a NOP module.13#14def self.type15return Msf::MODULE_NOP16end1718#19# Returns MODULE_NOP to indicate that this is a NOP module.20#21def type22return Msf::MODULE_NOP23end2425#26# Initializes the NOP generator, defaulting it to being usable on all27# platforms.28#29def initialize(info = {})30super({31'Platform' => '' # All platforms by default32}.update(info))33end3435#36# Stub method for generating a sled with the provided arguments. Derived37# Nop implementations must supply a length and can supply one or more of38# the following options:39#40# - Random (true/false)41# Indicates that the caller desires random NOPs (if supported).42# - SaveRegisters (array)43# The list of registers that should not be clobbered by the NOP44# generator.45# - BadChars (string)46# The list of characters that should be avoided by the NOP47# generator.48#49def generate_sled(length, opts)50return nil51end5253#54# Default repetition threshold when finding nop characters.55#56def nop_repeat_threshold57return 1000058end5960end6162end636465