jablonka.czprosek.czf

wifimon

Subversion Repositories:
[/] [trunk/] [wifimon] - Diff between revs 38 and 39

Show entire file Ignore whitespace

Rev 38 Rev 39
Line 1... Line 1...
#!/bin/bash #!/bin/bash
# authors : Petr Simandl www.simandl.cz # authors : Petr Simandl www.simandl.cz
# : Fyzik, Covex, Tydyt, Thunder.m # : Fyzik, Covex, Tydyt, Thunder.m, Unreal][
# release date : 29/03/2009 # release date : 19/04/2012
# name : wifimon # name : wifimon
# description : hostap and madwifi powered card monitoring # description : hostap and madwifi powered card monitoring
# license : GPL # license : GPL
###################################################################### ######################################################################
   
wl_version="0.5.7pre9" wl_version="0.5.7pre10"
   
###################################################################### ######################################################################
#custom settings #custom settings
   
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
Line 352... Line 352...
echo $wl_iwctxt | $wl_awkcmd '{print $1,$4,$5,$6,$11,$12" "}' | sed 's/ [^": ]*:/ /g' echo $wl_iwctxt | $wl_awkcmd '{print $1,$4,$5,$6,$11,$12" "}' | sed 's/ [^": ]*:/ /g'
fi fi
   
if [ -d $wl_hostap$wl_iface ] if [ -d $wl_hostap$wl_iface ]
then then
wl_numcl=`ls $wl_hostap$wl_iface | grep -c 00` wl_numcl=`ls $wl_hostap$wl_iface | grep -c [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:`
wl_macs=`ls $wl_hostap$wl_iface | grep 00` wl_macs=`ls $wl_hostap$wl_iface | grep [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:`
fi fi
   
if [ -d $wl_madwifi$wl_iface ] if [ -d $wl_madwifi$wl_iface ]
then then
wl_numcl=`$wl_wlancf $wl_iface list sta | grep -c ^[0..9]` wl_numcl=`$wl_wlancf $wl_iface list sta | grep -c ^[0-9a-fA-F][0-9a-fA-F]:`
# wl_numcl=`cat $wl_madwifi$wl_iface/associated_sta | grep -c macaddr` # wl_numcl=`cat $wl_madwifi$wl_iface/associated_sta | grep -c macaddr`
# wl_macs=`cat $wl_madwifi$wl_iface/associated_sta | tr "<" "#" | tr ">" "#" | tr " " "#" | tr "\n" "#" | tr "m" "\n" ` # wl_macs=`cat $wl_madwifi$wl_iface/associated_sta | tr "<" "#" | tr ">" "#" | tr " " "#" | tr "\n" "#" | tr "m" "\n" `
wl_macs=`$wl_wlancf $wl_iface list sta | grep ^[0..9] | tr " " "#"` wl_macs=`$wl_wlancf $wl_iface list sta | grep ^[0-9a-fA-F][0-9a-fA-F]: | tr " " "#"`
fi fi
   
if [ -d $wl_sysdev$wl_iface ] if [ -d $wl_sysdev$wl_iface ]
then then
wl_numcl=`$wl_iwlcmd $wl_iface peers | grep -c 00` wl_numcl=`$wl_iwlcmd $wl_iface peers | grep -c [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]:`
wl_macs=`iwlist $wl_iface peers | grep 00 | awk '{print $1}'` wl_macs=`iwlist $wl_iface peers | grep [0-9a-fA-F][0-9a-fA-F]:[0-9a-fA-F][0-9a-fA-F]: | $wl_awkcmd '{print $1}'`
fi fi
   
echo $wlm_number_of_clients $wl_numcl echo $wlm_number_of_clients $wl_numcl
   
wl_numcllast=$(($wl_numcllast + $wl_numcl)) wl_numcllast=$(($wl_numcllast + $wl_numcl))

Powered by WebSVN 2.2.1