|
1 | 1 | # -*- coding: binary -*-
|
2 |
| -# |
| 2 | + |
3 | 3 | require 'rexml/document'
|
4 | 4 | require 'rex/parser/nmap_xml'
|
5 | 5 | require 'msf/core/db_export'
|
@@ -287,7 +287,6 @@ def cmd_hosts(*args)
|
287 | 287 | end
|
288 | 288 |
|
289 | 289 | # If we got here, we're searching. Delete implies search
|
290 |
| - |
291 | 290 | tbl = Rex::Ui::Text::Table.new(
|
292 | 291 | {
|
293 | 292 | 'Header' => "Hosts",
|
@@ -475,7 +474,6 @@ def cmd_services(*args)
|
475 | 474 | end
|
476 | 475 |
|
477 | 476 | # If we got here, we're searching. Delete implies search
|
478 |
| - |
479 | 477 | col_names = default_columns
|
480 | 478 | if col_search
|
481 | 479 | col_names = col_search
|
@@ -771,7 +769,6 @@ def cmd_creds(*args)
|
771 | 769 | end
|
772 | 770 |
|
773 | 771 | # If we get here, we're searching. Delete implies search
|
774 |
| - |
775 | 772 | if user
|
776 | 773 | user_regex = Regexp.compile(user)
|
777 | 774 | end
|
@@ -930,9 +927,11 @@ def cmd_notes(*args)
|
930 | 927 |
|
931 | 928 | note_list = []
|
932 | 929 | 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? |
934 | 932 | note_list = framework.db.notes.dup
|
935 |
| - else # Collect notes of specified hosts |
| 933 | + # Collect notes of specified hosts |
| 934 | + else |
936 | 935 | each_host_range_chunk(host_ranges) do |host_search|
|
937 | 936 | framework.db.hosts(framework.db.workspace, false, host_search).each do |host|
|
938 | 937 | note_list.concat(host.notes)
|
@@ -1216,6 +1215,7 @@ def cmd_db_services(*args); deprecated_cmd(:services, *args); end
|
1216 | 1215 | # :category: Deprecated Commands
|
1217 | 1216 | def cmd_db_autopwn(*args); deprecated_cmd; end
|
1218 | 1217 |
|
| 1218 | + # |
1219 | 1219 | # :category: Deprecated Commands
|
1220 | 1220 | #
|
1221 | 1221 | # This one deserves a little more explanation than standard deprecation
|
@@ -1478,15 +1478,16 @@ def cmd_db_nmap(*args)
|
1478 | 1478 | }
|
1479 | 1479 | end
|
1480 | 1480 |
|
| 1481 | + # |
1481 | 1482 | # Store some locally-generated data as a file, similiar to store_loot.
|
| 1483 | + # |
1482 | 1484 | def report_store_local(ltype=nil, ctype=nil, data=nil, filename=nil)
|
1483 | 1485 | store_local(ltype,ctype,data,filename)
|
1484 | 1486 | end
|
1485 | 1487 |
|
1486 | 1488 | #
|
1487 | 1489 | # Database management
|
1488 | 1490 | #
|
1489 |
| - |
1490 | 1491 | def db_check_driver
|
1491 | 1492 | if(not framework.db.driver)
|
1492 | 1493 | print_error("No database driver installed. Try 'gem install pg'")
|
@@ -1720,9 +1721,9 @@ def db_parse_db_uri_postgresql(path)
|
1720 | 1721 | res
|
1721 | 1722 | end
|
1722 | 1723 |
|
1723 |
| - ## |
| 1724 | + # |
1724 | 1725 | # Miscellaneous option helpers
|
1725 |
| - ## |
| 1726 | + # |
1726 | 1727 |
|
1727 | 1728 | #
|
1728 | 1729 | # Parse +arg+ into a RangeWalker and append the result into +host_ranges+
|
|
0 commit comments