rubocop & msftidy
parent
8438774077
commit
4c27f381dc
|
@ -9,7 +9,7 @@ require 'msf/core'
|
||||||
class Metasploit3 < Msf::Post
|
class Metasploit3 < Msf::Post
|
||||||
include Msf::Auxiliary::Report
|
include Msf::Auxiliary::Report
|
||||||
include Msf::Post::Windows::LDAP
|
include Msf::Post::Windows::LDAP
|
||||||
# include Msf::Post::Windows::Accounts
|
# include Msf::Post::Windows::Accounts
|
||||||
|
|
||||||
USER_FIELDS = ['name',
|
USER_FIELDS = ['name',
|
||||||
'distinguishedname',
|
'distinguishedname',
|
||||||
|
@ -19,9 +19,9 @@ class Metasploit3 < Msf::Post
|
||||||
super(update_info(
|
super(update_info(
|
||||||
info,
|
info,
|
||||||
'Name' => 'Windows Gather Active Directory Groups',
|
'Name' => 'Windows Gather Active Directory Groups',
|
||||||
'Description' => %{
|
'Description' => %(
|
||||||
This module will enumerate AD groups on the specified domain.
|
This module will enumerate AD groups on the specified domain.
|
||||||
},
|
),
|
||||||
'License' => MSF_LICENSE,
|
'License' => MSF_LICENSE,
|
||||||
'Author' => [
|
'Author' => [
|
||||||
'Stuart Morgan <stuart.morgan[at]mwrinfosecurity.com>'
|
'Stuart Morgan <stuart.morgan[at]mwrinfosecurity.com>'
|
||||||
|
@ -32,7 +32,7 @@ class Metasploit3 < Msf::Post
|
||||||
|
|
||||||
register_options([
|
register_options([
|
||||||
OptString.new('ADDITIONAL_FIELDS', [false, 'Additional fields to retrieve, comma separated', nil]),
|
OptString.new('ADDITIONAL_FIELDS', [false, 'Additional fields to retrieve, comma separated', nil]),
|
||||||
OptString.new('FILTER', [false, 'Customised LDAP filter', nil]),
|
OptString.new('FILTER', [false, 'Customised LDAP filter', nil])
|
||||||
], self.class)
|
], self.class)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class Metasploit3 < Msf::Post
|
||||||
@user_fields = USER_FIELDS.dup
|
@user_fields = USER_FIELDS.dup
|
||||||
|
|
||||||
if datastore['ADDITIONAL_FIELDS']
|
if datastore['ADDITIONAL_FIELDS']
|
||||||
additional_fields = datastore['ADDITIONAL_FIELDS'].gsub(/\s+/,"").split(',')
|
additional_fields = datastore['ADDITIONAL_FIELDS'].gsub(/\s+/, "").split(',')
|
||||||
@user_fields.push(*additional_fields)
|
@user_fields.push(*additional_fields)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -71,8 +71,6 @@ class Metasploit3 < Msf::Post
|
||||||
# @param [Array<Array<Hash>>] the LDAP query results to parse
|
# @param [Array<Array<Hash>>] the LDAP query results to parse
|
||||||
# @return [Rex::Ui::Text::Table] the table containing all the result data
|
# @return [Rex::Ui::Text::Table] the table containing all the result data
|
||||||
def parse_results(results)
|
def parse_results(results)
|
||||||
domain = datastore['DOMAIN'] || get_domain
|
|
||||||
domain_ip = client.net.resolve.resolve_host(domain)[:ip]
|
|
||||||
# Results table holds raw string data
|
# Results table holds raw string data
|
||||||
results_table = Rex::Ui::Text::Table.new(
|
results_table = Rex::Ui::Text::Table.new(
|
||||||
'Header' => "Domain Groups",
|
'Header' => "Domain Groups",
|
||||||
|
@ -96,5 +94,4 @@ class Metasploit3 < Msf::Post
|
||||||
end
|
end
|
||||||
results_table
|
results_table
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue