好友
阅读权限20
听众
最后登录1970-1-1
|
本帖最后由 vipcrack 于 2021-12-30 10:38 编辑
这个注册需要逆一个算法代码。
下面这个是读取注册文件的代码,你得逆回去,从注册码,机器码逆回去得到注册文件数据。
后面的内容是注册码部分的内容,就是对用户名,机器码进行了MD5的处理。
[C#] 纯文本查看 复制代码 FileStream fileStream = new FileStream(openFileDialog.FileName, FileMode.Open);
BinaryReader binaryReader = new BinaryReader(fileStream, Encoding.Unicode);
int num = 15;
string text = binaryReader.ReadString();
int[] array = new int[] { 5, 7, 19, 28, 36, 41, 57 };
int[] array2 = new int[]
{
23, 35, 54, 79, 151, 162, 168, 179, 193, 237,
251, 264, 321, 347, 362, 377, 412
};
int num2 = 0;
int num3 = 0;
int num4 = 0;
int num5 = 0;
int num6 = 32;
string str = "";
string text2 = "";
int num7 = 0;
do
{
if (num7 == 24)
{
string text3 = Strings.Mid(text, num7 + 1, 1);
num = Strings.Asc(text3) - 32;
}
else if ((num7 == num6 + array[num2]) & (num3 < num))
{
string text3 = Strings.Mid(text, num7 + 1, 1);
str += text3;
num3++;
num2++;
if (num2 >= array.Length)
{
num6 = num7;
num2 = 0;
}
if (num3 >= num)
{
num6 = num7;
}
}
else if ((num3 >= num) & (num7 == num6 + array2[num4]) & (num5 < 16))
{
string text3 = Strings.Mid(text, num7 + 1, 1);
text2 += text3;
if (text2.Length == 4)
{
text2 += "-";
}
if (text2.Length == 9)
{
text2 += "-";
}
if (text2.Length == 14)
{
text2 += "-";
}
num5++;
num4++;
}
num7++;
}
while (num7 <= 760);
binaryReader.Close();
fileStream.Close();
this.michinecode = str;
this.regcode = text2;
机器码,注册码,需要逆回去。
注册码算法:
public static object smethod_0(string str3, string Str2)
{
string text = "";
int num = 0;
checked
{
int num2 = Strings.Len(str3) - 1;
int num3 = num;
for (;;)
{
int num4 = num3;
int num5 = num2;
if (num4 > num5)
{
break;
}
text += Conversion.Hex(Strings.Asc(Strings.Mid(str3, num3 + 1, 1)));
num3++;
}
return string.Concat(new string[]
{
Strings.Mid(MD5.MD5CODE(Strings.Mid(MD5.MD5CODE(text + Str2, 16), 3, 4), 16), 2, 4),
"-",
Strings.Mid(MD5.MD5CODE(Strings.Mid(MD5.MD5CODE(Str2 + text, 32), 1, 4), 32), 3, 4),
"-",
Strings.Mid(MD5.MD5CODE(Strings.Mid(MD5.MD5CODE(text + Str2, 32), 7, 4), 32), 6, 4),
"-",
Strings.Mid(MD5.MD5CODE(Strings.Mid(MD5.MD5CODE(Str2 + text, 16), 3, 5), 16), 6, 4)
});
}
}
[C#] 纯文本查看 复制代码 public static string MD5CODE(string strSource, short Code)
{
string text = "";
byte[] bytes = new ASCIIEncoding().GetBytes(strSource);
byte[] array = ((HashAlgorithm)CryptoConfig.CreateFromName("MD5")).ComputeHash(bytes);
checked
{
if (Code == 16)
{
int num = 4;
do
{
text += Conversion.Hex(array[num]).ToLower();
num++;
}
while (num <= 11);
}
else if (Code == 32)
{
int num = 0;
do
{
text += Conversion.Hex(array[num]).ToLower();
num++;
}
while (num <= 15);
}
else
{
int num2 = 0;
int num3 = array.Length - 1;
int num = num2;
for (;;)
{
int num4 = num;
int num5 = num3;
if (num4 > num5)
{
break;
}
text += Conversion.Hex(array[num]).ToLower();
num++;
}
}
return text;
}
} |
免费评分
-
查看全部评分
|