poedbg: External API for Packet Logging and more, C++, C#, Python
Note: This project is no longer maintained. Source code attached.
Ask and ye shall receive, exiles. I have pulled the packet logger into its own standalone module and implemented an external API that you can use to communicate with it. It currently supports C++, C#, and Python, with many other languages possible.
I've included the packet sending and receiving features to start. I will be expanding the capabilities of the API to include other things such as memory manipulation, hooking, and more. If you have suggestions, feel free to leave them in this thread.
Last edited by maper; 07-30-2018 at 02:56 AM.
Reason: Adding source reference.
I want to use that to implement
“Is flask drink request responded from the server or not”
This is greatly improve double drinking issues . Specially for instant flask... for now we manually use delay for those things.
Going to look at the code and work on this tomorrow.
Post Thanks / Like - 1 Thanks
everknown (1 members gave Thanks to GameHelper for this useful post)
I want to use that to implement
“Is flask drink request responded from the server or not”
This is greatly improve double drinking issues . Specially for instant flask... for now we manually use delay for those things.
Going to look at the code and work on this tomorrow.
Packet 0x36 is sent up the the server when you initiate a flask drink, 0xf4 is received on the client when the server confirms that a flask drink has occurred (does not get sent if you're at full health or mana, etc.)
Post Thanks / Like - 1 Thanks
everknown (1 members gave Thanks to maper for this useful post)
Packet 0x36 is sent up the the server when you initiate a flask drink, 0xf4 is received on the client when the server confirms that a flask drink has occurred (does not get sent if you're at full health or mana, etc.)
First problem I encountered is packets which send in groups. For example, I often see 0x0122 packet received, BUT sometime get 0x0122 000a ....
This is two packets. One is 0x0122 and another is chat message. Sometimes I get 0x000a and at the end I see 0x0122.
I guess, it is how their UDP reliability works (just resend if not approved), because they don't use TCP for determenistic lockstep synchronization.
So, we can pretty reliably read "Send" packets, but there is problem in correctly deserialize "Received", because there can be multiple packets serialized one after another.
Also, some of game mechanics is lockstep predicted, so in many cases your game version simulates what is happening on server instead of constatly updating what server send or actualized.
I've updated it with the latest version, which now includes the "PoeDbgDestroy" function. This function will detach the internal debugger, un-set all hook locations, and free the memory and handles that the module was using. You can safely close your applications after calling this function.
Post Thanks / Like - 1 Thanks
GameHelper (1 members gave Thanks to maper for this useful post)
Updated this again. Added more status codes for better error handling, corrected a thread handle leaking and performance issue, as well as improved the sample C++ code to give an example of packet data printing and packet filtering.
Also included a slightly longer list of packet IDs as I look more at different packets.
Are you able to tell if the client sends a packet to the server when you try to right-click off an active headhunter buff?
My problem is that Headhunter - Official Path of Exile Wiki will occasionally grant a buff that teleports you to nearby enemies automatically. This can be dangerous, but it is mostly very annoying. Attempting to right-click off a Headhunter buff does not work. I am just curious whether or not right-clicking the buff will even send a packet to the server, or if the client says "You know you can't right-click this, I'm not even going to send a packet"
And if the latter is true, what would happen if you attempted to send a packet to the server asking for the headhunter buff to be removed?
Last edited by xcrossover25x; 01-24-2018 at 07:42 AM.
Im 90% sure nothing will happen. Except it will be logged on server audit and if you happen to stumble into investigation team - it can be a proof of your malicious behavior. Do not send packets which are not possible in game finite-state-automata. So, you can't change state of the game in a way it will not permit - it will probably won't do a thing, and will be logged. Just like any FSA out there.
On the other hand, if you don't care about your own anticheat durability - you can encounter some very funny bugs and/or exploits. Possibility is low, though. I know it because the first question in poe-developer task for public API is probably "how to protect it from malicious behavior". Its just like vaaling unique/rare - it will probably crap the item, but in some rare cases you can get great benefit (if developer unconsiciously created a bug, but believed that it will never happen because client won't allow it).
Like noclip through walls, or brute-forcing recipes by not existing items in your inventory, or opening chests without need to move to them first, or pickuping items without cooldown. There is a lot of things that can be done, but most of them is probably already protected. Most of them is already protected by Deterministic LockStep algorithm, which basically run headless (without graphics and other unimportant things) copy of your client on server side
Last edited by amarat100; 01-24-2018 at 11:01 AM.
Post Thanks / Like - 2 Thanks
xcrossover25x, maper (2 members gave Thanks to amarat100 for this useful post)
I'm having an issue where no data is being returned. In both the C# and python sample files, I can capture the in going and outgoing packets and their Id's and lengths come in correctly however when I examine the Data, its always empty (or at least a byte array of length 1 with just a 0 in it).
The C++ sample works fine. In C# the data type of Data is byte[], is it actually a pointer instead?
I'm having an issue where no data is being returned. In both the C# and python sample files, I can capture the in going and outgoing packets and their Id's and lengths come in correctly however when I examine the Data, its always empty (or at least a byte array of length 1 with just a 0 in it).
The C++ sample works fine. In C# the data type of Data is byte[], is it actually a pointer instead?
Any ideas?
Thanks.
You're right, there were problems with both the Python and C# code interpreting the packet data incorrectly.
I have fixed both versions and pushed the fixes to GitHub. Thanks for pointing that out.