pka2xml

Docker Pulls GitLab CI Build Status

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.

Features

Usage

The easiest way to use pka2xml is via Docker.

Running with 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>

1. Decrypt a file to XML

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

2. Encrypt XML back to a Packet Tracer file

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

3. Fix a file for compatibility

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

Creating an Alias

To avoid typing the long Docker command every time, you can create an alias in your shell configuration file (e.g., ~/.bashrc or ~/.zshrc).

  1. Open your configuration file:

    nano ~/.bashrc  # or ~/.zpass for zsh
    
  2. 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'
    
  3. Reload your configuration:

    source ~/.bashrc  # or ~/.zshrc
    
  4. Now you can use it much more simply:

    pka2xml -d input.pka output.xml
    

Requirements

This website uses cookies. More information about the use of cookies is available in the cookies policy.
Accept