From ec8d2f8cc14df855f1d98b6e43f503cdfeacfea7 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 6 Sep 2024 14:48:45 +0200 Subject: [PATCH] Remove an old comment in lib/msf/core/payload/php.rb The encoder has been implemented in modules/encoders/php/minify.rb --- lib/msf/core/payload/php.rb | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/lib/msf/core/payload/php.rb b/lib/msf/core/payload/php.rb index 64f78dd01d..1d610df74f 100644 --- a/lib/msf/core/payload/php.rb +++ b/lib/msf/core/payload/php.rb @@ -136,43 +136,6 @@ module Msf::Payload::Php exec_methods = [passthru, shell_exec, system, exec, proc_open, popen].sort_by { rand } buf = setup + exec_methods.join("") + fail_block - #buf = Rex::Text.compress(buf) - - ### - # All of this junk should go in an encoder - # - # Replace all single-quoted strings with quoteless equivalents, e.g.: - # echo('asdf'); - # becomes - # echo($a.$s.$d.$f); - # and add "$a=chr(97);" et al to the top of the block - # - # Once this is complete, it is guaranteed that there are no spaces - # inside strings. This combined with the fact that there are no - # function definitions, which require a space between the "function" - # keyword and the name, means we can completely remove spaces. - # - #alpha_used = { 95 } - #buf.gsub!(/'(.*?)'/) { - # str_array = [] - # $1.each_byte { |c| - # if (('a'..'z').include?(c.chr)) - # alpha_used[c] = 1 - # str_array << "$#{c.chr}." - # else - # str_array << "chr(#{c})." - # end - # } - # str_array.last.chop! - # str_array.join("") - #} - #if (alpha_used.length > 1) - # alpha_used.each_key { |k| buf = "$#{k.chr}=chr(#{k});" + buf } - #end - # - #buf.gsub!(/\s*/, '') - # - ### return buf