fluxion/scripts/diagnostics.sh

63 lines
1.4 KiB
Bash
Raw Normal View History

2017-08-20 19:51:10 -06:00
#!/bin/bash
2017-11-28 13:48:44 -07:00
source lib/InterfaceUtils.sh
2017-08-20 19:51:10 -06:00
if [ ! "$1" ]
then echo "Usage ./scripts/diagnostics <wireless_interface>"; exit 1
fi
echo "[ FLUXION Info ]"
2017-08-27 02:15:18 -06:00
declare -r FLUXIONInfo=($(grep -oE "FLUXION(Version|Revision)=[0-9]+" fluxion.sh))
2017-08-20 19:51:10 -06:00
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
2017-08-27 02:15:18 -06:00
echo -n "Injection Test: "
aireplay-ng --test "$1" | grep -oE "Injection is working!|No Answer..." || echo "failed"
2017-08-20 19:51:10 -06:00
echo -ne "\n\n"
echo "[ XTerm Info ]"
echo "Version: `xterm -version`"
echo "Path: `ls -L $(which xterm)`"
2017-08-27 14:06:01 -06:00
echo -n "Test: "
2017-08-27 14:10:53 -06:00
if xterm -hold -fg "#FFFFFF" -bg "#000000" -title "XServer/XTerm Test" -e "echo \"XServer/XTerm test: close window to continue...\"" &> /dev/null
2017-08-27 14:06:01 -06:00
then echo "XServer/XTerm success!"
else echo "XServer/XTerm failure!"
fi
2017-08-20 19:51:10 -06:00
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