Jump to content

PacketParser - Yommys Amazing Ragnarok Packet Analyzer Framework


Yommy

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

This is a personal project i was working on while i was analyzing the ragnarok network protocol.

It started several years ago, and could only read wpe .pac captures, and displayed some basic output of the network traffic.

Now it displays 95% of all packets, and shows all the data structures inside each packet.

furthermore, it now uses a dll injected into the client, which sends all packet data to the parser for real-time analysis :)

pic2502tmp.th.jpg

The Parser can use diffrent modes to output or record data captured from the packets, the image above being "full_info"

picb32tmp.th.jpg

And this is a simple test showing a capture of NPC data, to reconstruct scripts in real-time and saves to file.

This mode is intended to ease dialog capture from official servers with new npc's that rAthena does not have.

But the main function is to analyze the network protocol,to see the order packets are transmitted and to

allow new client features to be added quicker.

I rewrote the parser at the begining of this year, with a more OOP based style, but some sources of packet data are not working/missing

dll injection - working good

capture with winpcap(taking packets direct from network card) - broken with bad connections, due to tcp retransmission, which i cannot figure out :(

wpe .pac reading - still to be added back

svn location : https://www.assembla...ubversion/nodes

As with most of my projects, PHP needs to be installed as this is PHP Command line scripting.

for this to work you have 2 options

1) edit the bat file, and change 'php' to the location of your php.exe

2) add your php folder to windows paths, so you can call php from anywhere..

http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath

If anybody has any interest or wants to help improve, send me a message

YomRawr <3

  • Upvote 12
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Oh my god, real-time NPC stealing? You are a genius. o_o

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  69
  • Reputation:   15
  • Joined:  12/06/11
  • Last Seen:  

Jesus christ... this is the most helpfully tool that i ever seen, thanks for your work! You deserve a yommycookie /heh

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  2244
  • Reputation:   182
  • Joined:  11/19/11
  • Last Seen:  

holy moly

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  9
  • Reputation:   0
  • Joined:  06/20/12
  • Last Seen:  

OMG....the best of the best. genius...

Edited by darkPirates
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

I can see unique NPCs created and designed for servers easily vanished now.

Since graphics were easily stolen (and still can be), next to nothing being stolen were Uniquely designed NPCs. Since graphics no longer were able to make servers stand out, NPCs did. Now, with this tool, nothing is longer unique.

Since this tool is easily able to get a hold of a NPC's structure, what's the point on creating new and unique NPCs to help make a server stand out? If this program can easily take that structure of the NPC, save it, and boom. The person now has that NPC they've always wanted from a specific server.. =/

On a side note, what exact client are you using?.. Since you have a Cash shop button.

Edited by Mysterious
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  2244
  • Reputation:   182
  • Joined:  11/19/11
  • Last Seen:  

free scripts for all O.o hurray! no need to pay for scripts anymore

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  70
  • Topics Per Day:  0.02
  • Content Count:  1245
  • Reputation:   392
  • Joined:  11/19/11
  • Last Seen:  

What would you put in for plen_#.txt? Where would you acquire this sort of table?

EDIT: I found the Plen extractor however I'm continuously obtaining this error "unknown opcode 4d @ 0 #"

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

free scripts for all O.o hurray! no need to pay for scripts anymore

Well this cannot take script functionality, this still needs to be programmed,

the tool can only take data sent in packets...,npc locations, dialog, menus, options chosen,

everything else will still need to be programmed :P

its the same as writing down everything the npc says, and creating the npc yourself

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

does it work to all official servers??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

On a side note, what exact client are you using?.. Since you have a Cash shop button.

This is kRO Main client, and this is another example of the power in this tool,

it was simple to capture and understand the packets in this new cash shop :)

does it work to all official servers??

it works on a packet level, so unless some server uses some strange packets or encryption, it should work or could be made to work

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

it works on a packet level, so unless some server uses some strange packets or encryption, it should work or could be made to work

ohh..that is nice...I'll try this for self improvement..^^

Thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  658
  • Reputation:   57
  • Joined:  11/20/11
  • Last Seen:  

This seems to be cool!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  36
  • Reputation:   4
  • Joined:  02/12/12
  • Last Seen:  

I can see some people almost jumped from they're chair thinking they would have access to entire npcs rsrs.

Anyways.. Seems really nice for the devs.. Great job man..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

after this I can't enter the map server of kRO Sakray...

| 032 | ## | Packet_ID 2AAB Not Found - Skipping 19 Bytes

any ideas??

edit: maybe due to my slow connection I'll try to other machine..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  82
  • Topics Per Day:  0.02
  • Content Count:  223
  • Reputation:   4
  • Joined:  02/23/12
  • Last Seen:  

not sure if this is a good thing, or a bad thing >:]

but for me who doesnt really know much about scripting... i dont really care haha

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  379
  • Reputation:   304
  • Joined:  11/10/11
  • Last Seen:  

I don't understand what the problem with the "npc capture". Don't forget that it just print the "visual" result ( mes, next, menu, input, close) and not all others internals thing like variables, algo, condition, check, rand, etc (which is the more important part of a npc).

Good job Yommy :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

I don't understand what the problem with the "npc capture". Don't forget that it just print the "visual" result ( mes, next, menu, input, close) and not all others internals thing like variables, algo, condition, check, rand, etc (which is the more important part of a npc).

yay, someone understands :) and the intention was meant for capturing dialogue of official server scripts that rAthena does not hold yet

and also it was to show a single use of this framework, it can capture any data, mob info from sense, etc

but the main usage was for analyzing new packets to add support for new clients in rAthena

after this I can't enter the map server of kRO Sakray...

| 032 | ## | Packet_ID 2AAB Not Found - Skipping 19 Bytes

any ideas??

edit: maybe due to my slow connection I'll try to other machine..

this is probably due to incorrect plen file, and packet at 31 has an incorrect length

be sure to use a plen file extracted from the actual client used to connect using the tool in dev folder

:)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

this is probably due to incorrect plen file, and packet at 31 has an incorrect length

be sure to use a plen file extracted from the actual client used to connect using the tool in dev folder

yup I use the extracted length on the client I used..

Sorry my mistake...the client I used was not updated cause once I load the game trough the browser the patcher did patch...XD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  280
  • Topics Per Day:  0.06
  • Content Count:  841
  • Reputation:   17
  • Joined:  04/16/12
  • Last Seen:  

This seems cool! Can rip NPC's from pRO! but don't know how to use it HAHA.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  2244
  • Reputation:   182
  • Joined:  11/19/11
  • Last Seen:  

can this be used to find how body relocation works?

I know wayean said he had a dix but something about eA/r/A coding it differently than official?

Thoughts?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  308
  • Reputation:   3
  • Joined:  12/18/11
  • Last Seen:  

how to use this?

'php' is not recognized as an internal or external command,

operable program or batch file.

Press any key to continue . . .

how to solve this?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

what is the meaning of PACKET_CZ, ZC, AC, HC & etc..and how can analyze and add some of the unknown functions??....

XD..I'm noob in packet something,,,...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  05/18/12
  • Last Seen:  

how to use this?

'php' is not recognized as an internal or external command,

operable program or batch file.

Press any key to continue . . .

how to solve this?

Answered in the OP's post.

As with most of my projects, PHP needs to be installed as this is PHP Command line scripting.

Requires PHP installed (and the php path to windows)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  81
  • Reputation:   69
  • Joined:  11/08/11
  • Last Seen:  

what is the meaning of PACKET_CZ, ZC, AC, HC & etc..and how can analyze and add some of the unknown functions??....

XD..I'm noob in packet something,,,...

C = Client

Z = Zone(map server)

A = Account(login server)

H = cHar(char server)

CZ = client to zone

ZC = zone to client

These are official packet names how gravity programmed them

can this be used to find how body relocation works?

i tried to login to kRO months ago, but i failed to capture any body relocation packets

and i couldnt make any char to do this skill :(

but yes, it could capture the packet sequence used :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...