Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 06:31

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

Advertisement



Packets and DC Protection

Discussion on Packets and DC Protection within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2009
Posts: 118
Received Thanks: 62
Packets and DC Protection

So I got a few packets working using phConnector and edxLoader. Actually, just the sit packet is all I've tested. I got positive results with that.

I came across some packets like running I had:
Code:
[C -> S][7021]
01
Then depending on where I was running to, I would have something similar below it like so:
Code:
6C 6A                                             
35 00                                             
B4 00                                             
F5 02
I figured those were the x and y coordinates I was running too. My problem is, how could I convert those into a string? If not that, then how could I set them with custom values? By the looks of it, it's hex, correct?

Second problem, whenever I connect to phConnector with my program, then login, I get disconnected after a few seconds. How could I resolve this?

Thanks,
TsterT

edit: opcodes >.>
tommy14 is offline  
Old 09/04/2011, 14:27   #2
 
ZeraPain's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
6C x_sec
6A y_sec
35 00 x_pos
B4 00 z_pos
F5 02 y_pos

Yes, these are hexvalues so you'll have to to convert them first.
(sectors are bytes, positions are uint16)

I don't really understand what you mean with "converting them to a string"
If you want to get the real position you will have to calculate them first.

int X = (int)((x_sec - 135) * 192 + (x_pos / 10));
int Y = (int)((y_sec - 92) * 192 + (y_pos / 10));

about the dc problem:
try to use an other proxy e.g. srproxy.
ZeraPain is offline  
Old 09/04/2011, 14:31   #3
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
Well too send your own packets you don't EVER use a string a lot of people in vb use a string for their packet but I recommend you to not use it. If you're using a .net language like vb.net or C# you can use a binarywriter too write the packet for example:

Code:
MemoryStream MemStream = new MemoryStream();
BinaryWriter writer = new BinaryWriter(MemStream);
writer.write((ushort)9); // Size
writer.write((ushort)0x7021); // Opcode
writer.write((ushort)0); // Security bytes

// Add data
and if you want to send it you use the .GetBytes method or whatever it was too get the packet and you send it with your socket.

I can give you examples in other languages but I assume you're using .net

About the disconnect. The server will disconnect you when you send a wrong packet. But you get disconnected after the login so I assume it's a gameserver thing mabye it can't connect to it. But I don't know what that problem could be. I don't know which sro client you're using so mabye the packet structure is a bit different cause the proxy sends a packet too the client. You could always try to use "srproxy".
kevin_owner is offline  
Old 09/04/2011, 18:46   #4
 
elite*gold: 0
Join Date: Feb 2009
Posts: 118
Received Thanks: 62
[quote=ZeraPain;12707575]
I don't really understand what you mean with "converting them to a string"
If you want to get the real position you will have to calculate them first.

int X = (int)((x_sec - 135) * 192 + (x_pos / 10));
int Y = (int)((y_sec - 92) * 192 + (y_pos / 10));
[quote]
By string I mean the values, as in the x, y, and z position. And where did you get those numbers to figure out the position?
Quote:
Originally Posted by ZeraPain View Post
about the dc problem:
try to use an other proxy e.g. srproxy.
The method I use to send packets only works for phConnector.

I know you can get DC'd while sending an incorrect packet. I'm positive this is the case because I can run around 24/7

So how would I send a packet with values like that? And the moment, I'm using
Code:
SendPacket("704C", "10", False)
I'm guessing it has something to do with changing False to True.

And it turns out the DC was just from an incorrect packet.

Send Packet function:
Code:
    Public Sub SendPacket(ByVal OpCode As String, ByVal sData As String, ByVal Enc As Boolean)
        Using buffer As New IO.MemoryStream
            Using w As New IO.BinaryWriter(buffer)
                w.Write(CUShort(0))
                w.Write(CUShort("&H" + OpCode))
                If Enc = True Then
                    w.Write(CUShort(3))
                Else
                    w.Write(CUShort(2))
                End If
                For n = 0 To sData.Length / 2 - 1
                    w.Write(CByte("&H" & sData.Substring(n * 2, 2)))
                Next

                w.BaseStream.Position = 0
                w.Write(CUShort(w.BaseStream.Length - 6))
                w.Flush()
                Client.Send(buffer.ToArray)
            End Using
        End Using
    End Sub
'Thanks to sarkoplata
Thanks,
TsterT
tommy14 is offline  
Old 09/04/2011, 20:02   #5
 
ZeraPain's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
why do you want to convert it to a string.. this doesn't make any sense. they are integers.

of course you can use an other proxy, you will just have to change the port and the security bytes.

False / True in your example means if the packet should be encrypted or not (you will only have to use False) but this method isn't really good if you have to call it with strings. packets are byte arrays; better try to get a packet handler.
ZeraPain is offline  
Old 09/04/2011, 20:25   #6
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
Code:
    Public Sub SendPacket(ByVal OpCode As String, ByVal sData As String, ByVal Enc As Boolean)
        Using buffer As New IO.MemoryStream
            Using w As New IO.BinaryWriter(buffer)
                w.Write(CUShort(0))
                w.Write(CUShort("&H" + OpCode))
                If Enc = True Then
                    w.Write(CUShort(3))
                Else
                    w.Write(CUShort(2))
                End If
                For n = 0 To sData.Length / 2 - 1
                    w.Write(CByte("&H" & sData.Substring(n * 2, 2)))
                Next

                w.BaseStream.Position = 0
                w.Write(CUShort(w.BaseStream.Length - 6))
                w.Flush()
                Client.Send(buffer.ToArray)
            End Using
        End Using
    End Sub
'Thanks to sarkoplata
This function is a bad one of sarkoplata because using a string is bad.

You should change the 2nd parameter too an array of bytes and add those with the binary writer with the list. There are also more things missing in that function but that would do it for now.

Owh and you might want too take a look at some emulators since there are many of them written in C# and some in vb. check out how they handle the packets and there is even a source of phbot available which is vb so you should check it out
kevin_owner is offline  
Old 09/05/2011, 01:58   #7
 
elite*gold: 0
Join Date: Feb 2009
Posts: 118
Received Thanks: 62
So I played with C#, and looked through Pushedx's guides, then found myself in C++.

This is a whole other topic, but I have a problem with the loader. It doesn't seem to work at all. It launches sro_client.exe, but doesn't, "make it seem like it was launched from silkroad.exe". I get the error, "Please execute Silkroad.exe" after the gameguard loads.

I appreciate you guys helping me with VB, but I now realize how much better C++ is ^^.
tommy14 is offline  
Old 09/05/2011, 02:16   #8
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
but C++ is also alot harder with the pointers and ect.

about the error which sro version are you using because it doesn't work anymore for some versions
kevin_owner is offline  
Old 09/05/2011, 03:24   #9
 
elite*gold: 0
Join Date: Feb 2009
Posts: 118
Received Thanks: 62
I know a couple languages, and after the first, it's fairly easy to pick up on others.

v1.322. What additions would I need to make for it to work?
tommy14 is offline  
Old 09/05/2011, 11:17   #10
 
Schickl's Avatar
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,064
Received Thanks: 539
Vb and C++ are two competely different stories
pointers are indeed quite hard to handle if you've never worked with them.
Vb doesn't really change it
it might take you some time to get used to it, but it should make the things you want to do, easier
Schickl is offline  
Old 09/05/2011, 22:34   #11
 
elite*gold: 0
Join Date: Feb 2009
Posts: 118
Received Thanks: 62
Yes, I realize this.

But could someone walk me through the process of fixing this loader?
tommy14 is offline  
Old 09/05/2011, 23:24   #12
 
Schickl's Avatar
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,064
Received Thanks: 539
You need to create a Mutex. Some months ago i knew how it worked but i forgot many things related to sro^^(for some reason working with a mutex was/is quite hard for me; don't ask me why xD)
So take a look at that part and you might be able to solve the problem yourself, or just wait till someone else replies^^
Schickl is offline  
Old 09/05/2011, 23:42   #13
 
elite*gold: 0
Join Date: Feb 2009
Posts: 118
Received Thanks: 62
So, I found this
Code:
	CreateMutexA(0, 0, "Silkroad Online Launcher");
	CreateMutexA(0, 0, "Ready");
My guess is that
Code:
	CreateMutexA(0, 0, "Ready");
Needs to change.

I'll do some digging through OllyDgb, but if someone else has the answer, feel free to share.

Edit: It didn't take me long, but I found this in sro_client
Code:
Text strings referenced in sro_client, item 13733
  Address = 00876899
  Command = PUSH OFFSET 00EBA808
  Comments = ASCII "Silkroad Online Launcher"
And
Code:
Text strings referenced in sro_client, item 13734
  Address = 008768C3
  Command = PUSH OFFSET 00EBA800
  Comments = ASCII "Ready"
Right next to each other.
tommy14 is offline  
Old 09/05/2011, 23:44   #14
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
for a simpel loader a mutex is enough but if you want too use the packet analyzer of edx you need too disable hackshield if i'm correct.

btw source for a simple loader
Code:
			Mutex Mutex1 = new Mutex(false, "Silkroad Online Launcher");
			Mutex1.WaitOne();
			Mutex Mutex2 = new Mutex(false, "Ready");
			Mutex2.WaitOne();
			Process p = new Process();
			p.StartInfo.FileName = ".\\sro_client.exe";
			
			p.StartInfo.Arguments = " 0 /38 " + Division + " 0";
			p.Start();
38 - Local
division is the division (duh) so 0 for isro
and the last 0 is the ip index. so for isro you have gwgt1 till gwgt4 and this number can be 0 till 3 in isro

but If you really want too fix edx you would probably need to know assembly. and I can't help you with that.

edit: you were faster
kevin_owner is offline  
Old 09/05/2011, 23:53   #15
 
elite*gold: 0
Join Date: Feb 2009
Posts: 118
Received Thanks: 62
Read up on the edit I made.
tommy14 is offline  
Reply


Similar Threads Similar Threads
[Packets] Wie änder ich flyff packets?
07/16/2011 - Flyff Private Server - 19 Replies
HeyHo, Ich würde sehr gerne wissen wie man die Flyff Packets ändert... ich denke mal Zahlen ändern werden nicht ausreichen oder?
Ban Protection! [NA/EU/BR]
09/26/2010 - Combat Arms Hacks, Bots, Cheats & Exploits - 19 Replies
Hey Guys! This release will really,really help you not get banned while hacking on Combat Arms. I don't know if you heard or not but nexon has this system that if someone reports you in CA, Nexon will litteraly take a screenshot at that exact moment and will upload that screenshot to they're computers/file system to see if you really are hacking or not. They also look at the videos that are taken too, which are in .avi format.
GM/PM protection
06/18/2010 - CO2 Private Server - 10 Replies
is there a way i can make GM/PM trade people stuff pk people and do other things like a normal player ?
Protection
01/31/2009 - Silkroad Online - 2 Replies
I'm so depressed caz' i got hacked once again. The only thing that ive done is that ive downloaded a video "arabian race trailor" from a post "Future abdates" from one of the people who has comented on the main post. I'm not saying that #$@# about the forum, on the contrary, it's one of the greatest forums ever. But there are people who use such things. After i downloaded it, and after my main character loged off, i returned to discover that the servers are "offline", although my noob was...
Mo/X - Protection
07/07/2005 - Guild Wars - 0 Replies
So, ich bin wieder zurück und bring gleich was mit :eek: This build is based on heavy supporting another person. In a way this person reaches invinciblity as long as none of the enchantments get removed. It is a perfect build to farm places with few creatures doing awfully high damage (like Underworld or augury rock). So let's start with the Attributes: Healing - As high as possible Smiting - Unimportant for this build Protection - min. 14 Divine Favor - As high as possible



All times are GMT +1. The time now is 06:32.


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.