首页
社区
课程
招聘
[求助]FlexLM 10.8 Java + FlexLM 10.X linux 的License 制作问题?
发表于: 2016-12-12 01:39 5388

[求助]FlexLM 10.8 Java + FlexLM 10.X linux 的License 制作问题?

2016-12-12 01:39
5388
已反编译的venderInfo的子类:

import com.macrovision.flexlm.misc.FlexlmPublicKey;
import java.security.PublicKey;
import com.macrovision.flexlm.FlexlmException;
import com.macrovision.flexlm.FlexlmConstants;
import com.macrovision.flexlm.VendorInfo;

public class XXXXInfo extends VendorInfo implements FlexlmConstants
{
    public XXXXInfo() throws FlexlmException {
        super();
    }
   
    public String getVendorName() {
        return "略去 ";
    }
   
    public PublicKey getPublicKey(final int n) {
        switch (n) {
            case 2: {
                return (PublicKey)new FlexlmPublicKey(this.getVendorName(), "659792E05C86A46B0B4AB31F10A53B02");
            }
            case 3: {
                return (PublicKey)new FlexlmPublicKey(this.getVendorName(), "66994BE6728C8304C0A951B450303C6DE523F0A4C38C");
            }
            case 4: {
                return (PublicKey)new FlexlmPublicKey(this.getVendorName(), "66BEF0D5F921DC63DC67FAD8873C6EA4D887AB21C5A99D6BB56A792CFA8A15");
            }
            default: {
                return null;
            }
        }
    }
   
    public int[] getEncryptionSeeds() {
        return new int[] { 241158379, 1268573936 };
    }
   
    public int[] getVendorKeys() {
        return new int[] { -1693521973, -1789841632, 683175751, -210946792 };
    }
   
    public int[] getCroKeys() {
        return new int[] { 1611626693, -1841157379 };
    }
   
    public int getDefaultStrength() {
        return 4;
    }
}

下载了flexlm 10.8 Java 版和 flexlm 10.8 版后,经反编译 flexlmutil.jar 发现: Java 版的vendor key 只有4 个, 而且Java的EncryptionSeeds和Native C 版有一下关联:

  protected void generateGetEncryptionSeeds(PrintWriter paramPrintWriter)
  {
    paramPrintWriter.println();
    paramPrintWriter.println("\tpublic int[] getEncryptionSeeds() {");
    paramPrintWriter.print("\t\treturn new int[] {");
    long l1 = parseHexItem("ENCRYPTION_SEED1");
    long l2 = parseHexItem("ENCRYPTION_SEED2");
    long l3 = parseHexItem("VENDOR_KEY5");
    if (this.includeNonCroSeeds)
    {
      paramPrintWriter.print("0x" + Long.toString(l1 ^ l3, 16));
      paramPrintWriter.print(",");
      paramPrintWriter.print("0x" + Long.toString(l2 ^ l3, 16));
    }
    else
    {
      long l4 = parseHexItem("VENDOR_KEY1");
      long l5 = parseHexItem("VENDOR_KEY2");
      long l6 = l4 ^ l5;
      paramPrintWriter.print("0x" + Long.toString(l6, 16));
      paramPrintWriter.print(",");
      long l7 = l1 ^ l2 ^ l6;
      paramPrintWriter.print("0x" + Long.toString(l7, 16));  //Native 版的EncryptionSeeds 经过异或运算后,被隐藏了
    }
    paramPrintWriter.println(" };");
    paramPrintWriter.println("\t}");
  }

    protected void generateGetVendorKeys(final PrintWriter printWriter) {
        printWriter.println();
        printWriter.println("\tpublic int[] getVendorKeys() {");
        printWriter.print("\t\treturn new int[] {");
        printWriter.print(this.getVendorWord("VENDOR_KEY1")); // Vendor key 1-4 都是从Native C 复制过来的
        printWriter.print(",");
        printWriter.print(this.getVendorWord("VENDOR_KEY2"));
        printWriter.print(",");
        printWriter.print(this.getVendorWord("VENDOR_KEY3"));
        printWriter.print(",");
        printWriter.print(this.getVendorWord("VENDOR_KEY4"));
        printWriter.println(" };");
        printWriter.println("\t}");
    }
   
    protected void generateGetCroKeys(final PrintWriter printWriter) {
        printWriter.println();
        printWriter.println("\tpublic int[] getCroKeys() {");
        printWriter.print("\t\treturn new int[] {");
        final long hexItem = this.parseHexItem("TRL_KEY1");   //CroKey 也是从Native C 复制过来的
        final long hexItem2 = this.parseHexItem("TRL_KEY2");
        if (hexItem != 0L && this.publicKeys != null) {
            printWriter.print("0x" + Long.toString(hexItem, 16));
            printWriter.print(",");
            printWriter.print("0x" + Long.toString(hexItem2, 16));
        }
        printWriter.println(" };");
        printWriter.println("\t}");
    }

从代码上看不到逆向求解Native C EncryptionSeeds 的方法.

另外在 ./jar目录里有flexlm.jar (10.1)版, 在./lib 目录里有liblmgr10.so 动态库 (Java Native C库)
我的问题是:
1.  liblmgr10.so 是SDK 附带的文件还是经加用户key 编译的?是否有public key 的checksum隐含在其中?请问哪位大侠能提供一个flexlm 10.8 SDK 的Linux 版,谢谢!

2. 若liblmgr10.so文件是flexlm厂商提供的,我能否用任意的DWORD 和 已知的Java EncryptionSeeds异或生成一对Native C 的EncryptionSeeds?

3. 用Flexvkg3 生成的Native C 10.0 的VendorKey 和 已有的Java VendorKey 完全不一样:

/* Native C by Flexvkg3*/
/* Version 10 keys */
#define VENDOR_KEY1 0x131fd4e9
#define VENDOR_KEY2 0xc4ace148
#define VENDOR_KEY3 0x8632a4d2
#define VENDOR_KEY4 0x95e581be
#define VENDOR_KEY5 0x631a43c6
#define TRL_KEY1 0x20f258e2
#define TRL_KEY2 0x2d401ed5

// Java version
int[] EncryptionSeeds = { 0xe5fc8eb, 0x4b9ce6f0};  // 十进制 { 241158379, 1268573936 };

int[] VendorKeys = { 0x9b0ee7cb, 0x95512f20, 0x28b86f47, 0xf36d3518 };  // 十进制{ -1693521973, -1789841632, 683175751, -210946792 };

int[] CroKeys = { 0x600f78c5, 0x92422afd };  // 十进制{ 1611626693, -1841157379 };

能否是版本号是10.1的原因? 哪位高人能搞一个能算10.1的算号器?

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

上传的附件:
收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 55
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
直接爆破不可以吗。试试附件可以不,不需要license就可以使用。
2016-12-14 22:48
0
游客
登录 | 注册 方可回帖
返回
//