twnet_parser/examples/06_and_07/print_pcap_files
2024-02-23 12:48:12 +08:00
..
07_dm1.pcap feat: add 0.6 support to the pcap printer example 2024-02-23 12:48:12 +08:00
print_pcap_files.py feat: add 0.6 support to the pcap printer example 2024-02-23 12:48:12 +08:00
README.md feat: add 0.6 support to the pcap printer example 2024-02-23 12:48:12 +08:00

print_pcap_files.py

This example reads a network capture file generated by tcpdump and prints out all teeworlds message names

Setup

You need tcpdump installed or a .pcap file with teeworlds traffic. And the python library dpkt

You can record traffic like this if you have a teeworlds server running on your machine.

tcpdump -i lo -w teeworlds.pcap "port 8303"

Then you also need the python libs

pip install twnet_parser
pip install dpkt

And then you can run the example like this:

$ ./print_pcap_files.py teeworlds.pcap
token
token
connect
accept
info
map_change
ready
sv_motd, sv_server_settings, con_ready
token
token
cl_start_info
sv_vote_clear_options, sv_tune_params, sv_ready_to_enter
enter_game
server_info
sv_weapon_pickup, sv_client_info, snap_single
snap_single
snap_single
input
input_timing, snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
input
input_timing, snap_empty
input
close