Files
metasploit-gs/modules/nops/php/generic.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
673 B
Ruby
Raw Normal View History

##
2017-07-24 06:26:21 -07:00
# This module requires Metasploit: https://metasploit.com/download
2013-10-15 13:50:46 -05:00
# Current source: https://github.com/rapid7/metasploit-framework
##
2006-12-17 07:57:51 +00:00
###
#
# This class implements a "nop" generator for PHP payloads
#
###
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Nop
2006-12-17 07:57:51 +00:00
def initialize
super(
2025-04-13 11:27:49 +10:00
'Name' => 'PHP Nop Generator',
'Alias' => 'php_generic',
2006-12-17 07:57:51 +00:00
'Description' => 'Generates harmless padding for PHP scripts',
2025-04-13 11:27:49 +10:00
'Author' => 'hdm',
'License' => MSF_LICENSE,
'Arch' => ARCH_PHP)
2006-12-17 07:57:51 +00:00
end
# Generate valid PHP code up to the requested length
2025-04-13 11:27:49 +10:00
def generate_sled(length, _opts = {})
Array.new(length) { ["\t", ' ', "\n", "\r", ';'].sample }.join
2006-12-17 07:57:51 +00:00
end
end