mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
new: added script to cross compile for arm6 on a preconfigured machine
This commit is contained in:
parent
43c7e45322
commit
9c1c937106
2 changed files with 22 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
*.sw*
|
*.sw*
|
||||||
|
*.tar.gz
|
||||||
pcaps
|
pcaps
|
||||||
bettercap-ng*.*
|
bettercap-ng*.*
|
||||||
bettercap-ng*
|
bettercap-ng*
|
||||||
|
|
21
build_arm.sh
Executable file
21
build_arm.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
# nothing to see here, just what i use to cross compile for ARM
|
||||||
|
DIR=/Users/evilsocket/gocode/src/github.com/evilsocket/bettercap-ng
|
||||||
|
EXE=bettercap-ng_arm7
|
||||||
|
|
||||||
|
echo "@ Updating repo ..."
|
||||||
|
rm -rf $EXE && git pull
|
||||||
|
|
||||||
|
echo "@ Configuring libpcap ..."
|
||||||
|
rm -rf libpcap-*.*
|
||||||
|
rm -rf libpcap*
|
||||||
|
wget http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz
|
||||||
|
tar xvf libpcap-1.8.1.tar.gz
|
||||||
|
cd libpcap-1.8.1
|
||||||
|
export CC=arm-linux-gnueabi-gcc
|
||||||
|
./configure --host=arm-linux --with-pcap=linux
|
||||||
|
make
|
||||||
|
|
||||||
|
echo "@ Building $EXE ..."
|
||||||
|
cd ..
|
||||||
|
env CC=arm-linux-gnueabi-gcc CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=7 CGO_LDFLAGS="-Llibpcap-1.8.1" go build -o $EXE .
|
||||||
|
rm -rf libpcap-1.8.1
|
Loading…
Add table
Add a link
Reference in a new issue