mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-10-29 18:07:27 +01:00
Add more normalization to temporary directory
This commit is contained in:
parent
98b3919e94
commit
aa9969c81a
@ -18,6 +18,8 @@ class CmdStagerBourne < CmdStagerBase
|
||||
|
||||
def generate(opts = {})
|
||||
opts[:temp] = opts[:temp] || '/tmp/'
|
||||
opts[:temp] = opts[:temp].empty?? opts[:temp] : opts[:temp] + '/'
|
||||
opts[:temp] = opts[:temp].gsub(/\/{2,}/, '/')
|
||||
opts[:temp] = opts[:temp].gsub(/'/, "\\\\'")
|
||||
opts[:temp] = opts[:temp].gsub(/ /, "\\ ")
|
||||
if (opts[:file])
|
||||
|
Loading…
Reference in New Issue
Block a user