المشاركات : 6
المواضيع 1
:
: 0
الإنتساب : Mar 2014
تفضل اخى
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, XPMan;
type a = array [0..1000000] of char;
type
TForm1 = class(TForm)
Button1: TButton;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
Edit3: TEdit;
Timer1: TTimer;
ProgressBar1: TProgressBar;
Edit1: TEdit;
Button3: TButton;
Button2: TButton;
Edit2: TEdit;
XPManifest1: TXPManifest;
Label1: TLabel;
Label2: TLabel;
StatusBar1: TStatusBar;
procedure Button1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
f:file of a;
s:file of a;
d: a;
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Unit2;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
i : integer ;
begin
if OpenDialog1.Execute then
begin
Button1.Enabled:=false;
Button3.Enabled := True;
Edit1.Text := Edit1.Text + ' ' + ExtractFileName(OpenDialog1.FileName);
AssignFile (f, OpenDialog1.FileName);
reset(f);
Read(f, d);
for i := 0 to 15 do
begin
Edit3.Text := Edit3.Text + IntToHex(Ord(d[I]),2);
end;
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
progressbar1.Position := 0;
caption := caption[Length(caption)] + Copy(caption, 1,Length(caption) - 1);
end;
procedure TForm1.Button3Click(Sender: TObject);
var sTemp,fTemp,aTemp,bTemp,cTemp,dTemp : string;
var soft,soft1,soft2,soft3,soft4,soft5: char;
begin
if Edit1.Text='File Name' then
MessageBeep($00000040);
Messagedlg('Ok Ali Extractor File',mtInformation,[mbOk],0);
sTemp:=edit3.Text;
if length(sTemp)<>32 then
begin
MessageDlg('Invalid Key', mtError,[mbOk], 0);
exit;
end;
begin
copyFile(pchar(opendialog1.filename),pchar(opendialog1.filename + '.BAK'),true);
AssignFile (F, OpenDialog1.FileName);
reset(f);
soft:=chr(strtoint('$' + copy(sTemp,1,2)));
d[4]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,3,2)));
d[5]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,5,2)));
d[6]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,7,2)));
d[7]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,9,2)));
d[8]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,11,2)));
d[9]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,13,2)));
d[10]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,15,2)));
d[11]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,17,2)));
d[12]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,19,2)));
d[13]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,21,2)));
d[14]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,23,2)));
d[15]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,25,2)));
d[16]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,27,2)));
d[17]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,29,2)));
d[18]:=soft;
soft:=chr(strtoint('$' + copy(sTemp,31,2)));
d[19]:=soft;
if length(fTemp)<>32 then
begin
Write(f,d);
CloseFile(f);
Edit1.Text:='File Name';
begin
end;
//end;
//end;
//end;
//end;
//end;
begin
timer1.Enabled := True;
progressbar1.Position := progressbar1.Position + 100 ;
end;
if progressbar1.Position = progressbar1.Max then
begin
timer1.Enabled := True;
end;
end;
end;
Button1.Enabled:=true;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
close;
end;
end.