Msf::Post::File.append_file: Append not overwrite on *nix shell sessions

This commit is contained in:
bcoles
2022-10-21 23:28:14 +11:00
parent a9c3c61aa3
commit cd656ecdbb
+12 -1
View File
@@ -540,7 +540,7 @@ module Msf::Post::File
return _win_bin_append_file(file_name, data)
end
else
return _write_file_unix_shell(file_name, data)
return _append_file_unix_shell(file_name, data)
end
end
true
@@ -909,6 +909,17 @@ protected
end
end
#
# Append +data+ to the remote file +file_name+.
#
# You should never call this method directly. Instead, call {#append_file}
# which will call this method if it is appropriate for the given session.
#
# @return [void]
def _append_file_unix_shell(file_name, data)
_write_file_unix_shell(file_name, data, true)
end
#
# Write +data+ to the remote file +file_name+.
#