Skip to content

Commit cfd05bc

Browse files
committed
Normalize comments
1 parent 0a9a8a5 commit cfd05bc

File tree

1 file changed

+10
-9
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+10
-9
lines changed

lib/msf/ui/console/command_dispatcher/db.rb

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: binary -*-
2-
#
2+
33
require 'rexml/document'
44
require 'rex/parser/nmap_xml'
55
require 'msf/core/db_export'
@@ -287,7 +287,6 @@ def cmd_hosts(*args)
287287
end
288288

289289
# If we got here, we're searching. Delete implies search
290-
291290
tbl = Rex::Ui::Text::Table.new(
292291
{
293292
'Header' => "Hosts",
@@ -475,7 +474,6 @@ def cmd_services(*args)
475474
end
476475

477476
# If we got here, we're searching. Delete implies search
478-
479477
col_names = default_columns
480478
if col_search
481479
col_names = col_search
@@ -771,7 +769,6 @@ def cmd_creds(*args)
771769
end
772770

773771
# If we get here, we're searching. Delete implies search
774-
775772
if user
776773
user_regex = Regexp.compile(user)
777774
end
@@ -930,9 +927,11 @@ def cmd_notes(*args)
930927

931928
note_list = []
932929
delete_count = 0
933-
if host_ranges.empty? # No host specified - collect all notes
930+
# No host specified - collect all notes
931+
if host_ranges.empty?
934932
note_list = framework.db.notes.dup
935-
else # Collect notes of specified hosts
933+
# Collect notes of specified hosts
934+
else
936935
each_host_range_chunk(host_ranges) do |host_search|
937936
framework.db.hosts(framework.db.workspace, false, host_search).each do |host|
938937
note_list.concat(host.notes)
@@ -1216,6 +1215,7 @@ def cmd_db_services(*args); deprecated_cmd(:services, *args); end
12161215
# :category: Deprecated Commands
12171216
def cmd_db_autopwn(*args); deprecated_cmd; end
12181217

1218+
#
12191219
# :category: Deprecated Commands
12201220
#
12211221
# This one deserves a little more explanation than standard deprecation
@@ -1478,15 +1478,16 @@ def cmd_db_nmap(*args)
14781478
}
14791479
end
14801480

1481+
#
14811482
# Store some locally-generated data as a file, similiar to store_loot.
1483+
#
14821484
def report_store_local(ltype=nil, ctype=nil, data=nil, filename=nil)
14831485
store_local(ltype,ctype,data,filename)
14841486
end
14851487

14861488
#
14871489
# Database management
14881490
#
1489-
14901491
def db_check_driver
14911492
if(not framework.db.driver)
14921493
print_error("No database driver installed. Try 'gem install pg'")
@@ -1720,9 +1721,9 @@ def db_parse_db_uri_postgresql(path)
17201721
res
17211722
end
17221723

1723-
##
1724+
#
17241725
# Miscellaneous option helpers
1725-
##
1726+
#
17261727

17271728
#
17281729
# Parse +arg+ into a RangeWalker and append the result into +host_ranges+

0 commit comments

Comments
 (0)