From 391145a4afb905e147e0dc972738bb30bca0806d Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Wed, 23 Dec 2015 15:14:37 +0000 Subject: [PATCH] Checking if group_filter is empty --- modules/post/windows/gather/ad_to_sqlite.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/post/windows/gather/ad_to_sqlite.rb b/modules/post/windows/gather/ad_to_sqlite.rb index 22294cf960..7cdeccb412 100644 --- a/modules/post/windows/gather/ad_to_sqlite.rb +++ b/modules/post/windows/gather/ad_to_sqlite.rb @@ -45,7 +45,7 @@ class Metasploit3 < Msf::Post vprint_status "Retrieving AD Groups" begin group_fields = ['distinguishedName', 'objectSid', 'samAccountType', 'sAMAccountName', 'whenChanged', 'whenCreated', 'description', 'groupType', 'adminCount', 'comment', 'managedBy', 'cn'] - if datastore['GROUP_FILTER'].empty? + if datastore['GROUP_FILTER'].nil? || datastore['GROUP_FILTER'].empty? group_query = "(objectClass=group)" else group_query = "(&(objectClass=group)(#{datastore['GROUP_FILTER']}))"