Add validation of session type
parent
7852ef7d0e
commit
d65ca818ea
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue