add rename_file method to Msf::Post::File

Came up on IRC, I'm not attached to it, but this commit adds the
rename_file method to lib/msf/core/post/file.rb and aliases it to
move_file and mv_file
bug/bundler_fix
kernelsmith 2012-10-01 18:14:44 -05:00
parent e6e25544ec
commit 3d999f13c4
1 changed files with 9 additions and 0 deletions

View File

@ -298,6 +298,15 @@ module Msf::Post::File
end
end
#
# Rename a remote file
#
def rename_file(new_file, old_file)
write_file(new_file, (read_file(old_file))
rm_f(old_file)
end
alias :move_file :rename_file
alias :mv_file :rename_file
protected
#