Fixed a bug caused by a lack of quotes.

This commit is contained in:
Matias Barcenas 2017-12-22 16:35:21 -06:00
parent b3718510a3
commit 3ef08c80e7
1 changed files with 1 additions and 1 deletions

View File

@ -358,7 +358,7 @@ function captive_portal_get_client_IP() {
} }
function captive_portal_get_IP_MAC() { function captive_portal_get_IP_MAC() {
if [ -f "$CaptivePortalPassLog/${APTargetSSIDClean//"/"}-$APTargetMAC-IP.log" ] && [ $(captive_portal_get_client_IP) != "" ] && [ -f "$FLUXIONWorkspacePath/clients.txt" ]; then if [ -f "$CaptivePortalPassLog/${APTargetSSIDClean//"/"}-$APTargetMAC-IP.log" ] && [ "$(captive_portal_get_client_IP)" != "" ] && [ -f "$FLUXIONWorkspacePath/clients.txt" ]; then
IP=$(captive_portal_get_client_IP) IP=$(captive_portal_get_client_IP)
MatchedClientMAC=$(cat $FLUXIONWorkspacePath/clients.txt | grep $IP | awk '{print $5}' | grep : | head -n 1 | tr [:upper:] [:lower:]) MatchedClientMAC=$(cat $FLUXIONWorkspacePath/clients.txt | grep $IP | awk '{print $5}' | grep : | head -n 1 | tr [:upper:] [:lower:])
if [ "$(echo $MatchedClientMAC | wc -m)" != "18" ]; then if [ "$(echo $MatchedClientMAC | wc -m)" != "18" ]; then