Ejemplo n.º 1
0
 public static void Main(string[] args)
 {
     try
     {
         if (args == null || args.Length == 0)
         {
             rootAppExe = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
         }
         else if (args[0].Contains("-rootAppName."))
         {
             rootAppExe     = args[0].Replace("-rootAppName.", "");
             isBypasserMode = true;
         }
         else if (args[0].Contains("-clrtemp."))
         {
             var tempfile = args[0].Replace("-clrtemp.", "");
             Console.WriteLine("[DEBUG]: Temporary file: " + tempfile);
             foreach (Process proc in Process.GetProcessesByName(tempfile))
             {
                 proc.Kill();
             }
             Thread.Sleep(250);
             File.Delete(tempfile);
             Environment.Exit(0);
         }
         else if (args[0].Contains("-clrt3mp&lc."))
         {
             var tempfile = args[0].Replace("-clrt3mp&lc.", "");
             Console.WriteLine("[DEBUG]: Temporary file: " + tempfile);
             foreach (Process proc in Process.GetProcessesByName(tempfile))
             {
                 proc.Kill();
             }
             Thread.Sleep(250);
             File.Delete(tempfile);
             rootAppExe = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
         }
         Application.SetHighDpiMode(HighDpiMode.SystemAware);
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         BleakMain f1          = new BleakMain();
         var       currappname = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
         if (currappname != rootAppExe)
         {
             f1.Text = GetUniqueKey(13);
         }
         f1.Show();
         Console.WriteLine("[DEBUG]: Main file: " + rootAppExe);
         Application.Run(f1);
     }
     catch (Exception ex)
     {
         MessageBox.Show("An error has occured, sorry :(\nBelow is error i logged:\n" + ex, "BleakInjector");
         Environment.Exit(0);
     }
 }
Ejemplo n.º 2
0
 public static void Main(string[] args)
 {
     try
     {
         if (args == null || args.Length == 0)
         {
             rootAppExe = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
         }
         else if (args[0].Contains("-rootAppName."))
         {
             rootAppExe     = args[0].Replace("-rootAppName.", "");
             isBypasserMode = true;
         }
         else if (args[0].Contains("-clrtemp."))
         {
             var tempfile = args[0].Replace("-clrtemp.", "");
             foreach (Process proc in Process.GetProcessesByName(tempfile))
             {
                 proc.Kill();
             }
             File.Delete(tempfile);
             Environment.Exit(0);
         }
         else if (args[0].Contains("-clrt3mp&lc."))
         {
             var tempfile = args[0].Replace("-clrt3mp&lc.", "");
             Console.WriteLine("[DEBUG]: Temporary file: " + tempfile);
             foreach (Process proc in Process.GetProcessesByName(tempfile))
             {
                 proc.Kill();
             }
             File.Delete(tempfile);
             rootAppExe = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
         }
         //Application.SetHighDpiMode(HighDpiMode.SystemAware);
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         BleakMain f1          = new BleakMain();
         var       currappname = Path.GetFileName(Process.GetCurrentProcess().MainModule.FileName);
         if (currappname != rootAppExe)
         {
             f1.Text = GetUniqueKey(13);
         }
         f1.Show();
         Console.WriteLine("[DEBUG]: Main file: " + rootAppExe);
         Application.Run(f1);
     }
     catch (Exception ex)
     {
         MessageBox.Show("An error has occured, sorry :(\nIf you can launch this app with -CSole paramenter, reporduce this error then copy that and make a issue,Thank you.\nBelow is error i logged for who can't use -CSole paramenter.\n" + ex);
     }
 }