This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/system/bin/sh | |
NEW_SUBNET='192.168.43' | |
WIFI_INTERFACE='wlan0' | |
WIFI_INTERFACE_INFO=$(ip addr show dev ${WIFI_INTERFACE} | grep -m1 "$WIFI_INTERFACE:") | |
if [[ "$WIFI_INTERFACE_INFO" == *"state UP"* ]]; then | |
LOCAL_TABLE=$(awk '$2=="local_network" {print $1}' /data/misc/net/rt_tables) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo iptables -A POSTROUTING -t nat -j MASQUERADE | |
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" | |
sudo ifconfig enp0s29f7u7 12.12.10.1 | |
adb shell su -c "ifconfig ccmni0 0.0.0.0" | |
adb shell su -c "ifconfig rndis0 12.12.10.2" | |
adb shell su -c "route add default gw 12.12.10.1 dev rndis0" | |
adb shell su -c "setprop net.dns1 8.8.8.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Step 1: Get phone's IP address | |
echo "Finding phone's IP address..." | |
PHONE_IP=$(adb shell ip route | awk '{print $9}') | |
# Check if IP address was found | |
if [ -z "$PHONE_IP" ]; then | |
echo "Could not find the phone's IP address. Make sure your phone is connected via USB and USB debugging is enabled." | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download latest TWRP from https://dl.twrp.me/shamu | |
#curl -L -J -O https://dl.twrp.me/shamu/twrp-2.8.7.1-shamu.img | |
curl -L -J -O https://dl.twrp.me/shamu/twrp-3.0.0-1-shamu.img | |
# Install the Android SDK tools (need fastboot and adb) | |
# Boot to bootloader using key combo or adb | |
adb reboot bootloader | |
# Ensure bootloader is unlocked in 'Developer Options' | |
# If you flashed Marshmallow, this should already be set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# install pwnagotchi on rpi4 | |
WIFI_DEV="wlan1" | |
AUTO_MODE=true | |
DEBUG=false | |
PWN_GRID=false | |
PWN_GRID_REPORT=false | |
HOME_NETWORK="YourHomeNetworkMaybe" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# requires ROOT privileges on android | |
# save this file to /data/local/vpnfw.sh on device. open new terminal on device and type: | |
# chmod 777 /data/local/vpnfw.sh | |
# connect to openVPN server first, then turn on wifi tethering | |
# execute script by typing: | |
# sh /data/local/vpnfw.sh | |
iptables -t filter -F FORWARD | |
iptables -t nat -F POSTROUTING | |
iptables -t filter -I FORWARD -j ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/system/bin/sh | |
# log -t IPTABLES -- $@ | |
# iptables -w -t mangle -A INPUT -i tun0 -j MARK --set-mark 0x3006a | |
IPTABLES="/system/bin/iptables.oem iptables" | |
need_arg=0; | |
last_cmd=""; | |
IIF="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on the scripts written by class101 of xda-developers.com: | |
# http://forum.xda-developers.com/showpost.php?p=57490025&postcount=205 | |
# | |
# This script enables a secure tunnel for your android phone to "reverse tether" | |
# and access the internet/a private network via the following steps: | |
# | |
# 1. Establish a level 3 (TAP) tunnel from your local host to a remote server via SSH (tap0) | |
# 2. Establish a level 3 interface between your local host and your android phone via USB (usb0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typeset -A keys | |
keys=( | |
power 26 | |
home 3 | |
up 19 | |
down 20 | |
left 21 | |
right 22 | |
enter 66 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/system/bin/ip addr add 192.168.1.1/24 dev dummy0 | |
/system/bin/ip addr add 192.168.2.1/24 dev dummy0 | |
/system/bin/ip addr add 192.168.3.1/24 dev dummy0 | |
/system/bin/ip addr add 192.168.4.1/24 dev dummy0 | |
/system/bin/ip addr add 192.168.5.1/24 dev dummy0 | |
/system/bin/ip addr add 192.168.6.1/24 dev dummy0 | |
/system/bin/ip addr add 192.168.7.1/24 dev dummy0 | |
/system/bin/ip addr add 192.168.8.1/24 dev dummy0 | |
/system/bin/ip addr add 192.168.9.1/24 dev dummy0 |
NewerOlder