# (C) 2006 Island Technology Group, LLC # All Rights Reserved box_ver="1.6" clear echo echo echo "Preparing to install bluebox to your router." echo echo "The full version will automatically be installed if you are registered at" echo "www.linksysco.com. Otherwise the demo version will be installed." echo echo "PRESS TO CONTINUE OR POWER OFF THE ROUTER TO ABORT." read continue_string if [ ! -e /www/openwrt.html ]; then cp /www/index.html /www/openwrt.html rm /www/index.html fi if [ -e /etc/init.d/S45firewall ]; then cp /etc/init.d/S45firewall /etc/S45firewall rm /etc/init.d/S45firewall fi if [ -e //box ]; then rm //box fi if [ -e //boot ]; then rm //boot fi if [ -e //tweak ]; then rm //tweak fi if [ -e /etc/banner ]; then rm /etc/banner fi ipkg update ipkg install wl # Move/install other files if [ ! -d /usr/kismet ]; then mkdir /usr/kismet fi # Define vars emac=$(nvram get et0macaddr | sed "s/://g") imac=$(nvram get il0macaddr | sed "s/://g") root_path="/" usb_path="/usr/bin/" etc_path="/etc/" kis_path="/usr/kismet/" www_path="/www/" get_domain="linksysco.com" get_path="http://$get_domain/download/bluebox.php?file=" dlext=".php?" php_mac_var_e="&emac=" php_mac_var_i="&imac=" wget -O /wiviz.tar.gz http://$get_domain/download/wiviz.tar.gz echo "installing wiviz" tar -xzf /wiviz.tar.gz wget -O /www/banner_sm.jpg http://$get_domain/images/banner_sm.jpg wget -O /usr/kismet/kismet_drone http://$get_domain/download/kismet_drone mvfile() { mv /tmp/$fn $path$fn } dlfile() { wget -O /tmp/$fn $get_path$fn$php_mac_var_e$emac$php_mac_var_i$imac$dlext if [ ! -s /tmp/$fn ]; then bad_file="yes" echo "File downloads have FAILED. Check your Internet connection and try again." exit 0 else mvfile fi } # Dl path=$kis_path fn="kismet_drone.conf" dlfile path=$etc_path fn="kis.log" dlfile fn="banner" dlfile fn="S60kisrun" dlfile fn="S69kishop" dlfile fn="S66autoscan" dlfile fn="autoscan" dlfile fn="flicker" dlfile fn="kis.log" dlfile path=$www_path fn="index.html" dlfile path=$usb_path fn="gpio" dlfile fn="box" dlfile fn="boot" dlfile fn="tweak" dlfile # Chmod/touch files chmod 777 /usr/kismet/kis* chmod 777 /etc/S6* chmod 777 /etc/autoscan chmod 777 /etc/flicker touch /www/autoscan.txt chmod 777 /usr/bin/box chmod 777 /usr/bin/boot chmod 777 /usr/bin/tweak chmod 777 /usr/bin/gpio touch /etc/blacklist # NVRAM nvram set boot_wait=on nvram set box_ver=$box_ver nvram set lan_ipaddr=192.168.108.1 nvram set box_monitor_method="ping" nvram set wl_txpwr1="25" nvram set box_monitor_ping_attempts=1 nvram commit # Success echo "NOTE: The box will reboot shortly set to 192.168.108.1 - this may require a" echo " release and renew of your PC's network settings (or just reboot the PC)" echo echo "press and you will be asked to define boot mode of bluebox." read press_enter rm install rm /wiviz.tar.gz boot