0

I want to use the mac address stored in a file in aireplay-ng command. I want this command to be executed once with each mac address in the file. Can you please tell me how to do it?

sudo aireplay-ng -1 0 -e VMC_AP -a  D4:4C:24:2B:EE:80 -h CC:AF:78:B3:E5:0F mon0 --ignore-negative-one  

I want -h CC:AF:78:B3:E5:0F to be replaced by different mac address stored in a file .

Thank you!

2
  • my boss says the same to me sometimes... more info pls! better with your codes buddy. Commented Jan 17, 2014 at 12:43
  • I've posted the code:) Commented Jan 17, 2014 at 12:47

1 Answer 1

2

Assuming mac.txt is the file where all mac addresses are (one per line), you can use the following:

while read mac
do 
    sudo aireplay-ng -1 0 -e VMC_AP -a  D4:4C:24:2B:EE:80 -h $mac mon0 --ignore-negative-one  &
done < mac.txt
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.