Guide
Introduction
pka2xml is a tool that lets you decrypt, encrypt, and retrofit Cisco Packet Tracer simulation files (.pka and .pkt) without needing to install anything on your machine.
Packet Tracer stores its simulation files in an encrypted binary format. This tool reverses that encryption so you can:
- Inspect or edit the raw XML content of a
.pkafile. - Re-encrypt an edited XML file back into a working
.pka. - "Retrofit" a
.pkaso it can be opened by any version of Packet Tracer.
How It Works
File Format
Packet Tracer .pka / .pkt files use a multi-layer encoding:
- Compression — the raw XML is compressed with zlib.
- Obfuscation — bytes are shuffled using a positional XOR scheme.
- Encryption — TwoFish cipher in EAX mode with a fixed key/IV.
- Second obfuscation — another round of positional XOR.
Decryption simply reverses these steps in order.
For the detailed technical write-up, see the original blog post.
Retrofit
The "Retrofit" function decrypts the file, replaces the <VERSION> tag with 6.0.1.0000, and re-encrypts it. Packet Tracer uses this tag to determine version compatibility — by setting it to an old version, any modern version of Packet Tracer will open the file without complaints.
Using the Web Tool
- Go to the Converter Tool page.
- Click the upload area or drag and drop your file.
.pka/.pktfiles → decrypt or retrofit..xmlfiles → encrypt back to.pka.
- Click the appropriate button (Decrypt, Encrypt, or Retrofit).
- Your browser will download the result automatically.
Command-Line Usage
If you prefer to run the tool locally, you can build the CLI from source.
Prerequisites
Build
# Using Docker (easiest)
docker build -t pka2xml:1.0.0 . && docker run -it pka2xml:1.0.0
# Or build manually
make dynamic-installUsage
# Decrypt a .pka to XML
pka2xml -d input.pka output.xml
# Encrypt an XML back to .pka
pka2xml -e input.xml output.pka
# Retrofit (make readable by any PT version)
pka2xml -f input.pka output.pka
# Decrypt a Packet Tracer "nets" file
pka2xml -nets $HOME/packettracer/nets
# Decrypt a Packet Tracer log file
pka2xml -logs $HOME/packettracer/pt_12.05.2020_21.07.17.338.logPrivacy
Files uploaded through the web tool are:
- Sent to the processing API over HTTPS.
- Never stored on any server.
- Returned directly to your browser for download.
License
pka2xml is released under the MIT License. See the LICENSE file for details.