Hi, I recently got back into the game and decided I want to familiarize myself with packets. I've noticed that there are a lot of resources available, which is very nice to see, however the majority of these resources are meant/made for vsro. I've been 'playing' GameGami's TRSRO and thought, why not give it a shot and try to mess around with the latest iSRO/TRSRO packets. This way I learn more about how Silkroad works under the hood, and at the same time I pick up some stuff about networking and C#.
My programming knowledge is Java for the most part, as most of my 9-5 day consists of programming in Java. So I thought I'd use the Silkroad.Net wrapper that was made for the SilkroadSecurityApi, since C# comes pretty close to Java.
So I took a shot at creating a simple program that attempts to clientlessly login to the TRSRO servers. However, since there's not many resources on the latest iSRO packets, data and whatnot, I'm getting stuck on some things. I managed to get up to the point where the program logs in, sends the secondary passcode and receives a valid/invalid response. After that, the program crashes due to it being unable to parse the incoming stream of data (I am assuming).
The following exception is thrown:
Since I am not very familiar with the SilkroadSecurity api, I was wondering if there are people who can help me and figure out what could be going wrong in my program.
Also there are some bytes in some packets that I was unable to parse myself, and was wondering if you guys have been able to. For example this one:
The source is available on my GitHub: [Only registered and activated users can see links. Click Here To Register...]
I'm also down to talk on Discord: Burak#5201
Update 19/06:
I decided to create an implementation in the original SilkroadSecurityApi. I did this so I could familiarize myself with the original api. See source code here: [Only registered and activated users can see links. Click Here To Register...]
Update 19/06 v2:
It is now possible to log in, select a character and join the game world. I've also added some pretty messages to login errors.
I shall delve deeper into the original api. Any form of feedback is always appreciated.
My programming knowledge is Java for the most part, as most of my 9-5 day consists of programming in Java. So I thought I'd use the Silkroad.Net wrapper that was made for the SilkroadSecurityApi, since C# comes pretty close to Java.
So I took a shot at creating a simple program that attempts to clientlessly login to the TRSRO servers. However, since there's not many resources on the latest iSRO packets, data and whatnot, I'm getting stuck on some things. I managed to get up to the point where the program logs in, sends the secondary passcode and receives a valid/invalid response. After that, the program crashes due to it being unable to parse the incoming stream of data (I am assuming).
The following exception is thrown:
Code:
Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'Length') at Silkroad.Security.Blowfish.Decrypt(Span`1 input) in C:\Users\burak\RiderProjects\Silkroad.Net\Silkroad\Security\Blowfish.cs:line 272 at Silkroad.Network.Messaging.Protocol.MessageProtocol.Decode(MessageSize size, Span`1 buffer) in C:\Users\burak\RiderProjects\Silkroad.Net\Silkroad\Network\Messaging\Protocol\MessageProtocol.cs:line 60 at Silkroad.Network.Session.ReceiveAsync() in C:\Users\burak\RiderProjects\Silkroad.Net\Silkroad\Network\Session.cs:line 252 at Silkroad.Network.Session.RunAsync() in C:\Users\burak\RiderProjects\Silkroad.Net\Silkroad\Network\Session.cs:line 356 at SimpleClientless.Program.Main(String[] args) in C:\Users\burak\RiderProjects\Silkroad.Net\SimpleClientless\Program.cs:line 32 at SimpleClientless.Program.<Main>(String[] args)
Also there are some bytes in some packets that I was unable to parse myself, and was wondering if you guys have been able to. For example this one:
Code:
Message login = new Message(Opcodes.Gateway.Request.LOGIN2, true);
login.Write((byte) Local.SRO_TR_Official_GameGami);
login.Write(UserName, Encoding.Default);
login.Write(Password, Encoding.Default);
// Unknown 6 bytes (for now)
login.Write<ushort>(123);
login.Write<ushort>(456);
login.Write<ushort>(789);
login.Write(servers["Misis"].Id);
login.Write<byte>(1);
I'm also down to talk on Discord: Burak#5201
Update 19/06:
I decided to create an implementation in the original SilkroadSecurityApi. I did this so I could familiarize myself with the original api. See source code here: [Only registered and activated users can see links. Click Here To Register...]
Update 19/06 v2:
It is now possible to log in, select a character and join the game world. I've also added some pretty messages to login errors.
I shall delve deeper into the original api. Any form of feedback is always appreciated.