New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broken hosts and services help command #18813
Merged
adfoster-r7
merged 1 commit into
rapid7:master
from
adfoster-r7:fix-broken-hosts-and-services-help-command
Feb 12, 2024
Merged
Fix broken hosts and services help command #18813
adfoster-r7
merged 1 commit into
rapid7:master
from
adfoster-r7:fix-broken-hosts-and-services-help-command
Feb 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Beforemsf6 auxiliary(admin/postgres/postgres_readfile) > help hosts
[-] Error while running command help: wrong number of arguments (given 0, expected 1)
Call stack:
/Users/sjanusz/Programming/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:426:in `cmd_hosts_help'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:184:in `block in cmd_help'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:176:in `each'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:176:in `cmd_help'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:581:in `run_command'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:530:in `block in run_single'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in `each'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in `run_single'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/shell.rb:165:in `block in run'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/shell.rb:309:in `block in with_history_manager_context'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/shell/history_manager.rb:33:in `with_context'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/shell.rb:306:in `with_history_manager_context'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/shell.rb:133:in `run'
/Users/sjanusz/Programming/metasploit-framework/lib/metasploit/framework/command/console.rb:54:in `start'
/Users/sjanusz/Programming/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
./msfconsole:23:in `<main>'
msf6 auxiliary(admin/postgres/postgres_readfile) > help services
[-] Error while running command help: wrong number of arguments (given 0, expected 1)
Call stack:
/Users/sjanusz/Programming/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:701:in `cmd_services_help'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:184:in `block in cmd_help'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:176:in `each'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:176:in `cmd_help'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:581:in `run_command'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:530:in `block in run_single'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in `each'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in `run_single'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/shell.rb:165:in `block in run'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/shell.rb:309:in `block in with_history_manager_context'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/shell/history_manager.rb:33:in `with_context'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/shell.rb:306:in `with_history_manager_context'
/Users/sjanusz/Programming/metasploit-framework/lib/rex/ui/text/shell.rb:133:in `run'
/Users/sjanusz/Programming/metasploit-framework/lib/metasploit/framework/command/console.rb:54:in `start'
/Users/sjanusz/Programming/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
./msfconsole:23:in `<main>'
msf6 auxiliary(admin/postgres/postgres_readfile) > hosts -h
Usage: hosts [ options ] [addr1 addr2 ...]
OPTIONS:
-a, --add <host> Add the hosts instead of searching
-c, --columns <columns> Only show the given columns (see list below)
-C, --columns-until-restart <columns> Only show the given columns until the next restart (see list below)
-d, --delete <hosts> Delete the hosts instead of searching
-h, --help Show this help information
-i, --info <info> Change the info of a host
-m, --comment <comment> Change the comment of a host
-n, --name <name> Change the name of a host
-O, --order <column id> Order rows by specified column number
-o, --output <filename> Send output to a file in csv format
-R, --rhosts Set RHOSTS from the results of the search
-S, --search <filter> Search string to filter by
-T, --delete-tag <tag> Remove a tag from a range of hosts
-t, --tag <tag> Add or specify a tag to a range of hosts
-u, --up Only show hosts which are up
Available columns: address, arch, comm, comments, created_at, cred_count, detected_arch, exploit_attempt_count, host_detail_count, info, mac, name, note_count, os_family, os_flavor, os_lang, os_name, os_sp, purpose, scope, service_count, state, updated_at, virtual_host, vuln_count, tags
msf6 auxiliary(admin/postgres/postgres_readfile) > services -h
Usage: services [-h] [-u] [-a] [-r <proto>] [-p <port1,port2>] [-s <name1,name2>] [-o <filename>] [addr1 addr2 ...]
OPTIONS:
-a, --add Add the services instead of searching.
-c, --column <col1,col2> Only show the given columns.
-d, --delete Delete the services instead of searching.
-h, --help Show this help information.
-O, --order <column id> Order rows by specified column number.
-o, --output <filename> Send output to a file in csv format.
-p, --port <ports> Search for a list of ports.
-r, --protocol <protocol> Protocol type of the service being added [tcp|udp].
-R, --rhosts Set RHOSTS from the results of the search.
-s, --name <name> Name of the service to add.
-S, --search <filter> Search string to filter by.
-u, --up Only show services which are up.
-U, --update Update data for existing service.
Available columns: created_at, info, name, port, proto, state, updated_at Aftermsf6 auxiliary(admin/postgres/postgres_readfile) > help hosts
Usage: hosts [ options ] [addr1 addr2 ...]
OPTIONS:
-a, --add <host> Add the hosts instead of searching
-c, --columns <columns> Only show the given columns (see list below)
-C, --columns-until-restart <columns> Only show the given columns until the next restart (see list below)
-d, --delete <hosts> Delete the hosts instead of searching
-h, --help Show this help information
-i, --info <info> Change the info of a host
-m, --comment <comment> Change the comment of a host
-n, --name <name> Change the name of a host
-O, --order <column id> Order rows by specified column number
-o, --output <filename> Send output to a file in csv format
-R, --rhosts Set RHOSTS from the results of the search
-S, --search <filter> Search string to filter by
-T, --delete-tag <tag> Remove a tag from a range of hosts
-t, --tag <tag> Add or specify a tag to a range of hosts
-u, --up Only show hosts which are up
Available columns: address, arch, comm, comments, created_at, cred_count, detected_arch, exploit_attempt_count, host_detail_count, info, mac, name, note_count, os_family, os_flavor, os_lang, os_name, os_sp, purpose, scope, service_count, state, updated_at, virtual_host, vuln_count, tags
msf6 auxiliary(admin/postgres/postgres_readfile) > help services
Usage: services [-h] [-u] [-a] [-r <proto>] [-p <port1,port2>] [-s <name1,name2>] [-o <filename>] [addr1 addr2 ...]
OPTIONS:
-a, --add Add the services instead of searching.
-c, --column <col1,col2> Only show the given columns.
-d, --delete Delete the services instead of searching.
-h, --help Show this help information.
-O, --order <column id> Order rows by specified column number.
-o, --output <filename> Send output to a file in csv format.
-p, --port <ports> Search for a list of ports.
-r, --protocol <protocol> Protocol type of the service being added [tcp|udp].
-R, --rhosts Set RHOSTS from the results of the search.
-s, --name <name> Name of the service to add.
-S, --search <filter> Search string to filter by.
-u, --up Only show services which are up.
-U, --update Update data for existing service.
Available columns: created_at, info, name, port, proto, state, updated_at
msf6 auxiliary(admin/postgres/postgres_readfile) > hosts -h
Usage: hosts [ options ] [addr1 addr2 ...]
OPTIONS:
-a, --add <host> Add the hosts instead of searching
-c, --columns <columns> Only show the given columns (see list below)
-C, --columns-until-restart <columns> Only show the given columns until the next restart (see list below)
-d, --delete <hosts> Delete the hosts instead of searching
-h, --help Show this help information
-i, --info <info> Change the info of a host
-m, --comment <comment> Change the comment of a host
-n, --name <name> Change the name of a host
-O, --order <column id> Order rows by specified column number
-o, --output <filename> Send output to a file in csv format
-R, --rhosts Set RHOSTS from the results of the search
-S, --search <filter> Search string to filter by
-T, --delete-tag <tag> Remove a tag from a range of hosts
-t, --tag <tag> Add or specify a tag to a range of hosts
-u, --up Only show hosts which are up
Available columns: address, arch, comm, comments, created_at, cred_count, detected_arch, exploit_attempt_count, host_detail_count, info, mac, name, note_count, os_family, os_flavor, os_lang, os_name, os_sp, purpose, scope, service_count, state, updated_at, virtual_host, vuln_count, tags
msf6 auxiliary(admin/postgres/postgres_readfile) > services -h
Usage: services [-h] [-u] [-a] [-r <proto>] [-p <port1,port2>] [-s <name1,name2>] [-o <filename>] [addr1 addr2 ...]
OPTIONS:
-a, --add Add the services instead of searching.
-c, --column <col1,col2> Only show the given columns.
-d, --delete Delete the services instead of searching.
-h, --help Show this help information.
-O, --order <column id> Order rows by specified column number.
-o, --output <filename> Send output to a file in csv format.
-p, --port <ports> Search for a list of ports.
-r, --protocol <protocol> Protocol type of the service being added [tcp|udp].
-R, --rhosts Set RHOSTS from the results of the search.
-s, --name <name> Name of the service to add.
-S, --search <filter> Search string to filter by.
-u, --up Only show services which are up.
-U, --update Update data for existing service.
Available columns: created_at, info, name, port, proto, state, updated_at LGTM 👍 |
sjanusz-r7
approved these changes
Feb 10, 2024
Release NotesFixes a crash when running the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix the broken
help hosts
andhelp services
commandVerification
These commands should not crash
Before
After