no need to keep the old, unused installer builders around anymore

git-svn-id: file:///home/svn/framework3/trunk@12874 4d416f70-5f16-0410-b530-b9f4589650da
unstable
James Lee 2011-06-06 21:23:59 +00:00
parent e2820918ad
commit a002b6dbbe
29 changed files with 0 additions and 1008 deletions

View File

@ -1,41 +0,0 @@
****************************************
* Metasploit Framework Linux Installer *
****************************************
The Metasploit installer for Linux provides a self-contained execution
environment for the Metasploit Framework. This includes the Ruby interpreter,
the RubyGems package, SQLite3, and Subversion. The package also includes
binary copies of the libraries needed to support these tools.
The installer is built using binaries from Ubuntu 6.06 Server. This old
version is necessary for the compiled tools to be compatible with older versions
of the GLIBC library.
The following applications/libraries are built from source:
- Ruby 1.9.1
- RubyGems
- SQLite3-Ruby
- Subversion
- Lorcon2
The following libraries are taken from Ubuntu:
- libssl.so.0.9.8
- libutil-2.3.6.so
- libcrypto.so.0.9.8
- libncursesw.so.5.5
- libsqlite3.so.0.8.6
- libncurses.so.5.5
- libz.so.1.2.3
- libaprutil-1.so.0.3.9
- libserf-0.so.0.0.0
- libapr-1.so.0.3.8
- libdb-4.3.so
- libpcap.so.0.9.4
- libexpat.so.1.0.0
While the source code for each of these applications and libraries are easily
available from the upstream repository, we will make them available directly
from the Metasploit server on demand.
The installer itself is created with makeself

View File

@ -1,125 +0,0 @@
#!/bin/sh
VERSION="3.5.0-beta"
BASE=`dirname $0`
usage() {
echo "MSF Installer Builder"
echo "Options:"
echo " -h This help message."
echo " -a <archive> A tar.bz2 archive of msf3. This should be an http repository"
echo " checked out with an old version of svn (usually 1.3.1) for"
echo " compatibility reasons. Note that this will rm any existing"
echo " msf3-* directory."
echo " -v <version name> The version name of this release, usually as found in"
echo " lib/msf/core/framework.rb or something like "
echo " 3.4-nightly-\`date +%F\` for nightlies."
echo " Defaults to ${VERSION}."
exit 1
}
while getopts ":a:hv:" flag; do
case $flag in
a)
echo archive=$OPTARG
[ -z "$OPTARG" ] && exit 1
ARCHIVE=$OPTARG
shift $(($OPTIND - 1)); OPTIND=1
;;
v)
echo version=$OPTARG
[ -z "$OPTARG" ] && exit 1
VERSION=$OPTARG
shift $(($OPTIND - 1)); OPTIND=1
;;
h)
usage
;;
:) echo Missing argument to $OPTARG
usage
;;
*) echo unknown opt $flag
esac
done
echo Building installers for Metasploit Framework v${VERSION}
if [ -n "${ARCHIVE}" ]; then
echo "Extracting archive"
rm -rf msf3-*
tar -xjf "${ARCHIVE}"
if [ ! -d msf3-http ]; then
echo "${ARCHIVE} must contain an svn checkout of msf as a single directory called msf3-http"
exit 1
fi
fi
if [ -z "$(which makeself)" ]; then
echo "makeself needs to be installed and in the path"
exit 2
fi
if [ ! -d msf3-http ]; then
echo "Cannot continue without an svn checkout of msf called msf3-http"
exit 3
fi
#
# Expects msf3.tar to exist and contain a single directory called msf3
#
build_makeself() {
TITLE=$1
INSTALLER_FILENAME=$2
BIN_TARBALL_PATH=$3
TMP=tmp_install_`date +%s1`
mkdir ${TMP}/
cp msf3.tar ${TMP}/
cp ${BIN_TARBALL_PATH} ${TMP}/metasploit.tar.bz2
bunzip2 ${TMP}/metasploit.tar.bz2
cp -a ${BASE}/scripts/*.sh ${TMP}/
cp -a ${BASE}/scripts/msfupdate ${TMP}/
makeself "${TMP}" "${INSTALLER_FILENAME}" "${TITLE}" ./installer.sh
rm -rf ${TMP}
}
# Remove any lingering symlinks from previous builds
rm msf3 2>/dev/null
ln -sf msf3-http msf3
tar hcf msf3.tar msf3
ln -sf msf3-http framework-${VERSION}
tar jhcf framework-${VERSION}.tar.bz2 framework-${VERSION}
rm framework-${VERSION}
TITLE="Metasploit Framework v${VERSION} Installer (64-bit)"
INSTALLER_FILENAME="framework-${VERSION}-linux-x86_64.run"
BINPATH="${BASE}/bin/linux64.tar.bz2"
if [ -f ${BINPATH} ]; then
echo "Making 64-bit"
build_makeself "${TITLE}" "${INSTALLER_FILENAME}" "${BINPATH}"
fi
TITLE="Metasploit Framework v${VERSION} Installer (32-bit)"
INSTALLER_FILENAME="framework-${VERSION}-linux-i686.run"
BINPATH="${BASE}/bin/linux32.tar.bz2"
if [ -f ${BINPATH} ]; then
echo "Making 32-bit"
# Build the regular 32-bit installer
# Uses the same msf3.tar as 64-bit, so we don't need to regenerate it.
build_makeself "${TITLE}" "${INSTALLER_FILENAME}" "${BINPATH}"
${BASE}/minify.sh msf3-http
rm msf3 msf3.tar
ln -sf msf3-mini msf3
tar hcf msf3.tar msf3
TITLE="Metasploit Framework v${VERSION} Miniature Installer (32-bit)"
INSTALLER_FILENAME="framework-${VERSION}-mini-linux-i686.run"
BINPATH="${BASE}/bin/linux32.tar.bz2"
build_makeself "${TITLE}" "${INSTALLER_FILENAME}" "${BINPATH}"
fi
rm msf3 msf3.tar

View File

@ -1,50 +0,0 @@
#!/bin/sh
if [ -z "$1" ]; then
echo "Need a directory to minify"
exit 1
fi
MSF_PATH=$1
MINI_PATH=$(dirname "${MSF_PATH}")/msf3-mini
echo $MINI_PATH
# This gets rid of all our .svn files
svn export ${MSF_PATH} ${MINI_PATH}
MINI_EXCLUDES="
HACKING
data/templates/src/
documentation/
external/
lib/msf/ui/gtk2
lib/msf/ui/gtk2.rb
lib/msf/ui/web
lib/msf/ui/web.rb
lib/rex/exploitation/opcodedb.rb
modules/auxiliary/dos/
modules/auxiliary/fuzzers/
msfcli
msfd
msfelfscan
msfgui
msfmachscan
msfopcode
msfpescan
msfrpc
msfrpcd
test
test/
$(find $MINI_PATH -name '*.rb.ut.rb')
"
# If we don't want to blow away the svn files necessary for performing an
# update, we should exclude directories so they don't get re-added when the
# first update happens. This only works with svn client versions >= 1.5.
#for file in ${MINI_EXCLUDES}; do
# if [ -d "${MSF_PATH}/${file}" ]; then
# svn up --set-depth=exclude "${MSF_PATH}/$file"
# fi
#done
cd ${MINI_PATH}
rm -rf ${MINI_EXCLUDES}

View File

@ -1,18 +0,0 @@

888 888 d8b888
888 888 Y8P888
888 888 888
88888b.d88b. .d88b. 888888 8888b. .d8888b 88888b. 888 .d88b. 888888888
888 "888 "88bd8P Y8b888 "88b88K 888 "88b888d88""88b888888
888 888 88888888888888 .d888888"Y8888b.888 888888888 888888888
888 888 888Y8b. Y88b. 888 888 X88888 d88P888Y88..88P888Y88b.
888 888 888 "Y8888 "Y888"Y888888 88888P'88888P" 888 "Y88P" 888 "Y888
888
888
888
Metasploit Framework v3.4.1 Release
Report Bugs: msfdev@metasploit.com


View File

@ -1,12 +0,0 @@
#!/bin/sh
export BASE=`dirname $0`
export PATH="${BASE}/bin":$PATH
export LD_LIBRARY_PATH="${BASE}/lib":$LD_LIBRARY_PATH
export GEM_HOME="${BASE}/lib/ruby/gems/1.9.1/gems/"
export GEM_PATH="${BASE}/lib/ruby/gems/1.9.1/gems/"
unset MY_RUBY_HOME
unset RUBY_VERSION
unset RUBY_OPTS
"$@"

View File

@ -1,102 +0,0 @@
#!/bin/bash
confirm(){
Q=$1
while true; do
echo -n "${Q} (yes/no) > "
read INPUT
if [ -z $INPUT ]; then
exit 1
fi
if [ $INPUT == "no" ]; then
return
fi
if [ $INPUT == "yes" ]; then
return 1
fi
done
}
INSTALL_DIR=/opt/metasploit3
cat banner.sh
if [ `id -u -n` != "root" ]; then
echo "Error: The installer must be executed as the root user."
echo ""
exit 1
fi
if [ -d "${INSTALL_DIR}" ]; then
echo "Warning: A copy of Metasploit already exists at ${INSTALL_DIR}"
echo " continuing this installation will DELETE the previous "
echo " install, including all user-modified files."
echo ""
echo "Please enter 'yes' to continue or any other key to abort"
confirm "Continue"
if [ $? -eq "0" ]; then exit; fi
echo ""
fi
echo "This installer will place Metasploit into the ${INSTALL_DIR} directory."
confirm "Continue"
if [ $? -eq "0" ]; then exit; fi
if [ -d "${INSTALL_DIR}" ]; then
echo "Removing files from the previous installation..."
rm -rf "${INSTALL_DIR}"
find /usr/local/bin -name 'msf*' -type l | xargs rm -f
echo ""
fi
mkdir -p "${INSTALL_DIR}"
echo "Extracting the Metasploit operating environment..."
tar --directory=/opt -xf metasploit.tar
cp run.sh env.sh "${INSTALL_DIR}"/
cp msfupdate "${INSTALL_DIR}"/app/
echo ""
echo "Extracting the Metasploit Framework..."
tar --directory="${INSTALL_DIR}" -xf msf3.tar
echo ""
echo "Installing links into /usr/local/bin..."
mkdir -p /usr/local/bin
ln -sf "${INSTALL_DIR}"/bin/msf* /usr/local/bin/
echo ""
hash -r
echo "Installation complete."
echo ""
echo "Would you like to automatically update Metasploit?"
confirm "AutoUpdate?"
if [ $? -eq "1" ]; then
CRON=`mktemp cronXXXXXX`
crontab -l 2>/dev/null | grep -v msfupdate > $CRON
echo "30 * * * * \"${INSTALL_DIR}\"/bin/msfupdate > /var/log/msfupdate.log 2>&1" >> $CRON
crontab $CRON
rm -f $CRON
echo ""
else
echo ""
echo "Warning: Automatic updates are disabled, update manually with:"
echo "$ sudo msfupdate"
echo ""
fi
echo "Would you like to update Metasploit right now?"
confirm "Update?"
if [ $? -eq "1" ]; then
echo ""
"${INSTALL_DIR}"/bin/msfupdate
echo ""
fi
echo "Launch the Metasploit console by running 'msfconsole'"
echo ""
echo "Exiting the installer..."

View File

@ -1,29 +0,0 @@
#!/bin/bash
if [ `id -u -n` != "root" ]; then
echo "[*] Error: msfupdate must be run as the root user"
exit 1
fi
cd $BASE/msf3
REPO=`grep framework3 .svn/entries`
echo "Updating Metasploit from ${REPO}..."
svn update
if [ $? -ne "0" ]; then
echo " "
echo "Error: cleaning up the SVN directory and retrying..."
svn cleanup
svn update
fi
if [ $? -ne "0" ]; then
echo " "
echo "Error: please check connectivity to the following URL:"
echo " "`grep framework3 .svn/entries`
echo " "
fi

View File

@ -1,31 +0,0 @@
#!/bin/sh
export LINK=$(which "$0")
export NAME=$(basename "$0")
while [ -L "$LINK" ]; do
LAST=$LINK
LINK="$(readlink "$LINK")"
if [ ! -L "$LINK" ]; then
break
fi
done
# Chop it twice
BASE=$(dirname "$LAST")
BASE=$(dirname "$BASE")
export BASE
export PATH=${BASE}/app:$PATH
export LD_LIBRARY_PATH=${BASE}/lib:$LD_LIBRARY_PATH
unset GEM_PATH
unset GEM_HOME
unset MY_RUBY_HOME
unset RUBY_VERSION
unset RUBY_OPTS
if [ -f "${BASE}/msf3/${NAME}" ]; then
exec ${BASE}/msf3/${NAME} "$@"
fi
exec ${NAME} "$@"

View File

@ -1,20 +0,0 @@
******************************************
* Metasploit Framework Windows Installer *
******************************************
The Metasploit installer for Windows provides a self-contained execution
environment for the Metasploit Framework. This includes the Ruby interpreter,
the RubyGems package, PostgreSQL, and Subversion. The package also includes
binary copies of the libraries needed to support these tools.
Packages bundled with this installer:
- NMap (from www.insecure.org)
- PostgreSQL (from www.postgresql.org)
- Ruby 1.9.2 (from http://rubyinstaller.org/downloads/)
- Subversion (from http://sourceforge.net/projects/win32svn/)
- VNCViewer.exe (from RealVNC)
- WinVi32 (from www.winvi.de)
The installer itself is created with NSIS.

View File

@ -1,7 +0,0 @@
@echo off
set BASE=%~dp0
cd %BASE%
set TARG=msfrun.rb msfconsole -L
shell.bat

View File

@ -1,7 +0,0 @@
@echo off
set BASE=%~dp0
cd %BASE%
set TARG=msfrun.rb tools/msf_irb_shell.rb
shell.bat

View File

@ -1,7 +0,0 @@
@echo off
set BASE=%~dp0
cd %BASE%
set TARG=msfupdate.rb
shell.bat

View File

@ -1,7 +0,0 @@
@echo off
set BASE=%~dp0
cd %BASE%
set TARG=msfrun.rb tools/nasm_shell.rb
shell.bat

View File

@ -1,11 +0,0 @@
@echo off
set BASE=%~dp0
cd %BASE%
set PATH="%BASE%bin";"%BASE%usr\X11R6\bin";"%BASE%tools";%PATH%
if not defined TARG set TARG=/bin/bash
start bin\rxvt.exe -display :0 -geometry 110x38 -sr -sl 5000 -fn "Lucida Console-12" -bg black -fg white -tn rxvt-cygwin-native -e /bin/bash --login -c "%TARG%"

View File

@ -1,15 +0,0 @@
@echo off
set BASE=%~dp0
cd %BASE%
set PATH="%BASE%bin";"%BASE%usr\X11R6\bin";"%BASE%tools";%PATH%
bin\umount -c >nul 2>&1
bin\umount -A
bin\mount -bfu "%BASE%/" /
bin\mount -bfu "%BASE%/bin" /usr/bin
bin\mount -bfu "%BASE%/lib" /usr/lib
if not defined TARG set TARG=/bin/bash
bin\bash --login -c "%TARG%"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -1,305 +0,0 @@
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Metasploit Framework"
!define PRODUCT_VERSION "3.5-beta"
!define PRODUCT_PUBLISHER "Rapid7 LLC"
!define PRODUCT_WEB_SITE "http://www.metasploit.com/framework/support/"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
!define NMAP_VERSION "5.30BETA1"
!define PG_VERSION "8.4.5-1"
VIProductVersion "3.5.0.0"
VIAddVersionKey /LANG=1033 "ProductName" "Metasploit Framework"
VIAddVersionKey /LANG=1033 "Comments" "This is the official installer for Metasploit 3"
VIAddVersionKey /LANG=1033 "CompanyName" "Rapid7 LLC"
VIAddVersionKey /LANG=1033 "LegalTrademarks" "Metasploit is a registered trademark of Rapid7 LLC"
VIAddVersionKey /LANG=1033 "LegalCopyright" " Copyright (C) 2003-2010 Rapid7 LLC"
VIAddVersionKey /LANG=1033 "FileDescription" "Metasploit 3 Windows Installer"
VIAddVersionKey /LANG=1033 "FileVersion" "3.5.0.0"
SetCompressor /SOLID lzma
Function LaunchMetasploit
Exec '"$INSTDIR\msfconsole.bat"'
FunctionEnd
; Stolen from http://nsis.sourceforge.net/More_advanced_replace_text_in_file
Function AdvReplaceInFile
Exch $0 ;file to replace in
Exch
Exch $1 ;number to replace after
Exch
Exch 2
Exch $2 ;replace and onwards
Exch 2
Exch 3
Exch $3 ;replace with
Exch 3
Exch 4
Exch $4 ;to replace
Exch 4
Push $5 ;minus count
Push $6 ;universal
Push $7 ;end string
Push $8 ;left string
Push $9 ;right string
Push $R0 ;file1
Push $R1 ;file2
Push $R2 ;read
Push $R3 ;universal
Push $R4 ;count (onwards)
Push $R5 ;count (after)
Push $R6 ;temp file name
GetTempFileName $R6
FileOpen $R1 $0 r ;file to search in
FileOpen $R0 $R6 w ;temp file
StrLen $R3 $4
StrCpy $R4 -1
StrCpy $R5 -1
loop_read:
ClearErrors
FileRead $R1 $R2 ;read line
IfErrors exit
StrCpy $5 0
StrCpy $7 $R2
loop_filter:
IntOp $5 $5 - 1
StrCpy $6 $7 $R3 $5 ;search
StrCmp $6 "" file_write1
StrCmp $6 $4 0 loop_filter
StrCpy $8 $7 $5 ;left part
IntOp $6 $5 + $R3
IntCmp $6 0 is0 not0
is0:
StrCpy $9 ""
Goto done
not0:
StrCpy $9 $7 "" $6 ;right part
done:
StrCpy $7 $8$3$9 ;re-join
IntOp $R4 $R4 + 1
StrCmp $2 all loop_filter
StrCmp $R4 $2 0 file_write2
IntOp $R4 $R4 - 1
IntOp $R5 $R5 + 1
StrCmp $1 all loop_filter
StrCmp $R5 $1 0 file_write1
IntOp $R5 $R5 - 1
Goto file_write2
file_write1:
FileWrite $R0 $7 ;write modified line
Goto loop_read
file_write2:
FileWrite $R0 $R2 ;write unmodified line
Goto loop_read
exit:
FileClose $R0
FileClose $R1
SetDetailsPrint none
Delete $0
Rename $R6 $0
Delete $R6
SetDetailsPrint both
Pop $R6
Pop $R5
Pop $R4
Pop $R3
Pop $R2
Pop $R1
Pop $R0
Pop $9
Pop $8
Pop $7
Pop $6
Pop $5
Pop $0
Pop $1
Pop $2
Pop $3
Pop $4
FunctionEnd
!include "MUI2.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "icons\metasploit.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_TEXT "Launch the Metasploit Framework"
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchMetasploit"
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "msf3\README"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Start menu page
var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Metasploit 3"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
; Language files
!insertmacro MUI_LANGUAGE "English"
; MUI end ------
RequestExecutionLevel "admin"
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "framework-${PRODUCT_VERSION}.exe"
InstallDir "$PROGRAMFILES\Metasploit\Framework3"
ShowInstDetails show
ShowUnInstDetails show
Section "MainSection" SecCore
SetOutPath $INSTDIR
; don't include the installer directories to avoid infinite recursion
; when building
;File /r /x "installer-*" /x "external" "*"
File /r /x "installer-*" "*"
SectionEnd
Section "Nmap" SecNmap
MessageBox MB_YESNO \
"Would you like to install the Nmap Security Scanner v${NMAP_VERSION}? Nmap is a free and open source \
utility for network exploration and security auditing. The Metasploit \
Framework is able to work with Nmap to provide exploit automation features. \
Nmap is copyright (C) 1996-2010 Insecure.Com LLC. Nmap is a registered \
trademark of Insecure.Com LLC. Nmap is included in this installer with \
the permission of the Nmap Project. Nmap is provided under the GNU Public License, \
not the BSD license which covers most of the Metasploit Framework" /SD IDYES IDNO endNmap
ExecWait '"$INSTDIR\other_installers\nmap-${NMAP_VERSION}-setup.exe"'
endNmap:
Delete "$INSTDIR\other_installers\nmap-${NMAP_VERSION}-setup.exe"
; Regardless of the user's choice about installing nmap, run the nmap
; registry tweaks so we can take advantage of the added socket performance
Exec 'regedt32 /S "$INSTDIR\other_installers\nmap_performance.reg"'
Delete "$INSTDIR\other_installers\nmap_performance.reg"
SectionEnd
Section "PG" SecPG
MessageBox MB_YESNO \
"Would you like to install PostgreSQL? Doing so will let you take \
advantage of Metasploit's database features. \
Either way, support for connecting to a PostgreSQL database will be \
included." /SD IDYES IDNO endPGSQL
ExecWait '"$INSTDIR\other_installers\postgresql-${PG_VERSION}-windows.exe"'
endPGSQL:
Delete "$INSTDIR\other_installers\postgresql-${PG_VERSION}-windows.exe"
SectionEnd
Section "FixupConsoleConfig" SecFixupConsoleConfig
Push "REPLACEME" ; text to be replaced
Push "$INSTDIR" ; replacement
Push all ; replace all occurrences
Push all ; replace all occurrences
Push "$INSTDIR\bin\console.xml"
Call AdvReplaceInFile
SectionEnd
Section "Cleanup" SecCleanup
RMDir /r "$INSTDIR\other_installers"
SectionEnd
Section -AdditionalIcons
SetShellVarContext all
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Metasploit Console.lnk" "$INSTDIR\msfconsole.bat" '' "$INSTDIR\icons\metasploit.ico" 0
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Metasploit Update.lnk" "$INSTDIR\msfupdate.bat" '' "$INSTDIR\icons\metasploit.ico" 0
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Metasm Shell.lnk" "$INSTDIR\metasm.bat" ''
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\RUBY Shell.lnk" "$INSTDIR\msfirb.bat" '' "$INSTDIR\icons\ruby.ico" 0
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\Support"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Support\Metasploit Online.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\Tools"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Tools\VNCViewer.lnk" "$INSTDIR\bin\vncviewer.exe"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Tools\WinVI.lnk" "$INSTDIR\bin\winvi32.exe"
CreateShortCut "$DESKTOP\Metasploit Console.lnk" "$INSTDIR\msfconsole.bat" '' "$INSTDIR\icons\metasploit.ico" 0
CreateShortCut "$DESKTOP\Metasploit Update.lnk" "$INSTDIR\msfupdate.bat" '' "$INSTDIR\icons\metasploit.ico" 0
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "${PRODUCT_STARTMENU_REGVAL}" "$ICONS_GROUP"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd
Function un.onUninstSuccess
;HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
Abort
FunctionEnd
Section Uninstall
SetShellVarContext all
ReadRegStr $ICONS_GROUP ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "${PRODUCT_STARTMENU_REGVAL}"
RMDir /r "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
RMDir /r "$SMPROGRAMS\$ICONS_GROUP"
Delete "$DESKTOP\Metasploit Console.lnk"
Delete "$DESKTOP\Metasploit Update.lnk"
System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)'
SetAutoClose true
SectionEnd

View File

@ -1,8 +0,0 @@
@echo off
set BASE=%~dp0
cd %BASE%
set PATH="%BASE%bin";"%BASE%bin\svn\bin";"%BASE%bin\ruby\bin";"%BASE%tools";%PATH%
start console.exe -t Metasploit

View File

@ -1,8 +0,0 @@
@echo off
set BASE=%~dp0
cd %BASE%
set PATH="%BASE%bin";"%BASE%bin\svn\bin";"%BASE%bin\ruby\bin";"%BASE%tools";%PATH%
start console.exe -t "Metasploit IRB"

View File

@ -1,11 +0,0 @@
@echo off
set BASE=%~dp0
cd %BASE%msf3
set PATH="%BASE%bin";"%BASE%bin\svn\bin";"%BASE%bin\ruby\bin";"%BASE%tools";%PATH%
svn up
echo Done
pause

View File

@ -1,15 +0,0 @@
#!/usr/bin/env ruby
File.umask(0022)
msf3 = '/msf3'
if ! File.directory?(msf3)
puts "[*] This Metasploit Framework installation is corrupted."
exit(1)
end
Dir.chdir(msf3)
targ = ARGV.shift
exec("ruby", targ, *ARGV)

View File

@ -1,32 +0,0 @@
#!/usr/bin/env ruby
File.umask(0022)
msf3 = '/msf3'
if ! File.directory?(msf3)
puts "[*] This Metasploit Framework installation is corrupted."
exit(1)
end
Dir.chdir(msf3)
begin
fd = File.open("/bin/bash", "a")
fd.close
rescue ::Exception
puts "[*] Error: msfupdate must be run as an administrative user"
sleep(30)
exit(1)
end
puts "[*] Updating the Metasploit Framework..."
puts ""
system("svn update")
puts ""
puts "[*] Update complete"
sleep(10)
exit(0)

View File

@ -1,82 +0,0 @@
CYGWIN=nodosfilewarning
export CYGWIN
PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/msf3:$PATH
export PATH
# Set the user id
USER="`id -un`"
export USER
# Set the umask
umask 022
# Make the file permissions multi-user friendly
if [ ! -f /etc/_FRIENDLY_ ];then
echo "[*] Configuring multi-user permissions for first run..."
/bin/userfriendly.sh
if [ $? -eq "1" ]; then
exit 1
fi
fi
# Here is how HOME is set, in order of priority, when starting from Windows
# 1) From existing HOME in the Windows environment, translated to a Posix path
# 2) from /etc/passwd, if there is an entry with a non empty directory field
# 3) from HOMEDRIVE/HOMEPATH
# 4) / (root)
# Override this to place HOME into the local directory
export HOME=/home/${USER}
# If the home directory doesn't exist, create it.
if [ ! -d "${HOME}" ]; then
mkdir -p "${HOME}"
echo "[*] Configuring the initial user environment..."
tar --directory=/etc/skel/ -cp . | tar --directory=${HOME} -xp
fi
# Set a HOSTNAME variable
HOSTNAME=`hostname`
export HOSTNAME
# Set a default prompt of: user@host and current_directory
PS1='\[\e]0;\w\a\]\n\[\e[33m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
export PS1
alias ls="ls --color"
# Run all of the profile.d scripts
# Note that these are supplied by separate packages
# Ascending alphanumerical order enforced
if [ -d "/etc/profile.d" ]; then
while read f; do
if [ -f "${f}" ]; then
. "${f}"
fi
done <<- EOF
`/bin/find -L /etc/profile.d -type f -iname '*.sh' -or -iname '*.zsh' | LC_ALL=C sort`
EOF
fi
# Uncomment to use the terminal colours set in DIR_COLOR
eval "`dircolors -b /etc/DIR_COLORS`"
# Default to removing the write permission for group and other
# (files normally created with mode 777 become 755; files created with
# mode 666 become 644)
umask 022
# Define default printer
PRINTER=""
export PRINTER
# Make sure we start in home unless invoked by CHERE
if [ ! -z "${CHERE_INVOKING}" ]; then
unset CHERE_INVOKING
else
cd "${HOME}"
fi

View File

@ -1,32 +0,0 @@
#!/usr/bin/env ruby
template = %Q|<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="%%NAME%%"
type="win32"/>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel
level="highestAvailable"
uiAccess="true"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>
|
dir = ARGV.shift() || exit
Dir.new(dir).entries.each do |name|
next if name !~ /\.exe$/i
temp = template.dup.gsub('%%NAME%%', name)
File.open(File.join(dir, "#{name}.manifest"), "wb") do |fd|
fd.write(temp)
end
end

View File

@ -1,27 +0,0 @@
#!/bin/bash
#
# Reset file permissions to allow other users
#
umask 022
chmod 755 /bin/bash 2>/dev/null
if [ $? -ne "0" ]; then
echo "[*] This application *MUST* be launched as an administrator the first time"
echo "[*] Press enter to exit"
read BOOM
exit 1
fi
chmod 755 -R /bin /*.bat /lib /usr /var /dev /etc /sbin /msf3 2>/dev/null
if [ $? -ne "0" ]; then
echo "[*] This application *MUST* be launched as an administrator the first time"
echo "[*] Press enter to exit"
read BOOM
exit 1
fi
chmod 755 /home
chmod 1777 /tmp /var/tmp
touch /etc/_FRIENDLY_

View File

@ -1,6 +0,0 @@
#!/usr/bin/env ruby
$:.unshift("msf3-base/msf3/lib")
require "msf/core"
puts Msf::Framework::Version