From 26dc28a5ddeea4bdb0b032977c1655f65b6a97a9 Mon Sep 17 00:00:00 2001 From: strasharo Date: Sun, 13 Mar 2016 20:32:04 +0200 Subject: [PATCH] Obtain client hostname from DHCPD log. --- fluxion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fluxion b/fluxion index 1c4d6ea..9d32faa 100755 --- a/fluxion +++ b/fluxion @@ -2839,7 +2839,7 @@ function handshakecheck { CLIENTE_FABRICANTE=\"unknown\" fi - CLIENTE_HOSTNAME=\$(echo \$cliente| cut -d \" \" -f 3 | cut -d \"(\" -f2 | cut -d \")\" -f1) + CLIENTE_HOSTNAME=\$(grep \$CLIENTE_IP $DUMP_PATH/clientes.txt | grep DHCPACK | sort | uniq | head -1 | grep '(' | awk -F '(' '{print \$2}' | awk -F ') '{print \$1}') echo -e \" $green \$x) $red\$CLIENTE_IP $yellow\$CLIENTE_MAC $transparent($blue\$CLIENTE_FABRICANTE$transparent) $green \$CLIENTE_HOSTNAME$transparent\" done