Esempio n. 1
0
        private static void Parse0x51(ClientSocket cs, Receiver receiver)
        {
            Int32  keyResponse       = receiver.GetInt32();
            string additionalMessage = receiver.GetNTString();

            switch (keyResponse)
            {
            case 0x000:
                //removes plug
                Builder builder = new Builder();
                builder.InsertNonNTString("tenb");
                builder.SendPacket(cs, 0x14);
                //determine what type of name is being used and send packet accordingly
                SendLogon(cs);
                return;

            case 0x100:
                Chat.Add(Color.White, "Old game version! (verbyte)" + NewLine);
                return;

            case 0x101:
                Chat.Add(Color.White, "Invalid game version!" + NewLine);
                CDKeys.WriteBadCDKey(cs.CdKey, " game-version");
                cs.CDKeyBlacklisted = true;
                return;

            case 0x102:
                Chat.Add(Color.White, "Must downgrade game version!" + NewLine);
                return;

            case 0x200:
                Chat.Add(Color.White, "Invalid cdkey!" + NewLine);
                CDKeys.WriteBadCDKey(cs.CdKey, " invalid");
                cs.CDKeyBlacklisted = true;
                break;

            case 0x201:
                Chat.Add(Color.White, "Key in use by: " + additionalMessage + NewLine);
                break;

            case 0x202:
                Chat.Add(Color.White, "Banned cdkey!" + NewLine);
                CDKeys.WriteBadCDKey(cs.CdKey, " banned");
                cs.CDKeyBlacklisted = true;
                break;

            case 0x203:
                Chat.Add(Color.White, "Cdkey meant for another product!" + NewLine);
                break;

            default:
                Chat.Add(Color.Yellow, "Unknown 0x51 response. sadface.com" + NewLine);
                break;
            }

            SocketActions.ReconnectClient(cs, true, false);
        }
Esempio n. 2
0
File: Form1.cs Progetto: inrg/KryX2
 private void Form1_Load(object sender, EventArgs e)
 {
     UserSettings.GenerateSettings();
     GeneratedSettings.SetFilePaths();
     GeneratedSettings.SetHashFiles();
     Chat.SetRichTextBox(this.chatBox);
     Proxies.ImportProxylist();
     CDKeys.ImportCdKeys();
     ConnectedBar.Reference(this.labelConnectedForecolor);
 }
Esempio n. 3
0
File: Form1.cs Progetto: inrg/KryX2
        private void button1_Click(object sender, EventArgs e)
        {
            //no keys, dont proceed

            int keyCount   = CDKeys.ReturnListCount();
            int proxyCount = Proxies.ReturnListCount();

            if (keyCount == 0)
            {
                Chat.Add(Color.Yellow, "No cdkeys. Connection stopped." + Environment.NewLine);
                return;
            }
            if (proxyCount == 0)
            {
                Chat.Add(Color.Yellow, "No proxies. Connection stopped." + Environment.NewLine);
                return;
            }

            //determine max number of socks allowed
            int socks      = UserSettings.MaxClients;
            int perProxy   = UserSettings.ClientsPerProxy;
            int maxSockets = (perProxy * proxyCount);

            if (socks > maxSockets)
            {
                socks = maxSockets;
            }

            if (socks > keyCount)
            {
                socks = keyCount;
            }

            if (socks == 0)
            {
                Chat.Add(Color.Yellow, "Bot count cannot be zero. Connection stopped." + Environment.NewLine);
                return;
            }

            if (!GeneratedSettings.ConstructHeaders(UserSettings.ServerName))
            {
                Chat.Add(Color.Yellow, "Could not validate server. Connection stopped." + Environment.NewLine);
                return;
            }

            GeneratedSettings.BotActive = true;

            ConnectedBar.SetTotalSockets(socks);

            Chat.Add(Color.White, "Loading " + socks + " sockets." + Environment.NewLine);

            SocketActions.SpawnAndConnectClients(socks);
        }
Esempio n. 4
0
        private static void Parse0x0F(ClientSocket cs, Receiver receiver)
        {
            Int32 eventId = receiver.GetInt32();

            //Int32 flags = receiver.GetInt32();
            //Int32 ping = receiver.GetInt32();
            //receiver.SkipLength(12); //ip, acc#, regauth
            receiver.SkipLength(20); //^^ skipping all this

            string username, message;

            //bot joined channel
            if (eventId == 0x07)
            {
                receiver.GetNTString();
                //get channel joined
                message = receiver.GetNTString();
                //if channel is the void then key is bad.
                //first join, check if voided
                if (cs.FirstJoin)
                {
                    cs.FirstJoin = false;
                    //skip username
                    if (message == "The Void")
                    {
                        cs.CDKeyBlacklisted = true;
                        CDKeys.WriteBadCDKey(cs.CdKey, " voided");
                        //reconnect
                        SocketActions.ReconnectClient(cs, true, false);
                    }
                }
                //not first join
                else
                {
                    cs.Channel = message.ToLower();
                }
            }

            //if a whisper or talk check if from master
            if (eventId == 0x04 || eventId == 0x05)
            {
                username = receiver.GetNTString();
                if (username.ToLower().Equals(UserSettings.MasterName))
                {
                    message = receiver.GetNTString();
                    CommandBots(cs, message);
                }
            }
        }
Esempio n. 5
0
        internal static void ReconnectClient(ClientSocket cs, bool newCdKey = false, bool newProxy = false)
        {
            if (GeneratedSettings.BotActive == false)
            {
                return;
            }

            //always use new proxy, probably safer/more reliable for all clients to load
            newProxy = true;

            DisconnectClient(cs);

            //if key was marked as bad get a new one no matter what
            if (cs.CDKeyBlacklisted)
            {
                newCdKey            = true;
                cs.CDKeyBlacklisted = false;
            }

            if (newCdKey)
            {
                if (!CDKeys.CycleCDKey(cs))
                {
                    cs.Active = false;
                    Debug.Print("CDKeys are out");
                    return;
                }
            }

            if (newProxy)
            {
                if (!Proxies.CycleProxy(cs))
                {
                    cs.Active = false;
                    Debug.Print("Proxies are out");
                    Chat.Add(Color.Red, "Proxies are out" + Environment.NewLine);
                    return;
                }
            }

            RelayConnectClient(cs);
            //cs.ConnectClient(); /r// semaphore
        }
Esempio n. 6
0
        private static bool CreateNewClient()
        {
            ClientSocket cs = new ClientSocket();

            if (!Proxies.CycleProxy(cs))
            {
                Chat.Add(Color.Yellow, "Proxy is null" + Environment.NewLine);
                return(false);
            } //exit method due to no more proxies being available


            //set cdkey
            if (!CDKeys.CycleCDKey(cs))
            {
                Chat.Add(Color.Yellow, "CDKey is null" + Environment.NewLine);
                return(false);
            }

            cs.Active = true;
            _clientSockets.Add(cs);
            return(true);
        }