rubocop & msftidy

bug/bundler_fix
Stuart Morgan 2015-12-21 18:15:19 +00:00
parent 8438774077
commit 4c27f381dc
1 changed files with 5 additions and 8 deletions

View File

@ -9,7 +9,7 @@ require 'msf/core'
class Metasploit3 < Msf::Post
include Msf::Auxiliary::Report
include Msf::Post::Windows::LDAP
# include Msf::Post::Windows::Accounts
# include Msf::Post::Windows::Accounts
USER_FIELDS = ['name',
'distinguishedname',
@ -19,9 +19,9 @@ class Metasploit3 < Msf::Post
super(update_info(
info,
'Name' => 'Windows Gather Active Directory Groups',
'Description' => %{
'Description' => %(
This module will enumerate AD groups on the specified domain.
},
),
'License' => MSF_LICENSE,
'Author' => [
'Stuart Morgan <stuart.morgan[at]mwrinfosecurity.com>'
@ -32,7 +32,7 @@ class Metasploit3 < Msf::Post
register_options([
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)
end
@ -40,7 +40,7 @@ class Metasploit3 < Msf::Post
@user_fields = USER_FIELDS.dup
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)
end
@ -71,8 +71,6 @@ class Metasploit3 < Msf::Post
# @param [Array<Array<Hash>>] the LDAP query results to parse
# @return [Rex::Ui::Text::Table] the table containing all the result data
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 = Rex::Ui::Text::Table.new(
'Header' => "Domain Groups",
@ -96,5 +94,4 @@ class Metasploit3 < Msf::Post
end
results_table
end
end