Skip to content
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

Improve user experience when loading invalid module names #11552

Merged
merged 4 commits into from Mar 12, 2019

Conversation

Projects
None yet
3 participants
@wvu-r7
Copy link
Contributor

wvu-r7 commented Mar 12, 2019

This is the superior solution, I hope.

wvu@kharak:/rapid7/metasploit-framework:feature/namespace$ ./msfconsole -q
[-] WARNING! The following modules could not be loaded!
[-] 	/rapid7/metasploit-framework/modules/exploits/windows/smb/ms17-010-eternalblue.rb
[-] Please see /Users/wvu/.msf4/logs/framework.log for details.
msf5 > log
[*] Launching less +G /Users/wvu/.msf4/logs/framework.log
[snip]
[03/11/2019 23:45:55] [e(0)] core: /rapid7/metasploit-framework/modules/exploits/windows/smb/ms17-010-eternalblue.rb failed to load due to the following error: Msf::Modules::Error Failed to load module (windows/smb/ms17-010-eternalblue from /rapid7/metasploit-framework/modules/exploits/windows/smb/ms17-010-eternalblue.rb) due to invalid module filename (must be lowercase alphanumeric snake case)
[snip]
msf5 >

Escalates #10729 and #10788 and addresses #11536.

wvu-r7 added some commits Mar 12, 2019

Revert Msf::ModuleLoadError exception
Msf::Modules::Error is already a thing! My bad.

@wvu-r7 wvu-r7 requested a review from busterb Mar 12, 2019

wvu-r7 added some commits Mar 12, 2019

Direct user to framework.log for load problems
This reduces long lines and cluttered output during startup.
@busterb
Copy link
Contributor

busterb left a comment

LGTM

@wvu-r7 wvu-r7 self-assigned this Mar 12, 2019

@wvu-r7 wvu-r7 merged commit 8e9c207 into rapid7:master Mar 12, 2019

3 checks passed

Metasploit Automation - Sanity Test Execution Successfully completed all tests.
Details
Metasploit Automation - Test Execution Successfully completed all tests.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

wvu-r7 added a commit that referenced this pull request Mar 12, 2019

@wvu-r7

This comment has been minimized.

Copy link
Contributor Author

wvu-r7 commented Mar 12, 2019

Release Notes

This converts the hard error for invalidly named modules into a soft error, allowing Metasploit to start by skipping the invalid module and warning the user.

@wvu-r7 wvu-r7 deleted the wvu-r7:feature/namespace branch Mar 12, 2019

@jmartin-r7 jmartin-r7 added the msf5 label Mar 13, 2019

@jmartin-r7

This comment has been minimized.

Copy link
Contributor

jmartin-r7 commented Mar 13, 2019

Marked msf5 due to conflicts on merge to 4.x related to evasion changes in these files. Backport may be possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.