How to Scan Specific Mac and Deauth

Dec 11, 2015 03:30 AM
Dec 11, 2015 04:31 AM
635853727436379543.jpg

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

Related Articles

637263493835297420.jpg

How to Use Zero-Width Characters to Hide Secret Messages in Text (& Even Reveal Leaks)

636455706472146367.jpg

How to Hide DDE-Based Attacks in MS Word

Comments

No Comments Exist

Be the first, drop a comment!