CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/nops/php/generic.rb
Views: 1904
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
###
7
#
8
# This class implements a "nop" generator for PHP payloads
9
#
10
###
11
class MetasploitModule < Msf::Nop
12
13
def initialize
14
super(
15
'Name' => 'PHP Nop Generator',
16
'Alias' => 'php_generic',
17
'Description' => 'Generates harmless padding for PHP scripts',
18
'Author' => 'hdm',
19
'License' => MSF_LICENSE,
20
'Arch' => ARCH_PHP)
21
end
22
23
# Generate valid PHP code up to the requested length
24
def generate_sled(length, opts = {})
25
# Default to just spaces for now
26
" " * length
27
end
28
end
29
30