Ejemplo n.º 1
0
        public FserverManager(string jsonpath)
        {
            if (File.Exists(jsonpath))
            {
                Print.Success(jsonpath + " Found");
            }
            else
            {
                Print.Error(jsonpath + "Not found", true);
            }

            this.jsonpath = jsonpath;
        }
Ejemplo n.º 2
0
 private void Init()
 {
     try
     {
         Print.Info(Tag + ": Initialzing Socket");
         socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
         socket.Bind(new IPEndPoint(IPAddress.Any, Port));
         Print.Success(Tag + ": Socket Bound to Port " + Port);
         ConnectToMasterServer();
         Send(PacketTypes.HeartBeat_Flat);
         Thread.Sleep(1000);
         Send(PacketTypes.HeartBeat);
     }
     catch (Exception e) { Print.Error(e.Message); }
 }
Ejemplo n.º 3
0
 private void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e)
 {
     try
     {
         iSClosing = true;
         newsock.Close();
         socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
         socket.Bind(new IPEndPoint(IPAddress.Any, Port));
         socket.Connect(masterserver);
         Send(PacketTypes.HeartBeat_Flat);
         Print.Success("Closing Server with flatline");
         Print.Info("\nPress any key to exit");
         Console.ReadKey();
         Environment.Exit(0);
     }
     catch (Exception x) { Print.Error(x.Message); Environment.Exit(0); }
 }
Ejemplo n.º 4
0
 public void Init()
 {
     Print.Info("Parsing " + this.jsonpath + "..");
     try
     {
         FServers = JsonConvert.DeserializeObject <List <FServer> >(File.ReadAllText(this.jsonpath));
         string servers = "[";
         foreach (FServer s in FServers)
         {
             servers += "^2" + s.Tag + "^7:^2" + s.Port + "^7,";
         }
         Print.Success(this.jsonpath + " loaded with ^2" + FServers.Count + " ^7entries " + servers.Substring(0, servers.Length - 1) + "]");
     }
     catch (Exception e)
     {
         Print.Error(e.Message);
     }
 }
Ejemplo n.º 5
0
        public async void DataCallBack(IAsyncResult result)
        {
            byte[] receivedata = new byte[3000];
            receivedata = (byte[])result.AsyncState;

            string respon = Encoding.Default.GetString(receivedata).Replace('\0', ' ').Replace('ÿ', ' ').Trim();

            if (respon != "")
            {
                Print.Success("Response: " + respon);
            }
            //getstatus -1051696178
            //statusResponse\g_compassShowEnemies\0\g_gametype\war\gamename\Call of Duty 4\mapname\mp_backlot\protocol\6\shortversion\1.7\sv_allowAnonymous\0\sv_disableClientConsole\0\sv_floodprotect\4\sv_hostname\1234\sv_maxclients\24\sv_maxPing\600\sv_maxRate\25000\sv_minPing\0\sv_privateClients\0\sv_punkbuster\0\sv_pure\1\sv_voice\1\ui_maxclients\32\challenge\-1051696178\pswrd\0\mod\0

            if (respon.Contains("getstatus"))
            {
                nonce = respon.Replace("getstatus", "").Trim();
                Print.Success(Tag + ": Nonce detected @" + nonce);

                ConnectToMasterAuthServer();

                Print.Info(Tag + ": Sending Spoofed IpAuthorizePacket to MasterAuthServer@" + masterauthserver.Address + ":" + masterauthserver.Port);
                Send(PacketTypes.IpAuthorizePacket());

                ConnectToMasterServer();
                Print.Info(Tag + ": Sending Spoofed statusResponse to " + "MasterServer@" + masterserver.Address + ":" + masterserver.Port);
                Send(PacketTypes.Convert(GenerateServerStatusString()));

                Print.Info("\n\t\t\t\t" + Tag + " ^2Registered To MasterServer^7\n");
                await WaitForClient();

                return;
            }

            receivedata = new byte[3000];
            if (socket.Connected)
            {
                socket.BeginReceive(receivedata, 0, receivedata.Length, SocketFlags.None, new AsyncCallback(DataCallBack), receivedata);
            }
        }
Ejemplo n.º 6
0
 private void ConnectToMasterAuthServer()
 {
     Print.Success(Tag + ": Connecting to  MasterAuthServer@" + masterauthserver.Address + ":" + masterauthserver.Port);
     socket.Connect(masterauthserver);
     Print.Success(Tag + ": Connected to  MasterAuthServer@" + masterauthserver.Address + ":" + masterauthserver.Port);
 }