mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Alternative solution for path for MSF tools.
This commit is contained in:
28
bin/metasploit.sh
Executable file
28
bin/metasploit.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
export NAME=$(basename "$0")
|
||||
export BASE="/opt/metasploit" # TODO: search this path
|
||||
|
||||
# Autogen'd
|
||||
. ${BASE}/scripts/setenv.sh
|
||||
|
||||
# Use Pro's bundled gems instead of the gemcache
|
||||
export MSF_BUNDLE_GEMS=0
|
||||
export BUNDLE_GEMFILE=${BASE}/apps/pro/Gemfile
|
||||
|
||||
# Set a flag so Gemfile can limit gems
|
||||
export FRAMEWORK_FLAG=true
|
||||
|
||||
export MSF_DATABASE_CONFIG=${BASE}/apps/pro/ui/config/database.yml
|
||||
export TERMINFO=${BASE}/common/share/terminfo/
|
||||
|
||||
# Check for ruby scripts such as msfconsole directly to avoid having to add
|
||||
# msf3 to the path.
|
||||
if [ -f "${BASE}/apps/pro/msf3/${NAME}" ]; then
|
||||
exec ${BASE}/apps/pro/msf3/${NAME} "$@"
|
||||
fi
|
||||
if [ -f "${BASE}/apps/pro/msf3/tools/exploit/${NAME}.rb" ]; then
|
||||
exec ${BASE}/apps/pro/msf3/tools/exploit/${NAME}.rb "$@"
|
||||
fi
|
||||
|
||||
exec ${NAME} "$@"
|
||||
Reference in New Issue
Block a user