Fix symlink test bug when running python meterpreter on windows

This commit is contained in:
adfoster-r7 2023-06-14 19:56:02 +01:00
parent 966dec5b03
commit 2a66987e39
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ class MetasploitModule < Msf::Post
def make_symlink(target, symlink)
if session.platform == 'windows'
cmd_exec("cmd.exe /c mklink #{directory?(target) ? '/D ' : ''}#{symlink} #{target}")
cmd_exec("cmd.exe", "/c mklink #{directory?(target) ? '/D ' : ''}#{symlink} #{target}")
else
cmd_exec("ln -s $(pwd)/#{target} $(pwd)/#{symlink}")
end