Skip to content

Instantly share code, notes, and snippets.

@CRC32EX
Created May 3, 2020 18:15
Show Gist options
  • Save CRC32EX/d8b7168a7c0eaf3cb377dd0612288438 to your computer and use it in GitHub Desktop.
Save CRC32EX/d8b7168a7c0eaf3cb377dd0612288438 to your computer and use it in GitHub Desktop.
using System.IO;
using System.Security.Cryptography;
namespace Test
{
class Program
{
static byte[] Decrypt(byte[] bytes)
{
var key = new byte[] { 0x90, 0x53, 0x76, 0x73, 0xa5, 0x80, 0xfb, 0xe1, 0x4c, 0xd1, 0x6b, 0x89, 0x95, 0x94, 0x1c, 0xc3 };
var iv = new byte[] { 0xda, 0xa0, 0x1e, 0x0b, 0x3e, 0xd7, 0x9b, 0xec, 0x93, 0x48, 0xbd, 0xb3, 0x47, 0x52, 0x0e, 0x9e };
var aes = Aes.Create();
aes.Padding = PaddingMode.PKCS7;
aes.Mode = CipherMode.CBC;
using var decryptor = aes.CreateDecryptor(key, iv);
return decryptor.TransformFinalBlock(bytes, 0, bytes.Length);
}
static void Main()
{
var bytes = File.ReadAllBytes("3c05c1e3a5cc1ca4fbfaaee1dd482787");
bytes = Decrypt(bytes);
File.WriteAllBytes("out.bin", bytes);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment