This repository contains scripts that help you validate QR codes.

Overview

Validation tools

This repository contains scripts that help you validate QR codes.

It's hacky, and a warning for Apple Silicon users: the dependencies I use are a mess on your platform. I've given up trying to get it working.

Initializing

First make sure that you have Python 3.9+ installed and working.

Secondly, install all the dependencies:

pip3 install -r requirements.txt

Thirdly, update trustlist.json using the response from the gateway.

No access to the gateway? Then you can use the German trust list:

https://de.dscg.ubirch.com/trustList/DSC/

Just remove the first line (it's a signature of the document).

validate_quality_assurance.py

This tool validates the encoding, schema and signature of all the Quality Assurance QR codes.

The QA repository can be found here:

https://github.com/eu-digital-green-certificates/dcc-quality-assurance

It has the following arguments, both of which are optional and have sensible defaults:

--repo 'path/to/dcc-quality-assurance'
--countries 'NL,DE,SE'

validate_hcert.py

This tool validates the encoding, schema and signature of all the hcert string. It reads the hcerts from std-in, one line per hcert, and validates in serial.

Example (unix-likes)

cat examples/hcert-examples.txt | python3 validate_hcert.py

Example (windows)

type examples\hcert-examples.txt | python validate_hcert.py

qr_to_hcert.py

This little tool converts a QR into a hcert string and dumps that to std-out.

Now you can do this to validate a QR code:

python qr_to_hcert.py examples/VAC.png | python validate_hcert.py

hcert_to_qr.py

Takes QRs from std:in; for each line, generates a QR. Dumps all QRs to std:out as base64. The last QR created is saved as "my.png" in the current folder

cat examples/hcert.txt | python hcert_to_qr.py

print_payload_hcert.py

Takes QRs from std:in; for each line, unpacks hcert and dumps all of the output to std:out.

cat examples/hcert.txt | python print_payload_hcert.py

print_payload_hcert.py

Takes a QR, parses it, unpacks hcert and dumps all of the output to std:out.

python print_payload_qr.py --file my.png
Owner
Ryan Barrett
Ryan Barrett
Obsidian tools - a Python package for analysing an Obsidian.md vault

obsidiantools is a Python package for getting structured metadata about your Obsidian.md notes and analysing your vault.

Mark Farragher 153 Jan 04, 2023
An okayish python script to generate a random Euler circuit with given number of vertices and edges.

Euler-Circuit-Test-Case-Generator An okayish python script to generate a random Euler circuit with given number of vertices and edges. Executing the S

Alen Antony 1 Nov 13, 2021
Personal Toolbox Package

Jammy (Jam) A personal toolbox by Qsh.zh. Usage setup For core package, run pip install jammy To access functions in bin git clone https://gitlab.com/

5 Sep 16, 2022
Finds price floor for every single attribute in a given collection

Solana Solanart Scanner Enjoy the Free Code Steps to run Download VS Code

Dalton Nisbett 19 Oct 20, 2022
Library for processing molecules and reactions in python way

Chython [ˈkʌɪθ(ə)n] Library for processing molecules and reactions in python way. Features: Read/write/convert formats: MDL .RDF (.RXN) and .SDF (.MOL

16 Dec 01, 2022
This is Cool Utility tools that you can use in python.

This is Cool Utility tools that you can use in python. There are a few tools that you might find very useful, you can use this on pretty much any project and some utils might help you a lot and save

Senarc Studios 6 Apr 18, 2022
python script to generate color coded resistor images

Resistor image generator I got nerdsniped into making this. It's not finished at all, and the code is messy. The end goal it generate a whole E-series

MichD 1 Nov 12, 2021
A hashtag from string extract python module

A hashtag from string extract python module

Fayas Noushad 3 Aug 10, 2022
RapidFuzz is a fast string matching library for Python and C++

RapidFuzz is a fast string matching library for Python and C++, which is using the string similarity calculations from FuzzyWuzzy

Max Bachmann 1.7k Jan 04, 2023
iOS Snapchat parser for chats and cached files

ParseSnapchat iOS Snapchat parser for chats and cached files Tested on Windows and Linux install required libraries: pip install -r requirements.txt c

11 Dec 05, 2022
A Container for the Dependency Injection in Python.

Python Dependency Injection library aiodi is a Container for the Dependency Injection in Python. Installation Use the package manager pip to install a

Denis NA 3 Nov 25, 2022
A clock app, which helps you with routine tasks.

Clock This app helps you with routine tasks. Alarm Clock Timer Stop Watch World Time (Which city you want) About me Full name: Matin Ardestani Age: 14

Matin Ardestani 13 Jul 30, 2022
Abstraction of a Unit, includes convertions and basic operations.

Units Abstraction of a Unit, includes convertions and basic operations. ------ EXAMPLE : Free Fall (No air resistance) ------- from units_test import

1 Dec 23, 2021
Package that allows for validate and sanitize of string values.

py.validator A library of string validators and sanitizers Insipired by validator.js Strings only This library validates and sanitizes strings only. P

Sanel Hadzini 22 Nov 08, 2022
jsoooooooon derulo - Make sure your 'jason derulo' is featured as the first part of your json data

jsonderulo Make sure your 'jason derulo' is featured as the first part of your json data Install: # python pip install jsonderulo poetry add jsonderul

jesse 3 Sep 13, 2021
JeNot - A tool to notify you when Jenkins builds are done.

JeNot - Jenkins Notifications NOTE: under construction, buggy, and not production-ready What A tool to notify you when Jenkins builds are done. Why Je

1 Jun 24, 2022
Edit SRT files to delay subtitle time-stamps.

subtitle-delay A program written in Python that directly edits SRT file to delay the subtitles. Features: Will throw an error if delaying with negativ

8 Jul 17, 2022
A utility that makes it easy to work with Python projects containing lots of packages, of which you only want to develop some.

Mixed development source packages on top of stable constraints using pip mxdev [mɪks dɛv] is a utility that makes it easy to work with Python projects

BlueDynamics Alliance 6 Jun 08, 2022
Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.

Lark - Parsing Library & Toolkit 3.5k Jan 05, 2023
Automatic generator of readmes for git repositories (Includes file' listing)

Readme Generator We are bored of write the same things once and once again. We trust in the comments made inside of our files, and we decided to autom

Natalia Vera Duran 6 Jul 20, 2021