Skip to main content

Scriptable green pass verifier

Project description

Green Pass Verifier

A verified green pass

Scriptable green pass verifier. With this application you can automatize accesses based on green pass validity. It can also be used to analyze your digital certification (e.g. to print which key was used to sign the certificate, --verbose).

It is compatibile with EU certificates (DGC) and UK certificate (NHS).

Installation

You need to have pip and libzbar to install the application.

You can install it using your favorite package manager, for instance in Ubuntu:

sudo apt install python3-pip libzbar0

You can just install the application using pip:

pip install greenpass

If you want to install it from sources, install the python3 requirements using the following command:

pip3 install -r requirements.txt

Usage

You can feed the application with different file formats, for instance:

Green pass official PDFs

greenpass --pdf greenpass.pdf

QRCode images in PNG

greenpass --qr greenpass.png

Txt files with the content of the qrcode

greenpass --txt greenpass.txt

Standard input and pipes

zbarimg --raw greenpass.png | greenpass --txt -

On a side note, you can verify camera-acquired images if your scanner prints the raw content of the QRcode on stdout

zbarcam --raw -q1 | greenpass --txt -

The application returns an UNIX compatible code, therefore you can concatenate commands that will be executed only if the green pass is verified.

greenpass --qr greenpass.png && echo "green pass ok"

You can also get the expiration configuration using --settings without other inputs.

greenpass --settings

Settings screen

Switches

-h --help

Help, print the help message

You need to use one of:

--settings

Dump the settings used by the Italian application

--qr QR

Analyze the qrcode QR

--pdf PDF

Analyze the pdf file PDF

--txt TXT

Analyze the txt file TXT

Caching options:

--cachedir CACHEDIR

Use CACHEDIR as the cache directory, by default the cache is placed in $HOME/.local/greenpass.

Miscellaneous switches:

--raw

Print the raw content (JSON) of the certificate

--no-color

Disable colored output.

--no-cache

Disable cache, redownload everything.

--key KEY

Use the content of the file KEY as the public certificate (DGC) or the public key (NHS) to verify the certificate.

--verbose

Print more information (e.g. which key verifies the certificate).

Pointers

If you want more information on the green pass certification and how to parse or verify it you can refer to the following resources:

Greenpass Encoding documentation

Official Italian Android application

JSON schema and specifications

A very detailed blog post on how decode the pass

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

greenpass-3.5.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

greenpass-3.5-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file greenpass-3.5.tar.gz.

File metadata

  • Download URL: greenpass-3.5.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5

File hashes

Hashes for greenpass-3.5.tar.gz
Algorithm Hash digest
SHA256 883bdd3a7a25fc54ae3bbe8816689a0362757fe980317b31bae8933712609819
MD5 f0261dbe23358efa0b8279f3cf1920cd
BLAKE2b-256 77ce9b1e2093cf5b655528607a76f5c867a67eecb5430bcfd9dab32a7ae02a2f

See more details on using hashes here.

File details

Details for the file greenpass-3.5-py3-none-any.whl.

File metadata

  • Download URL: greenpass-3.5-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.5

File hashes

Hashes for greenpass-3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f67be60f830cd783d7ce60f6f790e71e7d74d0f40c82e365fb95f78369d8d25f
MD5 52aa862e4f0850af29746ae4cf61442a
BLAKE2b-256 81e6f2f00e730e1e64647727f6db90b73935364d391b7aafa1cf31c50bf536cd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page