View Full Version : Project CARS UDP Packet Capture

13-09-2017, 21:32
Project CARS UDP Packet Capture

Version: 0.1-SNAPSHOT

The Project CARS UDP Packet Capture application is designed to run on your network, capturing packets on Port 5606, and saving them to a file for rebroadcast, further processing, or just because you like to accumulate binary files on your hard drive. The application is very simple in scope: You choose an output file, click and it'll write packets to the file.

Downloads: (https://github.com/SenorPez/literate-invention/releases)

ZIP: https://github.com/SenorPez/literate-invention/releases/download/0.1-SNAPSHOT/race-data-0.1-SNAPSHOT.zip
TAR: https://github.com/SenorPez/literate-invention/releases/download/0.1-SNAPSHOT/race-data-0.1-SNAPSHOT.tar

To run, unzip/untar the file, navigate to the bin directory, and run either race-data (Mac and Linux) or race-data.bat (Windows).


The Project CARS UDP Packet Capture [b]should be compatible with both Project CARS and Project CARS 2. Obviously, I've not tested it yet with Project CARS 2, but from what I do know it should be fine regardless of the packet format.
If you choose and existing capture file and click , the [b]existing file is removed. This also applies to if you click [End Capture] and then immediately click again, which isn't good behavior. I [b]think the best option is to just clear the output file field when you click [End Capture], despite that causing a bit of a hassle if you want to restart quickly.
There are very few options present right now. None, in fact.

Upcoming Features, Bug Reports, File Format Specification:

The project will live here: https://github.com/SenorPez/literate-invention/. Once I get the time, I'll put up things there, including future features planned (though I'll give you a sneak peek here) and the capture file format specification so that other developers can use capture files (though, again, I'll give you a sneak peek here). If you find bugs or have improvement suggestions yourself, please post them through the Github page!
Upcoming Features (again, I'm going to get these on Github sometime, just not right now):

Addition of user-enterable meta data to the capture file. For example, if you wanted the capture file header to say, "League: AoR GT3 Championship" and "Date: 10.04.18", you should be able to do that.
Server-based, command-line version of the tool for running without a graphical interface.
Automatic splitting of capture file into multiple files, to prevent them from getting too large.
Maybe Customization of capture file format output. (This is probably overkill.)
Maybe Automatic splitting of capture file based on session state in Project CARS. (This may not happen, as I don't want to process the packets too much, for speed and efficiency purposes.)

Capture File Format (again, I'm going to get this on Github sometime, just not right now):

Conforms to the PCAPNG (http://xml2rfc.tools.ietf.org/cgi-bin/xml2rfc.cgi?url=https://raw.githubusercontent.com/pcapng/pcapng/master/draft-tuexen-opsawg-pcapng.xml&modeAsFormat=html/ascii&type=ascii) file format with ONE exception: All file data is written using little endian byte ordering, as opposed to the byte ordering of the host machine. This is to match the Project CARS packet data, which is always little endian and for efficiency purposes isn't converted upon writing to the capture file.
The current file output consists of a Section Header Block, and Interface Description Block, and Simple Packet Blocks. Clients must use the Block Total Length fields in those blocks to determine length, as metadata inclusion (see Upcoming Features) will change.

You are welcome to use, test, break, and modify the Project CARS UDP Packet Capture application to your heart's content. More people using it means more people breaking it means more improvements to the tool!

If you have any questions, don't hesitate to reach out!

17-10-2017, 13:55
Apologies, but in trying to capture Project CARS 2 packets, I found a moderately severe bug in the packet capture application, where it would randomly mangle packets. In testing through the last few days it looks to have been squashed finally.

The 0.1-SNAPSHOT release linked above has been updated with the new, bug-free distributions of the application.