Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program TrueCryptBruteForce;
- {$APPTYPE CONSOLE}
- uses
- ExceptionLog,
- SysUtils
- , ShellAPI
- ;
- const
- cMaxPW = 999999;
- cTrueCryptPath = '"C:\Program Files\TrueCrypt\TrueCrypt.exe"';
- cRunCommand = ' /q /s /p "%s" /c y /b /v "%s"';
- cPath = 'C:\Users\Desktop\Container.tc';
- cSecsPerDay = 60*60*24;
- var
- pwFirstPart: String;
- pwSecondPart: String;
- pwThirdPart: String;
- pw: String;
- i: integer;
- crackCommand: String;
- maxPWLength: Integer;
- doBreak: Boolean;
- timeStamp: TDateTime;
- begin
- try
- pwFirstPart := 'abc';
- pwThirdPart := 'abc';
- maxPWLength := Length(IntToStr(cMaxPW));
- timeStamp := 0;
- for i := 0 to cMaxPW do
- begin
- doBreak := False;
- pwSecondPart := IntToStr(i);
- repeat
- pw := pwFirstPart + pwSecondPart + pwThirdPart;
- crackCommand := Format(cRunCommand, [pw, cPath]);
- crackCommand := cTrueCryptPath + crackCommand;
- if ((Now - timeStamp) * cSecsPerDay) > 2 then
- begin
- WriteLn(pw);
- timeStamp := Now;
- end;
- ShellExecute(0, nil, 'cmd.exe', PWideChar(crackCommand), nil, 0);
- if Length(pwSecondPart) < maxPWLength then
- pwSecondPart := '0' + pwSecondPart
- else
- doBreak := True;
- until doBreak;
- end;
- except
- on E: Exception do
- Writeln(E.ClassName, ': ', E.Message);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement