Skip to content

Instantly share code, notes, and snippets.

@dzervas
Last active January 1, 2022 12:04
Show Gist options
  • Save dzervas/4b26ef873778cbae6506a33d545631a3 to your computer and use it in GitHub Desktop.
Save dzervas/4b26ef873778cbae6506a33d545631a3 to your computer and use it in GitHub Desktop.
RasPi Scripts
#!/bin/sh
sudo sysctl -w net.ipv4.conf.usb0.forwarding=1
sudo iptables -t nat -A POSTROUTING -o $1 -j MASQUERADE
#!/bin/sh
ssh -6 [email protected] "sudo ifconfig usb0 172.16.32.1 && sudo ip r add default via 172.16.32.2"
scp init-net.sh [email protected]:~/
ssh [email protected] "chmod +x ~/rpi-init-net.sh && sudo ~/init-net.sh"
#!/bin/sh
sudo apt-get install -y build-essential autoconf automake libtool pkg-config libnl-3-dev libnl-genl-3-dev libssl-dev ethtool shtool rfkill zlib1g-dev libpcap-dev libsqlite3-dev libpcre3-dev libhwloc-dev libcmocka-dev
git clone https://github.com/aircrack-ng/aircrack-ng
cd aircrack-ng
autoreconf -i
./configure
make
sudo make install
#!/bin/sh
echo "[+] Installing dependencies"
sudo apt-get install -y raspberrypi-kernel-headers git libgmp3-dev gawk qpdf bison flex make
echo "[+] Cloning nexmon"
git clone --depth 1 https://github.com/seemoo-lab/nexmon
cd nexmon
if [ ! -f /usr/lib/arm-linux-gnueabihf/libisl.so.10 ]; then
echo "[+] Compiling libisl.so.10"
pushd buildtools/isl-0.10
./configure
make
make install
ln -s /usr/local/lib/libisl.so /usr/lib/arm-linux-gnueabihf/libisl.so.10
popd
fi
source setup_env.sh
make
echo "[+] Compiling patch for bcm43430a1"
pushd patches/bcm43430a1/7_45_41_46/nexmon/
make
sudo make backup-firmware
sudo make install-firmware
popd
echo "[+] Compiling nexutil"
pushd utilities/nexutil/
make
sudo make install
popd
sudo mv /lib/modules/4.14.71+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko{,.b}
sudo cp patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac_4.14.y-nexmon/brcmfmac.ko /lib/modules/4.14.71+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
depmod -a
#!/bin/sh
git clone https://github.com/t6x/reaver-wps-fork-t6x
cd reaver-wps-fork-t6x
make
sudo make install
#!/bin/sh
sudo apt-get install -y python-setuptools libnl-3-dev libnl-genl-3-dev libssl-dev
git clone https://github.com/wifiphisher/wifiphisher
cd wifiphisher
sudo python setup.py install
git clone https://github.com/wifiphisher/roguehostapd
pushd roguehostapd
sudo python setup.py install
popd
#!/bin/sh
sudo apt-get install -y python-setuptools aircrack-ng reaver pyrit wireshark macchanger build-essential libpcap-dev pixiewps
git clone https://github.com/derv82/wifite2
cd wifite2
sudo python setup.py install
git clone https://github.com/aanarchyy/bully
cd bully/src
make
sudo make install
#!/bin/sh
apt-get update
apt-get upgrade -y
apt-get install -y dnsmasq vim git
systemctl enable dnsmasq
echo "no-resolv \
server=1.1.1.1 \
local=/rpi/ \
expand-hosts \
domain=rpi \
dhcp-range=172.16.32.10,172.16.32.20,255.255.255.0,24h" >> /etc/dnsmasq.conf
systemctl start dnsmasq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment