diff --git a/documentation/modules/post/multi/gather/maven_creds.md b/documentation/modules/post/multi/gather/maven_creds.md index f856d348d8..afdae8a2cf 100644 --- a/documentation/modules/post/multi/gather/maven_creds.md +++ b/documentation/modules/post/multi/gather/maven_creds.md @@ -5,8 +5,8 @@ This module seeks all settings.xml (Maven configuration file) on the target file This module was successfully tested against: -- Ubuntu 14.04 and Maven 3.0.5 -- Debian 9 and Maven 3.0.5 +- Ubuntu 14.04 and Maven 3.0.5 with shell and meterpreter as session type +- Debian 9 and Maven 3.0.5 with shell and meterpreter as session type ## Verification Steps diff --git a/modules/post/multi/gather/maven_creds.rb b/modules/post/multi/gather/maven_creds.rb index de54914841..a5de37aa80 100644 --- a/modules/post/multi/gather/maven_creds.rb +++ b/modules/post/multi/gather/maven_creds.rb @@ -55,15 +55,13 @@ class MetasploitModule < Msf::Post def run print_status("Finding user directories") files = "" - if sysinfo - if sysinfo['OS'].include? "Windows" + case session.platform + when 'windows' files = gatherwin - else + when 'unix', 'linux', 'bsd', 'osx' files = gathernix - end - else - printerror("Incompatible session type, sysinfo is not available.") - return + else + print_error("Incompatible platform.") end if files.nil? || files.empty? print_error("No settings.xml file found")