Skip to content

Commit f20dcb2

Browse files
Land rapid7#19443, Remove an old comment in lib/msf/core/payload/php.rb
2 parents 062a1e7 + ec8d2f8 commit f20dcb2

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

lib/msf/core/payload/php.rb

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -137,43 +137,6 @@ def php_system_block(options = {})
137137
exec_methods = [passthru, shell_exec, system, exec, proc_open, popen];
138138
shuffle(exec_methods);
139139
buf = setup + exec_methods.join("") + fail_block
140-
#buf = Rex::Text.compress(buf)
141-
142-
###
143-
# All of this junk should go in an encoder
144-
#
145-
# Replace all single-quoted strings with quoteless equivalents, e.g.:
146-
# echo('asdf');
147-
# becomes
148-
# echo($a.$s.$d.$f);
149-
# and add "$a=chr(97);" et al to the top of the block
150-
#
151-
# Once this is complete, it is guaranteed that there are no spaces
152-
# inside strings. This combined with the fact that there are no
153-
# function definitions, which require a space between the "function"
154-
# keyword and the name, means we can completely remove spaces.
155-
#
156-
#alpha_used = { 95 }
157-
#buf.gsub!(/'(.*?)'/) {
158-
# str_array = []
159-
# $1.each_byte { |c|
160-
# if (('a'..'z').include?(c.chr))
161-
# alpha_used[c] = 1
162-
# str_array << "$#{c.chr}."
163-
# else
164-
# str_array << "chr(#{c})."
165-
# end
166-
# }
167-
# str_array.last.chop!
168-
# str_array.join("")
169-
#}
170-
#if (alpha_used.length > 1)
171-
# alpha_used.each_key { |k| buf = "$#{k.chr}=chr(#{k});" + buf }
172-
#end
173-
#
174-
#buf.gsub!(/\s*/, '')
175-
#
176-
###
177140

178141
return buf
179142

0 commit comments

Comments
 (0)