Jump to content
Yommy

PacketParser - Yommys Amazing Ragnarok Packet Analyzer Framework

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

holy moly

Share this post


Link to post
Share on other sites

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

Edited by darkPirates

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 #"

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

does it work to all official servers??

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

This seems to be cool!

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
Share on other sites

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

:)

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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,,,...

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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 :)

Share this post


Link to post
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...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.