Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
quick/dirty build a dynamic lib from xpwn - eric monti WARNING: this was for something really specific -- YMMV... drop this in your top-level directory where you checked out planetbeing/xpwn and cross your fingers ;)
#!/bin/bash
# quick/dirty build a dynamic lib from xpwn - eric monti
# WARNING: this was for something really specific -- YMMV...
# drop this in your top-level directory where you checked out planetbeing/xpwn and cross your fingers ;)
cmake -f CMakeLists.txt
make || exit 1
rm -rf ./sharedlib
mkdir -p ./sharedlib/lib
tmpdir=`mktemp -d .sharedlib_build.XXXX`
echo "[+] building in $tmpdir"
pushd $tmpdir
for staticlib in `find .. -name \*.a -type f`; do
cp $staticlib ../sharedlib/lib/
ar -x $staticlib
done
cc -o ../sharedlib/lib/libxpwn.dylib -dynamiclib *.o -lpng -lcrypto -lz -lstdc++ -lbz2 -framework CoreFoundation -framework IOKit
popd
test -f sharedlib/lib/libxpwn.dylib || exit 1
echo "[+] removing $tmpdir"
rm -rf $tmpdir
cp -r includes ./sharedlib/include
echo "[+] build finished. files in $(pwd)/sharedlib"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.