Register for your free account! | Forgot your password?

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

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

Advertisement



[Tool] PxBook - Packet Library

Discussion on [Tool] PxBook - Packet Library within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1
 
JellyBitz's Avatar
 
elite*gold: 0
Join Date: Sep 2018
Posts: 423
Received Thanks: 953
Arrow [Tool] PxBook - Packet Library

Hello, selfish community!

I'm sharing today my loved tool to parse packets without wasting too much time on it, at the same time keeping your knowledge as organizated as possible! Started being for personal use but looks too good for only me using it.

I made basically a tiny language to parse packets in a easy way and see his results at variables, working with hexdumps like this :
Code:
0000000000   02 01 02 80 07 00 00 09 00 4A 65 6C 6C 79 42 69   .........JellyBi
0000000016   74 7A 21 01 00 00 00 00 00 00 00 00 14 00 14 00   tz!.............
0000000032   00 00 C8 00 00 00 C8 00 00 00 00 00 00 00 05 41   ..È...È........A
0000000048   0E 00 00 00 42 0E 00 00 00 43 0E 00 00 00 34 0E   ....B....C....4.
0000000064   00 00 00 47 0E 00 00 00 00 84 07 00 00 05 00 4A   ...G...........J
0000000080   65 6C 6C 79 21 01 00 00 00 00 00 00 00 00 14 00   elly!...........
0000000096   14 00 00 00 C8 00 00 00 C8 00 00 00 00 00 00 00   ....È...È.......
0000000112   05 41 0E 00 00 00 42 0E 00 00 00 43 0E 00 00 00   .A....B....C....
0000000128   34 0E 00 00 00 47 0E 00 00 00 00                  4....G..........
or raw of bytes like :
Code:
02 01 02 80 07 00 00 09 00 4A 65 6C 6C 79 42 69 74 7A 21 01 00 00 00 00 00 00 00 00 14 00 14 00 00 00 C8 00 00 00 C8 00 00 00 00 00 00 00 05 41 0E 00 00 00 42 0E 00 00 00 43 0E 00 00 00 34 0E 00 00 00 47 0E 00 00 00 00 84 07 00 00 05 00 4A 65 6C 6C 79 21 01 00 00 00 00 00 00 00 00 14 00 14 00 00 00 C8 00 00 00 C8 00 00 00 00 00 00 00 05 41 0E 00 00 00 42 0E 00 00 00 43 0E 00 00 00 34 0E 00 00 00 47 0E 00 00 00 00
Features
  • Read and parse packets using pxbook script (I'll explain the syntax with more details)
  • Variables viewer with FOR & WHILE support
  • Save and load scripts using his packet opcode
  • Packet script viewer (pretty printting included)

Syntax
  • All conditions are handled strictly using at least one space between his data
  • Are not case sensitive
  • Doesnt matter his margins
  • Thanks to the recursive technology it support nesting
PHP Code:
// IF CONDITION!
// read (byte/uint8) and save it at a
byte a
if == 1
    
// read (byte/uint8) and override at a
   
byte a
   byte b
   
if == b
       
// do something?
   
endif
endif
// FOR CONDITION!
byte n
for  n
   ascii  name
   ulong  exp
endfor
// WHILE CONDITION!
while byte == 1
    uint refID
    uint8 flag
endwhile 
Variables
  • byte (1 byte)
  • uint8 (1)
  • ushort (2)
  • uint16 (2)
  • uint (4)
  • uint32 (4)
  • ulong (8)
  • uint64 (8)
  • single (4)
  • float (4)
  • ascii (2 + length)
  • ascii8 (1 + length)
  • ascii16 (2 + length)
  • ascii32 (4 + length)

At your app folder is only included two packet structures (.pxbook extension). Bugs are welcome with open hands!

The funny thing is that can be used not only for silkroad, you may find a better use of it.
Source at !


- Engels "JellyBitz" Quintero.
Attached Files
File Type: rar PxBook v1.0.4.rar (378.8 KB, 128 views)
JellyBitz is offline  
Thanks
9 Users
Old 05/20/2019, 03:42   #2
 
elite*gold: 0
Join Date: Mar 2016
Posts: 46
Received Thanks: 6
how to add other opcode?

example: I want to check the 0x3013 opcode

How do I add?
GhosTly93 is offline  
Old 05/20/2019, 15:29   #3
 
JellyBitz's Avatar
 
elite*gold: 0
Join Date: Sep 2018
Posts: 423
Received Thanks: 953
Quote:
Originally Posted by GhosTly93 View Post
how to add other opcode?
example: I want to check the 0x3013 opcode
How do I add?
Creating your pxScript, adding opcode and use save button, also the packet seems that needs a description to be loaded correctly, I'll fix that with the library viewer in a moment.

SERVER_AGENT_CHARACTER_DATA = 0x3013.
It requires to use file data. I'll think about adding that (get item/skill/model data by id)

You could make the process manually searching through files, no sounds pretty but it's the best because sometimes it's required to check more than just ID's on other packets..

An example with this hexdump where I added manually the ID's :
HTML Code:
0000000000   53 4D 9B C6 84 07 00 00 21 01 01 00 00 00 00 00   SM.Æ....!.......
0000000016   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0000000032   00 00 00 00 00 00 00 00 00 00 C8 00 00 00 C8 00   ..........È...È.
0000000048   00 00 01 00 00 00 00 00 00 00 00 00 2D 06 01 00   ............-...
0000000064   00 00 00 41 0E 00 00 < 03 01 02 04 > 00 00 00 00 00 00 00 00 00   ...A............
0000000080   2C 00 00 00 00 01 00 02 00 04 00 00 00 00 42 0E   ,.............B.
0000000096   00 00 < 03 01 02 04 > 00 00 00 00 00 00 00 00 00 2C 00 00 00 00   ...........,....
0000000112   01 00 02 00 05 00 00 00 00 43 0E 00 00 < 03 01 02 06 > 00 00 00   .........C......
0000000128   00 00 00 00 00 00 2C 00 00 00 00 01 00 02 00 06   ......,.........
0000000144   00 00 00 00 34 0E 00 00 < 03 01 06 06 > 00 00 00 00 00 00 00 00   ....4...........
0000000160   00 2F 00 00 00 00 01 00 02 00 07 00 00 00 00 47   ./.............G
0000000176   0E 00 00 < 03 03 04 01 > E8 03 0D 00 00 00 00 56 60 00 00 < 03 02 01 02 > 01 05   ...è......V`....
0000000192   00 00 01 01 01 00 00 00 01 02 01 00 00 00 01 03   ................
0000000208   01 00 00 00 01 11 01 00 00 00 01 12 01 00 00 00   ................
0000000224   01 13 01 00 00 00 01 14 01 00 00 00 02 00 02 01   ................
0000000240   00 01 00 00 00 03 DC 00 00 00 10 00 18 01 01 01   ......Ü.........
0000000256   01 1B 00 53 4E 5F 43 4F 4E 5F 51 53 50 5F 43 48   ...SN_CON_QSP_CH
0000000272   5F 45 58 49 4E 56 45 4E 54 4F 52 59 5F 31 01 00   _EXINVENTORY_1..
0000000288   00 00 00 DD 00 00 00 10 00 18 01 01 01 01 1B 00   ...Ý............
0000000304   53 4E 5F 43 4F 4E 5F 51 53 50 5F 57 43 5F 45 58   SN_CON_QSP_WC_EX
0000000320   49 4E 56 45 4E 54 4F 52 59 5F 32 01 00 00 00 00   INVENTORY_2.....
0000000336   DE 00 00 00 10 00 18 01 01 01 01 1B 00 53 4E 5F   Þ............SN_
0000000352   43 4F 4E 5F 51 53 50 5F 4B 54 5F 45 58 49 4E 56   CON_QSP_KT_EXINV
0000000368   45 4E 54 4F 52 59 5F 33 01 00 00 00 00 00 00 00   ENTORY_3........
0000000384   00 00 96 47 77 01 99 65 00 40 6F 44 19 CF D0 C2   ...Gw..e.@oD.ÏÐÂ
0000000400   00 60 E3 44 EC A4 00 01 00 EC A4 00 00 00 00 00   .`ãDì¤...ì¤.....
0000000416   00 80 41 00 00 48 42 00 00 C8 42 00 05 00 4A 65   ..A..HB..ÈB...Je
0000000432   6C 6C 79 00 00 00 01 00 00 00 00 00 00 00 00 00   lly.............
0000000448   00 00 00 00 00 00 FF 57 00 E0 04 00 00 00 00 6C   ......ÿW.à.....l
0000000464   0E 00 00 00 07 00 00 00 00 00 00 00 00 00 01 00   ................
0000000480   01 00 00                                          ................
And using pxScript to parse it normally :
PHP Code:
uint ServerTime
uint model
byte scale
byte level
byte levelMax
ulong exp
uint expSP
ulong gold
uint SP
ushort statPoints
byte berserkPoints
uint expGathered
uint HPMax
uint MPMax
byte expIcon
byte PKDaily
ushort PKTotal
uint PKPenalty
byte berserkLevel
byte PVPCape
byte inventorySize
FOR byte
    byte itemSlot
    uint rentType
    
IF rentType == 1
        ushort rentInfoCanDelete
        uint rentInfoPeriodBeginTime
        uint rentInfoPeriodEndTime
    
ENDIF
    IF 
rentType == 2
        ushort rentInfoCanDelete
        ushort rentInfoCanRecharge
        uint rentInfoMeterRateTime
    
ENDIF
    IF 
rentType == 3
        ushort rentInfoCanDelete
        ushort rentInfoCanRecharge
        uint rentInfoPeriodBeginTime
        uint rentInfoPeriodEndTime
        uint rentInfoPackingTime
    
ENDIF
    
uint refItemID
    
// ID's added manually to hexdump
    
byte ID1
    byte ID2
    byte ID3
    byte ID4
    
IF ID1 == 3
        
// ITEM_
        
IF ID2 == 1
            
// ITEM_CH_
            // ITEM_EU_
            // ITEM_AVATAR
            
byte itemLevel
            ulong itemVariance
            uint itemDurability
            
FOR byte
                uint magParam01
                uint magParam02
            
ENDFOR
            
byte bindingType
            
FOR byte
                byte bindOption01
                uint bindOption02
                uint bindOption03
            
ENDFOR
            
byte bindingType_
            
FOR byte
                byte bindOption01_
                uint bindOption02_
                uint bindOption03_
            
ENDFOR
        ENDIF
        IF 
ID2 == 2
            
// ITEM_COS
            
IF ID3 == 1
                
// ITEM_COS_P
                
byte petState
                
IF petState == 2
                    
// Summoned
                    
uint refObjID
                    ascii petName
                    
IF ID4 == 2
                        
// ITEM_COS_P (Ability)
                        
uint petRentEndTime
                    
ENDIF
                    
byte unkByte
                
ENDIF
                IF 
petState == 3
                    
// Alive
                    
uint refObjID
                    ascii petName
                    
IF ID4 == 2
                        
// ITEM_COS_P (Ability)
                        
uint petRentEndTime
                    
ENDIF
                    
byte unkByte
                
ENDIF
                IF 
petState == 4
                    
// Dead
                    
uint refObjID
                    ascii petName
                    
IF ID4 == 2
                        
// ITEM_COS_P (Ability)
                        
uint petRentEndTime
                    
ENDIF
                    
byte unkByte
                
ENDIF
            ENDIF
            IF 
ID3 == 2
                
// ITEM_ETC_TRANS_MONSTER
                
uint refObjID
            
ENDIF
            IF 
ID3 == 3
                
// MAGIC_CUBE
                
uint cubeQuantity
            
ENDIF
        ENDIF
        IF 
ID2 == 3
            
// ITEM_ETC
            
ushort quantity
            
IF ID3 == 1
                
IF ID4 == 1
                    
// Magic stone
                    
byte assimilationProbability
                
ENDIF
                IF 
ID4 == 2
                    
// Attributte stone
                    
byte assimilationProbability
                
ENDIF
            ENDIF
            IF 
ID3 == 14
                
IF ID3 == 2
                    
// ITEM_MALL_GACHA_CARD_WIN
                    // ITEM_MALL_GACHA_CARD_LOSE
                    
FOR byte
                        uint magParam01
                        uint magParam02
                    
ENDFOR
                ENDIF
            ENDIF
        ENDIF
    ENDIF
ENDFOR
// Bla bla bla... 
JellyBitz is offline  
Thanks
1 User
Old 05/23/2019, 18:02   #4
 
elite*gold: 0
Join Date: Mar 2016
Posts: 46
Received Thanks: 6
does not work, I don't understand how opcode is being added

copy paste from exdloader packet parse?
GhosTly93 is offline  
Old 05/24/2019, 14:20   #5
 
JellyBitz's Avatar
 
elite*gold: 0
Join Date: Sep 2018
Posts: 423
Received Thanks: 953
The opcode is not automagically added, it's just for keep organization at your files, same as description.

What really matter is pasting the hexdump, it checks if starts by "00000000" to read it as hexdump, otherwise read it as a line of array of bytes (pairs of hex values). I'll change it for better check of data the next time!

Here another example with an hexdump from 0x3015 (Spawn) barely parsed :
HTML Code:
0000000000   85 07 00 00 < 01 01 01 00 > 22 00 00 00 37 08 16 05 00 00 < 03 01 02 01 > 00 82   ...."...7.......
0000000016   05 00 00 < 03 01 02 03 > 00 5E 04 00 00 < 03 01 03 02 > 00 CA 05 00 00 < 03 01 02 05 > 00 AA 04   ....^....Ê....ª.
0000000032   00 00 < 03 01 03 04> 00 F3 04 00 00 < 03 01 03 06 > 00 50 00 00 00 < 03 01 06 02 > 00 04 01 00   ...ó....P.......
0000000048   00 < 03 01 04 01 > 00 05 01 9D 24 00 00 < 03 01 0D 04 > 00 00 8C 8D 1C 03 99 66   .....$.........f
0000000064   A7 FC 5F 44 12 F8 D0 C2 C9 D1 9E 43 17 BF 01 01   §ü_D.øÐÂÉÑ.C.¿..
0000000080   99 66 7A 03 00 00 32 00 01 00 03 00 B8 1E A5 41   .fz...2.....¸.¥A
0000000096   00 00 81 42 00 00 C8 42 01 FE 04 00 00 F3 EC 01   ...B..ÈB.þ...óì.
0000000112   00 06 00 55 4C 54 49 4D 41 00 01 00 00 00 00 00   ...ULTIMA.......
0000000128   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
0000000144   00 00 00 00 00 00 00 00 FF 04                     ........ÿ.......
pxScript :
PHP Code:
uint refObjID
byte ID1
byte ID2
byte ID3
byte ID4
if ID1 == 1
    
// BIONIC:
    // - CHARACTER
    // - NPC
    //   - NPC_FORTRESS_STRUCT
    //   - NPC_MOB
    //   - NPC_COS
    //   - NPC_FORTRESS_COS
    
if ID2 == 1
        
// CHARACTER
        
byte Scale
        byte BerserkLevel
        byte PVPCape
        byte ExpType
        byte inventorySize
        
for byte
            uint refItemjID
            byte ID1
            byte ID2
            byte ID3
            byte ID4
            
if ID1 == 3
                
if ID2 == 1
                    byte ItemOptLevel
                
endif
            endif
        endfor
        
byte avatarInventorySize
        
for byte
            uint refAvatarItemID
            byte aID1
            byte aID2
            byte aID3
            byte aID4
            
if aID1 == 3
                
if aID2 == 1
                    byte ItemOptLevel
                
endif
            endif
        endfor
    endif
    
byte hasMask
    
if hasMask == 1
        
// bla bla bla..
    
endif
endif
// Position
uint UniqueID
ushort Region
single X
single Y
single Z
ushort Angle
// Movement
byte hasDestination
byte movementType
if hasDestination == 1
    ushort DestinationRegion
    
if Region 32767
        
// World
        
ushort DestinationX
        ushort DestinationY
        ushort DestinationZ
    
endif
    if 
Region >= 32767
        
// Dungeon
        
uint DestinationX
        uint DestinationY
        uint DestinationZ
    
endif
endif
byte LifeState
byte unkByte3
byte motionState
byte Status
single WalkSpeed
single RunSpeed
single BerserkSpeed
// Buffs
for byte
    uint BuffID
    uint Duration
endfor
if 
ID2 == 1
    ascii Name
    byte JobType
    byte JobLevel
    byte PVPState
    byte hasMount
    byte isFighting
    
if hasMount == 1
        
//
    
endif
    
byte scrollMode
    byte InteractMode
    byte unkByte4
    ascii GuildName
    
// if no containsJobEquipment ? (false)
    
if == 1
        uint GuildID
        ascii GuildMemberName
        uint GuildLastRev
        uint UnionID
        uint UnionLastRev
        byte isFriendly
        byte GuildMemberSiegeAuthority
    
endif
    
byte EquipmentCooldown
    byte PKFlag
endif
if 
ID1 == 1
    byte unkByte6
endif 
JellyBitz is offline  
Old 02/09/2025, 19:06   #6
 
elite*gold: 0
Join Date: Jul 2020
Posts: 164
Received Thanks: 15
its have virus can you please share clean one ?
kotsh23 is offline  
Reply

Tags
library, packet, parser, silkroad, tester


Similar Threads Similar Threads
[RELEASE] Shaiya packet emcryption/decryption library
11/23/2016 - Shaiya PServer Guides & Releases - 1 Replies
Hi Everyone! Im releasing a library for the encryption/decryption of shaiya network packets. (The code might not be the best so bear with me.) The handshake - some basic explanation how it works: Client side:
Understanding the Packet System - Basics of a Packet explained
11/03/2012 - Cabal Online - 30 Replies
Read the advice first... *****************UPDATED 12/11/2011********************************* **** ADDED VB6 PROXY BOT SOURCE-CODE, WORKING EXAMPLE OF PROXY BOT****** ************************************************* ***************** The following CONSTANTS have been flagged, this means they appear in EVERY Packet exchange from client to server and server to client Red = Packet Id - Each packet has a unique ID number, in this case AA02, Each Packet id Relates to a specific...
[Tool] Combat Arms Library
06/03/2010 - Combat Arms Hacks, Bots, Cheats & Exploits - 67 Replies
http://sektorsoft.drmckays.de/~Files/CAL/SS/logo.p ng Was ist das Combat Arms Library (CAL)? Das Combat Arms Librarby (kurz CAL) ist ein kleines Programm, mit dem Spieler ihre Hacks mit anderen Spielern teilen können. Natürlich kann jeder die verfügbaren Hacks herunterladen, solange er genug Punkte hat. Bei der Registrierung erhält man 50 Punkte. Pro Download eines Hacks verliert man einen Punkt. Man erhählt 20 Punkte, wenn man einen Hack hochlädt und ihn somit mit anderen Spielern teilt. ...
[Question] Packet data , packet editing ??
10/13/2009 - 9Dragons - 2 Replies
I would like to know : What is packet data? How do i get the address for hacking a item in game? How to use it ??



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


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.