Advertisement
Guest User

Untitled

a guest
Sep 25th, 2019
761
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.28 KB | None | 0 0
  1. using System.IO;
  2. using System.Runtime.Serialization.Formatters.Binary;
  3. using System.Security.Cryptography;
  4. using System.Text;
  5.  
  6. namespace BSW_Decoder
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             BinaryFormatter binaryFormatter = new BinaryFormatter();
  13.             FileStream fs = File.Open("ILYCS.bsw", FileMode.Open);
  14.             using (RijndaelManaged rijndaelManaged = new RijndaelManaged())
  15.             {
  16.                 ICryptoTransform decryptor = rijndaelManaged.CreateDecryptor(Encoding.ASCII.GetBytes("C_H8A#R(L0I!E-09V3O]L)/9P)-E390+"), Encoding.ASCII.GetBytes("8charlie7volpe87"));
  17.                 byte[] buffer = (byte[])binaryFormatter.Deserialize(fs);
  18.                 using (FileStream outStream = File.Open("ILYCS.bsw.json", FileMode.Create, FileAccess.Write)){
  19.                     using (StreamWriter sw = new StreamWriter(outStream))
  20.                     {
  21.                         using (CryptoStream cryptoStream = new CryptoStream(new MemoryStream(buffer), decryptor, CryptoStreamMode.Read))
  22.                         {
  23.                             sw.Write(new StreamReader(cryptoStream).ReadToEnd());
  24.                         }
  25.                     }
  26.                 }
  27.                
  28.             }
  29.         }
  30.  
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement