Skip to content

Instantly share code, notes, and snippets.

View djeraseit's full-sized avatar
🎯
Focusing

Theodis Butler djeraseit

🎯
Focusing
View GitHub Profile
@djeraseit
djeraseit / setip
Created September 7, 2024 23:43 — forked from poqdavid/setip
Sets static IP for Android 11 hotspot
#!/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)
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"
@djeraseit
djeraseit / scrpwireless.md
Created September 7, 2024 23:39 — forked from rizperdana/scrpwireless.md
Script to allow your android phone connect wirelessly with your laptop via wifi or phone tethering
#!/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
@djeraseit
djeraseit / enable_tether.sh
Created September 7, 2024 23:39 — forked from dcode/enable_tether.sh
Enable tethering on Nexus 6 Marshmallow stock and w/o root
# 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
@djeraseit
djeraseit / pwnagotchi_install.sh
Created September 7, 2024 23:38 — forked from arainho/pwnagotchi_install.sh
install pwnagotchi on rpi4
#!/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"
@djeraseit
djeraseit / vpnfw.sh
Created September 7, 2024 23:38 — forked from eudemonics/vpnfw.sh
script for android to send wifi tethering traffic over openVPN
#!/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
@djeraseit
djeraseit / iptables.ash
Created September 7, 2024 23:38 — forked from pagxir/iptables.ash
share vpn over tethering for android 4.4+
#!/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=""
@djeraseit
djeraseit / reverse-tether.sh
Created September 7, 2024 23:36 — forked from chrisob/reverse-tether.sh
Android reverse tethering over bridged SSH tap interface
#!/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)
@djeraseit
djeraseit / usb-phone-control.zsh
Created September 7, 2024 23:35 — forked from mikedamage/usb-phone-control.zsh
Control an Android phone over USB and toggle tethering
typeset -A keys
keys=(
power 26
home 3
up 19
down 20
left 21
right 22
enter 66
)
@djeraseit
djeraseit / tether.rc
Created September 7, 2024 23:31 — forked from adam-blip/tether.rc
Android Tethering Fixed IP - Load this via root shell before enabling thethering > android 9
#!/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