A utility to decrypt and encrypt Cisco Packet Tracer (.pka, .pkt) files. This tool allows you to extract the XML content from modern Packet Tracer files or re-encrypt XML back into a compatible format, enabling compatibility with older versions of Packet Tracer.
.pka/.pkt files (using Twofish EAX) into readable XML..pka/.pkt format.The easiest way to use pka2xml is via Docker.
Since the tool runs inside a container, you need to mount your current working directory to the container so it can access your files.
docker run --rm -v $(pwd):/app cylab/pka2xml <command> <input_path> <output_path>
To extract the XML content from a .pka or .pkt file:
docker run --rm -v $(pwd):/app cylab/pka2xml -d /app/input.pka /app/output.xml
To convert an XML file back into a .pka or .pkt file:
docker run --rm -v $(pwd):/app cylab/pka2xml -e /app/output.xml /app/output.pka
To patch a file to a specific version (e.g., 6.0.1.0000) to make it readable in older versions of Packet Tracer:
docker run --rm -v $(pwd):/app cylab/pka2xml -f /app/input.pka /app/fixed_output.pka
To avoid typing the long Docker command every time, you can create an alias in your shell configuration file (e.g., ~/.bashrc or ~/.zshrc).
Open your configuration file:
nano ~/.bashrc # or ~/.zpass for zsh
Add the following line at the end of the file:
alias pka2xml='docker run --user $(id -u):$(id -g) --rm -v $(pwd):/app cylab/pka2xml'
Reload your configuration:
source ~/.bashrc # or ~/.zshrc
Now you can use it much more simply:
pka2xml -d input.pka output.xml