new: hid module is now available for Android

This commit is contained in:
evilsocket 2019-03-09 13:46:07 +01:00
commit aaf250f3c5
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -65,6 +65,24 @@ build_windows_amd64() {
scp -C winvm:$DIR/bettercap.exe . > /dev/null
}
build_android_arm() {
host_dep 'shield'
THEPATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:/system/xbin:/system/bin"
LPATH="/data/data/com.termux/files/usr/lib"
GPATH=/data/data/com.termux/files/home/go
DIR=/data/data/com.termux/files/home/go/src/github.com/bettercap/bettercap
echo "@ Updating repo on Android host ..."
ssh -p 8022 root@shield "su -c 'export PATH=$THEPATH && export LD_LIBRARY_PATH="$LPATH" && cd "$DIR" && rm -rf bettercap* && git pull && export GOPATH=$GPATH && go get ./...'"
echo "@ Building android/arm ..."
ssh -p 8022 root@shield "su -c 'export PATH=$THEPATH && export LD_LIBRARY_PATH="$LPATH" && cd "$DIR" && export GOPATH=$GPATH && go build -o bettercap . && setenforce 0'"
echo "@ Downloading bettercap ..."
scp -C -P 8022 root@shield:$DIR/bettercap .
}
rm -rf $BUILD_FOLDER
mkdir $BUILD_FOLDER
cd $BUILD_FOLDER
@ -72,6 +90,7 @@ cd $BUILD_FOLDER
build_linux_amd64 && create_archive bettercap_linux_amd64_$VERSION.zip
build_macos_amd64 && create_archive bettercap_macos_amd64_$VERSION.zip
build_windows_amd64 && create_exe_archive bettercap_windows_amd64_$VERSION.zip
build_android_arm && create_archive bettercap_android_arm_$VERSION.zip
sha256sum * > checksums.txt