DevKxnq1221

Untitled

Feb 9th, 2022
994
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.40 KB | None | 0 0
  1. using System;
  2. using System.Diagnostics;
  3. using System.IO;
  4. using System.IO.Compression;
  5. using System.Net;
  6. using System.Threading;
  7.  
  8. namespace Bootstrapper
  9. {
  10.     internal class Program
  11.     {
  12.         public static void Check() //prevents annoying errors AKA deletes the zip of it exists and downloads the latest version
  13.         {
  14.             bool flag = Directory.Exists("Osmium.zip");
  15.             if (flag)
  16.             {
  17.                 Directory.Delete("Osmium.zip", true);
  18.             }
  19.         }
  20.  
  21.         public static void CheckForMove()
  22.         {
  23.             bool flag = Directory.Exists("Osmium");
  24.             if (flag)
  25.             {
  26.                 Directory.Delete("Osmium", true);
  27.             }
  28.         }
  29.  
  30.         public static void CheckForUpdates()
  31.         {
  32.             bool flag = new WebClient().DownloadString("https://pastebin.com/raw/LINK").Contains("1"); //this pastebin checks and make sures you have the latest bootstrapper version
  33.             if (flag)
  34.             {
  35.                 Console.ForegroundColor = ConsoleColor.Red;
  36.                 Console.WriteLine("Out-Dated Client, Please update the Installer. We will redirect you to the download link.");
  37.                 Process.Start("https://discord.gg/YOURDISCORD"); //your discord link
  38.                 Console.WriteLine("[-] Press any key to exit the Installer...");
  39.                 Console.ReadKey();
  40.                 Environment.Exit(0);
  41.             }
  42.         }
  43.  
  44.         public static void Extract()
  45.         {
  46.             ZipFile.ExtractToDirectory(".\\Osmium.zip", ".\\Osmium");
  47.             Thread.Sleep(1850);
  48.             string path = ".\\Osmium.zip";
  49.             bool flag = File.Exists(path);
  50.             if (flag)
  51.             {
  52.                 try
  53.                 {
  54.                     File.Delete(path);
  55.                     Thread.Sleep(2200);
  56.                 }
  57.                 catch (Exception ex)
  58.                 {
  59.                     Exception ex2 = ex;
  60.                     Console.ForegroundColor = ConsoleColor.Red;
  61.                     Console.WriteLine("Error, try again!" + ex2.ToString());
  62.                 }
  63.             }
  64.         }
  65.  
  66.         private static void Main(string[] args)
  67.         {
  68.             Console.Title = "Installer";
  69.             Console.WriteLine("Osmium Bootstrapper V1");
  70.             Thread.Sleep(500);
  71.             Console.WriteLine("Checking For Updates...");
  72.             Thread.Sleep(500);
  73.             CheckForUpdates();
  74.             Console.WriteLine("-----------------------");
  75.             Console.WriteLine("Preparing To Install Required Files, Please Wait...");
  76.             Thread.Sleep(500);
  77.             Thread.Sleep(1500);
  78.             Console.WriteLine("Checking, Please Wait...");
  79.             Thread.Sleep(500);
  80.             Check();
  81.             Console.WriteLine("[Downloading] Osmium.zip");
  82.             new WebClient().DownloadFile(new WebClient().DownloadString("https://pastebin.com/raw/example"), "Release.zip"); //put a pastebin raw that contains a direct download for your exploit, for example, a discord cdn download
  83.             Thread.Sleep(500);
  84.             Console.WriteLine("[Downloaded] Osmium.zip");
  85.             Thread.Sleep(500);
  86.             Console.WriteLine("[Extracting] Osmium.zip");
  87.             CheckForMove();
  88.             Move();
  89.             Extract();
  90.             Thread.Sleep(1000);
  91.             Console.WriteLine("[Extracted] Osmium.zip");
  92.             Thread.Sleep(500);
  93.             Console.WriteLine("Osmium has been downloaded successfully! Press any key to start Exploit Name...");
  94.             Console.ReadKey();
  95.             string ExploitDirectory = Environment.CurrentDirectory + "\\Osmium\\Directory\\Osmium.exe";
  96.             try
  97.             {
  98.                 Process.Start(ExploitDirectory);
  99.             }
  100.             catch (Exception)
  101.             {
  102.                 Console.WriteLine("Failed to Open Osmium.exe, please turn off your anti-virus!");
  103.                 Console.ReadKey();
  104.                 Environment.Exit(0);
  105.             }
  106.             Environment.Exit(0);
  107.         }
  108.  
  109.         public static void Move()
  110.         {
  111.             string sourceDirName = "Release";
  112.             string destDirName = "Release";
  113.             try
  114.             {
  115.                 Directory.Move(sourceDirName, destDirName);
  116.             }
  117.             catch
  118.             {
  119.             }
  120.         }
  121.     }
  122. }
Advertisement
Add Comment
Please, Sign In to add comment