So, I occasionally play poker online, and I want to track my own gameplay stats, like how many hands I fold and when I tend to fold most. I've checked the terms of the poker software, and it's fine to track personal data like this. While there are commercial products that do this, I'm interested in the challenge of creating my own tracking tool. I'm curious about network packets—specifically, how the poker software communicates over the network. My plan is to observe how it sends and receives packets to gather my data before forwarding it to the software. Is it feasible to intercept those packets on my PC, and if so, how would I get started? I'm hoping to write this script in Python. Any pointers would be greatly appreciated!
4 Answers
Just a heads up, capturing network traffic might actually be against the terms of service for your poker platform. Plus, you don’t necessarily need to intercept packets; you can often get all the data you need from the hand histories that the poker client saves as text files. Many sites allow this—check out PokerStars' guidelines for example.
Wireshark is a solid tool for capturing packets. Keep in mind, if the poker app uses HTTPS, you might need to set up a man-in-the-middle proxy to see the contents of the packets, but that can be tricky since HTTPS is designed to block those kinds of interventions.
True, but when using HTTPS, it's important to realize that it’s meant to prevent MITM attacks. Be careful with that!
Definitely check out Wireshark and Fiddler! Both are great for network analysis and will help you dive deeper into the packets you're trying to understand.
Consider reading about the OSI model first, as it’ll help you understand how data is split across packets. The information you're after could be scattered, and it might be encoded, making it a bit of a challenge. But tackling it would be a great learning experience!
Fiddler is a good option too for analyzing HTTP requests and can help with SSL capture.