>>14560323
using System;
using System.Text;
using System.IO;
using System.Security.Cryptography;
public class Program
{
public static void Main()
{
Console.WriteLine("https//opensea[.]io/collection/contingency-ocol-44924");
Console.WriteLine();
//CONTINGENCY PROTOCOL 44924 COLLECTION DESCRIPTION
//MD5: 346257E94DA2E0D0D0F54AA397D291F0
//DATA: Q Society
string collectiondescriptiondecoded = "Q Society";
MD5 md5Hash = MD5.Create();
byte[] md5 = md5Hash.ComputeHash(Encoding.UTF8.GetBytes(collectiondescriptiondecoded));
Console.WriteLine("Verified: [Q Society] = " + BitConverter.ToString(md5).Replace("-", ""));
Console.WriteLine();
//SQME KEYS TO TEST
byte[] testkey0 = Encoding.UTF8.GetBytes("rustyshackleford");
byte[] testkey1 = Encoding.UTF8.GetBytes("Q H7^PZBVTpZ7302");
//https//www[.]britbonglogpost[.]com/978ea96f-2740-4ea6-b1d0-288f11a48ff7.jpg
byte[] testkey2 = HexStringToByteArray("978ea96f-2740-4ea6-b1d0-288f11a48ff7".Replace("-", ""));
//NFT IMAGE DESCRIPTIONS - BASE64 ENCODED DATA
//https[:]//opensea[.]io/assets/0x495f947276749ce646f68ac8c248420045cb7b5e/42715653451494116278904116357368839356782358833774246712130390239617933639681
string epsilon_b64 = "mbhD5klu/+mMNw6nN8bmE7+m4MWKp9ZMzO61R83YPGc23pCnwNXl6XnRPizFWi+k35YtNRsXiT20P7KNiV6Bz/jwBGq3PjQv2Zd14gORArKA6Cz30JEU9Sa6GGCEpJIufbFJuWWxaI9NTnGCrshcDDvIne9DvhwSTvcJHMOCAkeBNiRwxb/tCK17mclpwgV1fKXDhrCfzddOW2bTO14c0w==";
//https[:]//opensea[.]io/assets/0x495f947276749ce646f68ac8c248420045cb7b5e/42715653451494116278904116357368839356782358833774246712130390238518422011905
string omega_b64 = "QWIn8NzJMuDZIfibj/MqK1CPK32YXf3KuzCsf4HohUPSmUgyqAdY6moE98U6v3wVGTu2g1+ZziW+tqk9cVif41v+GC91bgnym7NlX9URAY/LLE9X9amJw3Qxa4PyNWat/dVkEOUFoa3vAE6TCVgk/gfWzB8085VW7A6hBcoR0D1tv9U5HrylObyNdm2I6ljim5XVXA9XRkLKffQReXWkAS7R34IQYsipc9jOaf/LlaCPputybuz5cKWaq/q6kbRksksbPL6v4F/omjkBHOJiqWxKHRkEgSIOEEEgIQHqk5h5Tnf7O7I5/eyDXGPAYBS2I7IwMmykLp7CG9nFLg5FDHmNgQZD4vOFrJcjoYcH3mg=";
//DECODE BASE64
var epsilon = Convert.FromBase64String(epsilon_b64);
var omega = Convert.FromBase64String(omega_b64);
//AES CRYPTO
var crypto = new AesCryptographyService();
Console.WriteLine("Epsilon: " + epsilon_b64);
Console.WriteLine("B64 Decoded: " + BitConverter.ToString(epsilon).Replace("-", ""));
Console.WriteLine("To String: " + Encoding.UTF8.GetString(epsilon));
Console.WriteLine();
var decrypted = crypto.Decrypt(epsilon, testkey0, md5);
Console.WriteLine("Trying Key: " + BitConverter.ToString(testkey0).Replace("-", "") + " IV: " + BitConverter.ToString(md5).Replace("-", ""));
Console.WriteLine("Decrypted: " + BitConverter.ToString(decrypted).Replace("-", ""));
Console.WriteLine("To String" + Encoding.UTF8.GetString(decrypted));
Console.WriteLine();
decrypted = crypto.Decrypt(epsilon, testkey1, md5);
Console.WriteLine("Trying Key: " + BitConverter.ToString(testkey1).Replace("-", "") + " IV: " + BitConverter.ToString(md5).Replace("-", ""));
Console.WriteLine("Decrypted: " + BitConverter.ToString(decrypted).Replace("-", ""));
Console.WriteLine("To String" + Encoding.UTF8.GetString(decrypted));
Console.WriteLine();
decrypted = crypto.Decrypt(epsilon, testkey2, md5);
Console.WriteLine("Trying Key: " + BitConverter.ToString(testkey2).Replace("-", "") + " IV: " + BitConverter.ToString(md5).Replace("-", ""));
Console.WriteLine("Decrypted: " + BitConverter.ToString(decrypted).Replace("-", ""));
Console.WriteLine("To String" + Encoding.UTF8.GetString(decrypted));
Console.WriteLine();
Console.WriteLine();
Console.WriteLine();
}
public static byte[] HexStringToByteArray(String hex)
{
int NumberChars = hex.Length;
byte[] bytes = new byte[NumberChars / 2];
for (int i = 0; i < NumberChars; i += 2)
bytes[i / 2] = Convert.ToByte(hex.Substring(i, 2), 16);
return bytes;
}
}
public class AesCryptographyService
{
public byte[] Encrypt(byte[] data, byte[] key, byte[] iv)
{
using (var aes = Aes.Create())
{
aes.KeySize = 128;
aes.BlockSize = 128;
aes.Padding = PaddingMode.Zeros;
aes.Key = key;
aes.IV = iv;
using (var encryptor = aes.CreateEncryptor(aes.Key, aes.IV))
{
return PerformCryptography(data, encryptor);
}
}
}
public byte[] Decrypt(byte[] data, byte[] key, byte[] iv)
{
using (var aes = Aes.Create())
{
aes.KeySize = 128;
aes.BlockSize = 128;
aes.Padding = PaddingMode.Zeros;
aes.Key = key;
aes.IV = iv;
using (var decryptor = aes.CreateDecryptor(aes.Key, aes.IV))
{
return PerformCryptography(data, decryptor);
}
}
}
private byte[] PerformCryptography(byte[] data, ICryptoTransform cryptoTransform)
{
using (var ms = new MemoryStream())
using (var cryptoStream = new CryptoStream(ms, cryptoTransform, CryptoStreamMode.Write))
{
cryptoStream.Write(data, 0, data.Length);
cryptoStream.FlushFinalBlock();
return ms.ToArray();
}
}
}