rubocop fixes

bug/bundler_fix
Stuart Morgan 2015-12-20 02:02:44 +00:00
parent d5436c6fae
commit 7ce24969bb
1 changed files with 156 additions and 157 deletions

View File

@ -75,10 +75,10 @@ class Metasploit3 < Msf::Post
threadcount = remaining_groups.count < datastore['THREADS'] ? remaining_groups.count : datastore['THREADS'] threadcount = remaining_groups.count < datastore['THREADS'] ? remaining_groups.count : datastore['THREADS']
# Loop through each of the groups, creating threads where necessary # Loop through each of the groups, creating threads where necessary
while(not remaining_groups.nil? and not remaining_groups.empty?) while !remaining_groups.nil? && !remaining_groups.empty?
group_gather = [] group_gather = []
1.upto(threadcount) do 1.upto(threadcount) do
group_gather << framework.threads.spawn("Module(#{self.refname})", false, remaining_groups.shift) do |individual_group| group_gather << framework.threads.spawn("Module(#{refname})", false, remaining_groups.shift) do |individual_group|
begin begin
next if !individual_group || individual_group.empty? || individual_group.nil? next if !individual_group || individual_group.empty? || individual_group.nil?
@ -136,7 +136,7 @@ class Metasploit3 < Msf::Post
g_SAM_TRUST_ACCOUNT: (sat_int == 0x30000002) ? 1 : 0, g_SAM_TRUST_ACCOUNT: (sat_int == 0x30000002) ? 1 : 0,
g_SAM_APP_BASIC_GROUP: (sat_int == 0x40000000) ? 1 : 0, g_SAM_APP_BASIC_GROUP: (sat_int == 0x40000000) ? 1 : 0,
g_SAM_APP_QUERY_GROUP: (sat_int == 0x40000001) ? 1 : 0, g_SAM_APP_QUERY_GROUP: (sat_int == 0x40000001) ? 1 : 0,
g_SAM_ACCOUNT_TYPE_MAX: (sat_int==0x7fffffff) ? 1 : 0, g_SAM_ACCOUNT_TYPE_MAX: (sat_int == 0x7fffffff) ? 1 : 0
} }
run_sqlite_query(db, 'ad_groups', sql_param_group) run_sqlite_query(db, 'ad_groups', sql_param_group)
@ -230,7 +230,7 @@ class Metasploit3 < Msf::Post
u_SAM_TRUST_ACCOUNT: (sat_int == 0x30000002) ? 1 : 0, u_SAM_TRUST_ACCOUNT: (sat_int == 0x30000002) ? 1 : 0,
u_SAM_APP_BASIC_GROUP: (sat_int == 0x40000000) ? 1 : 0, u_SAM_APP_BASIC_GROUP: (sat_int == 0x40000000) ? 1 : 0,
u_SAM_APP_QUERY_GROUP: (sat_int == 0x40000001) ? 1 : 0, u_SAM_APP_QUERY_GROUP: (sat_int == 0x40000001) ? 1 : 0,
u_SAM_ACCOUNT_TYPE_MAX: (sat_int==0x7fffffff) ? 1 : 0, u_SAM_ACCOUNT_TYPE_MAX: (sat_int == 0x7fffffff) ? 1 : 0
} }
run_sqlite_query(db, 'ad_users', sql_param_user) run_sqlite_query(db, 'ad_users', sql_param_user)
@ -247,7 +247,7 @@ class Metasploit3 < Msf::Post
end end
end end
end end
group_gather.map { |each_group| each_group.join } group_gather.map(&:join)
end end
vprint_status "Retrieving computers" vprint_status "Retrieving computers"
@ -347,7 +347,7 @@ class Metasploit3 < Msf::Post
c_SAM_TRUST_ACCOUNT: (sat_int == 0x30000002) ? 1 : 0, c_SAM_TRUST_ACCOUNT: (sat_int == 0x30000002) ? 1 : 0,
c_SAM_APP_BASIC_GROUP: (sat_int == 0x40000000) ? 1 : 0, c_SAM_APP_BASIC_GROUP: (sat_int == 0x40000000) ? 1 : 0,
c_SAM_APP_QUERY_GROUP: (sat_int == 0x40000001) ? 1 : 0, c_SAM_APP_QUERY_GROUP: (sat_int == 0x40000001) ? 1 : 0,
c_SAM_ACCOUNT_TYPE_MAX: (sat_int==0x7fffffff) ? 1 : 0, c_SAM_ACCOUNT_TYPE_MAX: (sat_int == 0x7fffffff) ? 1 : 0
} }
run_sqlite_query(db, 'ad_computers', sql_param_computer) run_sqlite_query(db, 'ad_computers', sql_param_computer)
print_line "Computer [#{sql_param_computer[:c_cn]}][#{sql_param_computer[:c_dNSHostName]}][#{sql_param_computer[:c_rid]}]" if datastore['SHOW_COMPUTERS'] print_line "Computer [#{sql_param_computer[:c_cn]}][#{sql_param_computer[:c_dNSHostName]}][#{sql_param_computer[:c_rid]}]" if datastore['SHOW_COMPUTERS']
@ -363,7 +363,6 @@ class Metasploit3 < Msf::Post
f = ::File.size(dbfile.to_s) f = ::File.size(dbfile.to_s)
print_status "Database closed: #{dbfile} at #{f} byte(s)" print_status "Database closed: #{dbfile} at #{f} byte(s)"
end end
end end
# Run the parameterised SQL query # Run the parameterised SQL query
@ -551,6 +550,6 @@ class Metasploit3 < Msf::Post
def get_rid(data) def get_rid(data)
sid = data.unpack("bbbbbbbbV*")[8..-1] sid = data.unpack("bbbbbbbbV*")[8..-1]
return sid[-1] sid[-1]
end end
end end