Skip to content

Commit

Permalink
fixed executable build script and modified manual instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerdodd committed Apr 11, 2018
1 parent b850839 commit 42e4936
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ $ ./kernelpop

1. install `pyinstaller` (steps vary per build system)
2. `$ pyinstaller kernelpop.py --onefile`
3. `$ cp dist/kernelpop .

both of the binary build steps should create a binary `kernelpop` in the project root.

Expand Down
21 changes: 4 additions & 17 deletions create_executable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,14 @@ echo "[*] installing pyinstaller"
pip install pyinstaller || echo "[!] could not install pyinstaller"


single_file="$(pwd)/singlefile.py"
echo "[*] compiling project into single file at $single_file"
dirs=('exploits' 'exploits/linux' 'exploits/mac' 'exploits/windows' 'src' 'constants.py' 'kernelpop.py')
echo "" > $single_file
for dir in ${dirs[@]}; do
current_find_dir="$dir"
echo "[*] searching in $dir"
for file in $(find $(pwd)/$dir -name '*.py'); do
cat $file >> $single_file
echo "" >> $single_file
done
done

echo "[*] building the executable"
pyinstaller singlefile.py --onefile
pyinstaller kernelpop.py --onefile

echo "[*] copying to project directory"
cp dist/singlefile kernelpop
echo "[*] copying executable to project root"
cp dist/kernelpop .

echo "[*] cleaning up build"
rm -r $(pwd)/build $(pwd)/dist $(pwd)/singlefile.spec $(pwd)/singlefile.py
rm -r $(pwd)/build $(pwd)/dist $(pwd)/kernelpop.spec

executable_location="$(pwd)/kernelpop"
echo "[+] executable at $executable_location"
Expand Down

0 comments on commit 42e4936

Please sign in to comment.