Land #5126, Meterpreter edit command fix

bug/bundler_fix
William Vu 2015-04-10 17:19:33 -05:00
commit d5903ca5b2
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 2 additions and 10 deletions

View File

@ -324,16 +324,8 @@ class Console::CommandDispatcher::Stdapi::Fs
meterp_temp.binmode
temp_path = meterp_temp.path
begin
# Download the remote file to the temporary file
client.fs.file.download_file(temp_path, args[0])
rescue RequestError => re
# If the file doesn't exist, then it's okay. Otherwise, throw the
# error.
if re.result != 2
raise $!
end
end
# Try to download the file, but don't worry if it doesn't exist
client.fs.file.download_file(temp_path, args[0]) rescue nil
# Spawn the editor (default to vi)
editor = Rex::Compat.getenv('EDITOR') || 'vi'