Open pdehaye opened 4 years ago
The following python function should extract TEKs from their packaged version.
import export_pb2 def process(filename): with open(filename, 'rb') as f: read_export = export_pb2.TemporaryExposureKeyExport() read_export.ParseFromString(f.read()[16:]) # 16 first characters are filler return read_export
This will require the protoc tool to be installed, and a export_pb2.proto file generated from this export.proto file by running
protoc
export_pb2.proto
export.proto
protoc --python_out=. export.proto
(For reference this worked like a breeze for me in figuring out the above).
This by @mh- is more comprehensive and helpful. Sincere thanks to him!
https://github.com/mh-/diagnosis-keys
The following python function should extract TEKs from their packaged version.
This will require the
protoc
tool to be installed, and aexport_pb2.proto
file generated from thisexport.proto
file by runningprotoc --python_out=. export.proto
(For reference this worked like a breeze for me in figuring out the above).