吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 499|回复: 2
收起左侧

[求助] 求助java代码解释

[复制链接]
boy666 发表于 2022-10-18 18:21
反编译的一个jar文件,求解这段代码是啥意思,是生成注册码对比的吗



[Java] 纯文本查看 复制代码
package com.kamava.lockhub;

import java.io.ByteArrayOutputStream;
import java.util.Locale;
import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class JNIHelper
{
  private static final Logger a = LoggerFactory.getLogger(JNIHelper.class);
  private Long b = new Long(0L);
  private static boolean c = false;
  private p d = null;
  
  private native long JNICCCFFF();
  
  private native int SDICreateConnection(int paramInt, Object paramObject);
  
  private native int SDIRefDeallocate(Object paramObject);
  
  private native int SDIDispatch(Object paramObject, int paramInt, long paramLong);
  
  private native int SDIRegisterService(Object paramObject, int paramInt1, String paramString, int paramInt2);
  
  private native int SDIServiceBrowse(Object paramObject, int paramInt);
  
  private native LockServerInfo SDIServiceResolve(int paramInt, String paramString, long paramLong);
  
  public static boolean a()
  {
    if (!c)
    {
      System.loadLibrary("libgcc_s_sjlj-1");
      System.loadLibrary("libevent_core-2-0-5");
      System.loadLibrary("nspr4");
      System.loadLibrary("libJNIHelper");
      c = true;
    }
    return c;
  }
  
  public static void b() {}
  
  private void SDIDriverServiceBrowseRespose(int paramInt1, int paramInt2, String paramString)
  {
    a.info((paramInt1 == 0 ? "remove" : "add") + " service:" + paramString + " " + (paramInt2 == 0 ? "" : "more..."));
    if (this.d != null) {
      this.d.a(paramInt1, paramString);
    }
  }
  
  public final int a(int paramInt, p paramp)
  {
    paramInt = -1;
    this.d = paramp;
    try
    {
      paramInt = SDIServiceBrowse(this.b, 0);
    }
    catch (Exception paramp)
    {
      a.error(paramp.toString());
    }
    return paramInt;
  }
  
  public final LockServerInfo a(int paramInt, String paramString, long paramLong)
  {
    paramInt = null;
    try
    {
      paramInt = SDIServiceResolve(0, paramString, 0L);
    }
    catch (Exception paramString)
    {
      a.error(paramString.toString());
    }
    return paramInt;
  }
  
  public final int a(int paramInt)
  {
    try
    {
      if (this.b.longValue() != 0L) {
        c();
      }
      paramInt = SDICreateConnection(0, this.b);
    }
    catch (Exception localException)
    {
      paramInt = -1;
      a.error(localException.toString());
    }
    return paramInt;
  }
  
  public final void c()
  {
    try
    {
      if (this.b.longValue() != 0L) {
        SDIRefDeallocate(this.b);
      }
    }
    catch (Exception localException)
    {
      a.error(localException.toString());
    }
    this.b = Long.valueOf(0L);
  }
  
  public final int a(int paramInt, long paramLong)
  {
    paramInt = -1;
    try
    {
      if (this.b.longValue() != 0L) {
        paramInt = SDIDispatch(this.b, 0, 0L);
      }
    }
    catch (Exception paramLong)
    {
      paramInt = -1;
      a.error(paramLong.toString());
    }
    return paramInt;
  }
  
  public final int a(int paramInt1, String paramString, int paramInt2)
  {
    paramInt1 = -1;
    try
    {
      if (this.b.longValue() != 0L) {
        paramInt1 = SDIRegisterService(this.b, 0, paramString, paramInt2);
      }
    }
    catch (Exception paramString)
    {
      paramInt1 = -1;
      a.error(paramString.toString());
    }
    return paramInt1;
  }
  
  public static int a(o paramo, String paramString)
  {
    int i = 0;
    try
    {
      if ((paramString = new HexBinaryAdapter().unmarshal(paramString)).length < 14)
      {
        i = -1;
      }
      else
      {
        paramo.i = false;
        paramo.b = ((paramString[6] & 0xFF) << 24 | (paramString[5] & 0xFF) << 16 | (paramString[11] & 0xFF) << 8 | paramString[13] & 0xFF);
        paramo.c = (2010 + (byte)(paramString[4] ^ 0xFFFFFFFF));
        paramo.d = ((byte)(paramString[2] ^ 0xFFFFFFFF));
        paramo.e = ((byte)(paramString[3] ^ 0xFFFFFFFF));
        paramo.f = (2010 + paramString[7]);
        paramo.g = paramString[1];
        paramo.h = ((byte)(paramString[9] ^ 0xFFFFFFFF));
        paramo.a = (paramString[12] & 0xFF | (paramString[8] & 0xFF) << 8 | (paramString[0] & 0xFF) << 16 | (paramString[10] & 0xFF) << 24);
        if ((!Locale.getDefault().getLanguage().equalsIgnoreCase("zh")) && (paramo.c == 1983) && (paramo.d == 1) && (paramo.e == 2) && (paramo.f == 1982) && (paramo.g == 3) && (paramo.h == 4)) {
          paramo.i = true;
        }
        i = 0;
      }
    }
    catch (Exception paramString)
    {
      i = -1;
      a.error(paramString.toString());
    }
    return i;
  }
  
  public static int a(StringBuilder paramStringBuilder, o paramo)
  {
    if (paramo.b == 0) {
      return -1;
    }
    try
    {
      ByteArrayOutputStream localByteArrayOutputStream;
      (localByteArrayOutputStream = new ByteArrayOutputStream(11)).write((byte)(paramo.b >> 24));
      localByteArrayOutputStream.write((byte)(2010 - paramo.c ^ 0xFFFFFFFF));
      localByteArrayOutputStream.write((byte)(int)(paramo.a >> 8));
      localByteArrayOutputStream.write((byte)(paramo.d ^ 0xFFFFFFFF));
      localByteArrayOutputStream.write((byte)(paramo.e ^ 0xFFFFFFFF));
      localByteArrayOutputStream.write((byte)(paramo.b >> 16 & 0xFF));
      localByteArrayOutputStream.write((byte)(paramo.b >> 8 & 0xFF));
      localByteArrayOutputStream.write((byte)(int)paramo.a);
      localByteArrayOutputStream.write((byte)(int)(paramo.a >> 16));
      localByteArrayOutputStream.write((byte)(paramo.b & 0xFF));
      localByteArrayOutputStream.write((byte)(int)(paramo.a >> 24));
      paramStringBuilder.append(new HexBinaryAdapter().marshal(localByteArrayOutputStream.toByteArray()));
      paramStringBuilder = 0;
    }
    catch (Exception localException)
    {
      paramStringBuilder = -1;
      a.error(localException.toString());
    }
    return paramStringBuilder;
  }
  
  public final long d()
  {
    long l = 19831116L;
    try
    {
      l = JNICCCFFF();
    }
    catch (Exception localException)
    {
      a.info(localException.toString());
    }
    catch (Error localError)
    {
      a.error(localError.toString());
    }
    return l;
  }
}

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

coderyzh 发表于 2022-10-19 00:45
代码出处是哪里方便说出来吗
chr_233 发表于 2022-10-20 13:46
上面几个  private native 方法是 jni 方法,函数主体在so里,要用ida看
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-25 06:34

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表