Skip to content

Commit cde319a

Browse files
author
Erik Lenoir
committed
Optim module and add doc
1 parent b529c35 commit cde319a

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

documentation/modules/post/multi/gather/maven_creds.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ This module seeks all settings.xml (Maven configuration file) on the target file
55

66
This module was successfully tested against:
77

8-
- Ubuntu 14.04 and Maven 3.0.5
9-
- Debian 9 and Maven 3.0.5
8+
- Ubuntu 14.04 and Maven 3.0.5 with shell and meterpreter as session type
9+
- Debian 9 and Maven 3.0.5 with shell and meterpreter as session type
1010

1111
## Verification Steps
1212

modules/post/multi/gather/maven_creds.rb

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,13 @@ def gatherwin
5555
def run
5656
print_status("Finding user directories")
5757
files = ""
58-
if sysinfo
59-
if sysinfo['OS'].include? "Windows"
58+
case session.platform
59+
when 'windows'
6060
files = gatherwin
61-
else
61+
when 'unix', 'linux', 'bsd', 'osx'
6262
files = gathernix
63-
end
64-
else
65-
printerror("Incompatible session type, sysinfo is not available.")
66-
return
63+
else
64+
print_error("Incompatible platform.")
6765
end
6866
if files.nil? || files.empty?
6967
print_error("No settings.xml file found")

0 commit comments

Comments
 (0)