Skip to content

Instantly share code, notes, and snippets.

@gabrielmocanu
Created March 14, 2022 20:12
Show Gist options
  • Save gabrielmocanu/84b4207d3c580b24b997e819fafd546f to your computer and use it in GitHub Desktop.
Save gabrielmocanu/84b4207d3c580b24b997e819fafd546f to your computer and use it in GitHub Desktop.
Makefile to generate shellcode from an assembly file using nasm.
.PHONY: all clean
all: shellcode.bin
shellcode.bin: shellcode.asm
nasm -o $@ $^
print: shellcode.bin
@hexdump -v -e '"\\" 1/1 "x%02x"' $^ ; echo
clean:
-rm -f shellcode.bin *~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment