Module: Msf::Simple::Nop

Includes:
Module
Defined in:
lib/msf/base/simple/nop.rb

Overview

Simple nop wrapper class for performing generation.

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Module

#_import_extra_options, #init_simplified, #inspect, #load_config, #save_config

Class Method Details

.generate_simple(nop, length, opts) ⇒ Object

Generate a nop sled, optionally with a few parameters.

opts can have any of the standard nop generate sled options as well as:

Format => The format to represent the data as: ruby, perl, c, raw

24
25
26
27
28
29
30
# File 'lib/msf/base/simple/nop.rb', line 24

def self.generate_simple(nop, length, opts)
  # Generate the nop sled using the options supplied
  buf = nop.generate_sled(length, opts)

  # Serialize the generated payload to some sort of format
  return Buffer.transform(buf, opts['Format'] || 'raw')
end

Instance Method Details

#generate_simple(length, opts) ⇒ Object

Calls the class method.


35
36
37
# File 'lib/msf/base/simple/nop.rb', line 35

def generate_simple(length, opts)
  Msf::Simple::Nop.generate_simple(self, length, opts)
end