Change piratebox MAC addresses at boot

Posted by zsunuser 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Change piratebox MAC addresses at boot
June 20, 2016 08:41AM
I want to change the MAC addresses on my pirate box on every boot

- I installed macchanger
opkg install macchanger


- I create /etc/init.d/macc

#!/bin/bash
# Short-Description: Change MAC addresses
/sbin/ifconfig eth0 down
/usr/bin/macchanger -a eth0
/sbin/ifconfig eth0 up
/sbin/ifconfig wlan0 down
/usr/bin/macchanger -a wlan0
/sbin/ifconfig wlan0 up

I made it exe

chmod +x /etc/init.d/macc

I let it run at startup

/etc/init.d/macc enable

I reboot

reboot

Edit: Solved! I created vittual Interfaces and pointed radio0 (PirateBoxWLAN) to the virtual Interface. OpenWRT's macchanger works perfect on a virtual Interface. (Working on zsun Cardreader) Macchanger works randomly on phsical Interfaces.



Edited 2 time(s). Last edit at 06/26/2016 08:08AM by zsunuser.