Skip to content

Commit e60aeca

Browse files
committed
Pass in session to CWD check
Oops, used to this being accessible universally. Not the case here.
1 parent 199a7cc commit e60aeca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/msf/core/exploit/file_dropper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def file_dropper_delete_file(session, file)
201201
# @param [String] dir The directory to delete
202202
# @return [Boolean] True if the delete command has been executed in the remote machine, otherwise false.
203203
def file_dropper_delete_dir(session, dir)
204-
if file_dropper_check_cwd?(dir)
204+
if file_dropper_check_cwd?(session, dir)
205205
print_warning("Attempting to delete working directory #{dir}")
206206
end
207207

@@ -258,7 +258,7 @@ def file_dropper_deleted?(session, path, exists_before)
258258
#
259259
# @param [String] path The path to check
260260
# @return [Boolean] true if the path is the same, otherwise false
261-
def file_dropper_check_cwd?(path)
261+
def file_dropper_check_cwd?(session, path)
262262
if session.type == 'meterpreter'
263263
return true if path == session.fs.dir.pwd
264264
else

0 commit comments

Comments
 (0)