C++ Knowledge required!

05/27/2017 04:58 -Prestige..#1
NOTE : AM NOT A C++ CODER.. SO ALL WHATS HERE IS JUST BASIC KNOWLEDGE AND GUESSING.


Due too am using MeGaMaX server files.. when the HWID packet(0x9001) is sent to the gateway is instantly blocks it & the IP(DUE TO MEGAMAX GATEWAY EXPLOIT FILTER)...

So to solve this.. the filter must not send the HWID packet to the gateway..

In SUPERMIKE source.. the part where it sends login packets and makes 'handshake'
Code:
 if (RemotePackets != null)
                        {
                            foreach (Packet _pck in RemotePackets)
                            {
                                #region Handshake
                                // Handshake
                                if (_pck.Opcode == 0x5000 || _pck.Opcode == 0x9000 )
                                {
                                    Send(true);
                                    continue;
                                }
                                #endregion
                                
                                #region Captcha remover
                                // Captcha remover, trololo!
                                if ((_pck.Opcode == 0x2322) && (FilterMain.Captcha_Remove))
                                {
                                    Packet captchapacket = new Packet(0x6323, false);
                                    captchapacket.WriteAscii(FilterMain.Captcha_Char);
                                    m_RemoteSecurity.Send(captchapacket);
                                    Send(true);
                                    continue;
                                }
                                #endregion

                                #region Login packet
                                // Login packet
                                if (_pck.Opcode == 0xA102)
                                {
                                    // Host
                                    string src_host;
                                    int src_port;
                                    byte res = _pck.ReadUInt8();

here i have to add a function like
Code:
if (_pck.Opcode == 0x9001)
--
IDK this part :confused::confused:
for Example.. Don't send packet to Gateway :D :D 
--

ANOTHER WALKAROUND:incase what am sayin' is totally shit and wrong ..
could the hwid packet be removed from "Remote Packets" ??
05/27/2017 07:03 B1Q#2
just parse the packet and when you're done add continue; at the end of the if body.

and this is C# not C++
05/27/2017 10:10 AceSpace#3
Code:
if (_pck.Opcode == 0x9001)
{
     string hwid = packet.ReadAscii();
     continue; // do not redirect the packet to gateway
}
05/27/2017 10:20 -Prestige..#4
Thank all..
Code:
if (_pck.Opcode != 0x9001)
                                {
                                    m_RemoteSecurity.Send(_pck);
                                    Send(true);
                                }
this made the trick :D

#close
05/27/2017 14:48 -Prestige..#5
Quote:
Originally Posted by B1QB0SS :3 View Post
lol wtf
whaaat ?? :D
in GATEWAYCONTEXT.CS
Code:
 // Reset packet count.
        public void resetPackets(object e)
        {
            this.packetCount = 0;
        }

        void OnReceive_FromClient(IAsyncResult iar)
        {
            lock (m_Lock)
            {
                try
                {
                    int nReceived = m_ClientSocket.EndReceive(iar);

                    if (nReceived != 0)
                    {

                        m_LocalSecurity.Recv(m_LocalBuffer, 0, nReceived);

                        List<Packet> ReceivedPackets = m_LocalSecurity.TransferIncoming();
                        if (ReceivedPackets != null)
                        {
                            foreach (Packet _pck in ReceivedPackets)
                            {
                                // Length of packet
                                this.length = _pck.GetBytes().Length;

                                // Packet count
                                this.packetCount++;

                                #region Packet protection
                                // Packet count
                                if (this.packetCount >= FilterMain.GATEWAY_COUNT)
                                {
                                    // Ignore spam plis
                                    if (FilterMain.ERROR_LOG.Equals("unknown") || FilterMain.ERROR_LOG.Equals("all") || FilterMain.ERROR_LOG.Equals("exploit"))
                                    {
                                        // Write to console log
                                        Console.ForegroundColor = ConsoleColor.DarkYellow;
                                        Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Opcode:{0x" + _pck.Opcode.ToString("X") + "} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                        Console.ResetColor();
                                    }

                                    // IF BAN IP?
                                    if (FilterMain.PACKET_METHOD == "ban")
                                    {
                                        if (!FilterMain.ban_list.Contains(this.ip))
                                        {
                                            // Add ban
                                            FilterMain.ban_list.Add(this.ip);

                                            try
                                            {
                                                // File exist, write to it.
                                                System.IO.StreamWriter file = new System.IO.StreamWriter("config/blacklist.txt", true);
                                                if (this.ip.Length > 0)
                                                {
                                                    file.WriteLine(this.ip + "\n");
                                                }
                                                file.Close();

                                                // Ban log(For checking random bans)
                                                System.IO.StreamWriter banlog = new System.IO.StreamWriter("logs/banlog.txt", true);
                                                banlog.WriteLine("[" + DateTime.UtcNow + "] {" + module_name + "} Banned {" + this.ip + "} Reason: {HIGH PPS}\n");
                                                banlog.Close();
                                            }
                                            catch { }

                                            // Inform?
                                            Console.ForegroundColor = ConsoleColor.DarkMagenta;
                                            Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Opcode:{0x" + _pck.Opcode.ToString("X") + "} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                            Console.ResetColor();
                                        }
                                    }

                                    // Disconnect
                                    this.DisconnectModuleSocket();
                                    return;
                                }
                                #endregion

                                #region Logging system
                                // LEGIT OPCODES
                                if (FilterMain.ERROR_LOG.Equals("legit") || FilterMain.ERROR_LOG.Equals("all"))
                                {
                                    if (FilterMain.Opcodes.ContainsKey(Convert.ToUInt16(_pck.Opcode)))
                                    {
                                        // ALLOWED OPCODE
                                        string name = FilterMain.Opcodes[Convert.ToUInt16(_pck.Opcode)];
                                        Console.ForegroundColor = ConsoleColor.Green;
                                        Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Opcode:{" + name + "} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                        Console.ResetColor();
                                    }
                                }

                                // EXPLOIT OPCODES
                                else if (FilterMain.ERROR_LOG.Equals("exploit") || FilterMain.ERROR_LOG.Equals("all"))
                                {
                                    if (FilterMain.BAD_Opcodes.ContainsKey(Convert.ToUInt16(_pck.Opcode)))
                                    {
                                        // SENT EXPLOITS
                                        string name = FilterMain.BAD_Opcodes[Convert.ToUInt16(_pck.Opcode)];
                                        Console.ForegroundColor = ConsoleColor.DarkYellow;
                                        Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Opcode:{0x" + _pck.Opcode.ToString("X") + "} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                        Console.ResetColor();
                                    }
                                }

                                // UNKNOWN OPCODES
                                else if (FilterMain.ERROR_LOG.Equals("unknown") || FilterMain.ERROR_LOG.Equals("all"))
                                {
                                    if (!FilterMain.Opcodes.ContainsKey(Convert.ToUInt16(_pck.Opcode)) && !FilterMain.BAD_Opcodes.ContainsKey(Convert.ToUInt16(_pck.Opcode)))
                                    {
                                        // SENT UNKNOWN SHIT
                                        Console.ForegroundColor = ConsoleColor.DarkRed;
                                        Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Opcode:{0x" + _pck.Opcode.ToString("X") + "} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                        Console.ResetColor();
                                    }
                                }
                                #endregion

                                #region Store system
                                // Store system
                                if (FilterMain.logging)
                                {
                                    if (!FilterMain.Opcodes.ContainsKey(Convert.ToUInt16(_pck.Opcode)) && !FilterMain.BAD_Opcodes.ContainsKey(Convert.ToUInt16(_pck.Opcode)))
                                    {
                                        try
                                        {
                                            // Prevent opening errors.
                                            //FilterMain.unknown_list.Add("0x" + _pck.Opcode.ToString("X"));

                                            // Write/Create w/e
                                            System.IO.StreamWriter file = new System.IO.StreamWriter("logs/unknown.txt", true);
                                            file.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Opcode:{0x" + _pck.Opcode.ToString("X") + "} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                            file.Close();
                                        }
                                        catch { }

                                        // DISCONNECT
                                        if (FilterMain.UNKNOWN_METHOD.Equals("disconnect"))
                                        {
                                            if (FilterMain.ERROR_LOG.Equals("unknown") || FilterMain.ERROR_LOG.Equals("all"))
                                            {
                                                // Inform?
                                                Console.ForegroundColor = ConsoleColor.DarkRed;
                                                Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Opcode:{0x" + _pck.Opcode.ToString("X") + "} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                                Console.ResetColor();
                                            }

                                            // Disconnect
                                            this.DisconnectModuleSocket();
                                            continue;
                                        }

                                        // BAN
                                        else if (FilterMain.UNKNOWN_METHOD.Equals("ban"))
                                        {
                                            if (!FilterMain.ban_list.Contains(this.ip))
                                            {
                                                // Add ban
                                                FilterMain.ban_list.Add(this.ip);

                                                try {
                                                    // File exist, write to it.
                                                    System.IO.StreamWriter file = new System.IO.StreamWriter("config/blacklist.txt", true);
                                                    if (this.ip.Length > 0)
                                                    {
                                                        file.WriteLine(this.ip + "\n");
                                                    }
                                                    file.Close();

                                                    // Ban log(For checking random bans)       System.IO.StreamWriter banlog = new System.IO.StreamWriter("logs/banlog.txt", true);
                                                    banlog.WriteLine("[" + DateTime.UtcNow + "] {" + module_name + "} Banned {" + this.ip + "} Reason: {UNKNOWN PACKET}\n");
                                                    banlog.Close();
                                                }
                                                catch { }

                                                // Inform?
                                                Console.ForegroundColor = ConsoleColor.DarkMagenta;
                                                Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Opcode:{0x" + _pck.Opcode.ToString("X") + "} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                                Console.ResetColor();

                                                // Disconnect
                                                this.DisconnectModuleSocket();
                                                return;
                                            }
                                        }
                                    }
                                }
                                #endregion

                                #region Flood fix for 0x2001
                                // Filter against flood
                                if (_pck.Opcode == 0x2001)
                                {
                                    // Recieve
                                    this.DoRecvFromServer();

                                    // K-guard
                                    if (this.length != 12)
                                    {
                                        Console.WriteLine("Debug #3");
                                        this.DisconnectModuleSocket();
                                        return;
                                    }

                                    // Continue
                                    continue;
                                }
                                #endregion

                                #region K-guard shits
                                if (_pck.Opcode == 0x2002)
                                {
                                    if (this.length != 0)
                                    {
                                        Console.WriteLine("Debug #2");
                                        this.DisconnectModuleSocket();
                                        return;
                                    }
                                }
                                #endregion

                                #region Fake playercount
                                // Server list
                                if (_pck.Opcode == 0x6101)
                                {
                                    // Block server status tools? :3
                                    if (FilterMain.block_status && this.patch_sent != 1)
                                    {
                                        // Inform
                                        Console.ForegroundColor = ConsoleColor.DarkYellow;
                                        Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Reason:{STATUS TOOL} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                        Console.ResetColor();

                                        // Disconnect
                                        this.DisconnectModuleSocket();
                                        return;
                                    }

                                    // Register
                                    this.sent_list = 1;

                                    // K-guard shits
                                    if (this.length != 0)
                                    {
                                        Console.WriteLine("Debug #1");
                                        this.DisconnectModuleSocket();
                                        return;
                                    }

                                    // Fake players
                                    if (FilterMain.ENABLED && (FilterMain.FAKE_PLAYERS > 0))
                                    {
                                        // Current players
                                        FilterMain.cur_players = (FilterMain.shard_players + FilterMain.FAKE_PLAYERS);

                                        // Fancy fix for sro players :D
                                        if (FilterMain.cur_players >= FilterMain.MAX_PLAYERS)
                                        {
                                            FilterMain.cur_players = FilterMain.MAX_PLAYERS;
                                        }

                                        FilterMain.max_players = FilterMain.MAX_PLAYERS;
                                        FilterMain.status = 1;

                                        Packet response1 = new Packet(0xA101, true);
                                        response1.WriteUInt8(0x01); //flag
                                        response1.WriteUInt8(0x14); //unk
                                        response1.WriteAscii("SRO_Vietnam_TestLocal [F] 0");
                                        response1.WriteUInt8(0x00); //flag

                                        response1.WriteUInt8(0x01); //flag
                                        response1.WriteUInt16(FilterMain.ShardID); //shardID
                                        response1.WriteAscii(FilterMain.ServerName); //name
                                        response1.WriteUInt16(FilterMain.cur_players); //online
                                        response1.WriteUInt16(FilterMain.MAX_PLAYERS); //maxplayers
                                        response1.WriteUInt8(0x01); //Status
                                        response1.WriteUInt8(0x14); //unk
                                        response1.WriteUInt8(0x00); //flag

                                        // Send fake packet :3
                                        m_LocalSecurity.Send(response1);
                                        Send(false);
                                        continue;
                                    }
                                }
                                #endregion

                                #region ID RESPONSE // Exploit fix
                                if (_pck.Opcode == 0x6100)
                                {
                                    this.sent_id = 1;
                                }
                                #endregion

                                #region Patch response // Exploit fix
                                if (_pck.Opcode == 0x6106)
                                {
                                    this.patch_sent = 1;
                                }
                                #endregion

                                #region HARDWARE PACKET OPCODE
                                if (_pck.Opcode == 0x9001 && (FilterMain.PCLIMIT > 0))
                                {
                                    // User HWID
                                    this.hwid = regex.Replace(_pck.ReadAscii(), string.Empty);
                                }
                                #endregion

                                #region Login packet
                                // Login packet
                                if (_pck.Opcode == 0x6102)
                                {
                                    // Check shit
                                    byte locale = _pck.ReadUInt8();
                                    this.user_id = _pck.ReadAscii().ToLower();
                                    this.user_pw = _pck.ReadAscii();
                                    ushort ServerID = _pck.ReadUInt16();

                                    #region New anti exploit(gateway)
                                    // Check news
                                    if (this.sent_list != 1 || this.sent_id != 1 && !(FilterMain.USER_ID.Contains(this.user_id)))
                                    {
                                        // Logging
                                        if (FilterMain.ERROR_LOG.Equals("unknown") || FilterMain.ERROR_LOG.Equals("all") || FilterMain.ERROR_LOG.Equals("exploit"))
                                        {
                                            // Inform
                                            Console.ForegroundColor = ConsoleColor.DarkYellow;
                                            Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Reason:{WEIRD BEHAVIOUR} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                            Console.ResetColor();
                                        }

                                        // Byebye
                                        this.DisconnectModuleSocket();
                                        return;
                                    }
                                    #endregion

                                    #region Pioneer shit
                                    // LOGIN LOG
                                    if (FilterMain.PIONEER)
                                    {
                                        // Ban log(For checking random bans)
                                        System.IO.StreamWriter userlog = new System.IO.StreamWriter("logs/login.txt", true);
                                        userlog.WriteLine("[" + DateTime.UtcNow + "] StrUserID: {" + this.user_id + "} IP: {" + this.ip + "}\n");
                                        userlog.Close();
                                    }
                                    #endregion

                                    #region GM STUFF
                                    // GM ONLY LOGIN
                                    if (FilterMain.GM_LOGIN && !(FilterMain.GM_ACCOUNT.Contains(this.user_id)))
                                    {
                                        // Disconnect
                                        this.DisconnectModuleSocket();
                                        return;
                                    }

                                    // GM PRIV IP
                                    if (FilterMain.PROXY.Contains(FilterMain.AGENT_IP) && FilterMain.GM_ACCOUNT.Contains(this.user_id))
                                    {
                                        // If not allowed ip.
                                        if (FilterMain.PRIV_IP.Count() > 0)
                                        {
                                            if (!FilterMain.PRIV_IP.Contains(this.ip))
                                            {
                                                // Logging
                                                Console.ForegroundColor = ConsoleColor.White;
                                                Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Reason:{PRIV_IP} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                                Console.ResetColor();

                                                // Disconnect
                                                this.DisconnectModuleSocket();
                                                return;
                                            }
                                        }
                                    }
                                    #endregion

                                    #region IP LIMIT SHIT
                                    // IP LIMIT ERROR MESSAGE
                                    if ((FilterMain.IPLIMIT > 0) && !(FilterMain.LIMIT_BYPASS.Contains(this.user_id)))
                                    {
                                        if (FilterMain.CAFELIMIT > 0 && (FilterMain.cafe_list.Contains(this.ip)))
                                        {
                                            // COUNT +1 BECAUSE ALWAYS 1 LESS
                                            if (ip_count(this.ip) > FilterMain.CAFELIMIT)
                                            {
                                                // Send client ERROR
                                                Packet new_packet = new Packet(0xA102, false);
                                                new_packet.WriteUInt8(0x02);
                                                new_packet.WriteUInt8(8); // ip limit error
                                                m_LocalSecurity.Send(new_packet);
                                                Send(false);

                                                // Disconnect
                                                this.DisconnectModuleSocket();

                                                // Continue
                                                return;
                                            }
                                        }
                                        else
                                        {
                                            // COUNT +1 BECAUSE ALWAYS 1 LESS
                                            if (ip_count(this.ip) > FilterMain.IPLIMIT)
                                            {
                                                // Send client ERROR
                                                Packet new_packet = new Packet(0xA102, false);
                                                new_packet.WriteUInt8(0x02);
                                                new_packet.WriteUInt8(8); // ip limit error
                                                m_LocalSecurity.Send(new_packet);
                                                Send(false);

                                                // Disconnect
                                                this.DisconnectModuleSocket();

                                                // Continue
                                                return;
                                            }
                                        }
                                    }
                                    #endregion

                                    #region PC LIMIT SHIT
                                    if (FilterMain.PCLIMIT > 0 &&!(FilterMain.LIMIT_BYPASS.Contains(this.user_id)))
                                    {
                                        // Check length and if not null.
                                        if (this.hwid == null)
                                        {
                                            // Debug
                                            Console.BackgroundColor = ConsoleColor.Red;
                                            Console.ForegroundColor = ConsoleColor.White;
                                            Console.WriteLine(module_name + " HWID was never sent from CLIENT->SUPERMIKE");
                                            Console.ResetColor();

                                            // Send client error
                                            Packet new_packet = new Packet(0xA102, false);
                                            new_packet.WriteUInt8(0x02);
                                            new_packet.WriteUInt8(12); // PC LIMIT ERROR
                                            m_LocalSecurity.Send(new_packet);
                                            Send(false);

                                            // Disconnect
                                            this.DisconnectModuleSocket();
                                            return;
                                        }

                                        // Check HWID LIMIT
                                        if (hwid_count(this.hwid) > FilterMain.PCLIMIT)
                                        {
                                            // Send client error
                                            Packet new_packet = new Packet(0xA102, false);
                                            new_packet.WriteUInt8(0x02);
                                            new_packet.WriteUInt8(10); // PC LIMIT ERROR
                                            m_LocalSecurity.Send(new_packet);
                                            Send(false);

                                            // Disconnect
                                            this.DisconnectModuleSocket();
                                            return;
                                        }

                                        // Advanced system? :D
                                        if (FilterMain.STORE_HWID && (FilterMain.DB))
                                        {
                                            try
                                            {
                                                SqlDataReader reader = sqlCon.Return("_HWIDCHECK", new SqlParameter("@StrUserID", Program.Plis(this.user_id)), new SqlParameter("@HWID", this.hwid));
                                                reader.Read();
                                                int value = reader.GetInt32(0);

                                                // SQL result
                                                if (value != 1)
                                                {
                                                    // Send client error
                                                    Packet new_packet = new Packet(0xA102, false);
                                                    new_packet.WriteUInt8(0x02);
                                                    new_packet.WriteUInt8(11); // PC LIMIT ERROR
                                                    m_LocalSecurity.Send(new_packet);
                                                    Send(false);

                                                    // Close reader
                                                    reader.Close();

                                                    // Disconnect
                                                    this.DisconnectModuleSocket();
                                                    return;
                                                }
                                            }
                                            catch {
                                                // Debug
                                                Console.BackgroundColor = ConsoleColor.Red;
                                                Console.ForegroundColor = ConsoleColor.White;
                                                Console.WriteLine("SQL error, lel :D");
                                                Console.ResetColor();

                                                // Send client error
                                                Packet new_packet = new Packet(0xA102, false);
                                                new_packet.WriteUInt8(0x02);
                                                new_packet.WriteUInt8(11); // PC LIMIT ERROR
                                                m_LocalSecurity.Send(new_packet);
                                                Send(false);

                                                // Disconnect
                                                this.DisconnectModuleSocket();
                                                return;
                                            }
                                        }

                                        // Avoid disconnects   [MENTION=352767]GateWay[/MENTION]
                                        try
                                        {
                                            // Add user to dictionary list, simple enough? :D
                                            if (!FilterMain.hwid_user.ContainsKey(this.user_id))
                                            {
                                                FilterMain.hwid_user.Add(this.user_id, this.hwid);
                                            }
                                            else
                                            {
                                                FilterMain.hwid_user.Remove(this.user_id);
                                                FilterMain.hwid_user.Add(this.user_id, this.hwid);
                                            }
                                        }
                                        catch {
                                            // Debug
                                            Console.BackgroundColor = ConsoleColor.Red;
                                            Console.ForegroundColor = ConsoleColor.White;
                                            Console.WriteLine("Dictionary error, lel :D");
                                            Console.ResetColor();
                                        }
                                    }
                                    #endregion

                                    #region ANTI BOT STUFF
                                    // Anti bot stuff, nobody would understand.
                                    if (locale == 51 && (FilterMain.BOT_DETECTION))
                                    {
                                        Packet login = new Packet(0x6102, true);
                                        login.WriteUInt8(22);
                                        login.WriteAscii(this.user_id);
                                        login.WriteAscii(this.user_pw);
                                        login.WriteUInt16(ServerID);
                                        m_RemoteSecurity.Send(login);
                                        Send(true);
                                        continue;
                                    }
                                    #endregion
                                }
                                #endregion

                                #region BlockOPCODES and shit
                                // BLOCK OPCODES
                                if (FilterMain.BAD_Opcodes.ContainsKey(Convert.ToUInt16(_pck.Opcode)))
                                {
                                    // Ban exploiters.
                                    if (FilterMain.EXPLOIT_METHOD == "ban")
                                    {
                                        if (!FilterMain.ban_list.Contains(this.ip))
                                        {
                                            // Add ban
                                            FilterMain.ban_list.Add(this.ip);

                                            try
                                            {
                                                // File exist, write to it.
                                                System.IO.StreamWriter file = new System.IO.StreamWriter("config/blacklist.txt", true);
                                                if (this.ip.Length > 0)
                                                {
                                                    file.WriteLine(this.ip + "\n");
                                                }
                                                file.Close();

                                                // Ban log(For checking random bans)
                                                System.IO.StreamWriter banlog = new System.IO.StreamWriter("logs/banlog.txt", true);
                                                banlog.WriteLine("[" + DateTime.UtcNow + "] {" + module_name + "} Banned {" + this.ip + "} Reason: {EXPLOITING}\n");
                                                banlog.Close();
                                            }
                                            catch { }

                                            // Inform?
                                            Console.ForegroundColor = ConsoleColor.DarkMagenta;
                                            Console.WriteLine("[" + DateTime.UtcNow + "][" + module_name + "] IP:{" + this.ip + "} User:{" + this.user_id + "} Opcode:{0x" + _pck.Opcode.ToString("X") + "} Bytes:{" + this.length + "} Packet_c{" + this.packetCount + "}");
                                            Console.ResetColor();
                                        }
                                    }

                                    // Disconnect
                                    this.DisconnectModuleSocket();
                                    return;
                                }
                                #endregion

                                #region Ignore handshake 
                                // Ignore handshake
                                if (_pck.Opcode == 0x5000 || _pck.Opcode == 0x9000)
                                {
                                    Send(false);
                                    continue;
                                }
                                #endregion

                                #region Clear logs
                                // Clear logs
                                if (m_LastPackets.Count > 100)
                                {
                                    m_LastPackets.Clear();
                                }
                                #endregion

                                // No clue
                                Packet CopyOfPacket = _pck;
                                m_LastPackets.Enqueue(CopyOfPacket);

                                // Send packets
                                    m_RemoteSecurity.Send(_pck);
                                    Send(true);

                            }
                        }

                    }

check down there...

Code:
               // Send packets
                                    m_RemoteSecurity.Send(_pck);
                                    Send(true);
just changed it to
Code:
                                // Send packets
                                if (_pck.Opcode != 0x9001)
                                {
                                    m_RemoteSecurity.Send(_pck);
                                    Send(true);
                                }
made exactly what i needed :/
so far so good :D
05/27/2017 18:10 Spidy.#6
#Closed