Register for your free account! | Forgot your password?

You last visited: Today at 18:23

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

Advertisement



unable to send packets

Discussion on unable to send packets within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
evolution007's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 284
Received Thanks: 90
unable to send packets

hello. i use srProxy to send packets to my client but when i use srproxy i cant launch client. i get this error:

settings for loader. redirect ip : 127.0.0.1:15779
i thought maybe if i modify the source of my code i will be able to not use srproxy but i was wrong. source code:
Code:
using System;
using System.Collections;
using System.Text;
using System.Net;
using System.Net.Sockets;

namespace SendNotice
{
    class Program
    {
        class ConnectedSocket
        {
            private Socket winSock;

            public void Connect(string IP, int Port)
            {
                winSock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
                IPAddress IPA = IPAddress.Parse(IP);
                IPEndPoint IPEP = new IPEndPoint(IPA, Port);
                try
                {
                    winSock.Connect(IPEP);
                }
                catch (SocketException se)
                {
                    Console.WriteLine(se.Message);
                }
            }

            public void Send(byte[] data)
            {
                if (winSock.Connected)
                    winSock.Send(data);
            }
        }

        private static ConnectedSocket Socket = new ConnectedSocket();

        static void Main(string[] args)
        {
            Socket.Connect("127.0.0.1", 9000);

            while (true)
            {
                Console.Write("Notice: ");
                string message = Console.ReadLine();
                Console.WriteLine("");
                SendNotice(message);
            }
        }

        private static void SendNotice(string notice)
        {
            PacketWriter writer = new PacketWriter(0x3026, 1); // OpCode 0x3026, Security (2 -> to server, 1 -> to client) for SrProxy
            writer.AppendByte(7); //Chat type
            writer.AppendUnicodeString(notice); //Message
            Socket.Send(writer.GetPacket());
        }
    }

    class PacketWriter
    {
        private ArrayList Data;
        private ArrayList Packet;
        private int Size;

        public PacketWriter(ushort opcode, byte security)
        {
            Size = 0;
            Data = new ArrayList();
            Packet = new ArrayList();

            Data.AddRange(BitConverter.GetBytes(opcode));
            Data.Add((byte)security);
            Data.Add((byte)0);
        }

        public byte[] GetPacket()
        {
            Packet.AddRange(BitConverter.GetBytes((ushort)Size));
            Packet.AddRange(Data);
            return (byte[])Packet.ToArray(typeof(byte));
        }

        public void AppendByte(byte value)
        {
            Data.Add((byte)value);
            Size += 1;
        }

        public void AppendUnicodeString(string message)
        {
            AppendWord((ushort)message.Length);
            Data.AddRange(Encoding.Unicode.GetBytes(message));
            Size += message.Length * 2;
        }

        public void AppendWord(ushort value)
        {
            Data.AddRange(BitConverter.GetBytes(value));
            Size += 2;
        }
    }
}
any ideas how to use it as simple as possible. i tried to use SilkroadSecurityApi but it looks for me too difficult
evolution007 is offline  
Old 08/26/2012, 15:06   #2
 
GoneUp's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 201
Received Thanks: 73
It has nothing to do with your Program. The sro_client just cannot connect to your proxy. Did you started it for sure?
GoneUp is offline  
Old 08/27/2012, 11:09   #3
 
evolution007's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 284
Received Thanks: 90
my loader port was wrong.
evolution007 is offline  
Old 09/14/2012, 10:19   #4
 
elite*gold: 0
Join Date: Jul 2012
Posts: 14
Received Thanks: 0
u open sro_client for olly
worldgs is offline  
Reply


Similar Threads Similar Threads
[REQUEST] packets send list , or anyway to sniff send packets
08/10/2012 - Kal Online - 16 Replies
hey everyone , as mentioned , i wanna know if anyone got a complete send packets lists or anyway i can sniff send packets , thanks in advance
Send Packets?!
04/09/2012 - .NET Languages - 10 Replies
Hallo Leute, Ich habe folgenden Code mit WPE Pro rausgesnifft von einen Chat aus dem Game "Steel Legions": Beispiel Send "Test": HEX: 00 00 00 16 01 6B 00 00 2A BA AC 00 00 01 00 04 54 65 73 74 05 02 00 00 0E 2D STRING: .....k..*.......Test.....- Diese Zahl berechnet sich so: 12+ Anzahl der Zeichen Anzahl der Zeichen String zum senden in Hex (54=T,65=e,73=s,74=t)
[Q] Need Help Send Mixed Packets
08/20/2010 - Kal Online - 24 Replies
Hello guys, i just wan'ted to ask can any 1 tell me how to send Mix Packets to server? If yes how? will be realy helpfull thanks for help
Is there a program I can use to log packets and send?
10/01/2008 - Silkroad Online - 1 Replies
Is there any program out there that I can use to log the packets I am receiving, sending, and for me to send packets manually. I've tried WPE Pro (with no gameguard) but it doesn't work.
Any one tell me how to send packets in RO
05/05/2008 - Ragnarok Online - 1 Replies
i have wpe pro latest as guy from this forum i saw his guide but i came through all right but atlast it says "you cannot get the item" this message appears can u tell me wats the problem??? the packet i had sent was for Mithril coins



All times are GMT +1. The time now is 18:24.


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.