This file contains hidden or 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 | |
while [[ -z "$(ifconfig | awk '$1 == "apcli0" {print $1}')" ]] || [[ -z "$(ifconfig | awk '$1 == "ra0" {print $1}')" ]]; do | |
sleep 66 | |
done | |
RTCONFIG="/var/Wireless/RT2860AP/RT2860AP.dat" | |
wait=9 | |
while true; do |
This file contains hidden or 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
-- remove the driver to clean up -- | |
wlctl -i wl0 down | |
rmmod wl | |
insmod wl | |
-- set WPA2-AES encryption -- | |
wlctl -i wl0 wsec 4 | |
wlctl -i wl0 wpa_auth 128 | |
wlctl -i wl0 wsec_restrict 1 | |
wlctl -i wl0 eap 0 |
This file contains hidden or 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
************************************************************************* | |
First router | |
************************************************************************* | |
Configure WDS on the first router (MAC address=00:11:11:11:11:11): | |
ifconfig ra0 down | |
ifconfig apcli0 down | |
ifconfig wds0 down | |
rmmod rt5390ap |
This file contains hidden or 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
openssl passwd -salt "" -1 "mipassword" |
This file contains hidden or 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 | |
export CROSS_COMPILE=/opt/trendchip/mips-linux-uclibc/usr/bin/mips-linux | |
export AR=${CROSS_COMPILE}-ar | |
export AS=${CROSS_COMPILE}-as | |
export LD=${CROSS_COMPILE}-ld | |
export RANLIB=${CROSS_COMPILE}-ranlib | |
export CC=${CROSS_COMPILE}-gcc | |
export CPP=${CROSS_COMPILE}-cpp | |
export NM=${CROSS_COMPILE}-nm | |
export LIBS="-static" |
This file contains hidden or 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
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE |
This file contains hidden or 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 | |
# MAC watchdog, checks if a MAC device exists on the local network and alerts by sending an email | |
# 2016 by danitool, Tki2000, txutxy | |
CORREO="mi [email protected]" | |
MAC="00:11:22:33:44:55" | |
RANGO_IP=192.168.3.1-254 | |
FLAG=0 | |
while : | |
do |
This file contains hidden or 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 | |
GPIOBASE=`cat /sys/class/gpio/gpiochip*/base | head -n1` | |
nums=`seq 0 51` | |
cd /sys/class/gpio | |
for i in $nums; do | |
GPIO=`expr $i + $GPIOBASE` | |
echo | |
echo "[GPIO$i] testing ext IRQ" | |
echo $GPIO > export; echo out > gpio$GPIO/direction |