Register for your free account! | Forgot your password?

You last visited: Today at 12:33

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

Advertisement



[VB.NET]Use OPCODES

Discussion on [VB.NET]Use OPCODES within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
lordfeling's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 32
Received Thanks: 2
[VB.NET]Use OPCODES

Hi all ,

Im a amateur in VB.NET, and I never programmed a tool for Silkroad except a Spammer.
Today, I would like to introduce me to OpCode, in order to make small programs.

But the problem is that I do not know how to write code in VB.NET, for send to server opcodes, how this happens.

So, I've already use edxSilkroadLoader5 for capture OPCODES in game :
Code:
[S -> C][B0BD]
C9 E 04 00
61 05 00 00
67 5F 02 00

This is the code for a Skill fire. So this is 0xB0BD ?
But, I don't know how to use this information in VB.NET for send to the server the Packet.

So, i want to know if anybody can help me to learn how to use OPCODES in Silkroad with VB.NET ?

Thanks
lordfeling is offline  
Old 07/26/2011, 17:28   #2
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
I'm not int the whole .net world but you need to use a socket to connect to the server. And you could use the binairywriter to build the whole packet. Take a look at some open source emulator projects like csremu or srevolution. It has a packet writer in it and you might want to use that one. It's C# but you can convert C#.net to vb.net.

But yeah the opcode of that packet is 0xB0BD and the data is 3 integers. It's quite a lot to explain in one post so mabye you could try some things and tell me the parts which are unclear. Btw it would also be helpfull to have some basic understanding of the tcp/ip thing.
kevin_owner is offline  
Old 07/26/2011, 21:18   #3

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
This pakcet is taken by server and sending it may result in dc and wont have effect.
You should capture packets which are Client to Server. [C -> S]
Capture the sit-stand up packet and post it here , i will help about it.
sarkoplata is offline  
Old 07/26/2011, 22:26   #4
 
lordfeling's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 32
Received Thanks: 2
Quote:
Originally Posted by sarkoplata View Post
This pakcet is taken by server and sending it may result in dc and wont have effect.
You should capture packets which are Client to Server. [C -> S]
Capture the sit-stand up packet and post it here , i will help about it.
Hi, thanks for you responce.

I've captured somes packet :

Code:
Sit-stand up :
[C -> S][704F]
04
Code:
pick gold :
[C -> S][7074]
01                                                
02                                                
01                                                
6E 05 1A 00

I never programmed a tool with packet.
That why I require help for learn how to use Packet.

Thanks.
lordfeling is offline  
Old 07/27/2011, 17:35   #5

 
sarkoplata's Avatar
 
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,661
Quote:
Originally Posted by lordfeling View Post
Hi, thanks for you responce.

I've captured somes packet :

Code:
Sit-stand up :
[C -> S][704F]
04
Code:
pick gold :
[C -> S][7074]
01                                                
02                                                
01                                                
6E 05 1A 00

I never programmed a tool with packet.
That why I require help for learn how to use Packet.

Thanks.
Ok, First of all we should import our class.
Just write the top of the class :

PHP Code:
Imports System.Net.Sockets 
Now we are able to use system.net.sockets class.

Lets declare our socket :

PHP Code:
    Public Client As Socket = New Socket(AddressFamily.InterNetworkSocketType.StreamProtocolType.Tcp
Now , we are should connect to our proxy to inject packets.
You can basicly use phConnector for this.
(And you will redirect your ip to 127.0.0.1 : 15778 from loader. )

Lets connect our socket :

PHP Code:
Client.Connect("localhost"xyour phConnector botport 
Now we connected to proxy and we can send packets.
Packets are in raw form at fact , but we convert em to easier structure.

Client.Send("x") will send raw packets.
So we should make our packet raw at first.
Here is my func. to do that. This func. is written by xKraizy.

PHP Code:
Public Sub SendPacket(ByVal OpCode As StringByVal sData As StringByVal 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(1))
                
End If
                For 
0 To sData.Length 1
                    w
.Write(CByte("&H" sData.Substring(22)))
                
Next

                w
.BaseStream.Position 0
                w
.Write(CUShort(w.BaseStream.Length 6))
                
w.Flush()
                
Client.Send(buffer.ToArray)
            
End Using
        End Using
    End Sub 
You can call this function anywhere you want now.
For example , add client connecting thingy to form_load , and add a button and write this.

PHP Code:
SendPacket("704F","04",False
First parameter is your opcode
Second parameter is your packet data
Third packet is a boolean , if you make it True , you will be able to send encrypted packets.(They are a bit intermediate part.)

And about gold packet ;

I dont really remember but every byte in packet has a meaning.

PHP Code:
[-> S][7074// Opcode
01 // Some Flag                                               
02 // Some Flag                                                      
01 // Some Flag                                                      
6E 05 1A 00  // UniqueID of gold. 
Have fun and ask when you needed !
sarkolata
sarkoplata is offline  
Thanks
8 Users
Old 07/27/2011, 18:07   #6
 
lordfeling's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 32
Received Thanks: 2
Thanks fot you responce.
I will try to do what you posted, but im not sure to understand all.

And im looking for phconnector, but impossible to find it (for download it).

EDIT : I've downloaded phConnector.
lordfeling is offline  
Old 10/11/2011, 11:32   #7
 
elite*gold: 0
Join Date: Oct 2011
Posts: 43
Received Thanks: 12
How could i send a notice using this method.

[C->S] [3026]
0702004869

[C->S] [3026]
48690D0A

I believe the above is the notice info.
thegfx3r is offline  
Old 10/13/2011, 15:29   #8
 
s2k's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 194
Received Thanks: 1,091
notice is Server -> Client. not sure about the opcode
s2k is offline  
Old 10/13/2011, 16:14   #9
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Quote:
Originally Posted by thegfx3r View Post
How could i send a notice using this method.

[C->S] [3026]
0702004869

[C->S] [3026]
48690D0A

I believe the above is the notice info.
Code:
3026 - Notice (Server -> Client)

3026 //Opcode
02 //Message-Length
68-69 //message: hi
02 //server -> client
Kraizy​ is offline  
Old 10/13/2011, 16:45   #10
 
lesderid's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
Quote:
Originally Posted by xKraizy View Post
Code:
3026 - Notice (Server -> Client)

3026 //Opcode
02 //Message-Length
68-69 //message: hi
02 //server -> client
I'm afraid that's wrong.
This is what I have:

PHP Code:
var packet = new Packet(0x3026);

packet.WriteByte(7); //Chat type
packet.WriteString(valuenoticeutf16true); 
lesderid is offline  
Old 10/13/2011, 19:36   #11
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
@lesderid it worked with my old project..
Kraizy​ is offline  
Old 10/13/2011, 20:49   #12
 
lesderid's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
Quote:
Originally Posted by xKraizy View Post
@lesderid it worked with my old project..
That's strange.
lesderid is offline  
Old 10/14/2011, 14:58   #13
 
Kraizy​'s Avatar
 
elite*gold: 0
The Black Market: 471/0/0
Join Date: Apr 2010
Posts: 9,696
Received Thanks: 1,811
Quote:
Originally Posted by lesderid View Post
That's strange.
Maybe there is not only one way to do something like that
Kraizy​ is offline  
Old 10/14/2011, 16:58   #14
 
lesderid's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
Quote:
Originally Posted by xKraizy View Post
Maybe there is not only one way to do something like that
I doubt that's the case.
Maybe you were just using another version of SRO or something, but this is really what I've been using in my code since ages ago.
lesderid is offline  
Old 10/14/2011, 20:46   #15
 
Schickl's Avatar
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,064
Received Thanks: 539
Kraizy's packet structure is indeed wrong
Code:
///Chatpacket

1100
2630
0200
05
0400
53657374
0400
5300650073007400

for Type 0x02, 0x04, 0x05 and 0x06:
# of Bytes | Description
-----------|------------------------
2	   | Size of the Data in byte
2	   | Opcode
2	   | Direction 0200 = to client and 0100 = to server
1	   | Type of the Message
2	   | Size of the Name
--	   | As specified before
2	   | Length of the Message. Counting every UNICODE char(2 bytes = 1 char)
--	   | As specified before(UNICODE!!!)
This isn't the exact structure for the notice, but the only thing that is removed is the length of the name and the name
Everything else should be the same
Oh and don't try to use it at normal chat(just sayin')

Security bytes have been replaced in there, because i was using it with nuconnector
[ADDED]
****
I'd like to read that code, but vb has such a ****** up syntax^^
a/w
Isn't the notice in Unicode?(Didn't try it out for a loooong time)
So phconnector just wants you to specify the opcode at the beginning of the packet and the direction at the end?
Personally I don't like that. It requires you to modify the original packet structure and so you won't be able to use it with other tools easily(and it also makes it quite hard to read imo)
Well, whatever
Just felt like saying it^^

oh I should've added what the message types mean 0x02 = PM, 0x04 = guild, 0x05 = union and 0x06 = academy
The other Types I didn't document:
0x01 = normal chat(Object ID required)
0x03 = should be party(Object ID again?!)
0x07 = notice

edit: well, lol, seems like he deleted his post so most of the things i said are non-sense
Schickl is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
New OpCodes
05/20/2010 - Perfect World - 0 Replies
Im looking for OpCodes in Perfect World MS Version to get the Code working. How to get them or any have the right ones ? Func AutoRun($x, $y, $z) ;------------------------------------- Local $result, $process, $code_add, $thread, $param_add Local $Param = DllStructCreate("float ") DllStructSetData($Param, 1, $x, 1)
How to get the sro opcodes?
01/19/2010 - Silkroad Online - 5 Replies
I would like to get the opcodes of silkroad but where can i get them in the ip packets or in the sro_client ? i already sniffed some stuff with smartsniff but how can i see what's in it cuz of the encryption or whatever it is. and i used ollydbg to open sro_client.exe but i couldn't find anything cuz i don't know how that program works. i see something like: SRO_Clie.0065990B but is that a opcode? and what does it do? greetz, kevin_owner.
Opcodes
06/13/2009 - Silkroad Online - 1 Replies
Hey does anyone know where I can get opcodes (eg. for torque)



All times are GMT +1. The time now is 12:33.


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.