From 39049a71ca14012a02e05eb8f3bca074b6e4ecd9 Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Tue, 11 Oct 2011 21:55:30 +0000 Subject: [PATCH] Chk nil for user in case it returns nil, but password doesn't git-svn-id: file:///home/svn/framework3/trunk@13880 4d416f70-5f16-0410-b530-b9f4589650da --- .../windows/gather/credentials/nimbuzz.rb | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/post/windows/gather/credentials/nimbuzz.rb b/modules/post/windows/gather/credentials/nimbuzz.rb index f52722e9df..1b23fb8767 100644 --- a/modules/post/windows/gather/credentials/nimbuzz.rb +++ b/modules/post/windows/gather/credentials/nimbuzz.rb @@ -17,21 +17,21 @@ class Metasploit3 < Msf::Post include Msf::Auxiliary::Report def initialize(info={}) - super( update_info( info, - 'Name' => 'Windows Gather Nimbuzz Instant Messenger Password Extractor', - 'Description' => %q{ - This module extracts the account passwords saved by Nimbuzz Instant - Messenger in hex format. - }, - 'License' => MSF_LICENSE, - 'Author' => - [ - 'sil3ntdre4m ', - 'SecurityXploded Team', #www.SecurityXploded.com - ], - 'Version' => '$Revision$', - 'Platform' => [ 'windows' ], - 'SessionTypes' => [ 'meterpreter' ] + super(update_info( info, + 'Name' => 'Windows Gather Nimbuzz Instant Messenger Password Extractor', + 'Description' => %q{ + This module extracts the account passwords saved by Nimbuzz Instant + Messenger in hex format. + }, + 'License' => MSF_LICENSE, + 'Author' => + [ + 'sil3ntdre4m ', + 'SecurityXploded Team', #www.SecurityXploded.com + ], + 'Version' => '$Revision$', + 'Platform' => [ 'windows' ], + 'SessionTypes' => [ 'meterpreter' ] )) end @@ -58,7 +58,7 @@ class Metasploit3 < Msf::Post return end - user = registry_getvaldata("HKU\\#{k}\\Software\\Nimbuzz\\PCClient\\Application\\", "Username") + user = registry_getvaldata("HKU\\#{k}\\Software\\Nimbuzz\\PCClient\\Application\\", "Username") || "" hpass = registry_getvaldata("HKU\\#{k}\\Software\\Nimbuzz\\PCClient\\Application\\", "Password") next if hpass == nil or hpass == ""