metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
Msf::Post::Windows::CliParse#win_parse_error
Parses error output of some windows CLI commands and returns hash with
the keys/vals detected always returns hash as follows but :errval only
comes back from sc.exe using 'FAILED' keyword
Note, most of the time the :errval will be nil, it's not usually provided
sc.exe error example:
[SC] EnumQueryServicesStatus:OpenService FAILED 1060:
The specified service does not exist as an installed service.
returns:
{
:error => "The specified service does not exist as an installed service",
:errval => 1060
}
reg.exe error example:
ERROR: Invalid key name.
Type "REG QUERY /?" for usage.
returns:
{
:error => "INVALID KEY NAME."
:errval => nil
}Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/msf/core/post/windows/cli_parse.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Msf--Post--Windows--CliParse-win_parse_error-for-pr
# Commit to gitgit add lib/msf/core/post/windows/cli_parse.rbgit commit -m "better docs for Msf::Post::Windows::CliParse#win_parse_error"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Msf--Post--Windows--CliParse-win_parse_error-for-pr
hub pull-request
# Celebrate!