[QUOTE='XF[BCG];1199755']1、看了下,机器码应该是从这里传来的:jdMethod_if(); 分析下这个内容
2、注册是机器码加 yolan 字符串再MD5的吧?
MessageDigest localMessageDigest = MessageDigest.getInstance("MD5&...[/QUOTE]
非常荣幸得到您的批评指正
前面两点说的都非常正确:
1. 机器码确实是由 jdMethod_if(); 算出来的,它的实现是这样:
public String jdMethod_if()
{
DiskID localDiskID = new DiskID();
return DiskID.DiskID().toUpperCase();
}
其中DiskID这个类是在一个单独的DLL里面的,由于Divbrush程序是java做的,用C重写一遍会比较麻烦,所以我就偷懒了。
2. 第二条说的很对
3. 关于我说的“一个很明确的替换”也是偷懒了,其实字符串替换有两个地方,除了前面代码中显示出来的,还有一个是这一句:
MessageDigest localMessageDigest = MessageDigest.getInstance("MD5");
localMessageDigest.update((str1 + "yolan").getBytes("UTF-8"));
byte[] arrayOfByte = localMessageDigest.digest();
[B] k localk = new k();
String str2 = localk.a(arrayOfByte);[/B]
str2 = str2.toUpperCase();
k这个类就是做字符串替换的:
public class k
{
private static char[] a = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' };
public String a(byte[] paramArrayOfByte)
{
int i = paramArrayOfByte.length * 8;
int j = i % 6;
int k = 0;
StringBuffer localStringBuffer = new StringBuffer();
while (k < i)
{
int m = k / 8;
int n;
switch (k % 8)
{
case 0:
localStringBuffer.append(a[((paramArrayOfByte[m] & 0xFC) >> 2)]);
break;
case 2:
localStringBuffer.append(a[(paramArrayOfByte[m] & 0x3F)]);
break;
case 4:
if (m == paramArrayOfByte.length - 1)
{
localStringBuffer.append(a[((paramArrayOfByte[m] & 0xF) << 2 & 0x3F)]);
}
else
{
n = ((paramArrayOfByte[m] & 0xF) << 2 | (paramArrayOfByte[(m + 1)] & 0xC0) >> 6) & 0x3F;
localStringBuffer.append(a[n]);
}
break;
case 6:
if (m == paramArrayOfByte.length - 1)
{
localStringBuffer.append(a[((paramArrayOfByte[m] & 0x3) << 4 & 0x3F)]);
}
else
{
n = ((paramArrayOfByte[m] & 0x3) << 4 | (paramArrayOfByte[(m + 1)] & 0xF0) >> 4) & 0x3F;
localStringBuffer.append(a[n]);
}
break;
case 1:
case 3:
case 5:
}
k += 6;
}
if (j == 2)
localStringBuffer.append("==");
else if (j == 4)
localStringBuffer.append("=");
return localStringBuffer.toString();
}
}