(真心感谢maffy,sink师傅还有我的一位游戏开发大牛同学对我的代码思路提示以及帮助,第一次弄,不太会)
这里我们补充对之前那个博客那个题目获取故障密文的代码粘上,其实就相当于你自己ILSpy里面的代码放进你的vs studio里面就行,改一改头部加一点料就行,几乎完全不用管里面的内容:
using System.Formats.Asn1;
using System.Text;
using System.Runtime.CompilerServices;
namespace Program1 {
class Program1
{
public static byte[,,] v14 = new byte[10, 16, 256]{//将题目源码复制即可};
public static uint[,,] v13 = new uint[10, 16, 256]{//将题目源码复制即可};
public static byte[,,,] v12 = new byte[9, 96, 16, 16]{//将题目源码复制即可};
public static void GGG(byte[] v16)
{
byte[] array = new byte[16];
uint[] array2 = new uint[]
{
0U,
5U,
10U,
15U,
4U,
9U,
14U,
3U,
8U,
13U,
2U,
7U,
12U,
1U,
6U,
11U
};
for (int i = 0; i < 16; i++)
{
array[i] = v16[(int)array2[i]];
}
array.CopyTo(v16, 0);
}
public static void AAA(byte[] aaa, byte[] bbb, int r_index)
{
for (int i = 0; i < 9; i++)
{
GGG(aaa);
if (i == 8)
{
if (r_index != 0)
{
aaa[r_index % 16] = (byte)(r_index * 10);
}
}
for (int j = 0; j < 4; j++)
{
uint num = v11[i, 4 * j, aaa[4 * j]];
uint num2 = v11[i, 4 * j + 1, aaa[4 * j + 1]];
uint num3 = v11[i, 4 * j + 2, aaa[4 * j + 2]];
uint num4 = v11[i, 4 * j + 3, aaa[4 * j + 3]];
uint num5 = v12[i, 24 * j, (num >> 28) & 0xF, (num2 >> 28) & 0xF];
uint num6 = v12[i, 24 * j + 1, (num3 >> 28) & 0xF, (num4 >> 28) & 0xF];
uint num7 = v12[i, 24 * j + 2, (num >> 24) & 0xF, (num2 >> 24) & 0xF];
uint num8 = v12[i, 24 * j + 3, (num3 >> 24) & 0xF, (num4 >> 24) & 0xF];
aaa[4 * j] = (byte)((v12[i, 24 * j + 4, num5, num6] << 4) | v12[i, 24 * j + 5, num7, num8]);
num5 = v12[i, 24 * j + 6, (num >> 20) & 0xF, (num2 >> 20) & 0xF];
num6 = v12[i, 24 * j + 7, (num3 >> 20) & 0xF, (num4 >> 20) & 0xF];
num7 = v12[i, 24 * j + 8, (num >> 16) & 0xF, (num2 >> 16) & 0xF];
num8 = v12[i, 24 * j + 9, (num3 >> 16) & 0xF, (num4 >> 16) & 0xF];
aaa[4 * j + 1] = (byte)((v12[i, 24 * j + 10, num5, num6] << 4) | v12[i, 24 * j + 11, num7, num8]);
num5 = v12[i, 24 * j + 12, (num >> 12) & 0xF, (num2 >> 12) & 0xF];
num6 = v12[i, 24 * j + 13, (num3 >> 12) & 0xF, (num4 >> 12) & 0xF];
num7 = v12[i, 24 * j + 14, (num >> 8) & 0xF, (num2 >> 8) & 0xF];
num8 = v12[i, 24 * j + 15, (num3 >> 8) & 0xF, (num4 >> 8) & 0xF];
aaa[4 * j + 2] = (byte)((v12[i, 24 * j + 16, num5, num6] << 4) | v12[i, 24 * j + 17, num7, num8]);
num5 = v12[i, 24 * j + 18, (num >> 4) & 0xF, (num2 >> 4) & 0xF];
num6 = v12[i, 24 * j + 19, (num3 >> 4) & 0xF, (num4 >> 4) & 0xF];
num7 = v12[i, 24 * j + 20, num & 0xF, num2 & 0xF];
num8 = v12[i, 24 * j + 21, num3 & 0xF, num4 & 0xF];
aaa[4 * j + 3] = (byte)((v12[i, 24 * j + 22, num5, num6] << 4) | v12[i, 24 * j + 23, num7, num8]);
num = v13[i, 4 * j, aaa[4 * j]];
num2 = v13[i, 4 * j + 1, aaa[4 * j + 1]];
num3 = v13[i, 4 * j + 2, aaa[4 * j + 2]];
num4 = v13[i, 4 * j + 3, aaa[4 * j + 3]];
num5 = v12[i, 24 * j, (num >> 28) & 0xF, (num2 >> 28) & 0xF];
num6 = v12[i, 24 * j + 1, (num3 >> 28) & 0xF, (num4 >> 28) & 0xF];
num7 = v12[i, 24 * j + 2, (num >> 24) & 0xF, (num2 >> 24) & 0xF];
num8 = v12[i, 24 * j + 3, (num3 >> 24) & 0xF, (num4 >> 24) & 0xF];
aaa[4 * j] = (byte)((v12[i, 24 * j + 4, num5, num6] << 4) | v12[i, 24 * j + 5, num7, num8]);
num5 = v12[i, 24 * j + 6, (num >> 20) & 0xF, (num2 >> 20) & 0xF];
num6 = v12[i, 24 * j + 7, (num3 >> 20) & 0xF, (num4 >> 20) & 0xF];
num7 = v12[i, 24 * j + 8, (num >> 16) & 0xF, (num2 >> 16) & 0xF];
num8 = v12[i, 24 * j + 9, (num3 >> 16) & 0xF, (num4 >> 16) & 0xF];
aaa[4 * j + 1] = (byte)((v12[i, 24 * j + 10, num5, num6] << 4) | v12[i, 24 * j + 11, num7, num8]);
num5 = v12[i, 24 * j + 12, (num >> 12) & 0xF, (num2 >> 12) & 0xF];
num6 = v12[i, 24 * j + 13, (num3 >> 12) & 0xF, (num4 >> 12) & 0xF];
num7 = v12[i, 24 * j + 14, (num >> 8) & 0xF, (num2 >> 8) & 0xF];
num8 = v12[i, 24 * j + 15, (num3 >> 8) & 0xF, (num4 >> 8) & 0xF];
aaa[4 * j + 2] = (byte)((v12[i, 24 * j + 16, num5, num6] << 4) | v12[i, 24 * j + 17, num7, num8]);
num5 = v12[i, 24 * j + 18, (num >> 4) & 0xF, (num2 >> 4) & 0xF];
num6 = v12[i, 24 * j + 19, (num3 >> 4) & 0xF, (num4 >> 4) & 0xF];
num7 = v12[i, 24 * j + 20, num & 0xF, num2 & 0xF];
num8 = v12[i, 24 * j + 21, num3 & 0xF, num4 & 0xF];
aaa[4 * j + 3] = (byte)((v12[i, 24 * j + 22, num5, num6] << 4) | v12[i, 24 * j + 23, num7, num8]);
}
}
GGG(aaa);
for (int k = 0; k < 16; k++)
{
aaa[k] = v14[9, k, aaa[k]];
}
for (int l = 0; l < 16; l++)
{
bbb[l] = aaa[l];
}
}
public static void Main(string[] args)
{
try
{
Random rand = new Random();
for (int i = 0; i < 17; i++)
{
string v6 = "0123456789abcdef";
byte[] bytes = Encoding.UTF8.GetBytes(v6);
byte[] v32 = new byte[16];
bytes.CopyTo(v32, 0);
AAA(v32, bytes, i);
String a = BitConverter.ToString(bytes).Replace("-", "");
Console.WriteLine(a);
}
}
catch (Exception)
{
}
}
}
}
完工,see you!!!感谢您看到这!!!