-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
Add module favorites/bookmarks functionality for msfconsole #5107
Comments
A text file? |
You can already basically do this with aliases. I have a standing alias for the psexec module for instance In msfconsole:
The path on that psexec might be wrong, just going from memory. Create a file at ~/.msf4/msfconsole.rc and populate it with the output from the list of active aliases from above. I also recommend putting a -f in each of them because the alias plugin will check the validity of each alias, and not all commands are in scope during msfconsole start up, the -f will override the check and alias it anyways. So msfconsole.rc might look like:
~/.msf4/msfconsole.rc Is loaded by msfconsole automatically upon startup |
|
@kernelsmith wrote |
One thing to note in @kernelsmith's scheme is that |
Yeah, I used to chain resource files together but now I just start msfconsole and then load other rc's with the resource command if need be. Or add 'resource other.rc' to the bottom of msfconsole.rc |
@reider-roque, if you start using aliases, I think there will now be two of us ;). I use them all the time, but I'm pretty sure no one else does LOL. BTW, do you feel this is a good enough solution or do you want to keep the issue open? We could discuss a change that might have an aliases.rc always run, if present, even if -r is specified. It's exceedingly unlikely that doing so would cause any trouble for the specified additional resource file |
@kernelsmith, I think it would be awesome if you could add persistency to the plugin. I mean saving and keeping aliases across msfconsole restarts. Here is a scheme I have in mind:
Of course proposed flag names can be named something else. E.g. -p (persistence) can instead be named -w (write to the file) or -s (save); and -R may be named --force-reload for extra precaution. I'm sorry I can't help with adding this functionality. I was staring at the alias.rb code for a while, but alas Ruby is not a good fried of mine yet. |
Thanks, I will investigate adding this functionality. Yeah, alias.rb is one of the more complicated plugins you'll see because it makes heavy use of metaprogramming to cleanly "inject" and remove methods to handle aliases that you create so aliases are handled as 1st-class commands that don't work differently than built in commands. It's actually probably the one piece of code of which I'm most proud :) |
I believe #14201 fixed this by adding the |
Feature request.
The amount of available modules is enormous. And sometimes it is difficult to recall the module path I'm looking for (
search
to the rescue). It'll be nice to have some kind of persistent [across msfconsole restarts] favorites/bookmarks mechanism that could be used for the purpose.Platform/Version information:
The text was updated successfully, but these errors were encountered: