java验证license破解手记
java 验证license 破解手记:
Parasoft C++ Test Pro v6.5.8.1
C++Test 64.5 MB (last update 2005-Oct-27)
http://www.parasoft.com/jsp/downloads/cpptest/cpptest_win32_6.5.8.1_pro.exe
Parasoft.C.Plus.Plus.Test.Pro.v6.5.8.1-SHOCK
这个是有题目的,他只是破解了Toolkit.dll,可以运行C++TestW.exe进行GUI测试的。
但是壮大的comandline没有破解到。如许你要套用makefile对整个工程进行test就不行能了。
G:\editg\CPPTest65\bin>cpptest t.c
There is no license to run command line.
Please launch C++Test GUI to enter license details.
用c32asm反编译可以得看到他导入alex.dll的几个函数验证license:
ALEX.DLL:??0RegistryKey@@QAE@W4PredefinedKey@0@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4Mode@0@W4Access@0@@Z
ALEX.DLL:?isValid@RegistryKey@@QBE_NXZ
......
反编译ALEX.DLL,分析这些函数,太多,太庞大,找不到关键点。
从error message 动手,用winhex搜索ALEX.DLL,包括ansi/unicode,并未发明“There is no license to run command line”字符串。
用uedit对整个bin目录下所有文件搜索,也未发明。那么,这一句license error message从那里冒出来得?
G:\editg\CPPTest65\bin>cpptest t.c之后,
在系统temp目录下发明一个文件Toolkit16970.log,重要内容如下。
[INFO] Checking main feature...
[INFO] Version: Application: C++Test 6.5
[INFO] License configured
[INFO] Final status: 0
[INFO] checkConfiguration(t):finish
[INFO] cancelOtherThreads:begin
[INFO] cancelOtherThreads:finish
[INFO] checkConfiguration:finish
[INFO] isFeatureConfigurated returned ErrorCode: -3
[toolkit.modules.common.license.LicenseConfigurationException: isFeatureConfigurated returned ErrorCode: -3
[ at toolkit.modules.common.license.LicenseUtils.isFeatureConfigurated(LicenseUtils.java:177)
[ at toolkit.modules.common.license.LicenseModule.getFeatureStatus(LicenseModule.java:392)
[ at com.parasoft.cpptest.app.LicenseManager.printErrorMessage(LicenseManager.java:814)
[ at com.parasoft.cpptest.app.LicenseManager.checkLicense(LicenseManager.java:424)
[ at com.parasoft.cpptest.app.ModuleTest.mainSlave(ModuleTest.java:1539)
[ at com.parasoft.cpptest.app.ModuleTest.main(ModuleTest.java:1376)
这时想到这个东西有很大一部分是java写的。发明bin\jars有一堆.jar文件。
此中有一个license.jar.由于.jar文件便是zip压缩的一堆.class文件,
于是用winrar解压了这个.jar。
可见,LicenseUtils.java的isFeatureConfigurated前往-3,(引起一系列后续处理),表现没有license。
去下了个Jad - the fast JAva Decompiler,和它的GUI前端FrontEnd Plus v1.04:
http://www.kpdus.com/jad.html#download
趁便分析了FrontEnd的注册码:
--------------cut--------------------
REGEDIT4
[HKEY_CURRENT_USER\Software\FrontEnd Plus]
"First Name"="readyu"
"Last Name"="#newsmth"
"Serial No"="22249790-678B4188-06D766F0"
--------------end---------------------
反编译LicenseUtils.class,看函数,我考,是boolean,太爽了,从这里看,间接return true应该表现成功:
public static synchronized boolean isFeatureConfigurated(LicenseFeature testedLicensefeature, Hashtable featuresStates)
throws LicenseConfigurationException
{
int dfeaturesStatus = getFeatureFailReasonInt(testedLicensefeature, featuresStates);
if(dfeaturesStatus == 0)
return true;
if(dfeaturesStatus == 7 || dfeaturesStatus == 9)
return false;
else
throw new LicenseConfigurationException("isFeatureConfigurated returned ErrorCode: ", dfeaturesStatus);
}
修正思绪:
if(dfeaturesStatus == 0)
return true;
间接改为:
return true;
LicenseUtils.class便是JVM的呆板码了,没法间接改。反编译出来的LicenseUtils.java也只要阅读价值,
根本编译不过。
去下了一个jclasslib,开源的jvm bytecode反汇编工具,看class的JVM汇编指令。
http://puzzle.dl.sourceforge.net/sourceforge/jclasslib/jclasslib_windows_3_0.zip
- 文章作者: 福州军威计算机技术有限公司
军威网络是福州最专业的电脑维修公司,专业承接福州电脑维修、上门维修、IT外包、企业电脑包年维护、局域网网络布线、网吧承包等相关维修服务。
版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章原始出处 、作者信息和声明。否则将追究法律责任。
TAG:
评论加载中...
|