Esempio n. 1
0
        public HttpCnC(JsonConfig BotConfig)
        {
            ConsoleLog.Status("Mode: HTTP C&C");
            my_http_server              = new http_server();
            my_http_server.HTTPCnCmode  = true;
            my_http_server.ShutdownHTTP = false;
            my_http_server.start_http_server(BotConfig);
            string last_cnc_status = "";

            while (my_http_server.ShutdownHTTP == false)
            {
                string NewStatusMessage = my_http_server.GetStatus();
                if (NewStatusMessage != last_cnc_status)
                {
                    last_cnc_status = NewStatusMessage;
                    ConsoleLog.Status(last_cnc_status);
                }
                Thread.Sleep(5000);
            }
            ConsoleLog.Status("Shutting down now");
            if (my_http_server.GetBot != null)
            {
                my_http_server.GetBot.GetClient.Network.Logout();
            }
        }
Esempio n. 2
0
 public CliExitOnLogout(JsonConfig Config)
 {
     ConsoleLog.Status("Mode: Cli [Basic]");
     if (helpers.botRequired(Config) == true)
     {
         SecondBot Bot = new SecondBot();
         Bot.Setup(Config, AssemblyInfo.GetGitHash());
         Bot.Start();
         if (Config.EnableHttp == true)
         {
             http_server my_http_server = null;
             my_http_server = new http_server();
             my_http_server.start_http_server(Bot, Config);
         }
         while (Bot.KillMe == false)
         {
             string NewStatusMessage = Bot.GetStatus();
             if (NewStatusMessage != Bot.LastStatusMessage)
             {
                 Bot.LastStatusMessage = NewStatusMessage;
                 ConsoleLog.Status(Bot.LastStatusMessage);
             }
             Thread.Sleep(5000);
         }
         Bot.GetClient.Network.Logout();
     }
     else
     {
         ConsoleLog.Warn("Required settings missing");
     }
 }