Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Diagnostics;
- using System.IO;
- using System.Linq;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.SetWindowSize(75, 12);
- //string path = "title.tik";
- Console.WriteLine("enter ticket name (title.tik)");
- string CustomTIKname = Console.ReadLine();
- Console.Clear();
- Console.WriteLine("working....");
- var CDecryptOutput = "starting... and looking for output above 400 letters";
- while (CDecryptOutput.Length < 400)
- {
- //Console.Clear();
- Random randomHex = new Random();
- Byte[] randomHexArray = new Byte[16];
- randomHex.NextBytes(randomHexArray);
- byte[] hextowrite = randomHexArray;
- using (var stream = new FileStream(CustomTIKname, FileMode.Open, FileAccess.ReadWrite))
- {
- stream.Position = 447; //the key starts here
- using (var b = new BinaryWriter(stream))
- {
- //for manual testing i guess
- //byte[] tetete = { 0x0a, 0x64, 0x58, 0x3f, 0xf1, 0x1d, 0x81, 0xd6, 0x80, 0xc7, 0x40, 0x5a, 0xf5, 0x96, 0x8b, 0x37 };
- //b.Write(tetete);
- b.Write(hextowrite);
- }
- }
- //read output from cdecrypt
- Process compiler = new Process();
- compiler.StartInfo.FileName = "CDecrypt.exe";
- compiler.StartInfo.Arguments = "title.tmd " + CustomTIKname + " ckey.bin";
- compiler.StartInfo.UseShellExecute = false;
- compiler.StartInfo.RedirectStandardOutput = true;
- compiler.Start();
- CDecryptOutput = compiler.StandardOutput.ReadToEnd();
- compiler.WaitForExit();
- // Console.WriteLine(CDecryptOutput);
- }
- // Keep the console window open in debug mode.
- Console.Clear();
- Console.WriteLine(CDecryptOutput);
- Console.WriteLine("Press any key to exit.");
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement