PHP Nop Generator

2006-12-17T07:57:51
ID MSF:NOP/PHP/GENERIC
Type metasploit
Reporter Rapid7
Modified 2017-07-24T13:26:21

Description

Generates harmless padding for PHP scripts

                                        
                                            ##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

###
#
# This class implements a "nop" generator for PHP payloads
#
###
class MetasploitModule < Msf::Nop

  def initialize
    super(
      'Name'        => 'PHP Nop Generator',
      'Alias'       => 'php_generic',
      'Description' => 'Generates harmless padding for PHP scripts',
      'Author'      => 'hdm',
      'License'     => MSF_LICENSE,
      'Arch'        => ARCH_PHP)
  end

  # Generate valid PHP code up to the requested length
  def generate_sled(length, opts = {})
    # Default to just spaces for now
    " " * length
  end
end