From 8e5c5e114d0228322d594250014e8f528ae9dae5 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Tue, 12 Jul 2011 21:05:44 +0000 Subject: [PATCH] Check for when reg key list is nil git-svn-id: file:///home/svn/framework3/trunk@13157 4d416f70-5f16-0410-b530-b9f4589650da --- modules/post/windows/gather/enum_applications.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/post/windows/gather/enum_applications.rb b/modules/post/windows/gather/enum_applications.rb index 0ee850c36b..8f1c778b66 100644 --- a/modules/post/windows/gather/enum_applications.rb +++ b/modules/post/windows/gather/enum_applications.rb @@ -47,8 +47,11 @@ class Metasploit3 < Msf::Post ] apps = [] appkeys.each do |keyx86| - registry_enumkeys(keyx86).each do |ak| - apps << keyx86 +"\\" + ak + found_keys = registry_enumkeys(keyx86) + if found_keys + found_keys.each do |ak| + apps << keyx86 +"\\" + ak + end end end