Skip to main content

CRX Unpack in Python

Package version Documentation Status Python versions supported License: MIT

This module contains several utilities for working with Google Chrome extension files (CRXs), which have the *.crx file extension. The goal of this project is to mimic as closely as possible the functionality of Google Chrome when these extensions are unpacked and installed.

Documentation

Please view the full documentation for this project on Read the Docs.

Installation

Since crx_unpack is available on PyPI, you can install it using pip:

$ pip install crx_unpack

Structure of CRX Package Format

The information in this section introduces the structure and contents of CRX files.

As explained at https://developer.chrome.com/extensions/crx

Package Header

The header contains the author’s public key and the extension’s signature. The signature is generated from the ZIP file using SHA-1 with the author’s private key. The header requires a little-endian byte ordering with 4-byte alignment. The following table describes the fields of the .crx header in order:

Field

Type

Length

Value

Description

magic number

char[]

32 bits

Cr24

Chrome requires this constant at the beginning of every .crx package.

version

unsigned int

32 bits

2

The version of the *.crx file format used (currently 2).

public key length

unsigned int

32 bits

pubkey.length

The length of the RSA public key in bytes.

signature length

unsigned int

32 bits

sig.length

The length of the signature in bytes.

public key

byte[]

pubkey.length

pubkey.contents

The contents of the author’s RSA public key formatted as an X509 SubjectPublicKeyInfo block.

signature

byte[]

sig.length

sig.contents

The signature of the ZIP content using the author’s private key. The signature is created using the RSA algorithm with the SHA-1 hash function.

Extension Contents

The extension’s ZIP file is appended to the *.crx package after the header. This should be the same ZIP file that the signature in the header was generated from.

Metadata

Release files for crx-unpack 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crx-unpack 0.1.4
File Size Uploaded Provenance Actions
crx_unpack-0.1.4.tar.gz 13.3 kB Without provenance Details for crx_unpack-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crx-unpack 0.1.4
File Interpreter ABI Platform Actions
crx_unpack-0.1.4-py3-none-any.whl Python 3 none any Details for crx_unpack-0.1.4-py3-none-any.whl

Total release size: 28.9 kB

Release files / crx_unpack-0.1.4.tar.gz

Download URL crx_unpack-0.1.4.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c62fe369287f563b09a1a1745dcfe3bf852d6c9b9869fe8a8bdab218b9b9aab5
BLAKE2b-256 checksum
How to use checksums
87de32d51020e0f931c2cdba1a868ac4e624686789e8108e0940a98ed776b62a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / crx_unpack-0.1.4-py3-none-any.whl

Download URL crx_unpack-0.1.4-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bb328491cf077d05f8ca34dfff02bc653ada7787a7d5772675714353651e977
BLAKE2b-256 checksum
How to use checksums
e5ee07b45a1260c97939760cbe9cb16cbefa01f3a701f3cea747de7779b44312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for crx-unpack 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page