Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FileDropper to properly clone string variables before storing them #18403

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/msf/core/exploit/file_dropper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def initialize(info = {})
# exploiting).
# @return [void]
def register_files_for_cleanup(*files)
@dropped_files += files
@dropped_files += files.map(&:clone)
adfoster-r7 marked this conversation as resolved.
Show resolved Hide resolved
end

def allow_no_cleanup
Expand All @@ -56,7 +56,7 @@ def allow_no_cleanup
# exploiting).
# @return [void]
def register_dirs_for_cleanup(*dirs)
@dropped_dirs += dirs
@dropped_dirs += dirs.map(&:clone)
end

# Singular versions
Expand Down