Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- rem **********************************************************************************
- rem ** How to verify TrueCrypt Windows binary files:
- rem **
- rem ** (1) Extract the TrueCrypt source code into the original folder which
- rem ** is "c:\truecrypt-7.1a" for TrueCrypt 7.1a
- rem ** Note: The original path can be looked up from "truecrypt.sys" where
- rem ** the MS compiler has placed a reference to this location.
- rem **
- rem ** (2) Extract the original TrueCrypt binary files by executing
- rem ** "TrueCrypt Setup 7.1a.exe" (select "Extract" instead of "Install"
- rem ** and accept the extraction path). Then, the file "TrueCrypt Setup 7.1a.exe"
- rem ** must be moved to "TrueCrypt\TrueCrypt Setup.exe".
- rem **
- rem ** (3) Compile your own binary files by executing
- rem ** "c:\truecrypt-7.1a\TrueCrypt.sln" and by compiling for "All" and "Win32".
- rem **
- rem ** (4) Copy this batch file into "c:\truecrypt-7.1a\check.bat" and execute it.
- rem **
- rem ** (5) The comparison of the disassembler listings of self-compiled and original
- rem ** binary file can then be looked up in the ".cmp.txt"-files of the "Check"
- rem ** and "Check2" sub-folders.
- rem **
- rem **********************************************************************************
- rem ** For compatibility with 32-bit Windows
- if "%ProgramFiles(x86)%" equ "" set ProgramFiles(x86)=%ProgramFiles%
- rem ** Set environment for Visual Studio 9.0 tools
- set HOME=%~dp0
- cd /d "%ProgramFiles(x86)%\Microsoft Visual Studio 9.0\VC\"
- call vcvarsall.bat
- rem ** Clean the "Check" and "Check2" sub-folders
- rd /s /q "%HOME%Check" 2>NUL
- md "%HOME%Check"
- rd /s /q "%HOME%Check2" 2>NUL
- md "%HOME%Check2"
- rem ** Check the TrueCrypt binary files
- rem ** ("Driver" is temporarily renamed to prevent "dumpbin.exe" from finding any
- rem ** symbol names)
- call :check "TrueCrypt Setup.exe"
- call :check "TrueCrypt.exe"
- call :check "TrueCrypt Format.exe"
- move "%HOME%Driver" "%HOME%Driver.bak"
- call :check "truecrypt.sys"
- call :check "truecrypt-x64.sys"
- move "%HOME%Driver.bak" "%HOME%Driver"
- goto :eof
- :check
- set F=%~1
- set R=%HOME%Check\%~1
- dumpbin /disasm "%HOME%TrueCrypt\%F%" >"%R%.org.txt"
- dumpbin /disasm "%HOME%Release\Setup Files\%F%" >"%R%.new.txt"
- fc "%R%.org.txt" "%R%.new.txt" >"%R%.cmp.txt"
- set R2=%HOME%Check2\%~1
- dumpbin /all /disasm "%HOME%TrueCrypt\%F%" >"%R2%.org.txt"
- dumpbin /all /disasm "%HOME%Release\Setup Files\%F%" >"%R2%.new.txt"
- fc "%R2%.org.txt" "%R2%.new.txt" >"%R2%.cmp.txt"
- goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement