首页 > 技术文章 > SparkGateway

dongpohezui 2020-10-18 23:10 原文

下载链接:
Remote Spark
https://www.remotespark.com/html5.html

SparkGatewayw是32位的GUI程序,用来设置服务程序。
SparkGateway是服务程序。
SparkGateway.jar是实现各种功能的jar包。
gateway.conf是配置文件。

You can download the evaluation version from our web site. The evaluation version is free for evaluation in 45 days and personal use only. Only 2 concurrent connections will be allowed after the evaluation period (45 days).

可通过

java -jar SparkGateway.jar

运行程序,
修改当前时间为一年后的时间,显示 License expired

GitHub-shanghai / jd-gui:一个独立的Java Decompiler GUI
https://github.com/java-decompiler/jd-gui

使用jd-gui查看SparkGateway.jar

Main-Class: com.toremote.gateway.SparkGateway

build.txt:
#Sat, 15 Aug 2020 12:55:11 -0600
#Build Number for ANT. Do not edit!
#Sat Aug 15 12:55:11 MDT 2020
build.time=2020_08_15_12
build.number=951

搜索License expired

查看as.class中的Licence c() 函数

3888000000L为毫秒数,即45天。
license.arg1 = 2; 即仅允许2个并发连接。

GitHub - Col-E/Recaf: A modern Java bytecode editor
https://github.com/Col-E/Recaf
修改java字节码,重编译jar

将ICONST_2修改为SIPUSH 999即可突破“仅允许2个并发连接”的限制。

同样的方法,还可以修改一下 com.toremote.license.License 的 daysleft() 函数和 isExpired() 函数。

程序如何获取firstTime?

com.toremote.as :private static final AppPrefs a = new AppPrefs(SparkGateway.class);
com.toremote.tools.AppPrefs : preferences = Preferences.userNodeForPackage(paramClass) 读取注册表

计算机\HKEY_CURRENT_USER\Software\JavaSoft\Prefs\com\toremote\gateway
_test为程序启动次数
firstTime为unix毫秒时间戳

推荐阅读