Add validation of session type

bug/bundler_fix
AgoraSecurity 2016-08-31 11:29:04 -05:00 committed by GitHub
parent 7852ef7d0e
commit d65ca818ea
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ class MetasploitModule < Msf::Post
end
def run
if session.type != 'meterpreter'
print_error ('Only meterpreter sessions are supported by this post module')
return
end
progfiles_env = session.sys.config.getenvs('SYSTEMDRIVE', 'HOMEDRIVE', 'ProgramFiles', 'ProgramFiles(x86)', 'ProgramW6432')
locations = []
progfiles_env.each do |_k, v|