2009-11-09 07:02:43 +00:00
|
|
|
; Script generated by the HM NIS Edit Script Wizard.
|
|
|
|
|
2009-11-04 03:21:14 +00:00
|
|
|
; HM NIS Edit Wizard helper defines
|
|
|
|
!define PRODUCT_NAME "Metasploit Framework"
|
|
|
|
!define PRODUCT_VERSION "3.3"
|
|
|
|
!define PRODUCT_PUBLISHER "Rapid7 LLC"
|
2009-11-09 07:02:43 +00:00
|
|
|
!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"
|
|
|
|
|
2009-11-04 03:21:14 +00:00
|
|
|
|
2009-11-09 07:02:43 +00:00
|
|
|
VIProductVersion "3.3.0.1"
|
2009-11-04 03:21:14 +00:00
|
|
|
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-2009 Rapid7 LLC"
|
|
|
|
VIAddVersionKey /LANG=1033 "FileDescription" "Metasploit 3 Windows Installer"
|
2009-11-09 07:02:43 +00:00
|
|
|
VIAddVersionKey /LANG=1033 "FileVersion" "3.3.0.1"
|
2009-11-04 03:21:14 +00:00
|
|
|
|
|
|
|
SetCompressor /SOLID lzma
|
|
|
|
|
2009-11-09 07:02:43 +00:00
|
|
|
Function LaunchMetasploit
|
|
|
|
Exec '"$INSTDIR\msfconsole.bat"'
|
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
|
|
|
|
!include "MUI2.nsh"
|
2009-11-04 03:21:14 +00:00
|
|
|
|
|
|
|
; MUI Settings
|
|
|
|
!define MUI_ABORTWARNING
|
2009-11-09 07:02:43 +00:00
|
|
|
!define MUI_ICON "metasploit.ico"
|
|
|
|
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
|
2009-11-04 03:21:14 +00:00
|
|
|
|
2009-11-09 07:02:43 +00:00
|
|
|
!define MUI_FINISHPAGE_RUN
|
|
|
|
!define MUI_FINISHPAGE_RUN_TEXT "Launch the Metasploit Framework"
|
|
|
|
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchMetasploit"
|
2009-11-04 03:21:14 +00:00
|
|
|
|
|
|
|
; Welcome page
|
|
|
|
!insertmacro MUI_PAGE_WELCOME
|
|
|
|
|
|
|
|
; License page
|
|
|
|
!insertmacro MUI_PAGE_LICENSE "metasploit_license.txt"
|
|
|
|
|
|
|
|
; Directory page
|
|
|
|
!insertmacro MUI_PAGE_DIRECTORY
|
|
|
|
|
2009-11-09 07:02:43 +00:00
|
|
|
; 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
|
|
|
|
|
2009-11-04 03:21:14 +00:00
|
|
|
; Instfiles page
|
|
|
|
!insertmacro MUI_PAGE_INSTFILES
|
|
|
|
|
|
|
|
; Finish page
|
2009-11-09 07:02:43 +00:00
|
|
|
!insertmacro MUI_PAGE_FINISH
|
2009-11-04 03:21:14 +00:00
|
|
|
|
|
|
|
; Uninstaller pages
|
|
|
|
!insertmacro MUI_UNPAGE_INSTFILES
|
|
|
|
|
|
|
|
; Language files
|
|
|
|
!insertmacro MUI_LANGUAGE "English"
|
|
|
|
|
|
|
|
; MUI end ------
|
|
|
|
|
2009-11-09 07:02:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
RequestExecutionLevel "admin"
|
|
|
|
|
2009-11-04 03:21:14 +00:00
|
|
|
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
2009-11-12 05:59:46 +00:00
|
|
|
OutFile "framework-3.3.exe"
|
2009-11-09 07:02:43 +00:00
|
|
|
InstallDir "$PROGRAMFILES\Metasploit\Framework3"
|
2009-11-04 03:21:14 +00:00
|
|
|
ShowInstDetails show
|
|
|
|
ShowUnInstDetails show
|
|
|
|
|
|
|
|
Section "MainSection" SecCore
|
2009-11-09 07:02:43 +00:00
|
|
|
SetOutPath $INSTDIR
|
|
|
|
File /r "C:\metasploit-33\*.*"
|
2009-11-04 03:21:14 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2009-11-09 07:02:43 +00:00
|
|
|
Section "Nmap" SecNmap
|
|
|
|
MessageBox MB_YESNO \
|
|
|
|
"Would you like to install the Nmap Security Scanner v5.00? 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-2009 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
|
|
|
|
|
2009-11-12 05:59:46 +00:00
|
|
|
ExecWait '"$INSTDIR\tmp\nmap-5.00-setup.exe"'
|
2009-11-09 07:02:43 +00:00
|
|
|
endNmap:
|
|
|
|
Delete "$INSTDIR\tmp\nmap-5.00-setup.exe"
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section "Registry" SecReg
|
2009-11-12 05:59:46 +00:00
|
|
|
Exec 'regedt32 /S "$INSTDIR\tmp\nmap_performance.reg"'
|
|
|
|
Delete "$INSTDIR\tmp\nmap_performance.reg"
|
|
|
|
SectionEnd
|
2009-11-09 07:02:43 +00:00
|
|
|
|
|
|
|
|
2009-11-04 03:21:14 +00:00
|
|
|
Section -AdditionalIcons
|
|
|
|
SetShellVarContext all
|
2009-11-09 07:02:43 +00:00
|
|
|
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
|
|
|
|
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
|
2009-11-12 05:59:46 +00:00
|
|
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Metasploit Console.lnk" "$INSTDIR\msfconsole.bat" '' "$INSTDIR\metasploit.ico" 0
|
2009-11-09 07:02:43 +00:00
|
|
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Metasploit Web.lnk" "$INSTDIR\msfweb.bat" '' "$INSTDIR\metasploit.ico" 0
|
2009-11-12 05:59:46 +00:00
|
|
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Metasploit Update.lnk" "$INSTDIR\msfupdate.bat" '' "$INSTDIR\metasploit.ico" 0
|
|
|
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Cygwin Shell.lnk" "$INSTDIR\shell.bat" ''
|
2009-11-09 07:02:43 +00:00
|
|
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\NASM Shell.lnk" "$INSTDIR\nasm.bat" ''
|
|
|
|
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\RUBY Shell.lnk" "$INSTDIR\msfirb.bat" '' "$INSTDIR\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"
|
|
|
|
|
2009-11-12 05:59:46 +00:00
|
|
|
CreateShortCut "$DESKTOP\Metasploit Console.lnk" "$INSTDIR\msfconsole.bat" '' "$INSTDIR\metasploit.ico" 0
|
2009-11-09 07:02:43 +00:00
|
|
|
CreateShortCut "$DESKTOP\Metasploit Update.lnk" "$INSTDIR\msfupdate.bat" '' "$INSTDIR\metasploit.ico" 0
|
|
|
|
|
2009-11-04 03:21:14 +00:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
Section -Post
|
|
|
|
WriteUninstaller "$INSTDIR\uninst.exe"
|
2009-11-09 07:02:43 +00:00
|
|
|
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}"
|
2009-11-04 03:21:14 +00:00
|
|
|
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
|
2009-11-09 07:02:43 +00:00
|
|
|
SetShellVarContext all
|
|
|
|
ReadRegStr $ICONS_GROUP ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "${PRODUCT_STARTMENU_REGVAL}"
|
2009-11-12 05:59:46 +00:00
|
|
|
|
2009-11-04 03:21:14 +00:00
|
|
|
RMDir /r "$INSTDIR"
|
2009-11-09 07:02:43 +00:00
|
|
|
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
2009-11-12 05:59:46 +00:00
|
|
|
|
2009-11-09 07:02:43 +00:00
|
|
|
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)'
|
2009-11-04 03:21:14 +00:00
|
|
|
SetAutoClose true
|
2009-11-12 05:59:46 +00:00
|
|
|
SectionEnd
|
|
|
|
|