2007-02-18 00:10:39 +00:00
|
|
|
##
|
2017-07-24 13:26:21 +00:00
|
|
|
# This module requires Metasploit: https://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
2006-12-17 07:57:51 +00:00
|
|
|
###
|
|
|
|
#
|
|
|
|
# This class implements a "nop" generator for PHP payloads
|
|
|
|
#
|
|
|
|
###
|
2016-03-08 13:02:44 +00:00
|
|
|
class MetasploitModule < Msf::Nop
|
2006-12-17 07:57:51 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
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
|
2006-12-17 07:57:51 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
# Generate valid PHP code up to the requested length
|
|
|
|
def generate_sled(length, opts = {})
|
|
|
|
# Default to just spaces for now
|
|
|
|
" " * length
|
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
end
|