Skip to content

Instantly share code, notes, and snippets.

View edomora97's full-sized avatar
🥄
Working hard!

Edoardo Morassutto edomora97

🥄
Working hard!
View GitHub Profile
#!/usr/bin/env python3
import contextlib, ctypes, os, pathlib, subprocess, sys
EFIVARSFS = pathlib.Path('/sys/firmware/efi/efivars')
LOADER_GUID = '4a67b082-0a4c-41cf-b6c7-440b29bb8c4f'
LOADER_ENTRY_ONE_SHOT = 'LoaderEntryOneShot'
FS_IMMUTABLE_FL = 0x00000010 # see <linux/fs.h>
try: