This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from Crypto.Cipher import AES | |
from Crypto.Random import get_random_bytes | |
def debug_print(level, *args, **kwargs): | |
if debug_level >= level: | |
print(*args, **kwargs) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PK=/path/to/PK.esl | |
KEK=(/path/to/KEK1.esl /path/to/KEK2.esl) | |
DB=(/path/to/db1.esl /path/to/db2.esl) | |
hash_expand() { | |
[ ! -v H ] && H="$(printf '00%.0s' {1..32})" | |
H="$(printf "${H}$1" | xxd -r -p | sha256sum | awk '{print $1}')" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cmd="${1:-/bin/id -u}" | |
cmd="${cmd} &> /tmp/output" | |
caller() { | |
job_name="transient$(date +%s%N).service" | |
job_path=$(echo $job_name | sed 's/\./_2e/') | |
gdbus call --session \ | |
--dest=org.freedesktop.systemd1 \ | |
--object-path=/org/freedesktop/systemd1 \ | |
--method=org.freedesktop.systemd1.Manager.StartTransientUnit \ |