Last active
August 22, 2025 01:23
-
-
Save psifertex/31d9bc3167eca91e466ebaae4382521c to your computer and use it in GitHub Desktop.
Revisions
-
psifertex revised this gist
Jul 10, 2025 . 1 changed file with 15 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,9 +8,9 @@ # if [[ "$OSTYPE" == "darwin"* ]]; then SED_INPLACE="-i ''" else SED_INPLACE="-i" fi if [ -d ~/Downloads ] @@ -95,8 +95,19 @@ popd echo "\u001b[36m[+] Updating the git hash..." echo "\u001b[0m" # Get current Binary Ninja dev hash from BinExportDeps.cmake (dev branch only) CURRENT_BN_HASH=$(awk '/else\(\)/{flag=1} flag && /_binexport_binaryninja_git_tag/{getline; print; exit}' $BE_PATH/cmake/BinExportDeps.cmake | grep -o '[a-f0-9]\{40\}') echo "Current BN dev hash in BinExportDeps.cmake: $CURRENT_BN_HASH" echo "Binary Ninja hash from installation: $BINARY_HASH" # Update the Binary Ninja dev hash in BinExportDeps.cmake if [ "$CURRENT_BN_HASH" != "$BINARY_HASH" ]; then echo "Updating BN dev hash from $CURRENT_BN_HASH to $BINARY_HASH" sed $SED_INPLACE "s/$CURRENT_BN_HASH/$BINARY_HASH/g" $BE_PATH/cmake/BinExportDeps.cmake else echo "BN dev hash already up to date" fi echo "\u001b[36m[+] Running regenerate-api-stubs..." echo "\u001b[0m" -
psifertex revised this gist
Dec 1, 2024 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,12 @@ # that requires applying this patch, remove when resolved # if [[ "$OSTYPE" == "darwin"* ]]; then SED_CMD="sed -i '' -E -e" else SED_CMD="sed -i -E -e" fi if [ -d ~/Downloads ] then DOWNLOADS=~/Downloads @@ -89,8 +95,8 @@ popd echo "\u001b[36m[+] Updating the git hash..." echo "\u001b[0m" $SED_CMD "s/(1bd42a73e612f50c68d802acda674c21a30e980c|6e2b374dece03f6fb48a1615fa2bfee809ec2157)/$BINARY_HASH/g" $BE_PATH/cmake/BinExportDeps.cmake $SED_CMD "s/2023-05-18/2023-09-24/g" $BE_PATH/cmake/BinExportDeps.cmake echo "\u001b[36m[+] Running regenerate-api-stubs..." echo "\u001b[0m" -
psifertex revised this gist
May 7, 2024 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,16 +21,16 @@ then BN_PATH=`cat ~/.binaryninja/lastrun` BINARY_HASH=$(sed 's/^.*\///' < $BN_PATH/api_REVISION.txt 2>/dev/null) CORES=$(nproc --all) PLUGIN_DEST=~/.binaryninja/plugins/binexport12_binaryninja.so PLUGIN_SRC=~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.so elif [ -d ~/Library/Application\ Support/Binary\ Ninja ] && [ -f ~/Library/Application\ Support/Binary\ Ninja/lastrun ] then BN_USER=~/Library/Application\ Support/Binary\ Ninja BN_PATH=`cat ~/Library/Application\ Support/Binary\ Ninja/lastrun` BINARY_HASH=$(sed 's/^.*\///' < $BN_PATH/../Resources/api_REVISION.txt 2>/dev/null) CORES=$(sysctl -n hw.logicalcpu) PLUGIN_DEST=~/Library/Application\ Support/Binary\ Ninja/plugins/binexport12_binaryninja.dylib PLUGIN_SRC=~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.dylib else echo "Failed to find appropriate Binary Ninja user directory." exit 1 -
psifertex revised this gist
Nov 30, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -90,7 +90,7 @@ popd echo "\u001b[36m[+] Updating the git hash..." echo "\u001b[0m" sed -i '' -E -e "s/(1bd42a73e612f50c68d802acda674c21a30e980c|6e2b374dece03f6fb48a1615fa2bfee809ec2157)/$BINARY_HASH/g" $BE_PATH/cmake/BinExportDeps.cmake sed -i '' -E -e "s/2023-05-18/2023-09-24/g" $BE_PATH/cmake/BinExportDeps.cmake echo "\u001b[36m[+] Running regenerate-api-stubs..." echo "\u001b[0m" -
psifertex revised this gist
Nov 15, 2023 . 1 changed file with 32 additions and 43 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,10 @@ # Note: # CMake, Clang, clang-format, Ninja, git and sed are required to build # # Note that currently there is a bug (https://github.com/google/binexport/issues/117) # that requires applying this patch, remove when resolved # if [ -d ~/Downloads ] then @@ -17,12 +21,16 @@ then BN_PATH=`cat ~/.binaryninja/lastrun` BINARY_HASH=$(sed 's/^.*\///' < $BN_PATH/api_REVISION.txt 2>/dev/null) CORES=$(nproc --all) PLUGIN_DEST="~/.binaryninja/plugins/binexport12_binaryninja.so" PLUGIN_SRC="~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.so" elif [ -d ~/Library/Application\ Support/Binary\ Ninja ] && [ -f ~/Library/Application\ Support/Binary\ Ninja/lastrun ] then BN_USER=~/Library/Application\ Support/Binary\ Ninja BN_PATH=`cat ~/Library/Application\ Support/Binary\ Ninja/lastrun` BINARY_HASH=$(sed 's/^.*\///' < $BN_PATH/../Resources/api_REVISION.txt 2>/dev/null) CORES=$(sysctl -n hw.logicalcpu) PLUGIN_DEST="~/Library/Application\ Support/Binary\ Ninja/plugins/binexport12_binaryninja.dylib" PLUGIN_SRC="~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.dylib" else echo "Failed to find appropriate Binary Ninja user directory." exit 1 @@ -59,29 +67,30 @@ then else git clone https://github.com/google/binexport.git $BE_PATH fi if [ ! -d $BN_API_PATH ] then git clone --recursive --branch dev https://github.com/Vector35/binaryninja-api.git $BN_API_PATH fi pushd $BN_API_PATH if git fetch --all then if git checkout "$BINARY_HASH" then git pull echo "Binary Ninja API exists, repo updated" else echo Not a repo or could not match binary hash exit fi fi popd echo "\u001b[36m[+] Updating the git hash..." echo "\u001b[0m" sed -i '' -E -e "s/(1bd42a73e612f50c68d802acda674c21a30e980c|6e2b374dece03f6fb48a1615fa2bfee809ec2157)/$BINARY_HASH/g" $BE_PATH/cmake/BinExportDeps.cmake sed -i '' -E -e "s/(2023-05-18/2023-09-24/g" $BE_PATH/cmake/BinExportDeps.cmake echo "\u001b[36m[+] Running regenerate-api-stubs..." echo "\u001b[0m" @@ -99,33 +108,13 @@ cmake --build . --config Release -- "-j$CORES" popd if [ -f $PLUGIN_DEST ] then echo "\u001b[36m[+] Not linking the plugin, file already exists\u001b[0m" else echo "\u001b[36m[+] Linking BinExport plugin to Binary Ninja plugin folder\u001b[0m" ln -sf $PLUGIN_SRC $PLUGIN_DEST fi echo "\u001b[32;1m[+] Done!" echo "\u001b[0m" -
psifertex revised this gist
Sep 26, 2023 . 1 changed file with 1 addition and 26 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,30 +2,6 @@ # Note: # CMake, Clang, clang-format, Ninja, git and sed are required to build if [ -d ~/Downloads ] then @@ -74,7 +50,6 @@ then if git fetch --all then git reset --hard origin/main # Because previous runs of this script will dirty the repo echo "BinExport exists, repo updated" else echo Not a repo, remove $BE_PATH to continue @@ -119,7 +94,7 @@ pushd $BE_PATH echo "\u001b[36m[+] Building BinExport..." echo "\u001b[0m" rm -rf build && mkdir build && cd build cmake .. -G Ninja -DCMAKE_CXX_FLAGS="-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION" -DBINEXPORT_BINARYNINJA_CHANNEL=DEV -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$PWD" -DBINEXPORT_ENABLE_IDAPRO=OFF -DBINEXPORT_ENABLE_BINARYNINJA=ON cmake --build . --config Release -- "-j$CORES" popd -
psifertex renamed this gist
Sep 26, 2023 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,7 @@ # # Note that currently there is a bug (https://github.com/google/binexport/issues/117) # that requires applying this patch, remove when resolved # patch_boost() { cat > /tmp/boost.patch << ** @@ -26,8 +27,6 @@ git apply patch /tmp/boost.patch rm /tmp/boost.patch } if [ -d ~/Downloads ] then DOWNLOADS=~/Downloads -
psifertex revised this gist
Sep 26, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,8 @@ # Note: # CMake, Clang, clang-format, Ninja, git and sed are required to build # # Note that currently there is a bug (https://github.com/google/binexport/issues/117) # that requires applying this patch, remove when resolved patch_boost() { cat > /tmp/boost.patch << ** -
psifertex revised this gist
Sep 26, 2023 . 1 changed file with 27 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,31 @@ #!/usr/bin/env zsh # Note: # CMake, Clang, clang-format, Ninja, git and sed are required to build # # Note that currently there is a bug that requires applying this patch, remove when resolved patch_boost() { cat > /tmp/boost.patch << ** diff --git a/third_party/boost_parts/boost/container_hash/hash.hpp b/third_party/boost_parts/boost/container_hash/hash.hpp index 76de793..32f0559 100644 --- a/third_party/boost_parts/boost/container_hash/hash.hpp +++ b/third_party/boost_parts/boost/container_hash/hash.hpp @@ -127,7 +127,7 @@ namespace boost }; #else template <typename T> - struct hash_base : std::unary_function<T, std::size_t> {}; + struct hash_base : std::__unary_function<T, std::size_t> {}; #endif struct enable_hash_value { typedef std::size_t type; }; ** git apply patch /tmp/boost.patch rm /tmp/boost.patch } echo hi if [ -d ~/Downloads ] then @@ -50,6 +74,7 @@ then if git fetch --all then git reset --hard origin/main # Because previous runs of this script will dirty the repo patch_boost echo "BinExport exists, repo updated" else echo Not a repo, remove $BE_PATH to continue @@ -85,7 +110,7 @@ sed -i'' -e "s/2023-05-18/modified/g" $BE_PATH/cmake/BinExportDeps.cmake echo "\u001b[36m[+] Running regenerate-api-stubs..." echo "\u001b[0m" pushd $BE_PATH/binaryninja/stubs/ ./regenerate-api-stubs.sh $BN_API_PATH popd -
psifertex revised this gist
Jun 20, 2023 . 1 changed file with 29 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ then DOWNLOADS=~/Downloads else mdir ~/downloads DOWNLOAD=~/downloads fi BE_PATH=$DOWNLOADS/binexport if [ -d ~/.binaryninja ] && [ -f ~/.binaryninja/lastrun ] @@ -80,8 +80,8 @@ fi echo "\u001b[36m[+] Updating the git hash..." echo "\u001b[0m" sed -i'' -e "s/1bd42a73e612f50c68d802acda674c21a30e980c/$BINARY_HASH/g" $BE_PATH/cmake/BinExportDeps.cmake sed -i'' -e "s/2023-05-18/modified/g" $BE_PATH/cmake/BinExportDeps.cmake echo "\u001b[36m[+] Running regenerate-api-stubs..." echo "\u001b[0m" @@ -99,19 +99,32 @@ cmake --build . --config Release -- "-j$CORES" popd case "$OSTYPE" in linux*) if [ -f ~/.binaryninja/plugins/binexport12_binaryninja.so ] then echo "\u001b[36m[+] Unable to link .so, file already exists" echo "\u001b[0m" exit fi echo "\u001b[36m[+] Linking BinExport plugin to Binary Ninja plugin folder" echo "\u001b[0m" ln -sf ~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.so ~/.binaryninja/plugins ;; darwin*) if [ -f ~/Library/Application\ Support/Binary\ Ninja/plugins/binexport12_binaryninja.dylib ] then echo "\u001b[36m[+] Unable to link .dylib, file already exists" echo "\u001b[0m" exit fi echo "\u001b[36m[+] Linking BinExport plugin to Binary Ninja plugin folder" echo "\u001b[0m" ln -sf ~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.dylib ~/Library/Application\ Support/Binary\ Ninja/plugins ;; *) ;; esac echo "\u001b[32;1m[+] Done!" echo "\u001b[0m" -
psifertex revised this gist
May 8, 2023 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ then DOWNLOADS=~/Downloads else mdir ~/downloads DOWNLOADS=~/downloads fi BE_PATH=$DOWNLOADS/binexport if [ -d ~/.binaryninja ] && [ -f ~/.binaryninja/lastrun ] @@ -103,14 +103,14 @@ if [ ! -L $BE_PATH/build/binaryninja/binexport12_binaryninja.so ] then echo "\u001b[36m[+] Linking BinExport plugin to Binary Ninja plugin folder" echo "\u001b[0m" ln -sf $DOWNLOADS/binexport/build/binaryninja/binexport12_binaryninja.so ~/.binaryninja/plugins fi if [ ! -L $DOWNLOADS/binexport/build/binaryninja/binexport12_binaryninja.dylib ] then echo "\u001b[36m[+] Linking BinExport plugin to Binary Ninja plugin folder" echo "\u001b[0m" ln -sf $DOWNLOADS/binexport/build/binaryninja/binexport12_binaryninja.dylib ~/Library/Application\ Support/Binary\ Ninja/plugins fi echo "\u001b[32;1m[+] Done!" -
psifertex revised this gist
Apr 19, 2023 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,11 +16,13 @@ then BN_USER=~/.binaryninja BN_PATH=`cat ~/.binaryninja/lastrun` BINARY_HASH=$(sed 's/^.*\///' < $BN_PATH/api_REVISION.txt 2>/dev/null) CORES=$(nproc --all) elif [ -d ~/Library/Application\ Support/Binary\ Ninja ] && [ -f ~/Library/Application\ Support/Binary\ Ninja/lastrun ] then BN_USER=~/Library/Application\ Support/Binary\ Ninja BN_PATH=`cat ~/Library/Application\ Support/Binary\ Ninja/lastrun` BINARY_HASH=$(sed 's/^.*\///' < $BN_PATH/../Resources/api_REVISION.txt 2>/dev/null) CORES=$(sysctl -n hw.logicalcpu) else echo "Failed to find appropriate Binary Ninja user directory." exit 1 @@ -93,7 +95,7 @@ echo "\u001b[36m[+] Building BinExport..." echo "\u001b[0m" rm -rf build && mkdir build && cd build cmake .. -G Ninja -DBINEXPORT_BINARYNINJA_CHANNEL=DEV -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$PWD" -DBINEXPORT_ENABLE_IDAPRO=OFF -DBINEXPORT_ENABLE_BINARYNINJA=ON cmake --build . --config Release -- "-j$CORES" popd -
psifertex revised this gist
Apr 19, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -93,7 +93,7 @@ echo "\u001b[36m[+] Building BinExport..." echo "\u001b[0m" rm -rf build && mkdir build && cd build cmake .. -G Ninja -DBINEXPORT_BINARYNINJA_CHANNEL=DEV -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$PWD" -DBINEXPORT_ENABLE_IDAPRO=OFF -DBINEXPORT_ENABLE_BINARYNINJA=ON cmake --build . --config Release -- "-jauto" popd -
psifertex revised this gist
Apr 18, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -101,7 +101,7 @@ if [ ! -L $BE_PATH/build/binaryninja/binexport12_binaryninja.so ] then echo "\u001b[36m[+] Linking BinExport plugin to Binary Ninja plugin folder" echo "\u001b[0m" ln -sf ~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.so ~/Library/Application\ Support/Binary\ Ninja/plugins fi if [ ! -L ~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.dylib ] -
psifertex revised this gist
Apr 18, 2023 . 1 changed file with 51 additions and 20 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,14 +2,38 @@ # Note: # CMake, Clang, clang-format, Ninja, and sed are required to build if [ -d ~/Downloads ] then DOWNLOADS=~/Downloads else mdir ~/downloads DOWNLOAD=~/downloads fi BE_PATH=$DOWNLOADS/binexport if [ -d ~/.binaryninja ] && [ -f ~/.binaryninja/lastrun ] then BN_USER=~/.binaryninja BN_PATH=`cat ~/.binaryninja/lastrun` BINARY_HASH=$(sed 's/^.*\///' < $BN_PATH/api_REVISION.txt 2>/dev/null) elif [ -d ~/Library/Application\ Support/Binary\ Ninja ] && [ -f ~/Library/Application\ Support/Binary\ Ninja/lastrun ] then BN_USER=~/Library/Application\ Support/Binary\ Ninja BN_PATH=`cat ~/Library/Application\ Support/Binary\ Ninja/lastrun` BINARY_HASH=$(sed 's/^.*\///' < $BN_PATH/../Resources/api_REVISION.txt 2>/dev/null) else echo "Failed to find appropriate Binary Ninja user directory." exit 1 fi BN_API_PATH=$DOWNLOADS/binaryninja-api echo "Configuration:" echo " DOWNLOADS: $DOWNLOADS" echo " BE_PATH: $BE_PATH" echo " BN_API_PATH: $BN_API_PATH" echo " BN_PATH: $BN_PATH" echo " BINARY_HASH: $BINARY_HASH" if [ -z "$BINARY_HASH" ] then echo "Failed to find appropriate hash for Binary Ninja" @@ -18,24 +42,24 @@ fi echo "\u001b[36m[+] Cloning BinExport & Binary Ninja API..." echo "\u001b[0m" if [ -d $BE_PATH ] then pushd $BE_PATH if git fetch --all then git reset --hard origin/main # Because previous runs of this script will dirty the repo echo "BinExport exists, repo updated" else echo Not a repo, remove $BE_PATH to continue exit fi popd else git clone https://github.com/google/binexport.git $BE_PATH fi if [ -d $BN_API_PATH ] then pushd $BN_API_PATH if git fetch --all then if git checkout "$BINARY_HASH" @@ -49,30 +73,37 @@ then fi popd else git clone --recursive --branch dev https://github.com/Vector35/binaryninja-api.git $BN_API_PATH fi echo "\u001b[36m[+] Updating the git hash..." echo "\u001b[0m" sed -i'' -e "s/9d8bc846bd213407fb1a7a19af2a96f17501ac3b/$BINARY_HASH/g" $BE_PATH/cmake/BinExportDeps.cmake sed -i'' -e "s/2023-02-15/modified/g" $BE_PATH/cmake/BinExportDeps.cmake echo "\u001b[36m[+] Running regenerate-api-stubs..." echo "\u001b[0m" pushd $BE_PATH/third_party/binaryninja_api/ ./regenerate-api-stubs.sh $BN_API_PATH popd pushd $BE_PATH echo "\u001b[36m[+] Building BinExport..." echo "\u001b[0m" rm -rf build && mkdir build && cd build cmake .. -G Ninja -DBINEXPORT_BINARYNINJA_CHANNEL=DEV -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$PWD" -DBINEXPORT_ENABLE_IDAPRO=OFF -DBINEXPORT_ENABLE_BINARYNINJA=ON cmake --build . --config Release -- "-j auto" popd if [ ! -L $BE_PATH/build/binaryninja/binexport12_binaryninja.so ] then echo "\u001b[36m[+] Linking BinExport plugin to Binary Ninja plugin folder" echo "\u001b[0m" ln -sf ~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.dylib ~/Library/Application\ Support/Binary\ Ninja/plugins fi if [ ! -L ~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.dylib ] then echo "\u001b[36m[+] Linking BinExport plugin to Binary Ninja plugin folder" -
psifertex revised this gist
Mar 28, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ # # sudo defaults write /Library/LaunchAgents/com.google.security.zynamics.bindiff.plist Disabled -bool YES BINARY_HASH=$(sed 's/^.*\///' < /Applications/Binary\ Ninja.app/Contents/Resources/api_REVISION.txt 2>/dev/null) if [ -z "$BINARY_HASH" ] then echo "Failed to find appropriate hash for Binary Ninja" -
psifertex revised this gist
Mar 23, 2023 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,10 @@ # CMake, Clang, clang-format, Ninja, and sed are required to build # !! Change the second git hash to the most recent git commit when using the Binary Ninja development API branch !! # !! It's located in the sed part of this script (L#15) !! # If you've previously run the BinDiff installer, by default it's going to keep overwritting the plugin. # Use this to prevent that: # # sudo defaults write /Library/LaunchAgents/com.google.security.zynamics.bindiff.plist Disabled -bool YES BINARY_HASH=$(sed 's/^.*\///' < /Applications/Binary\ Ninja-dev.app/Contents/Resources/api_REVISION.txt 2>/dev/null) if [ -z "$BINARY_HASH" ] -
psifertex revised this gist
Mar 10, 2023 . 1 changed file with 9 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,13 +32,16 @@ fi if [ -d ~/Downloads/binaryninja-api ] then pushd ~/Downloads/binaryninja-api if git fetch --all then if git checkout "$BINARY_HASH" then git pull echo "Binary Ninja API exists, repo updated" else echo Not a repo or could not match binary hash exit fi fi popd else -
psifertex revised this gist
Mar 6, 2023 . 1 changed file with 54 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,32 +5,74 @@ # !! Change the second git hash to the most recent git commit when using the Binary Ninja development API branch !! # !! It's located in the sed part of this script (L#15) !! BINARY_HASH=$(sed 's/^.*\///' < /Applications/Binary\ Ninja-dev.app/Contents/Resources/api_REVISION.txt 2>/dev/null) if [ -z "$BINARY_HASH" ] then echo "Failed to find appropriate hash for Binary Ninja" exit 1 fi echo "\u001b[36m[+] Cloning BinExport & Binary Ninja API..." echo "\u001b[0m" if [ -d ~/Downloads/binexport ] then pushd ~/Downloads/binexport if git fetch --all then git reset --hard origin/main # Because previous runs of this script will dirty the repo echo "BinExport exists, repo updated" else echo Not a repo, remove ~/Downloads/binexport to continue exit fi popd else git clone https://github.com/google/binexport.git ~/Downloads/binexport fi if [ -d ~/Downloads/binaryninja-api ] then pushd ~/Downloads/binaryninja-api if git checkout "$BINARY_HASH" then git pull echo "Binary Ninja API exists, repo updated" else echo Not a repo or could not match binary hash exit fi popd else git clone --recursive --branch dev https://github.com/Vector35/binaryninja-api.git ~/Downloads/binaryninja-api fi echo "\u001b[36m[+] Updating the git hash..." echo "\u001b[0m" sed -i'' -e "s/9d8bc846bd213407fb1a7a19af2a96f17501ac3b/$BINARY_HASH/g" ~/Downloads/binexport/cmake/BinExportDeps.cmake sed -i'' -e "s/2023-02-15/modified/g" ~/Downloads/binexport/cmake/BinExportDeps.cmake echo "\u001b[36m[+] Running regenerate-api-stubs..." echo "\u001b[0m" pushd ~/Downloads/binexport/third_party/binaryninja_api/ ./regenerate-api-stubs.sh ~/Downloads/binaryninja-api popd pushd ~/Downloads/binexport echo "\u001b[36m[+] Building BinExport..." echo "\u001b[0m" rm -rf build && mkdir build && cd build cmake .. -G Ninja -DBINEXPORT_BINARYNINJA_CHANNEL=DEV -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$PWD" -DBINEXPORT_ENABLE_IDAPRO=OFF -DBINEXPORT_ENABLE_BINARYNINJA=ON cmake --build . --config Release -- "-j$(sysctl -n hw.logicalcpu)" popd if [ ! -L ~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.dylib ] then echo "\u001b[36m[+] Linking BinExport plugin to Binary Ninja plugin folder" echo "\u001b[0m" ln -sf ~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.dylib ~/Library/Application\ Support/Binary\ Ninja/plugins fi echo "\u001b[32;1m[+] Done!" echo "\u001b[0m" -
0x8ff revised this gist
Mar 5, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ echo "\u001b[36m[+] Cloning BinExport & Binary Ninja API..." echo "\u001b[0m" git clone https://github.com/google/binexport.git ~/Downloads/binexport git clone --recursive --branch dev https://github.com/Vector35/binaryninja-api.git ~/Downloads/binaryninja-api echo "\u001b[36m[+] Updating the git hash..." echo "\u001b[0m" -
0x8ff revised this gist
Mar 5, 2023 . No changes.There are no files selected for viewing
-
0x8ff created this gist
Mar 5, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ #!/usr/bin/env zsh # Note: # CMake, Clang, clang-format, Ninja, and sed are required to build # !! Change the second git hash to the most recent git commit when using the Binary Ninja development API branch !! # !! It's located in the sed part of this script (L#15) !! echo "\u001b[36m[+] Cloning BinExport & Binary Ninja API..." echo "\u001b[0m" git clone https://github.com/google/binexport.git ~/Downloads/binexport git clone --recursive https://github.com/Vector35/binaryninja-api.git ~/Downloads/binaryninja-api echo "\u001b[36m[+] Updating the git hash..." echo "\u001b[0m" sed -i -e 's/9d8bc846bd213407fb1a7a19af2a96f17501ac3b/b62dd911b325e637d48bcb2098766510955c1599/g' ~/Downloads/binexport/cmake/BinExportDeps.cmake sed -i -e 's/2023-02-15/modified/g' ~/Downloads/binexport/cmake/BinExportDeps.cmake echo "\u001b[36m[+] Running regenerate-api-stubs..." echo "\u001b[0m" cd ~/Downloads/binexport/third_party/binaryninja_api/ ./regenerate-api-stubs.sh ~/Downloads/binaryninja-api cd ~/Downloads/binexport echo "\u001b[36m[+] Building BinExport..." echo "\u001b[0m" mkdir build && cd build cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release "-DCMAKE_INSTALL_PREFIX=$PWD" -DBINEXPORT_ENABLE_IDAPRO=OFF -DBINEXPORT_ENABLE_BINARYNINJA=ON cmake --build . --config Release -- "-j$(sysctl -n hw.logicalcpu)" echo "\u001b[36m[+] Moving BinExport plugin to Binary Ninja plugins folder" echo "\u001b[0m" mv ~/Downloads/binexport/build/binaryninja/binexport12_binaryninja.dylib ~/Library/Application\ Support/Binary\ Ninja/plugins echo "\u001b[32;1m[+] Done!" echo "\u001b[0m"