Skip to content

kirisakow/covid-certificate-qr-decoder

Repository files navigation

WARNING This library is still under development and intended for experimental purposes only.

COVID Vaccination Certificate QR code decoder

python3 ./webcam_capture_QR_code.py | python3 ./covid-certificate-qr-decoder.py
  • The webcam_capture_QR_code.py script is a QR-code scanner. It turns on your webcam, waits for you to show it a QR-code, decodes it, extracts the data, prints it out, and exits. If your QR-code is a COVID vaccination certificate, the output will be a base45 string that you can recognize by the HC1: prefix.

  • The covid-certificate-qr-decoder.py script can decode a COVID vaccination certificate base45 string (recognizable by the HC1: prefix), decompress the data, decode it again as a COSE message based on the CBOR tag, deserialize the resulting bytestring, print it out, and exit. This script works in pair with its best buddy script webcam_capture_QR_code.py.

Installation

  1. Clone the repository.
  2. Install dependencies: python3 -m pip install -r requirements.txt

Usage

Launch one or the other script, or both, or any of them in combination with other shell commands:

# scan a QR-code with your webcam and pipe the base45 string to the decoder:
python3 ./webcam_capture_QR_code.py | python3 ./covid-certificate-qr-decoder.py

# or decode any base45 string:
echo 'HC1:.........' | python3 ./covid-certificate-qr-decoder.py
# IMPORTANT NOTE: if you use BASH, the base45 string must be enclosed in single —not double— quotes, as we don't want BASH to interpret $ as a special character.

# or scan any QR-code with your webcam:
python3 ./webcam_capture_QR_code.py

Technical resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages