Exemple #1
0
 private void TimerFired(object sender, ElapsedEventArgs e)
 {
     //if currently logged on
     if (_clientSocket.LoggedOn)
     {
         //if not in target channel
         if (_clientSocket.Channel != UserSettings.TargetChannel)
         {
             //send join
             PacketParser.Send0x0C(_clientSocket);
         }
         //if in target channel
         else
         {
             Builder builder = new Builder();
             builder.InsertNTString(UserSettings.IdleMessage);
             builder.SendPacket(_clientSocket, 0x0e);
         }
     }
     //if not logged on yet
     else
     {
         SocketActions.ReconnectClient(_clientSocket, false, true);
     }
 }
Exemple #2
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);
        }
Exemple #3
0
        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);
        }
Exemple #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);
                }
            }
        }
Exemple #5
0
        internal static void Send0x50(ClientSocket cs)
        {
            byte[] byteOne = new byte[1] {
                1
            };

            SocketActions.SendData(cs, byteOne);

            Builder builder = new Builder();

            builder.InsertInt32(0);
            builder.InsertString("68XI");
            builder.InsertString(ReturnClient());
            builder.InsertInt32(0xD3);
            builder.InsertInt32(0);
            builder.InsertInt32(0);
            builder.InsertInt32(0);
            builder.InsertInt32(0);
            builder.InsertInt32(0);
            builder.InsertNTString("USA");
            builder.InsertNTString("United States");
            builder.SendPacket(cs, 0x50);
        }
Exemple #6
0
 public SocketAction(SocketActions socketActions, string message, bool valid)
 {
     SocketActions = socketActions;
     Message       = message;
     Valid         = valid;
 }
Exemple #7
0
 internal void SendPacket(ClientSocket cs, byte packetId)
 {
     //Debug.Print("sending packet " + packetId.ToString("X2"));
     SocketActions.SendData(cs, FinalizePacket(packetId));
 }
Exemple #8
0
 private void button2_Click(object sender, EventArgs e)
 {
     GeneratedSettings.BotActive = false;
     SocketActions.DisconnectAllClients();
 }