Created
December 14, 2024 18:09
-
-
Save retpolanne/777a4660bd5eb50bee200daa6bf9b8b9 to your computer and use it in GitHub Desktop.
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 | |
# Ref https://docs.kernel.org/admin-guide/binfmt-misc.html | |
# enabled | |
# interpreter /usr/bin/qemu-x86_64 | |
# flags: POCF | |
# offset 0 | |
# magic 7f454c4602010100000000000000000002003e00 | |
# mask fffffffffffefe00fffffffffffffffffeffffff | |
# :name:type:offset:magic:mask:interpreter:flags | |
BINFMT=":qemu-x86_64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-x86_64:POCF" | |
echo "$BINFMT" > /proc/sys/fs/binfmt_misc/register |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment