Register for your free account! | Forgot your password?

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

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

Advertisement



A help and how to fix packages

Discussion on A help and how to fix packages within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
ruancarlosbr's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 54
Received Thanks: 2
A help and how to fix packages

example:
[C -> S][7074]
01 ................
01 ................
01 ................
40 2C 1A 00 @,..............

arrange example


Packet topla = new Packet(0x7074);<<1
topla.WriteUInt8(1);
topla.WriteUInt8(1);
topla.WriteUInt8(1);
topla.WriteUInt32(id);
ag_remote_security.Send(topla);

correct?

another Example

[S -> C][0FF1]
01 00 00 00 ................
00 00 00 00 ................

[S -> C][A101]
01 ................
02 ................
1D 00 ................
53 69 6C 6B 72 6F 61 64 5F 4B 6F 72 65 61 5F 59 Silkroad_Korea_Y
61 68 6F 6F 5F 4F 66 66 69 63 69 61 6C ahoo_Official...
00 ................
01 ................
01 00 ................
05 00 ................
74 65 73 74 65 teste...........
00 00 ................
64 00 d...............
01 ................
00 ................

how to fix this package?
ruancarlosbr is offline  
Old 07/21/2011, 17:09   #2
 
ZeraPain's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
0FF1

01 00 00 00 -> UInt32(1)
00 00 00 00 -> UInt32(0)

A101

01 -> UInt8(1)
02 -> UInt8(2)
1D 00 -> UInt16(text length)
53 69 6C 6B 72 6F 61 64 5F 4B 6F 72 65 61 5F 59 -> Ascii(text)

as so on...
ZeraPain is offline  
Old 07/21/2011, 17:56   #3
 
ruancarlosbr's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 54
Received Thanks: 2
everyone could contribute
ITS packages built in C #
ruancarlosbr is offline  
Old 07/21/2011, 18:03   #4
 
elite*gold: 0
Join Date: Nov 2007
Posts: 959
Received Thanks: 602
well,I don't know what you're talking about.
vorosmihaly is offline  
Old 07/21/2011, 18:10   #5
 
ruancarlosbr's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 54
Received Thanks: 2
PacketWriter Writer = new PacketWriter();
Writer.Create(0xA101);
Writer.Word(0x0201); << ???
Writer.Text("Silkroad_Korea_Yahoo_Official");
Writer.Byte(0);
MsSQL ms = new MsSQL("SELECT * FROM server");



A101

01 -> UInt8(1)
02 -> UInt8(2)
1D 00 -> UInt16(text length)
53 69 6C 6B 72 6F 61 64 5F 4B 6F 72 65 61 5F 59 -> Ascii(text)

???
ruancarlosbr is offline  
Old 07/21/2011, 18:13   #6
 
elite*gold: 0
Join Date: Nov 2007
Posts: 959
Received Thanks: 602
I guess you should do it this way:
Packet p = new Packet(0xA101);
p.WriteUInt8(1);
p.WriteUInt8(2);
p.WriteAscii("Silkroad_Korea_Yahoo_Offficial");
p.WriteUInt8(0)
and so on..
so I suggest you not to use PacketWriter / PacketReader classes
vorosmihaly is offline  
Old 07/21/2011, 18:18   #7
 
ruancarlosbr's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 54
Received Thanks: 2
which is correct

Server responds to Client
[S -> C][A101]
01 ................
02 ................
1D 00 ................
53 69 6C 6B 72 6F 61 64 5F 4B 6F 72 65 61 5F 59 Silkroad_Korea_Y
61 68 6F 6F 5F 4F 66 66 69 63 69 61 6C ahoo_Official...
00

PacketWriter Writer = new PacketWriter(); Correct code?
Writer.Create(0xA101);
Writer.UInt8(1);
Writer.UInt8(2);
Writer.UInt16(textlength);
Writer.Text("Silkroad_Korea_Yahoo_Official");
Writer.Byte(0);

or this is correct
PacketWriter Writer = new PacketWriter();
Writer.Create(0xA101);
Writer.Word(0x0201);
Writer.Text("Silkroad_Korea_Yahoo_Official");
Writer.Byte(0);
ruancarlosbr is offline  
Old 07/21/2011, 18:20   #8
 
elite*gold: 0
Join Date: Nov 2007
Posts: 959
Received Thanks: 602
first one
vorosmihaly is offline  
Old 07/21/2011, 18:42   #9
 
ZeraPain's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
please learn how to work with hexadecimal first before asking stupid questions...
ZeraPain is offline  
Old 07/21/2011, 19:34   #10
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
Indeed.

@ruancarlosbr
1 byte = int8
2 bytes = int16
4 bytes = int32
4 bytes = Single/Float
8 bytes = int64
8 bytes = Double // Not used in sro if i'm correct.

and Word(0x0201) isn't equal to int8(2) and int8(1)

the frist one means 513 in decimal and the others are just 2 and 1.

But I also advice the same thing as ZeraPain. These problems could have been avoided if you read a tutorial or even wikipedia about hex.
kevin_owner is offline  
Old 07/21/2011, 19:49   #11
 
bootdisk's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 134
Received Thanks: 41
Primitive data type - Wikipedia, the free encyclopedia

I love fixed point math!
bootdisk is offline  
Thanks
1 User
Old 07/21/2011, 22:06   #12
 
ruancarlosbr's Avatar
 
elite*gold: 0
Join Date: Oct 2008
Posts: 54
Received Thanks: 2
hum example

0FF1

01 00 00 00 << 4 bytes = int32 < are formed by four numbers ?
00 00 -> 2 bytes = int16

Correct ?
ruancarlosbr is offline  
Old 07/21/2011, 22:30   #13
 
kevin_owner's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,484
Received Thanks: 809
that's correct.
kevin_owner is offline  
Old 07/21/2011, 23:15   #14
 
elite*gold: 0
Join Date: May 2007
Posts: 99
Received Thanks: 39
hi people look on my exemple source code, it's very simple to understand.


Is it help you ?
benco is offline  
Old 07/22/2011, 10:54   #15
 
lesderid's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
By the way, SRO uses Little Endian.
lesderid is offline  
Reply


Similar Threads Similar Threads
Downloading Packages...
04/16/2011 - Minecraft - 2 Replies
Hey, wollte mir grad minecraft auf 1.4_01 patchen aber jetzt steht da die ganze zeit nurnoch Downloading Packages obwohl ich die Vollversion legal habe..
[B] Webspace-Packages
01/25/2011 - elite*gold Trading - 60 Replies
Heyho liebe ElitePvP'Ler! Ich biete euch hiermit meine kleinen Webspace-Pakete zu verfügung. Mein Server steht in Frankreich und hat einen TOP-Speed! Es stehen 5 Angebote zu Verfügung. #Package 1: - 500MB Webspace - 5 MySQL Datenbanken - 10 FTP User
[B][STEAM] MW2,CSS,COJ (+MW2 Packages) [S] PSC or PP
10/23/2010 - Steam Trading - 10 Replies
Hallo, ich verkaufe hier einen Steam Account (: Natürlich VAC Unbanned! Trade gerne über MM! Bei Interesse meldet euch per PN oder ICQ 444-632-605 :> Mitglied seit: May 28, 2005
[HELP] how to create new packages
04/02/2010 - CO2 Private Server - 2 Replies
Hello friends of its elite pvpers alluda need to create new gift packs for server 5165 Thanks for the help I need your help :handsdown::handsdown:
Decrypting Packages
05/21/2008 - Dekaron - 5 Replies
So i see you guys use WPE or some other sniffer. My question is.. How do you decrypt the packets?



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


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.