Land #7305, missing env var fix for Steam module

bug/bundler_fix
William Vu 2016-09-13 23:11:40 -05:00
commit a5502264d4
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 2 additions and 2 deletions

View File

@ -42,12 +42,12 @@ class MetasploitModule < Msf::Post
# We will just use an x64 only defined env variable to check. # We will just use an x64 only defined env variable to check.
progfiles_env = session.sys.config.getenvs('ProgramFiles(X86)', 'ProgramFiles') progfiles_env = session.sys.config.getenvs('ProgramFiles(X86)', 'ProgramFiles')
progfilesx86 = progfiles_env['ProgramFiles(X86)'] progfilesx86 = progfiles_env['ProgramFiles(X86)']
if not progfilesx86.empty? and progfilesx86 !~ /%ProgramFiles\(X86\)%/ if not progfilesx86.blank? and progfilesx86 !~ /%ProgramFiles\(X86\)%/
progs = progfilesx86 # x64 progs = progfilesx86 # x64
else else
progs = progfiles_env['ProgramFiles'] # x86 progs = progfiles_env['ProgramFiles'] # x86
end end
path = progs + '\\Steam\\config' path = "#{progs}\\Steam\\config"
print_status("Checking for Steam configs in #{path}") print_status("Checking for Steam configs in #{path}")