본문 바로가기

Application/Debug

New Project : BadCode









NSIS Script코드입니다.

;NSIS Modern User Interface
;Start Menu Folder Selection Example Script
;Written by Joost Verburg;--------------------------------
;Include Modern UI

!include "MUI.nsh"
!include Sections.nsh

;--------------------------------
;General

;Name and file
Name "악성코드"
OutFile "Badcode.exe"

;Default installation folder
InstallDir "$PROGRAMFILESBad Code"

;Get installation folder from registry if available
InstallDirRegKey HKCU "SoftwareBadcode" ""

;Vista redirects $SMPROGRAMS to all users without this
RequestExecutionLevel admin

;--------------------------------
;Variables

Var MUI_TEMP
Var STARTMENU_FOLDER
Var File01
Var File02
Var File03
Var File04
Var File05
Var File06
Var File07
Var File08
Var File09
Var File10
Var File11

;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING

;--------------------------------
;Pages

!insertmacro MUI_PAGE_LICENSE "License.txt"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY

;Start Menu Folder Page Configuration
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKCU"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "SoftwareBadcode"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"

; !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER

; !insertmacro MUI_PAGE_INSTFILES

; !insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "Korean"

;--------------------------------
;Installer Sections

Section /o "시작할때마다 바탕화면정리" Sec00

SetOutPath "$INSTDIR"

;ADD YOUR OWN FILES HERE...

;Store installation folder
WriteRegStr HKCU "SoftwareBadcode" "" $INSTDIR

;Create uninstaller
WriteUninstaller "$INSTDIRUninstall.exe"

;Create shortcuts
CreateDirectory "$SMPROGRAMS$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS$STARTMENU_FOLDERUninstall.lnk" "$INSTDIRUninstall.exe"

SectionEnd

Section /o "이지캐치 제거" Sec01
ExecWait "C:WINDOWSezcatch_uninstaller.exe"

SectionEnd

Section /o "아프리카 플레이어 제거" Sec02
ExecWait "C:Program FilesafreecaUninstall.exe"
RmDir /r "C:Program Filesafreeca"

SectionEnd

Section /o "K-Defense 키보드보안 제거" Sec03
ExecWait "regsvr32 /u /s “C:WINDOWSDownloaded Program Fileskdfense8.ocx”"

SectionEnd

Section /o "nProtect KeyCrypt 제거" Sec04
ExecWait "C:WINDOWSsystem32npkuninst.exe"

SectionEnd

Section /o "nProtect Netizen 제거" Sec05
ExecWait "C:WINDOWSsystem32npnuninst.exe"

SectionEnd

Section /o "PCHealth 제거" Sec06
ExecWait "rundll32.exe setupapi.dll,InstallHinfSection DefaultUninstall 132 C:WINDOWSINFPCHealth.inf"

SectionEnd

Section /o "SoftCamp Secure KeyStroke" Sec07
ExecWait "C:WINDOWSsystem32UnSCSK.exe"

SectionEnd

Section /o "Nexon Plug" Sec08
ExecWait "C:Documents and SettingsAll UsersApplication DataNexonNGMNGM.exe -mode:uninstall -dll:platform.nx.com/NGM/Bin/NGMDll.dll -game:65538 -locale:KR"

SectionEnd

Section /o "아이템베이 안전툴바 제거" Sec09
ExecWait "C:Program FilesItemBayIBBarIBBar_setup.exe -u"
RmDir /r "C:Program FilesItemBay"

SectionEnd

Section /o "야후 툴바 제거" Sec10
ExecWait "C:PROGRA~1Yahoo!Commonunyt.exe"
RmDir /r "C:Program FilesYahoo!"

SectionEnd

Section /o "한글인터넷주소도우미 라이트 제거" Sec11
ExecWait "regsvr32 /u /s C:WINDOWSsystem32KoreanAdd.dll"
Delete "C:Windowssystem32KoreanAdd.dll"

SectionEnd

;--------------------------------
;Descriptions

;Language strings
LangString DESC_Sec00 ${LANG_ENGLISH} "시작할때마다 게임을 찾아서 '게임'이라는 폴더에 넣어줍니다.."
LangString DESC_Sec01 ${LANG_ENGLISH} "바이러스도 못잡으면서 돈만 밝히는.."
LangString DESC_Sec02 ${LANG_ENGLISH} "웹사이트 돌다보면 어디선가 설치되는 이상한놈."
LangString DESC_Sec03 ${LANG_ENGLISH} "되기나 하는지 -_-.."
LangString DESC_Sec04 ${LANG_ENGLISH} "겜좀 하다보면 깔린다.. 속도 잡아먹는 주범.."
LangString DESC_Sec05 ${LANG_ENGLISH} "도대체 왜 두개나 까는지...."
LangString DESC_Sec06 ${LANG_ENGLISH} "너때문에 건강이 더 나빠지고 있다.."
LangString DESC_Sec07 ${LANG_ENGLISH} "아주 컴터 안에 캠프를 지어라.."
LangString DESC_Sec08 ${LANG_ENGLISH} "기본값이 처음시작할때 Silence모드가 기본으로 되어있기만 해도 안지운다.."
LangString DESC_Sec09 ${LANG_ENGLISH} "안전하게 좀 지워져라.."
LangString DESC_Sec10 ${LANG_ENGLISH} "아주 오래된 툴바.."
LangString DESC_Sec11 ${LANG_ENGLISH} "한글인터넷주소를 쓴다면 놔두시길.. 본인은 안티 넷피아라서 꼭 지운다.."

;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Sec00} $(DESC_Sec00)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec01} $(DESC_Sec01)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec02} $(DESC_Sec02)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec03} $(DESC_Sec03)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec04} $(DESC_Sec04)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec05} $(DESC_Sec05)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec06} $(DESC_Sec06)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec07} $(DESC_Sec07)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec08} $(DESC_Sec08)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec09} $(DESC_Sec09)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec10} $(DESC_Sec10)
!insertmacro MUI_DESCRIPTION_TEXT ${Sec11} $(DESC_Sec11)

!insertmacro MUI_FUNCTION_DESCRIPTION_END

;--------------------------------
;Uninstaller Section

Section "Uninstall"

;ADD YOUR OWN FILES HERE...

Delete "$INSTDIRUninstall.exe"

RMDir "$INSTDIR"

!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP

Delete "$SMPROGRAMS$MUI_TEMPUninstall.lnk"

;Delete empty start menu parent diretories
StrCpy $MUI_TEMP "$SMPROGRAMS$MUI_TEMP"

startMenuDeleteLoop:
ClearErrors
RMDir $MUI_TEMP
GetFullPathName $MUI_TEMP "$MUI_TEMP.."

IfErrors startMenuDeleteLoopDone

StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop
startMenuDeleteLoopDone:

DeleteRegKey /ifempty HKCU "SoftwareBadcode"

SectionEnd

Function .onInit

StrCpy $File01 'C:WINDOWSezcatch_uninstaller.exe'
StrCpy $File02 'C:Program FilesafreecaUninstall.exe'
StrCpy $File03 'C:WINDOWSDownloaded Program Fileskdfense8.ocx'
StrCpy $File04 'C:WINDOWSsystem32npkuninst.exe'
StrCpy $File05 'C:WINDOWSsystem32npnuninst.exe'
StrCpy $File06 'C:WINDOWSINFPCHealth.inf'
StrCpy $File07 'C:WINDOWSsystem32UnSCSK.exe'
StrCpy $File08 'C:Documents and SettingsAll UsersApplication DataNexonNGMNGM.exe'
StrCpy $File09 'C:Program FilesItemBayIBBarIBBar_setup.exe'
StrCpy $File10 'C:PROGRA~1Yahoo!Commonunyt.exe'
StrCpy $File11 'C:WINDOWSsystem32KoreanAdd.dll'

IfFileExists $File01 Sec01Exists PastSec01Check
Sec01Exists:
; This is what is done by sections.nsh SelectSection macro
SectionGetFlags "${Sec01}" $0
IntOp $0 $0 | ${SF_SELECTED}
SectionSetFlags "${Sec01}" $0

PastSec01Check:
IfFileExists $File02 Sec02Exists PastSec02Check
Sec02Exists:
; Use the macro from sections.nsh
!insertmacro SelectSection ${Sec02}

PastSec02Check:
IfFileExists $File03 Sec03Exists PastSec03Check
Sec03Exists:
!insertmacro SelectSection ${Sec03}

PastSec03Check:
IfFileExists $File04 Sec04Exists PastSec04Check
Sec04Exists:
!insertmacro SelectSection ${Sec04}

PastSec04Check:
IfFileExists $File05 Sec05Exists PastSec05Check
Sec05Exists:
!insertmacro SelectSection ${Sec05}

PastSec05Check:
IfFileExists $File06 Sec06Exists PastSec06Check
Sec06Exists:
!insertmacro SelectSection ${Sec06}

PastSec06Check:
IfFileExists $File07 Sec07Exists PastSec07Check
Sec07Exists:
!insertmacro SelectSection ${Sec07}

PastSec07Check:
IfFileExists $File08 Sec08Exists PastSec08Check
Sec08Exists:
!insertmacro SelectSection ${Sec08}

PastSec08Check:
IfFileExists $File09 Sec09Exists PastSec09Check
Sec09Exists:
!insertmacro SelectSection ${Sec09}

PastSec09Check:
IfFileExists $File10 Sec10Exists PastSec10Check
Sec10Exists:
!insertmacro SelectSection ${Sec10}

PastSec10Check:
IfFileExists $File11 Sec11Exists PastSec11Check
Sec11Exists:
!insertmacro SelectSection ${Sec11}

PastSec11Check:
FunctionEnd

태그