86
contributi
Aki (discussione | contributi) |
Aki (discussione | contributi) (→Script) |
||
Riga 365: | Riga 365: | ||
function _iwlist { | function _iwlist { | ||
local var="iwlist" | local var="iwlist" | ||
local tmpfile=$(/bin/tempfile) | |||
nome_e_riga "$var" | nome_e_riga "$var" | ||
if [ -x /sbin/iwlist ]; then | if [ -x /sbin/iwlist ]; then | ||
/sbin/iwlist scan > $tmpfile 2>&1 | |||
if [ $? = 0 ]; then | |||
_ok "$var scan" | |||
/bin/sed -e 's/ESSID:.*/ESSID:"*script-removed*"/g' -e '/^[ ]*IE: Unknown:.*/d' $tmpfile &>> $log | |||
else | |||
_error "$var scan" | |||
fi | |||
else | else | ||
echo "Il comando $var non esiste" >> $log && _error "$var" | echo "Il comando $var non esiste" >> $log && _error "$var" | ||
fi | fi | ||
rm $tmpfile | |||
} | } | ||
contributi