Access password strike

zhaozj2021-02-08  216

type TForm1 = class (TForm) Button1: TButton; Chk2000: TCheckBox; Edit1: TEdit; Button2: TButton; Edit2: TEdit; OpenDialog1: TOpenDialog; Button3: TButton; Label1: TLabel; procedure Button1Click (Sender: TObject); procedure Button2Click ( Sender: TObject); procedure Button3Click (Sender: TObject); procedure Edit2KeyPress (Sender: TObject; var Key: Char); private procedure WMDropFiles (var Msssage: TMessage); message WM_DROPFILES; {Private declarations} public {public declarations} end;

Var Form1: TFORM1;

IMPLEMENTATION

{$ R * .dfm}

Const Xorstring: Array [0..12] of Byte = ($ 86, $ FB, $ 9A, $ FA, $ C6, $ 5E, $ 28, $ E6, $ 13); xorstring2 : Array [0..20] of byte = ($ D3, $ EC, $ 08, $ 9A, $ 93, $ 7B, $ A0, $ DF, $ 22, $ 13, $ 9A, $ B1, $ 61, $ 79, $ C7, $ 7C, $ 5B);

Procedure TForm1.Wmdropfiles (VAR MSSSAGE: TMESSAGE); Begin ShowMessage ('Hello Boy'); End; Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT);

VarpassBuff: Array [0..14] of byte; Pass: array [0..14] of char; passbuff2: array [0..40] of byte; pass2: array [0..20] of char; b: BYTE; F: TFileStream; I, J: Integer;

Begin File: // ShowMessage ($ F8) CHAR ($ EC)) IF Not FileExists (Edit1.Text) Then Begin MessageBox (Handle, 'You are MM's,' I am a kindness Your ', MB_OK MB_ICONInInformation; exit; end; f: = tfilestream.create (edit1.text, fmopenread); if not chk2000.checked The begin Try F.seek; f.Read (Passbuff, 14); for i: = 0 to 13 do begin b: = passbuff [i] xor xorstring [i]; pass [i]: = char (b); end; pass [sizeof (pass) -1]: = # 0; Edit2.Text: = STRPAS (PASS); Finally F.Free; end; Else Begin Try F.seek ($ 42, Sofrombeginning); F.Read (PassBuff2, 40); i: = 0; J: = 0 WHILE I <40 DO BEGIN B: = passbuff2 [i] xor Xorstring2 [J]; Pass2 [J]: = CHAR (B); INC (I, 2); INC (J); END; Pass2 [SizeOf (Pass2 ) - 1]: = # 0; edit2.text: = StrPas (pass2); Finally f.free; end; end; end; procedure tform1.button2click (sender: Tobject); begin if OpenDialog1.execute1 Edit1.Text: = OpenDialog1.fi LENAME; END;

Procedure TForm1.Button3Click (Sender: TOBJECT); VarpassBuff: Array [0..14] of byte; pass: array [0..14] of char; passbuff2: array [0..40] of byte; pass2: array [ 0..20] of char; b: Byte; f: tfilestream; i, j: integer; s: string; begin file: // showMessage ($ f8) char ($ f8) char ($ EC)) If not fileexists (edit1.text) THEN BEGIN MessageBox (Handle, 'You are mm ",' I am a kind you ', MB_OK MB_ICONITIONFORMATION; exit; end; f: = tfilestream.create (edit1.text, Fmopenwrite; if not chk2000.checked the begin try Fillchar (Pass, 14, # 0); s: = edit2.text; strcopy (@pass, pchar (Trim (s))); for i: = 0 to 13 do Begin B: = BYTE (Pass [i]); PassBuff [I]: = xorstring [i] xor b; end; passbuff [13]: = $ b6; f.seek ($ 42, Sofrombeginning); F.Write (Passbuff , 14); Finally F.Free; End; Else Begin Try F.seek ($ 42, SOFROMBEGINNING); F.Read (PassBuff2, 40); i: = 0; J: = 0; While i <40 do Begin B : = Passbuff2 [i] xor xorstring2 [j]; pass2 [j]: = cha R (b); INC (I, 2); INC (j); end; pass2 [sizeof (pass2) - 1]: = # 0; edit2.text: = strPas (pass2); finally f.free; end; END;

Procedure tform1.edit2keypress (Sender: Tobject; var key: char); begin file: // if longth (edit1.text)> = 13 THEN key: = # 0;

End.

转载请注明原文地址:https://www.9cbs.com/read-3005.html

New Post(0)