Path: blob/master/lib/msf/base/simple/nop.rb
19567 views
# -*- coding: binary -*-12module Msf3module Simple45###6#7# Simple nop wrapper class for performing generation.8#9###10module Nop1112include Module1314#15# Generate a nop sled, optionally with a few parameters.16#17# opts can have any of the standard nop generate sled options18# as well as:19#20# Format => The format to represent the data as: ruby, perl, c, raw21#22def self.generate_simple(nop, length, opts)23# Generate the nop sled using the options supplied24buf = nop.generate_sled(length, opts)2526# Serialize the generated payload to some sort of format27return Buffer.transform(buf, opts['Format'] || 'raw')28end2930#31# Calls the class method.32#33def generate_simple(length, opts)34Msf::Simple::Nop.generate_simple(self, length, opts)35end3637end3839end40end414243