Register for your free account! | Forgot your password?

You last visited: Today at 01:30

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



C++ Knowledge required!

Discussion on C++ Knowledge required! within the SRO Private Server forum part of the Silkroad Online category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: May 2017
Posts: 108
Received Thanks: 17
Question C++ Knowledge required!

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" ??
-Prestige.. is offline  
Old 05/27/2017, 07:03   #2
 
B1Q's Avatar
 
elite*gold: 350
Join Date: Aug 2015
Posts: 2,008
Received Thanks: 1,193
just parse the packet and when you're done add continue; at the end of the if body.

and this is C# not C++
B1Q is offline  
Old 05/27/2017, 10:10   #3

 
AceSpace's Avatar
 
elite*gold: 21
Join Date: Mar 2011
Posts: 1,613
Received Thanks: 1,122
Code:
if (_pck.Opcode == 0x9001)
{
     string hwid = packet.ReadAscii();
     continue; // do not redirect the packet to gateway
}
AceSpace is offline  
Thanks
1 User
Old 05/27/2017, 10:20   #4
 
elite*gold: 0
Join Date: May 2017
Posts: 108
Received Thanks: 17
Thank all..
Code:
if (_pck.Opcode != 0x9001)
                                {
                                    m_RemoteSecurity.Send(_pck);
                                    Send(true);
                                }
this made the trick

#close
-Prestige.. is offline  
Old 05/27/2017, 14:48   #5
 
elite*gold: 0
Join Date: May 2017
Posts: 108
Received Thanks: 17
Quote:
Originally Posted by B1QB0SS :3 View Post
lol wtf
whaaat ??
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
-Prestige.. is offline  
Old 05/27/2017, 18:10   #6


 
Spidy.'s Avatar
 
elite*gold: 1
Join Date: Oct 2012
Posts: 8,423
Received Thanks: 3,242
#Closed
Spidy. is offline  
Closed Thread


Similar Threads Similar Threads
Hacks knowledge exchange
09/04/2008 - Cabal Online - 14 Replies
CABAL(EU) SERVER: I have: 1. One hit kill(with exp) WITHOUT SPEEDHACK AND DC 2. Unlimited defense ... also have other hacks, but only in pm. I want: ALZ and item dupe.
This is what i Offer(hacking Knowledge)
02/24/2008 - Cabal Online - 29 Replies
Ok fellas many of you dont know me. but i am a very known guy in dif gms cause of my hacking contribution in some dif ways Like 2moons GB and others. I know Gameguard and Xtrap like the palm of my hand thumbs up. Now i got interested in Cabal (Currently plying US server). I hve all the tools neded to get hcks up and running (of evry type) but since i dont know game basics yet and its logic this might slow me down.. So if anyone is willing to tut me up on basics stuff and th...
Request of: Knowledge / AutoDropper
11/23/2007 - Conquer Online 2 - 2 Replies
Can anyone help me make an autodropper for mining? Similar to automining but it will drop all the ores it can with a push of a button? Such as pressing the button, and macro/(auto here) will start and make all items in the inventory drop? I have seen the Trading Super Fast macro thingie, it seems like it CAN work in the same way but the part when it presses down to scroll the trade window makes the miner move so if anyone can also let me know how to remove that one click scrolling down ,...
put your knowledge or gm code here
07/17/2007 - Conquer Online 2 - 0 Replies
Is there any possible way to get the code gm`s use if so im sure EVERYONE would like it if not just close this
Anyone with pretty GOOD knowledge of AutoIt look!
03/04/2006 - Conquer Online 2 - 2 Replies
1.Ok as obvious, im an AutoIt programmer. As you guys know i did say that i was making a tao bot, but i thought i knew more about coding than i did, and i couldnt do the advnaced stuff. Anyways, to the point... I need 1 person that knows quite a bit about AutoIt coding. Together we shall make my idea come to life, the idea will include about everything that is macro related. Message me PLEASE if you are interested!!!! 2.Second of all, i know it might be possible to add ADVANCED+++ coding...



All times are GMT +1. The time now is 01:31.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.