Skip to content

Commit

Permalink
Release Build
Browse files Browse the repository at this point in the history
- Updated build file for new certificate and to create build zip file.
- Compiled and signed binaries for version 1.0.1.2.
  • Loading branch information
NoMoreFood committed May 23, 2018
1 parent 0c9a5ec commit c28bad6
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 9 deletions.
30 changes: 30 additions & 0 deletions Build/WinPriv-hash.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

Algorithm Hash Path
--------- ---- ----
SHA256 50B093A48BF40FA720874CEA54BFFCC0D0027F93A510891AECFDD004F7620DB9 x64\WinPriv.exe
SHA256 7FE09602BFEE40F61C99E4B22414247485F6053596302DF9B49486BF07A76F13 x64\WinPrivCmd.exe
SHA256 57440A7E21F665AD71687FB9664551B35CF31ABC5BFD880B423A68B9A29885C9 x86\WinPriv.exe
SHA256 B30311EACE41EDDBB4B1A84B4E299AD9CBC27FD72F36AB678FFF1A0CABDE3EE1 x86\WinPrivCmd.exe
SHA256 F0472293747FB74F4027A0CA87D99731E3172D2EBC4CC7AE7EBB22A4CB70901A WinPriv.zip



Algorithm Hash Path
--------- ---- ----
SHA1 2B23DEB9B4D0C855FC01CCE456F3B4FF732BDC50 x64\WinPriv.exe
SHA1 5FD1ADD743237A144922282F5F59DAB46328F03B x64\WinPrivCmd.exe
SHA1 A984F2084E349A54547136E5344BC61A451D71D5 x86\WinPriv.exe
SHA1 204EC8496C2B858BBA4ADEE8E1CB53AD90DAF10B x86\WinPrivCmd.exe
SHA1 C4A5FC3E2A4FCC8C4F24B2D6A5CD35D41CB30529 WinPriv.zip



Algorithm Hash Path
--------- ---- ----
MD5 8E19586953AA868BBD4BEF1FC55787D5 x64\WinPriv.exe
MD5 7395C5457E5B05E7B7D3486B8C2239AA x64\WinPrivCmd.exe
MD5 F4B4CBE55203F3356B3CB36C2069F134 x86\WinPriv.exe
MD5 E5B7FCF8F53BD9854A208DB5F3710E3F x86\WinPrivCmd.exe
MD5 5F361C3804C5D5686811DBF293A4898E WinPriv.zip


Binary file added Build/WinPriv.zip
Binary file not shown.
33 changes: 24 additions & 9 deletions Build/build.cmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
@ECHO OFF
TITLE Building WinPriv...
CLS
SET PATH=%WINDIR%\system32;%WINDIR%\system32\WindowsPowerShell\v1.0

:: cert info to use for signing
SET CERT=9CC90E20ABF21CDEF09EE4C467A79FD454140C5A
SET CERT=2FA35B20356EFEB88F9E9B5F20221693C57100E5
set TSAURL=http://time.certum.pl/
set LIBNAME=WinPriv
set LIBURL=https://github.com/NoMoreFood/WinPriv
Expand All @@ -10,6 +13,7 @@ set LIBURL=https://github.com/NoMoreFood/WinPriv
RD /S /Q "%~dp0.vs" >NUL 2>&1
RD /S /Q "%~dp0x86\Temp" >NUL 2>&1
RD /S /Q "%~dp0x64\Temp" >NUL 2>&1
FORFILES /S /P "%~dp0." /M "*.*zip" /C "CMD /C DEL /Q @path" >NUL 2>&1
FORFILES /S /P "%~dp0." /M "*.*pdb" /C "CMD /C DEL /Q @path" >NUL 2>&1
FORFILES /S /P "%~dp0." /M "*.*obj" /C "CMD /C DEL /Q @path" >NUL 2>&1
FORFILES /S /P "%~dp0." /M "*.log" /C "CMD /C DEL /Q @path" >NUL 2>&1
Expand All @@ -22,15 +26,26 @@ FORFILES /S /P "%~dp0." /M "*.exp" /C "CMD /C DEL /Q @path" >NUL 2>&1
IF DEFINED ProgramFiles SET PX86=%ProgramFiles%
IF DEFINED ProgramFiles(x86) SET PX86=%ProgramFiles(x86)%

:: setup paths
SET PATH=%WINDIR%\system32;%WINDIR%\system32\WindowsPowerShell\v1.0
SET PATH=%PATH%;%PX86%\Windows Kits\10\bin\x64
SET PATH=%PATH%;%PX86%\Windows Kits\8.1\bin\x64
SET PATH=%PATH%;%PX86%\Windows Kits\10\bin\10.0.16299.0\x64
:: setup commands and paths
SET POWERSHELL=POWERSHELL.EXE -NoProfile -NonInteractive -NoLogo
FOR /F "USEBACKQ DELIMS=" %%X IN (`DIR /OD /B /S "%PX86%\Windows Kits\10\SIGNTOOL.exe" ^| FINDSTR x64`) DO SET SIGNTOOL="%%~X"

:: sign the main executables
SET BINDIR=%~dp0
signtool sign /sha1 %CERT% /fd sha1 /tr %TSAURL% /td sha1 /d %LIBNAME% /du %LIBURL% "%BINDIR%\x86\*.exe" "%BINDIR%\x64\*.exe"
signtool sign /sha1 %CERT% /as /fd sha256 /tr %TSAURL% /td sha256 /d %LIBNAME% /du %LIBURL% "%BINDIR%\x86\*.exe" "%BINDIR%\x64\*.exe"
%SIGNTOOL% sign /sha1 %CERT% /fd sha1 /tr %TSAURL% /td sha1 /d %LIBNAME% /du %LIBURL% "%BINDIR%\x86\*.exe" "%BINDIR%\x64\*.exe"
%SIGNTOOL% sign /sha1 %CERT% /as /fd sha256 /tr %TSAURL% /td sha256 /d %LIBNAME% /du %LIBURL% "%BINDIR%\x86\*.exe" "%BINDIR%\x64\*.exe"

:: zip up executatables
PUSHD "%BINDIR%"
%POWERSHELL% -Command "Compress-Archive -LiteralPath @('x86','x64') -DestinationPath '%BINDIR%\WinPriv.zip'"
POPD

:: output hash information
SET HASHFILE=%BINDIR%\WinPriv-hash.txt
IF EXIST "%HASHFILE%" DEL /F "%HASHFILE%"
FOR %%H IN (SHA256 SHA1 MD5) DO %POWERSHELL% -Command ^
"Get-ChildItem -Include @('*.zip','*.exe') -Path '%BINDIR%' -Recurse | Get-FileHash -Algorithm %%H | Out-File -Append '%HASHFILE%' -Width 256"
%POWERSHELL% -Command "$Data = Get-Content '%HASHFILE%'; $Data.Replace((Get-Item -LiteralPath '%BINDIR%').FullName,'').Trim() | Set-Content '%HASHFILE%'"

PAUSE
PAUSE
C
Binary file modified Build/x64/WinPriv.exe
Binary file not shown.
Binary file modified Build/x64/WinPrivCmd.exe
Binary file not shown.
Binary file modified Build/x86/WinPriv.exe
Binary file not shown.
Binary file modified Build/x86/WinPrivCmd.exe
Binary file not shown.

0 comments on commit c28bad6

Please sign in to comment.