Pwnagotchi
Revision as of 13:52, 8 September 2025 by Xbl (talk | contribs) (Created page with "= Gucci = === Connect === <code>ip addr add 10.0.0.1/24 dev enp*</code></br> <code>10.0.0.2:80</code> bettercap</br> <code>10.0.0.2:8080</code> funkloch</br> <code>10.0.0.2:8421</code> PiSugar</br> === linux_connection_share.sh === <pre>#!/usr/bin/env bash set -e # name of the ethernet gadget interface on the host USB_IFACE=${1:-enp17s0u1} USB_IFACE_IP=10.0.0.1 USB_IFACE_NET=10.0.0.0/24 # host interface to use for upstream connection UPSTREAM_IFACE=${2:-enp7s0} #ip a...")
Gucci
Connect
ip addr add 10.0.0.1/24 dev enp*
10.0.0.2:80 bettercap
10.0.0.2:8080 funkloch
10.0.0.2:8421 PiSugar
#!/usr/bin/env bash
set -e
# name of the ethernet gadget interface on the host
USB_IFACE=${1:-enp17s0u1}
USB_IFACE_IP=10.0.0.1
USB_IFACE_NET=10.0.0.0/24
# host interface to use for upstream connection
UPSTREAM_IFACE=${2:-enp7s0}
#ip addr add "$USB_IFACE_IP/24" dev "$USB_IFACE"
#ip link set "$USB_IFACE" up
iptables -A FORWARD -o "$UPSTREAM_IFACE" -i "$USB_IFACE" -s "$USB_IFACE_NET" -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -F POSTROUTING
iptables -t nat -A POSTROUTING -o "$UPSTREAM_IFACE" -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
Backup
sudo tar -czvf pwny-backup.tar.gz /root/brain.json /root/.api-report.json /root/handshakes/ /root/peers/ /etc/pwnagotchi/ /boot/firmware/config.txt /boot/cmdline.txt /usr/local/share/pwnagotchi/custom-plugins/
Restore
sudo tar -xzvf pwny-backup.tar.gz -C /