Added diagnostics script

This commit is contained in:
Matias Barcenas 2017-08-20 20:51:10 -05:00
parent ff834a64af
commit 3bfb621b67
1 changed files with 58 additions and 0 deletions

58
scripts/diagnostics.sh Executable file
View File

@ -0,0 +1,58 @@
#!/bin/bash
source lib/InterfaceUtils.sh
if [ ! "$1" ]
then echo "Usage ./scripts/diagnostics <wireless_interface>"; exit 1
fi
echo "[ FLUXION Info ]"
declare -r FLUXIONInfo=($(egrep "^FLUXION(Version|Revision)" fluxion.sh))
echo "FLUXION V${FLUXIONInfo[0]/*=/}.${FLUXIONInfo[1]/*=/}"
echo -ne "\n\n"
echo "[ BASH Info ]"
bash --version
echo "Path: `ls -L $(which bash)`"
echo -ne "\n\n"
echo "[ Interface ($1) Info ]"
if interface_physical "$1"
then echo "Device: $InterfacePhysical"
else echo "Device: Unknown"
fi
if interface_driver "$1"
then echo "Driver: $InterfaceDriver"
else echo "Driver: Unsupported"
fi
if interface_chipset "$1"
then echo "Chipset: $InterfaceChipset"
else echo "Chipset: Unknown"
fi
echo
aireplay-ng --test "$1"
echo -ne "\n\n"
echo "[ XTerm Info ]"
echo "Version: `xterm -version`"
echo "Path: `ls -L $(which xterm)`"
echo -ne "\n\n"
echo "[ HostAPD Info ]"
hostapd -v
echo "Path: `ls -L $(which hostapd)`"
echo -ne "\n\n"
echo "[ Aircrack-ng Info ]"
aircrack-ng -H | head -n 4
echo -ne "\n\n"
echo "[ System Info ]"
if [ -r "/proc/version" ]
then cat /proc/version
else uname -r
fi