Project Display - Auto-Drone Kismet drone install script
RenderMan Auto-Drone Kismet drone install scriptLast Updated: 1/25/2006 2:39:35 PM
Associated Gallery: N/AAssociated File Library: Auto-Drone
Direct URL:  http://www.churchofwifi.org/Project_Display.asp?PID=88
 
Auto-Drone V0.1

Auto-Drone, Automatic installer for the Kismet_drone

Auto-drone is a quick and very dirty script I can up with to re-load the Kismet_drone on a WRT54G with the OpenWRT firmware according to my how-to. Yes I could build an IPKG, however the lack of flexibility and lag time between revisions makes this script easier in my books.

After the number of times I've blown up my test routers, I wanted a quick way to re-install the drone binaries. This script is the result. Hopefully you find it makes your life easier by automating the install process.

The script asks for 3 things: The router version (for using the proper kismet_drone.conf file, your gateway IP (incase you have'nt set it yet), and your DNS server address (so we can update your Ipkg list and get the wl driver)

The script fetches the 'wl' driver through ipkg, downloads the kismet_drone binaries from kismetwireless.net and downloads the startup scripts and conf files from Renderlab.net. Based on your choice of router, the kismet_drone.conf file's 'source' line is configured for you. files are downloaded and unpacked in /tmp which gets cleaned out on reboot.

Download:

(Best to just telnet into the router and wget the file to /tmp

wget http://www.renderlab.net/projects/wrt54g/autodrone.sh


Script contents
---------------
[code]


#!/bin/sh
echo "Type [1] for V1 or 1.1 routers,"
echo "Type [2] for V2 or V2.2 routers,"
echo "Type [3] for V3 and V4 routers,"
echo "Type [4] for the alternative script"
echo "Followed by the [ENTER] key:"

read version

echo "Type the IP address of your gateway or firewall:"

read gateway

route add default gw $gateway

echo "Type the IP address of your DNS server:"

read dns

rm /etc/resolv.conf
echo nameserver $dns > /etc/resolv.conf

#fetch 'wl' driver
ipkg update
ipkg install wl

#fetch kismet_drone binaries

cd /tmp
wget http://www.kismetwireless.net/code/kismet-2005-08-R1-wrt54.tar.gz

#fetch
modded startup scripts

cd /tmp
wget http://www.renderlab.net/projects/wrt54g/dronefiles.tar.gz

#unpack
everything

tar -zxvf kismet-2005-08-R1-wrt54.tar.gz
tar -zxvf dronefiles.tar.gz

cd kismet-2005-08-R1-wrt54
cp kismet_drone /usr/bin
cd /tmp
cp S70JW_scan /etc/init.d
cp S60kismet_drone /etc/init.d

#make everything executable

chmod 777 /usr/bin/kismet_drone
chmod 777 /etc/init.d/S60kismet_drone
chmod 777 /etc/init.d/S70JW_scan

#copy the correct kismet_drone.conf file into place
if [ "$version" = ŕ" ]; then
cp /tmp/kismet_drone.conf.V1 /etc/kismet_drone.conf
elif [ "$version" = Ŗ" ]; then
cp /tmp/kismet_drone.conf.V2 /etc/kismet_drone.conf
elif [ "$version" = ŗ" ]; then
cp /tmp/kismet_drone.conf.V3 /etc/kismet_drone.conf
elif [ "$version" = Ř" ]; then
cp /tmp/kismet_drone.conf.V3 /etc/kismet_drone.conf
fi
echo "*****************************************************************"
echo "* Your drone should now be setup, please reboot for it to start *"
echo "*****************************************************************"


[/code]
Views 686281

Church of Wifi Site Policies