-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_64.bat
More file actions
27 lines (14 loc) · 838 Bytes
/
build_64.bat
File metadata and controls
27 lines (14 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@echo off
SET unencrypted_file=%1
:: Check arguments
IF "%1" == "" echo First argument needs to be the path of the binary to be encrypted && goto :error
IF "%2" == "" (SET crypted_file=".\tmp\encrypted_binary.exe") ELSE (SET crypted_file=%2)
:: Encrypt payload
.\x64\Release\Builder.exe %unencrypted_file% .\tmp\crypted.exe || echo Error encrypting file && goto :error
:: Build stub - Make sure to build with develoepr command tools of visual studio
msbuild Crypter.sln /t:Stub /p:Configuration="Debug" /p:Platform="x64" || echo Error building project && goto :error
:: Copy to destination directory
move .\x64\Debug\Stub.exe %crypted_file% || echo Error encrypted stub && goto :error
:: del .\tmp\crypted.exe || echo "Error deleting temporary files"
echo Success the final binary has been placed at %crypted_file%
:error