RyperX
September 2, 2016, 9:12am
1
Hey guys,
i hope you can help me. I want to create a script that change every 30 minutes the mac adress of a virtuell wireless interface
I know i can set the mac with interface wireless set profile mac-address=xx…
But how would a script looks like when i want
interface wireless set profile mac-address=1234
wait 30mins
interface wireless set profile mac-address=4321
wait 30mins
interface wireless set profile mac-address=2222
wait 30mins
start again from beginning with mac 1234
Hopefully you can help me
RyperX:
Hey guys,
i hope you can help me. I want to create a script that change every 30 minutes the mac adress of a virtuell wireless interface
I know i can set the mac with interface wireless set profile mac-address=xx…
But how would a script looks like when i want
interface wireless set profile mac-address=1234
wait 30mins
interface wireless set profile mac-address=4321
wait 30mins
interface wireless set profile mac-address=2222
wait 30mins
start again from beginning with mac 1234
Hopefully you can help me
What is the reason you want to do this for?
Here, this will generate a new mac address. It’s dirty, but it works. just set the add a command to set the mac on the interface you want, then run the script every 30 minutes.
:local hexArray 0abcdef0123456789abcdef012345abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012345
:local newMAC "";
:local hex1num [/system clock get time ];
:local hex2num [/system resource get cpu-load ];
:local rnd1num [:pick $hex1num 6 8];
:local rnd2num [:pick $hex2num];
:set newMAC ("D4:CA:6D:" .\
[:tostr [:pick $hexArray ($rnd1num+$rnd2num) ]] .\
[:tostr [:pick $hexArray ($rnd2num+4) ]] .":".\
[:tostr [:pick $hexArray ($rnd1num+12) ]] .\
[:tostr [:pick $hexArray ($rnd2num+1) ]] .":".\
[:tostr [:pick $hexArray $rnd1num ]] .\
[:tostr [:pick $hexArray ($rnd1num+$rnd2num+5) ]] );
:log warning $newMAC;
RyperX
September 26, 2016, 8:43am
4
Streetpassing for 3DS
IntrusDave:
Here, this will generate a new mac address. It’s dirty, but it works. just set the add a command to set the mac on the interface you want, then run the script every 30 minutes.
:local hexArray 0abcdef0123456789abcdef012345abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef012345
:local newMAC "";
:local hex1num [/system clock get time ];
:local hex2num [/system resource get cpu-load ];
:local rnd1num [:pick $hex1num 6 8];
:local rnd2num [:pick $hex2num];
:set newMAC ("D4:CA:6D:" .\
[:tostr [:pick $hexArray ($rnd1num+$rnd2num) ]] .\
[:tostr [:pick $hexArray ($rnd2num+4) ]] .":".\
[:tostr [:pick $hexArray ($rnd1num+12) ]] .\
[:tostr [:pick $hexArray ($rnd2num+1) ]] .":".\
[:tostr [:pick $hexArray $rnd1num ]] .\
[:tostr [:pick $hexArray ($rnd1num+$rnd2num+5) ]] );
:log warning $newMAC;
Thanks but its important that i can specify the needed mac adress. A random one will not work