|
You last visited: Today at 07:21
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.
07/22/2011, 13:45
|
#16
|
elite*gold: 0
Join Date: May 2007
Posts: 99
Received Thanks: 39
|
Quote:
Originally Posted by lesderid
By the way, SRO uses Little Endian.
|
it's depends on silkroad language version
|
|
|
07/22/2011, 14:30
|
#17
|
elite*gold: 0
Join Date: Oct 2008
Posts: 54
Received Thanks: 2
|
02 32 02 23 4 bytes = int32 ??? correct ?
|
|
|
07/22/2011, 14:44
|
#18
|
elite*gold: 0
Join Date: Sep 2010
Posts: 134
Received Thanks: 41
|
@ruancarlosbr: if you've windows7, just open the calculator and put it in programmer mode, there you can see bytes. Sides you can see how many bytes and bits does a word has, etc.
but yes, 4 bytes = int32 but careful with floats.
Edit: remember it starts counting from 0, naming it int32 is a bit tricky because you can play with 31bits (including the bit 0).
|
|
|
07/22/2011, 14:44
|
#19
|
elite*gold: 0
Join Date: Oct 2008
Posts: 54
Received Thanks: 2
|
FALAR[C -> S][7576]
01 ................
00 ................
00 ................
02 00 ................
PacketWriter Writer = new PacketWriter();
Writer.Create(0x7576);
Writer.UInt8(1);
Writer.UInt8(0);
Writer.UInt8(0);
Writer.UInt16(2);
Correct ??
exapmple ?
|
|
|
07/22/2011, 15:01
|
#20
|
elite*gold: 0
Join Date: May 2007
Posts: 99
Received Thanks: 39
|
1 byte = 8bits.
01 = 1 byte = 8 bits
00 = 1 byte = 8 bits = UInt8<--- nbr bits
02 00 = 2 bytes = 16 bits (2x8 bits) = UInt16
UInt8 Byte, start from 0 up to 255
UInt16 Unsigned Short, start from 0 up to 65535
....
|
|
|
07/22/2011, 16:03
|
#21
|
elite*gold: 0
Join Date: Oct 2008
Posts: 54
Received Thanks: 2
|
EXAMPLE:
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..
HX
53 = S
HX
69 = i
HX
6C = l
8 bits => word 1 byte 09 = int8
16 bits => word 2 bytes 00 00 int16
32 bits => word 4 bytes 30 55 52 30 int32
|
|
|
07/22/2011, 19:52
|
#22
|
elite*gold: 0
Join Date: May 2007
Posts: 99
Received Thanks: 39
|
in bytes data there's no string value. it's char or char array
look in my source code posted previousely. the best way in your exemple is to peek data in byte array type and convert it with :
System.Encoding.GetEncoding("UTF-8").GetString(bytesStr)
UTF-8 is just exemple, use good string encoding of Sro_client.exe
|
|
|
07/23/2011, 11:03
|
#23
|
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
|
Quote:
Originally Posted by benco
in bytes data there's no string value. it's char or char array
look in my source code posted previousely. the best way in your exemple is to peek data in byte array type and convert it with :
System.Encoding.GetEncoding("UTF-8").GetString(bytesStr)
UTF-8 is just exemple, use good string encoding of Sro_client.exe
|
UTF8 is a member of the Encoding class.
If you use that static member instead of the method to get the Encoding, it's faster.
|
|
|
07/23/2011, 12:07
|
#24
|
elite*gold: 0
Join Date: May 2007
Posts: 99
Received Thanks: 39
|
Quote:
Originally Posted by lesderid
UTF8 is a member of the Encoding class.
If you use that static member instead of the method to get the Encoding, it's faster.
|
I know there is utf8. As I said, it's just an exemple to show how to use different encoding ^^
|
|
|
07/23/2011, 13:53
|
#25
|
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
|
Quote:
Originally Posted by benco
I know there is utf8. As I said, it's just an exemple to show how to use different encoding ^^
|
SRO only uses UTF-8 and UTF-16 (aka. Unicode), which are both members of the Encoding class.
But okay.
|
|
|
07/23/2011, 19:23
|
#26
|
elite*gold: 0
Join Date: May 2007
Posts: 99
Received Thanks: 39
|
for ISRO yes it's utf-8, but csro use GB18030
|
|
|
07/23/2011, 19:55
|
#27
|
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
|
Quote:
Originally Posted by benco
for ISRO yes it's utf-8, but csro use GB18030
|
Oh, I see. I didn't know that.
|
|
|
07/23/2011, 20:10
|
#28
|
elite*gold: 41
Join Date: Nov 2007
Posts: 3,390
Received Thanks: 2,700
|
i kinda love how the coding corner evolves.
seriously... been a great idea of mine.
sorry for moderational off topic
|
|
|
07/23/2011, 21:22
|
#29
|
elite*gold: 0
Join Date: Dec 2007
Posts: 2,400
Received Thanks: 1,517
|
Quote:
Originally Posted by Yo123
i kinda love how the coding corner evolves.
seriously... been a great idea of mine.
sorry for moderational off topic
|
Dude, it's pretty much dead. xD
Even more offtopic: Work on Lua decompiler! Naw!
|
|
|
07/24/2011, 00:00
|
#30
|
elite*gold: 166
Join Date: Apr 2009
Posts: 2,339
Received Thanks: 2,648
|
Quote:
Originally Posted by ruancarlosbr
FALAR[C -> S][7576]
01 ................
00 ................
00 ................
02 00 ................
PacketWriter Writer = new PacketWriter();
Writer.Create(0x7576);
Writer.UInt8(1);
Writer.UInt8(0);
Writer.UInt8(0);
Writer.UInt16(2);
Correct ??
exapmple ?
|
Yea , thats correct
|
|
|
|
|
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 07:21.
|
|