Skip to content

Instantly share code, notes, and snippets.

@kntjspr
Created June 12, 2025 08:58
Show Gist options
  • Select an option

  • Save kntjspr/e126d4b432ef5b6a0a4327348b0d05de to your computer and use it in GitHub Desktop.

Select an option

Save kntjspr/e126d4b432ef5b6a0a4327348b0d05de to your computer and use it in GitHub Desktop.
Convert Donut shellcode (.bin) into escaped raw shellcode in C using a one-liner python script.
py -c "data = open('payload.bin','rb').read(); print('unsigned char shellcode[] = \"' + ''.join(f'\\x{b:02x}' for b in data) + '\";')" > shellcode.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment