QQ2006消息轰炸

来源:互联网 发布:三星windows phone 编辑:程序博客网 时间:2024/03/29 15:05

#include <stdio.h>
#include <windows.h>
#include <conio.h>
HWND hSend;

HWND Fwnd(HWND hNext,int a)
{
int i;
hNext=GetWindow(hNext,GW_CHILD);
for(i=0;i<a;i++)
{
   hNext=GetWindow(hNext,GW_HWNDNEXT);
   if(i==3)
   {
    hSend=hNext;
   }
}
return hNext;
}

int bomb(HWND hEdit)
{
int i,j,k,l,iTimes,iStr[32];
char c=48,cStr[64];

printf("Type the words to send:\n");
for(i=0;c!=13;i++)
{
   c=getche();
   cStr[i]=c;
}
if(i==1)return 0;
for(j=0;j<i/2;j++)
{
   iStr[j]=MAKEWORD(cStr[2*j+1],cStr[2*j]);
}
printf("\nType the time to send:");
scanf("%d",&iTimes);
for(k=0;k<iTimes;k++)
{
   for(l=0;l<j;l++)
   {
    SendMessageCallback(hEdit,WM_IME_CHAR,iStr[l],0,0,0);
   }
   SendMessage(hSend,BM_CLICK,0,0);
   Sleep(300);
}
printf("Already send %d times.\n",iTimes);
return 1;
}

int main()
{
HWND hNext;
char wndName[16]="与 ";
char Name[8];

printf("Screen name:");
scanf("%s",&Name);
strcat(wndName,Name);
strcat(wndName," 交谈中");
hNext=FindWindow("#32770",wndName);
if(hNext)
{
   hNext=Fwnd(hNext,22);
   hNext=Fwnd(hNext,0);
   while(bomb(hNext));
}
return 0;
}

原创粉丝点击