SHARE
TWEET

TrueCrypt Bruteforce

a guest Sep 17th, 2012 290 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program TrueCryptBruteForce;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. uses
  6.   ExceptionLog,
  7.   SysUtils
  8.   , ShellAPI
  9.   ;
  10.  
  11. const
  12.   cMaxPW = 999999;
  13.   cTrueCryptPath = '"C:\Program Files\TrueCrypt\TrueCrypt.exe"';
  14.   cRunCommand = ' /q /s  /p "%s" /c y /b /v "%s"';
  15.   cPath = 'C:\Users\Desktop\Container.tc';
  16.   cSecsPerDay = 60*60*24;
  17.  
  18. var
  19.   pwFirstPart: String;
  20.   pwSecondPart: String;
  21.   pwThirdPart: String;
  22.   pw: String;
  23.   i: integer;
  24.   crackCommand: String;
  25.   maxPWLength: Integer;
  26.   doBreak: Boolean;
  27.   timeStamp: TDateTime;
  28.  
  29. begin
  30.   try
  31.     pwFirstPart := 'abc';
  32.     pwThirdPart := 'abc';
  33.  
  34.     maxPWLength := Length(IntToStr(cMaxPW));
  35.     timeStamp := 0;
  36.  
  37.     for i := 0 to cMaxPW do
  38.     begin
  39.       doBreak := False;
  40.       pwSecondPart := IntToStr(i);
  41.  
  42.       repeat
  43.       pw := pwFirstPart + pwSecondPart + pwThirdPart;
  44.  
  45.       crackCommand := Format(cRunCommand, [pw, cPath]);
  46.       crackCommand := cTrueCryptPath + crackCommand;
  47.  
  48.       if ((Now - timeStamp) * cSecsPerDay) > 2 then
  49.       begin
  50.         WriteLn(pw);
  51.         timeStamp := Now;
  52.       end;
  53.  
  54.       ShellExecute(0, nil, 'cmd.exe', PWideChar(crackCommand), nil, 0);
  55.  
  56.       if Length(pwSecondPart) < maxPWLength then
  57.         pwSecondPart := '0' + pwSecondPart
  58.       else
  59.         doBreak := True;
  60.       until doBreak;
  61.     end;
  62.   except
  63.     on E: Exception do
  64.       Writeln(E.ClassName, ': ', E.Message);
  65.   end;
  66. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top