Skip to content

Commit f17ea91

Browse files
author
HD Moore
committed
Whitespace changes only
1 parent 1ce1cdf commit f17ea91

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

lib/msf/core/db_manager.rb

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def connect(opts={})
196196

197197
# Prefer the config file's pool setting
198198
nopts['pool'] ||= 75
199-
199+
200200
# Prefer the config file's wait_timeout setting too
201201
nopts['wait_timeout'] ||= 300
202202

@@ -346,7 +346,7 @@ def update_all_module_details
346346
self.modules_caching = true
347347

348348
::ActiveRecord::Base.connection_pool.with_connection {
349-
349+
350350
refresh = []
351351
skipped = []
352352

@@ -460,16 +460,16 @@ def module_to_details_hash(m)
460460

461461
res[:description] = m.description.to_s.strip
462462

463-
m.arch.map{ |x|
464-
bits << [ :arch, { :name => x.to_s } ]
463+
m.arch.map{ |x|
464+
bits << [ :arch, { :name => x.to_s } ]
465465
}
466466

467-
m.platform.platforms.map{ |x|
468-
bits << [ :platform, { :name => x.to_s.split('::').last.downcase } ]
467+
m.platform.platforms.map{ |x|
468+
bits << [ :platform, { :name => x.to_s.split('::').last.downcase } ]
469469
}
470470

471-
m.author.map{|x|
472-
bits << [ :author, { :name => x.to_s } ]
471+
m.author.map{|x|
472+
bits << [ :author, { :name => x.to_s } ]
473473
}
474474

475475
m.references.map do |r|
@@ -500,14 +500,14 @@ def module_to_details_hash(m)
500500
# Some modules are a combination, which means they are actually aggressive
501501
res[:stance] = m.stance.to_s.index("aggressive") ? "aggressive" : "passive"
502502

503-
503+
504504
m.class.mixins.each do |x|
505505
bits << [ :mixin, { :name => x.to_s } ]
506506
end
507507
end
508508

509509
if(m.type == "auxiliary")
510-
510+
511511
m.actions.each_index do |i|
512512
bits << [ :action, { :name => m.actions[i].name.to_s } ]
513513
end
@@ -523,9 +523,9 @@ def module_to_details_hash(m)
523523

524524
res
525525
end
526-
527-
528-
526+
527+
528+
529529
#
530530
# This provides a standard set of search filters for every module.
531531
# The search terms are in the form of:
@@ -562,7 +562,7 @@ def search_modules(search_string, inclusive=false)
562562
end
563563

564564
::ActiveRecord::Base.connection_pool.with_connection {
565-
565+
566566
where_q = []
567567
where_v = []
568568

@@ -572,7 +572,7 @@ def search_modules(search_string, inclusive=false)
572572
case kt
573573
when 'text'
574574
xv = "%#{kv}%"
575-
where_q << ' ( ' +
575+
where_q << ' ( ' +
576576
'module_details.fullname ILIKE ? OR module_details.name ILIKE ? OR module_details.description ILIKE ? OR ' +
577577
'module_authors.name ILIKE ? OR module_actions.name ILIKE ? OR module_archs.name ILIKE ? OR ' +
578578
'module_targets.name ILIKE ? OR module_platforms.name ILIKE ? ' +
@@ -594,7 +594,7 @@ def search_modules(search_string, inclusive=false)
594594
# TODO
595595
when 'type'
596596
where_q << ' ( module_details.mtype = ? ) '
597-
where_v << [ kv ]
597+
where_v << [ kv ]
598598
when 'app'
599599
where_q << ' ( module_details.stance = ? )'
600600
where_v << [ ( kv == "client") ? "passive" : "active" ]
@@ -604,11 +604,11 @@ def search_modules(search_string, inclusive=false)
604604
when 'cve','bid','osvdb','edb'
605605
where_q << ' ( module_refs.name = ? )'
606606
where_v << [ kt.upcase + '-' + kv ]
607-
607+
608608
end
609609
end
610610
end
611-
611+
612612
qry = Mdm::ModuleDetail.select("DISTINCT(module_details.*)").
613613
joins(
614614
"LEFT OUTER JOIN module_authors ON module_details.id = module_authors.module_detail_id " +
@@ -629,4 +629,3 @@ def search_modules(search_string, inclusive=false)
629629

630630
end
631631
end
632-

0 commit comments

Comments
 (0)