sokai's snippets
  4efca6961b1a7
Language: bash
Length: 299 (16 lines)
Title: /usr/sbin/horst.sh
Creator: sokai
Date: Thu. Dec 29, 2011 06:42 PM
Visibility: Public


index / view raw
 
  1. #!/bin/sh
  2. # /usr/sbin/horst.sh
  3.  
  4. if lsmod | grep -q ath[0-9];then
  5. BASE=wlan0
  6. if [ -n "$1" ] && [ -z "${1#wlan[0-9]}" ];then
  7. BASE=$1
  8. shift
  9. fi
  10. WLDEV=mon0
  11. iw dev $BASE interface add $WLDEV type monitor >/dev/null
  12. horst -i $WLDEV $*
  13. iw dev $WLDEV del # cleanup
  14. else
  15. horst $*
  16. fi