#!/usr/bin/env python3 import binascii import logging import os import sys import time import uuid from structure import Structure from kmsDB2Dict import kmsDB2Dict import kmsPidGenerator import filetimes from formatText import justify, shell_message, byterize # sqlite3 is optional try: import sqlite3 except ImportError: pass logger = logging.getLogger('root') class UUID(Structure): commonHdr = () structure = ( ('raw', '16s'), ) def get(self): return uuid.UUID(bytes_le=str(self).encode('latin-1')) class kmsBase: def __init__(self, data, config): self.data = data self.config = config class kmsRequestStruct(Structure): commonHdr = () structure = ( ('versionMinor', '