Ejemplo n.º 1
0
 public svrHandle()
 {
     try {
         clientListener = new Thread(new ThreadStart(listenForClients));
         clientListener.Start();
         Globals.b_serverRunning = true;
     } catch { GlobalFunc.Write("Failed to start the listen thread!"); GlobalFunc.DelayedRestart(3); }
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.Title           = "LMAOnline v4 - GSN Edition";
            Console.BackgroundColor = ConsoleColor.Black;
            Console.ForegroundColor = ConsoleColor.Cyan;

            GlobalFunc.iniReadHandle();
            GlobalFunc.checkfolders();
            GlobalFunc.loadXeX();

            //if (!GlobalFunc.AllowAppThroughFirewall())
            //{ GlobalFunc.Write("Unable to add application to firewall. This may cause issues with other checks!"); }
            if (!GlobalFunc.LoadBinFiles())
            {
                GlobalFunc.Write("Failed to load proper bin files!"); GlobalFunc.DelayedRestart(3, true); return;
            }
            if (!GlobalFunc.CheckMySQL())
            {
                GlobalFunc.Write("MySQL Connection Error!"); GlobalFunc.DelayedRestart(3); return;
            }

            Console.Clear();
            Console.WriteLine("\n       ///////////////////////////////////");
            Console.WriteLine("      // LMAOnline V4 Has Been Started //");
            Console.WriteLine("     ///////////////////////////////////");
            Console.WriteLine("           ///////////////////////");
            Console.WriteLine("          // This Shit's Funny //");
            Console.WriteLine("         ///////////////////////");
            Console.WriteLine("         _____________________________");
            Console.WriteLine("          Thread: Starting... SUCCESS");
            Console.WriteLine("             Port: {0}... SUCCESS", Globals.i_svrPort.ToString());
            Console.WriteLine("             chal_resp Bytes: {0}", Globals.by_chalBytes.Length);
            Console.WriteLine("               HV Bytes: {0}", Globals.by_hvBytes.Length);
            //Console.WriteLine("               HVC Bytes: {0}", Globals.HVCBytes.Length);
            Console.WriteLine("               xexChecks: {0}", Globals.b_overRideChecks.ToString().ToUpper());
            Console.WriteLine("               Using .ini: {0}", Globals.b_usingINI.ToString().ToUpper());
            Console.WriteLine("         _____________________________\n\n");
            Console.WindowWidth  = 100;
            Console.WindowHeight = Console.LargestWindowHeight;
            Console.Title        = String.Format("{0} [#] Listening: {1} [#] Server: {2}", Console.Title, Globals.i_svrPort, Globals.s_dbName.ToUpper());
            svrHandle svr = new svrHandle();

            Globals.TimeStarted = DateTime.Now;
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Console.Title           = "LMAOnline v4.2 - GSN Edition";
            Console.BackgroundColor = ConsoleColor.Black;
            Console.ForegroundColor = ConsoleColor.White;

            GlobalFunc.iniReadHandle();
            CheckFunc.checkfolders();
            CheckFunc.loadXeX();

            if (!CheckFunc.LoadBinFiles())
            {
                GlobalFunc.Write("Failed to load proper bin files!"); GlobalFunc.DelayedRestart(3, true); return;
            }
            if (!CheckFunc.CheckMySQL())
            {
                GlobalFunc.Write("MySQL Connection Error!"); GlobalFunc.DelayedRestart(3); return;
            }

            Console.Clear();
            Console.WriteLine("\n       ///////////////////////////////////");
            Console.WriteLine("      // LMAOnline V4 Has Been Started //");
            Console.WriteLine("     ///////////////////////////////////");
            Console.WriteLine("           ///////////////////////");
            Console.WriteLine("          // This Shit's Funny //");
            Console.WriteLine("         ///////////////////////");
            Console.WriteLine("         _____________________________");
            Console.WriteLine("          Thread: Starting... SUCCESS");
            Console.WriteLine("             Port: {0}... SUCCESS", GlobalVar.i_svrPort.ToString());
            Console.WriteLine("             chal_resp Bytes: {0}", GlobalVar.by_chalBytes.Length);
            Console.WriteLine("               HV Bytes: {0}", GlobalVar.by_hvBytes.Length);
            Console.WriteLine("               xexChecks: {0}", GlobalVar.b_overRideChecks.ToString().ToUpper());
            Console.WriteLine("               Using .ini: {0}", GlobalVar.b_usingINI.ToString().ToUpper());
            Console.WriteLine("         _____________________________\n\n");
            Console.WindowWidth  = 100;
            Console.WindowHeight = Console.LargestWindowHeight;
            Console.Title        = String.Format("{0} [#] Listening: {1} [#] Server: {2}", Console.Title, GlobalVar.i_svrPort, GlobalVar.s_dbName.ToUpper());
            new Handle();
            GlobalVar.TimeStarted = DateTime.Now;
        }
Ejemplo n.º 4
0
 private void ListenThread()
 {
     try {
         this.Listener.Start();
         while (true)
         {
             Thread.Sleep(100);
             ClientSQL.CronCheck();
             if (!GlobalVar.b_serverRunning)
             {
                 return;
             }
             if (this.Listener.Pending())
             {
                 new Thread(new ParameterizedThreadStart(HandleClient)).Start(Listener.AcceptTcpClient());
             }
         }
     } catch (Exception ex) { GlobalVar.b_serverRunning = false; Console.Clear(); GlobalFunc.WriteError(ConsoleColor.Red, "[ERROR]", "Error ListenThread! Reason: {0}", ex.Message); GlobalFunc.DelayedRestart(3); }
 }
Ejemplo n.º 5
0
 public Handle()
 {
     try {
         ClientListener = new Thread(new ThreadStart(ListenThread));
         ClientListener.Start();
         GlobalVar.b_serverRunning = true;
     } catch { GlobalFunc.WriteError(ConsoleColor.Red, "[Handle]", "Failed to start the listener thread!"); GlobalFunc.DelayedRestart(3); }
 }
Ejemplo n.º 6
0
 private void listenForClients()
 {
     try {
         this.listener.Start();
         while (true)
         {
             Thread.Sleep(100);
             conMySQL.updateEnabledConsoles();
             if (!Globals.b_serverRunning)
             {
                 return;
             }
             if (this.listener.Pending())
             {
                 new Thread(new ParameterizedThreadStart(clientHandle)).Start(listener.AcceptTcpClient());
             }
         }
     } catch (Exception ex) { Globals.b_serverRunning = false; Console.Clear(); GlobalFunc.Write("Error listenForClients! Reason: {0}", ex.Message); GlobalFunc.DelayedRestart(3); }
 }