• 标 题:[原创] 为qq2000c 0305添加ip显示和去掉广告 (4千字)
  • 作 者:[最弱智]
  • 时 间:2002-4-10 13:43:37
  • 链 接:http://bbs.pediy.com

为qq2000c 0305去掉广告,同时加入显示ip的功能
[最弱智] 2002年4月10日
转载请保留全文

(1) 用lordpe加入IPSearcher!_GetAddress

如果手工做,可以保证exe大小无变化,既然loadpe已经有了这功能,就不自己麻烦了。 :)

(2) 去掉广告:

00444477: 53                          push        ebx
00444478: 6880000008                  push        008000080
0044447D: 6A03                        push        003
0044447F: 53                          push        ebx
00444480: 6A01                        push        001
00444482: 6800000080                  push        080000000
00444487: FF7508                      push        d,[ebp][08]
0044448A: 899E90000000                mov        [esi][00000090],ebx
00444490: 899E88000000                mov        [esi][00000088],ebx
00444496: 895E74                      mov        [esi][74],ebx
00444499: 895E60                      mov        [esi][60],ebx
0044449C: 895E54                      mov        [esi][54],ebx
0044449F: FF15B4725900                call        CreateFileA ;KERNEL32.dll
004444A5: E9F4000000                  jmp        .00044459E  ----- (1)

(3) 用reshack将原广告位置的STATIC改成具有ES_READONLY | ES_MULTILINE风格的EDIT

修改之后,原来的PtInRect就不用修改了,因为DlgProc已经接受不到WM_LBUTTONDOWN
消息了。

(4) 添加显示ip程序段:

004444AA: 51                          push        ecx
004444AB: 52                          push        edx
004444AC: 56                          push        esi
004444AD: 53                          push        ebx
004444AE: 8B86F4030000                mov        eax,[esi][000003F4] // 用户数据区
004444B4: 8B98C0030000                mov        ebx,[eax][000003C0] // port
004444BA: 8B80BC030000                mov        eax,[eax][000003BC] // 指向IP指针
004444C0: 803800                      cmp        b,[eax],000
004444C3: 7437                        je        .0004444FC
004444C5: 53                          push        ebx    // port (int)
004444C6: 50                          push        eax    // IP
004444C7: 50                          push        eax    // IP
004444C8: FF151DB07800                call        _GetAddress ;IPsearcher.dll
004444CE: 83C404                      add        esp,004
004444D1: FF7004                      push        d,[eax][04] // 地理位置
004444D4: FF30                        push        d,[eax]      // 连接方式
004444D6: 6800C75F00                  push        0005FC700  // format
004444DB: 90                          nop
004444DC: 6810C75F00                  push        0005FC710  // buffer
004444E1: FF15E0765900                call        wsprintfA ;USER32.dll
004444E7: 83C418                      add        esp,018
004444EA: B810C75F00                  mov        eax,0005FC710 // buffer
004444EF: 50                          push        eax
004444F0: FFB6D8020000                push        d,[esi][000002D8] // handle
004444F6: FF15C8775900                call        SetWindowTextA ;USER32.dll
004444FC: 5B                          pop        ebx
004444FD: 5E                          pop        esi
004444FE: 5A                          pop        edx
004444FF: 59                          pop        ecx
00444500: 8D8670030000                lea        eax,[esi][00000370]
00444506: E909390200                  jmp        .000467E14

数据:

005FC700:  25 73 20 25-73 0D 0A 25-73 3A 25 64-00 00 00 00  %s %s%s:%d
005FC710:  00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
005FC720:  00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
005FC730:  00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
005FC740:  00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00
005FC750:  00 00 00 00-00 00 00 00-00 00 00 00-00 00 00 00

(5) 跳到显示ip程序段:

00467DF1: 6896000000                  push        000000096
00467DF6: 57                          push        edi
00467DF7: E8AA6D0F00                  call      .00055EBA6
00467DFC: 8D8634030000                lea        eax,[esi][00000334]
00467E02: 50                          push        eax
00467E03: 6824010000                  push        000000124
00467E08: 57                          push        edi
00467E09: E8986D0F00                  call      .00055EBA6
00467E0E: E997C6FDFF                  jmp        .0004444AA // 转去显示IP
00467E13: 90                          nop                     // 对齐
00467E14: 50                          push        eax
00467E15: 53                          push        ebx
00467E16: 57                          push        edi
00467E17: E876690F00                  call      .00055E792

这样,ip:port和地址就都显示出来了,广告如果要彻底去掉,需要把 "AD\" 改成
全0,或者一个非法的目录名,不然广告虽然不显示了,但是还会下载。