Hello :) I am a newbie and a Portuguese, so, sorry if i can't be clear enough.
I'm creating a script to scan all MAC addresses in my LAN (Nmap) and if a specific one exists then that MAC will be deauthenticated (aireplay).
- allMAC=$( nmap -sP 192.168.1.0/24 | egrep 'MAC' | awk '{print $3}' )
Now, the previous code outputs only the MAC address of all devices connected.
PROBLEM:
The "allMAC" variable will output all the MAC's and i need to select each one with a command to show me the first line, then show the second, etc.
I know that adding the -c switch to grep it will output the number of lines (MAC's), and i want to make an array that will select every line until it finds the MAC i want to deauth if exists.
PS: How can i put a variable after "$" ? eg:
awk '{print $ $VAR }'
I hope that its not too confuse.
Thanks
Comments
No Comments Exist
Be the first, drop a comment!