private static void Monitoring_Blocks() // Remove as regras usando o nome
        {
            try
            {
                if (unlockQueue.Count < 1)
                {
                    return;
                }


                Printf.roxo("[Monitoring] Awaiting unlock: " + unlockQueue.Count);

                for (int i = 0; i < unlockQueue.Count; i++)
                {
                    uint date = uint.Parse(DateTime.Now.ToString("yyMMddHHmm"));

                    if (date >= unlockQueue[i].end) // Remova o ban da lista
                    {
                        Printf.sucess("Desbloqueado  [" + unlockQueue[i].name + "]");
                        Add_Drop_Rule.blocked.Remove(unlockQueue[i]._ip);

                        Netsh.Remove(unlockQueue[i].name);

                        unlockQueue.RemoveAt(i);
                        i--;
                        continue;
                    }
                }
            }
            catch (Exception ex)
            {
                Printf.b_danger("[RemoveRule]\n" + ex);
            }
        }
Example #2
0
        public static bool check()
        {
            if (int.Parse(DateTime.Now.ToString("yyMMdd")) > 200210)
            {
                Printf.danger("Versão expirou, entre em contato com o vendedor");
                File.Delete(@"data/GameServer/GameServers.json");
                File.Delete(@"config/auth.ini");
                File.Delete(@"config/battle.ini");
                File.Delete(@"config/game.ini");
                return(false);
            }

            return(true);

            try
            {
                string usrAgent  = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0) 0x1E901";
                var    webClient = new WebClient {
                    Encoding = Encoding.UTF8
                };
                webClient.Headers["User-Agent"] = usrAgent;
                string  launcher = webClient.DownloadString(dominio + "/pbserver/license.php?key=1c5d90100ce485f572186a26de60e82ebc3a9a31");
                dynamic data     = JsonConvert.DeserializeObject(launcher);

                bool   enable = data.client.enable;
                bool   expire = data.client.expire;
                string msg    = data.client.msg;

                if (!String.IsNullOrEmpty(msg))
                {
                    Printf.roxo(msg);
                }

                if (enable && !expire)
                {
                    return(true);
                }
            }
            catch (Exception ex)
            {
                Printf.danger("Falha ao validar licensa");
                SaveLog.fatal("[ValidLicense] " + ex);
            }
            return(false);
        }
Example #3
0
        public static void header(bool first)
        {
            if (!first)
            {
                Printf.roxo(@"_________________________________________________", false);
                Printf.roxo(@"\___C__O__N__S__O__L__E____C__O__M__M__A__N__D__/", false);
                Printf.roxo(@"/_______________________________________________\", false);
                Printf.info("\n Digite help para ver a lista de comandos\n", false);
                return;
            }
            StringBuilder txtHeader = new StringBuilder();

            txtHeader.Append(@"=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=").Append('\n');
            txtHeader.Append(@"             S E R V E R     G A M E").Append('\n');
            txtHeader.Append(@"").Append('\n');
            txtHeader.Append(@" + [UDP3 Private]").Append('\n');
            txtHeader.Append(@" + Release 2019").Append('\n');
            txtHeader.Append(@" + ...Version: 4.0.0").Append('\n');
            txtHeader.Append(@" + Distro @luisfeliperm").Append('\n');
            txtHeader.Append(@" + [email protected]").Append('\n');
            txtHeader.Append(@"=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=");
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine(txtHeader.ToString());
        }