Skip to content

Instantly share code, notes, and snippets.

@sAsPeCt488
Created August 25, 2022 21:49
Show Gist options
  • Save sAsPeCt488/0886572a36d5db4b4da6059c93425d22 to your computer and use it in GitHub Desktop.
Save sAsPeCt488/0886572a36d5db4b4da6059c93425d22 to your computer and use it in GitHub Desktop.
Linux Kernel Pwn helper build script.
#!/bin/bash
if [ $# -lt 3 ]
then
echo "Usage: ./build.sh <exploit.c> <extracted-fs> <outfile>"
exit 1
fi
gcc $1 -o $2/exploit -static
cd $2
find . -print0 \
| cpio --null -ov --format=newc \
| gzip -9 > ../$3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment