-
-
[求助]算法请教
-
发表于: 2022-9-6 15:46 17812
-
由"11111111",和"D91C",算出55E33B97.是否由可能根据55E33B97,11111111。算出D91C
using System;
public class Program
{
public static Int32 transform(int data, int[] sec)
{
Int32 result = ((data % sec[0]) * sec[2]) - ((data / sec[0]) * sec[1]);
if (result < 0)
result += (sec[0] * sec[2]) + sec[1];
return result;
}
public static string getKey(string seedTXT, string appKeyTXT)
{
Int32 result;
string[] seed = { seedTXT.Substring(0, 2), seedTXT.Substring(2, 2), seedTXT.Substring(4, 2), seedTXT.Substring(6, 2) };
string[] appKey = { appKeyTXT.Substring(0, 2), appKeyTXT.Substring(2, 2) };
int[] sec_1 = { 0xB2, 0x3F, 0xAA };
int[] sec_2 = { 0xB1, 0x02, 0xAB };
Int32 res_msb = transform(Int16.Parse(appKey[0] + appKey[1], System.Globalization.NumberStyles.HexNumber), sec_1) | transform(Int16.Parse(seed[0] + seed[3], System.Globalization.NumberStyles.HexNumber), sec_2);
Int32 res_lsb = transform(Int16.Parse(seed[1] + seed[2], System.Globalization.NumberStyles.HexNumber), sec_1) | transform(res_msb, sec_2);
result = (res_msb << 16) | res_lsb;
return result.ToString("X8");
}
public static void Main()
{
Console.WriteLine(getKey("11111111", "D91C"));
}
}
赞赏
- [求助]软件加Enigma保护后WIN10 自带杀毒软件报病毒 1356
- dll 内存数据修改工具 2764
- [求助][求助]Obsidium调试时电脑蓝屏 3131
- [求助]jar, java程序动态和静态逆向分析使用什么软件 2688
- [求助]C#逆向分析工具 4871