Sample Header Ad - 728x90

How to run msfconsole within any directory?

1 vote
2 answers
1729 views
I just installed metasploit . The issue is I can only run ./msfconsole in installation directory which is /opt/framework/metasploit-framework. When I run msfconsole in another directory, I get this error: Could not find rake-10.4.2 in any of the sources Run bundle install to install missing gems. In my .bashrc file : export PATH="$PATH:$HOME/.rvm/bin" export PATH="$PATH:$HOME/.gem/ruby/2.3.0/bin" export PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH" export PATH=$PATH:/opt/framework/metasploit-framework alias msfconsole="./msfconsole --quiet -x \"db_connect ${USER}@msf\"" My solution so far (I have to exit to /opt/framework/metasploit-framework though) : alias msfconsole="cd /opt/framework/metasploit-framework && ./msfconsole --quiet -x \"db_connect ${USER}@msf\""
Asked by Ηλεκτρολόγος Μηχανικός (123 rep)
Jan 9, 2016, 03:38 PM
Last activity: Jul 13, 2017, 11:59 AM