Verus Coin - this coin was backdoored by it's lead dev and should not be trusted! https://git.hush.is/duke/backdoors/src/branch/master/vrsc.md
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.8 KiB

7 years ago
#!/bin/sh
KMD_DIR=kmd/mac/verus-cli
binaries=("komodo-cli" "komodod")
alllibs=()
for binary in "${binaries[@]}";
do
# do the work in the destination directory
cp src/$binary $KMD_DIR
# find the dylibs to copy for komodod
DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'`
echo "copying $DYLIBS to $KMD_DIR"
# copy the dylibs to the srcdir
for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; done
done
libraries=("libgcc_s.1.dylib" "libgomp.1.dylib" "libidn2.0.dylib" "libstdc++.6.dylib")
for binary in "${libraries[@]}";
do
# Need to undo this for the dylibs when we are done
chmod 755 $KMD_DIR/$binary
# find the dylibs to copy for komodod
DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'`
echo "copying $DYLIBS to $KMD_DIR"
# copy the dylibs to the srcdir
for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=($dylib); done
done
indirectlibraries=("libintl.8.dylib" "libunistring.2.dylib")
for binary in "${indirectlibraries[@]}";
do
# Need to undo this for the dylibs when we are done
chmod 755 src/$binary
# find the dylibs to copy for komodod
DYLIBS=`otool -L $KMD_DIR/$binary | grep "/usr/local" | awk -F' ' '{ print $1 }'`
echo "copying indirect $DYLIBS to $KMD_DIR"
# copy the dylibs to the dest dir
for dylib in $DYLIBS; do cp -rf $dylib $KMD_DIR; alllibs+=(i$dylib); done
done
for binary in "${binaries[@]}";
do
# modify komodod to point to dylibs
echo "modifying $binary to use local libraries"
i=0
for dylib in "${alllibs[@]}"
do
let i=i+1
echo "Next lib is $dylib "
install_name_tool -change $dylib @executable_path/`basename $dylib` $KMD_DIR/$binary
done
chmod +x $KMD_DIR/$binary
done