马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册
x
Delish是一个Delicious的插件,可以生成页面快照。又是一启动就要求购买的模式,还有12天的试用期。良好的软件设计,优秀的界面,典型的注册模式-经典的反向工程目标:
首先:otx Delish.app > Delish.otx
查看这个文件:mate Delish.otx。很快找到了这样的东西:-(BOOL)[LicenseController checkLicense]
很不错,这样就可以开始gdb了:
liwn:MacOS liweinan$ gdb Delish
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries ............... done
(gdb) b [LicenseController checkLicense]
Breakpoint 1 at 0xc6cd
(gdb) run
Starting program: /Users/liweinan/Desktop/Delish.app/Contents/MacOS/Delish
Reading symbols for shared libraries +++++++++++++........................................................................................... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
Breakpoint 1, 0x0000c6cd in -[LicenseController checkLicense] ()
接下来结合Delish.otx中的内容看一下:
+0 0000c6c9 55 pushl %ebp
+1 0000c6ca 89e5 movl %esp,%ebp
+3 0000c6cc 53 pushl %ebx
+4 0000c6cd 83ec24 subl $0x24,%esp
+7 0000c6d0 a134360100 movl 0x00013634,%eax licenseIsValid
+12 0000c6d5 89442404 movl %eax,0x04(%esp)
+16 0000c6d9 8b4508 movl 0x08(%ebp),%eax
+19 0000c6dc 890424 movl %eax,(%esp)
+22 0000c6df e8c5990000 calll 0x000160a9 -[(%esp,1) licenseIsValid]
+27 0000c6e4 84c0 testb %al,%al
+29 0000c6e6 0f8580010000 jnel 0x0000c86c
......
于是:
(gdb) b *0x0000c6e4
Breakpoint 3 at 0xc6e4
(gdb) c
Continuing.
Breakpoint 3, 0x0000c6e4 in -[LicenseController checkLicense] ()
(gdb) stepi
0x0000c6e6 in -[LicenseController checkLicense] ()
(gdb)
0x0000c6ec in -[LicenseController checkLicense] ()
(gdb) jump *0x0000c86c
Continuing at 0xc86c.
Reading symbols for shared libraries . done
2008-12-07 10:27:24.917 Delish[26015:813] Succeeded! Received 178 bytes of data
Reading symbols for shared libraries . done
2008-12-07 10:27:24.980 Delish[26015:813] delicious last update = str=2008-12-06T10:32:20Z (2008-12-06T10:32:20ZGMT) lastRefresh:2008-12-06 19:26:24 +0800, 1
2008-12-07 10:27:24.980 Delish[26015:813] Refreshing from cache - /Users/liweinan/Library/Application Support/Delish/posts.xml
Reading symbols for shared libraries . done
Reading symbols for shared libraries .. done
Reading symbols for shared libraries ... done
注册框消失:
游戏到这里就可以结束了,再写下去就非法了。
要说的是:MacOS的反盗版技术和M$平台相比,落后好远啊。 |