Pass in session to CWD check
Oops, used to this being accessible universally. Not the case here.
This commit is contained in:
@@ -201,7 +201,7 @@ module Exploit::FileDropper
|
||||
# @param [String] dir The directory to delete
|
||||
# @return [Boolean] True if the delete command has been executed in the remote machine, otherwise false.
|
||||
def file_dropper_delete_dir(session, dir)
|
||||
if file_dropper_check_cwd?(dir)
|
||||
if file_dropper_check_cwd?(session, dir)
|
||||
print_warning("Attempting to delete working directory #{dir}")
|
||||
end
|
||||
|
||||
@@ -258,7 +258,7 @@ module Exploit::FileDropper
|
||||
#
|
||||
# @param [String] path The path to check
|
||||
# @return [Boolean] true if the path is the same, otherwise false
|
||||
def file_dropper_check_cwd?(path)
|
||||
def file_dropper_check_cwd?(session, path)
|
||||
if session.type == 'meterpreter'
|
||||
return true if path == session.fs.dir.pwd
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user