wifimon |
Subversion Repositories: |
Rev 17 | Rev 18 | |
---|---|---|
Line 2... | Line 2... | |
# authors : Petr Simandl www.simandl.cz |
# authors : Petr Simandl www.simandl.cz | |
# : Fyzik, Covex, Tydyt |
# : Fyzik, Covex, Tydyt | |
# release date : 05/10/2003 |
# release date : 13/06/2005 | |
# name : wifimon |
# name : wifimon | |
# description : hostap powered wifi card monitoring |
# description : hostap powered wifi card monitoring | |
# license : GPL |
# license : GPL | |
|
| |
wl_version="0.5.3" |
wl_version="0.5.4" | |
|
| |
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:usr/local/bin:/usr/local/sbin |
PATH=$PATH:$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:usr/local/bin:/usr/local/sbin | |
|
| |
wl_iwccmd=`which iwconfig` |
wl_iwccmd=`which iwconfig` | |
wl_ifccmd=`which ifconfig` |
wl_ifccmd=`which ifconfig` | |
Line 261... | Line 261... | |
|
| |
} # w_pkts |
} # w_pkts | |
###################################################################### |
###################################################################### | |
w_managed() |
w_managed() | |
{ echo $wl_iwctxt | $wl_awkcmd '{print $1,$3,$4,$5" "}' |
{ echo $wl_iwctxt | $wl_awkcmd '{print $1,$3,$4,$5" "}' | |
echo -n `$wl_ifccmd $wl_iface | grep -E "inet addr|inet adr" | $wl_awkcmd '{print $2" "}' | sed s/ad*r://g`" " # IP adresa mastera z ifconfig |
echo -n `$wl_ifccmd $wl_iface | grep -E "inet addr|inet adr" | $wl_awkcmd '{print $2}' | sed s/ad*r://g`" " # IP adresa mastera z ifconfig | |
|
| |
if [ $wcm_macoff -eq 1 ] |
if [ $wcm_macoff -eq 0 ] | |
then |
then | |
echo $wl_iwctxt | $wl_awkcmd '{print $6,$11" "}' |
wl_mac=`echo -n $wl_iwctxt | $wl_awkcmd '{print $8}'` | |
else |
echo -n "${wlc_mac}$wl_mac${wlc_std} " | |
echo $wl_iwctxt | $wl_awkcmd '{print $9,$6,$11" "}' |
||
fi |
fi | |
echo $wl_iwctxt | $wl_awkcmd '{print $6,$10" "}' | ||
|
| |
wl_wtxt=`cat $wl_wireless | grep $wl_iface | $wl_awkcmd '{print $3,$4,$5}' | sed 's/\.//g'` |
wl_wtxt=`cat $wl_wireless | grep $wl_iface | $wl_awkcmd '{print $3,$4,$5}' | sed 's/\.//g'` | |
wl_quality=`echo $wl_wtxt | $wl_awkcmd '{print $1}'` |
wl_quality=`echo $wl_wtxt | $wl_awkcmd '{print $1}'` | |
wl_signal=`echo $wl_wtxt | $wl_awkcmd '{print $2}'` |
wl_signal=`echo $wl_wtxt | $wl_awkcmd '{print $2}'` | |
wl_signal=$(($wl_signal - 256)) |
wl_signal=$(($wl_signal - 256)) | |
Line 361... | Line 361... | |
echo |
echo | |
} # w_master |
} # w_master | |
|
| |
###################################################################### |
###################################################################### | |
w_iface() |
w_iface() | |
{ wl_iwctxt=`$wl_iwccmd $wl_iface 2>/dev/null | grep -v 'Device|Some|Extension' | sed 's/ Nick/_Nick/'` |
{ wl_iwctxt=`$wl_iwccmd $wl_iface 2>/dev/null | grep -v 'Device|Some|Extension' | sed 's/ Nick/_Nick/' | sed 's/Access Point/Access_Point/'` | |
wl_mode=`echo $wl_iwctxt | $wl_awkcmd '{print $5}' | sed 's/Mode://g'` |
wl_mode=`echo $wl_iwctxt | $wl_awkcmd '{print $5}' | sed 's/Mode://g'` | |
if [ "a$wl_mode" = "aManaged" ] |
if [ "a$wl_mode" = "aManaged" ] | |
then |
then | |
w_managed |
w_managed | |
elif [ "a$wl_mode" = "aAd-Hoc" ] |
elif [ "a$wl_mode" = "aAd-Hoc" ] |