# Change the MAC address of the target network interface If (( COUNT >= 10 )) then exit 0 else COUNT=$(( COUNT + 1 )) echo "Attempt: $COUNT" fi The content of the script mac-changer should be: #!/bin/bash Copy the below script content and use in nano: Shift+ Insert for paste Ctrl+ O and Enter for save Ctrl+ X for exit.Sudo nano /etc/network/if-up.d/mac-changer Sudo chmod +x /etc/network/if-up.d/mac-changer Let's call the script mac-changer: sudo touch /etc/network/if-up.d/mac-changer We can achieve this goal by a simple script that uses ifconfig.Ĭreate executable script file in the directory /etc/network/if-up.d, thus the script will be executed each time when the command ifup is executed, including at system startup.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |