Pass in session to CWD check

Oops, used to this being accessible universally. Not the case here.
This commit is contained in:
William Vu
2018-01-25 16:41:30 -06:00
parent 199a7cc134
commit e60aeca2db
+2 -2
View File
@@ -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