All pastes #124244 Raw Edit

Unnamed

public text v1 · immutable
#124244 ·published 2006-08-09 22:32 UTC
rendered paste body
#! /bin/sh

WIFI="rausb0"

dump_start() {
  if [ "`/sbin/ifconfig | grep $WIFI`" != "" ]; then 
      echo "Starting airodump-ng: "
      screen -d -m -S dump airodump-ng -w /root/cap/dump  -c 6 --ivs $WIFI
  fi
}

dump_stop() {
  kill -9 `screen -ls|grep dump|cut -d "." -f 1`
}

dump_restart() {
  dump_stop
  sleep 2
  dump_start
}

case "$1" in
  'start')
    dump_start
    ;;

  'stop')
    dump_stop
    ;;
	
  'restart')
    dump_restart
    ;;

  *)
    echo "Usage: $0 start|stop|restart"
    ;;
esac