Skip to content

Commit d3d744a

Browse files
committed
Make sure we get the field :value
1 parent b1453af commit d3d744a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

modules/post/windows/gather/enum_ad_computers.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ def run
8181

8282
report = {}
8383
0.upto(fields.length-1) do |i|
84-
field = result[i] || ""
84+
field = result[i][:value] || ""
8585

8686
# Only perform these actions if the database is connected and we want
8787
# to store in the DB.
8888
if db && datastore['STORE_DB']
8989
case fields[i]
9090
when 'dNSHostName'
91-
dns = field
91+
dns = field.value
9292
report[:name] = dns
9393
hostnames << dns
9494
when 'operatingSystem'

modules/post/windows/gather/enum_ad_service_principal_names.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def parse_result(result, fields)
100100
row = []
101101

102102
0.upto(fields.length-1) do |i|
103-
field = (result[i].nil? ? "" : result[i])
103+
field = (result[i][:value].nil? ? "" : result[i][:value])
104104

105105
if fields[i] == 'servicePrincipalName'
106106
break if field.blank?

modules/post/windows/gather/enum_ad_to_wordlist.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class Metasploit3 < Msf::Post
2626
'company',
2727
'streetAddress',
2828
'sAMAccountName',
29-
'userAccountControl',
3029
'comment',
3130
'description'
3231
]
@@ -37,7 +36,7 @@ def initialize(info={})
3736
'Description' => %q{
3837
This module will gather information from the default Active Domain (AD) directory
3938
and use these words to seed a wordlist. By default it enumerates user accounts to
40-
build the wordlist
39+
build the wordlist.
4140
},
4241
'License' => MSF_LICENSE,
4342
'Author' => ['Thomas Ring'],
@@ -69,7 +68,7 @@ def run
6968
@words_dict = {}
7069
q[:results].each do |result|
7170
result.each do |field|
72-
search_words(field)
71+
search_words(field[:value])
7372
end # result.each
7473
end # q.each
7574

modules/post/windows/gather/enum_ad_user_comments.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,11 @@ def run
6565

6666
report = {}
6767
result.each do |field|
68-
if field.nil?
68+
if field[:value].nil?
6969
row << ""
7070
else
71-
row << field
71+
row << field[:value]
72+
7273
end
7374
end
7475

0 commit comments

Comments
 (0)