Rudimentary Mac Cycler for Linux
(Disclaimer: I don't code, so much as I just hack around with random Internet searches. At this point in time, scripted input and random number generation is beyond anything that I am capable of and/or willing to spend the time to do for this script. So for now, this script is sequential.)
What is this?
I have modified somebunny's script to include the 161 extended prime MAC addresses from the spreadsheet. It functions just as before, except you can call spoof1 all the way through spoof161. I have also put together an extremely simple script to automate MAC shifting.
Requirements:
-A working HomePass system that uses somebunny's script. I am not here to help you set up your network; dicamarques already has a perfectly good guide for that.
-An understanding of how to use the Find and Replace function of a text editor. (Or a willingness to follow directions.)
Step 1: If you haven't already done so, follow the tutorial for a Linux machine on this guide: http://gbatemp.net/threads/how-to-have-a-homemade-streetpass-relay.352645/
Once you have successfully gotten a streetpass with this guide, you should be able to use the modifications that I have made to it.
Step 2: Download this zip file that contains the modified version of somebunny's script and the mac cycling script. (Attached to this post)
Step 3: Extract the two scripts to your home folder.
Step 4: The automation script is really, really simple, but it saves quite a bit of typing. This means it's time to fire up the text editor. Open mac_cycle_script with your text editor of choice (gedit, leafpad, mousepad, etc.).
Step 5: Find your text editor's "Find and Replace" feature. In most cases, it can be opened by pressing Control+H on your keyboard, otherwise, just look around in the menus until you find it.
Step 6: Set your wlan number. In the "Find What" field, type "wlanY" (without quotes). In the "Replace with" field, type the interface name that you'll be using as your access point (on my machine, it's wlan4). Make sure that the checkbox labeled "replace all" or "replace all at once" is checked. Then mash go; find and replace those entries.
Step 7: Set your internet interface. In the "Find What" field, type "INTERNET_INTERFACE" (without quotes). In the "Replace with" field, type the name of your internet interface. (E.g. lan0, wlan0, etc, etc. If you have already gotten this working without my mods, you should know what to put here.) Again, be sure to check the "replace all" box, then hit enter, click find and replace, or what have you.
Step 8: Set your cycling interval. In the "Find What" field, type "200" (without quotes). The "Replace with" field is up to you. Just input the number of seconds you want to wait before cycling (good numbers include 900 (15 minutes) and 3600 (1 hour). After that, check your checkbox and go.
The "sleep 200" command instructs the shell to wait 200 seconds before changing MACs. If you leave the interval at 200, you should get back around to the 1st MAC address in roughly nine hours, so you could theoretically just let this thing go on indefinitely while trying to, say, rack up pokemiles. This isn't practical if you actually want to be connected to the Internet with your DS, because you'll get kicked off every 3 minutes or so.
Step 9: Save the script.
Step 10: Fire up the terminal and enter these two commands:
sudo chmod +x ./home_zone_161
sudo chmod +x ./mac_cycle_script
Step 11: Run the mac cycler! (With root privileges, of course.)
sudo ./mac_cycle_script
With any luck, you should have a HomePass station on Linux that sequentially cycles through 161 MACs at an interval of your choice.
**Mileage may vary. It usually takes my Linux machine a minute or two to get the Internet connection back up, and I find Linux in general to be very picky. This script works for me, but I can't promise that it will work for you. If anyone with greater knowledge of Linux and bash scripting wants to take my work and improve upon it, all I ask is that you give due credit to somebunny and dicamarques.
Also, if you have any trouble connecting, check, the original tutorial thread, and then double check this one. If you have never been able to get streetpasses on linux, please post in the other thread.
See snailface's post below for a randomized version!
What is this?
I have modified somebunny's script to include the 161 extended prime MAC addresses from the spreadsheet. It functions just as before, except you can call spoof1 all the way through spoof161. I have also put together an extremely simple script to automate MAC shifting.
Requirements:
-A working HomePass system that uses somebunny's script. I am not here to help you set up your network; dicamarques already has a perfectly good guide for that.
-An understanding of how to use the Find and Replace function of a text editor. (Or a willingness to follow directions.)
Step 1: If you haven't already done so, follow the tutorial for a Linux machine on this guide: http://gbatemp.net/threads/how-to-have-a-homemade-streetpass-relay.352645/
Once you have successfully gotten a streetpass with this guide, you should be able to use the modifications that I have made to it.
Step 2: Download this zip file that contains the modified version of somebunny's script and the mac cycling script. (Attached to this post)
Step 3: Extract the two scripts to your home folder.
Step 4: The automation script is really, really simple, but it saves quite a bit of typing. This means it's time to fire up the text editor. Open mac_cycle_script with your text editor of choice (gedit, leafpad, mousepad, etc.).
Step 5: Find your text editor's "Find and Replace" feature. In most cases, it can be opened by pressing Control+H on your keyboard, otherwise, just look around in the menus until you find it.
Step 6: Set your wlan number. In the "Find What" field, type "wlanY" (without quotes). In the "Replace with" field, type the interface name that you'll be using as your access point (on my machine, it's wlan4). Make sure that the checkbox labeled "replace all" or "replace all at once" is checked. Then mash go; find and replace those entries.
Step 7: Set your internet interface. In the "Find What" field, type "INTERNET_INTERFACE" (without quotes). In the "Replace with" field, type the name of your internet interface. (E.g. lan0, wlan0, etc, etc. If you have already gotten this working without my mods, you should know what to put here.) Again, be sure to check the "replace all" box, then hit enter, click find and replace, or what have you.
Step 8: Set your cycling interval. In the "Find What" field, type "200" (without quotes). The "Replace with" field is up to you. Just input the number of seconds you want to wait before cycling (good numbers include 900 (15 minutes) and 3600 (1 hour). After that, check your checkbox and go.
The "sleep 200" command instructs the shell to wait 200 seconds before changing MACs. If you leave the interval at 200, you should get back around to the 1st MAC address in roughly nine hours, so you could theoretically just let this thing go on indefinitely while trying to, say, rack up pokemiles. This isn't practical if you actually want to be connected to the Internet with your DS, because you'll get kicked off every 3 minutes or so.
Step 9: Save the script.
Step 10: Fire up the terminal and enter these two commands:
sudo chmod +x ./home_zone_161
sudo chmod +x ./mac_cycle_script
Step 11: Run the mac cycler! (With root privileges, of course.)
sudo ./mac_cycle_script
With any luck, you should have a HomePass station on Linux that sequentially cycles through 161 MACs at an interval of your choice.
**Mileage may vary. It usually takes my Linux machine a minute or two to get the Internet connection back up, and I find Linux in general to be very picky. This script works for me, but I can't promise that it will work for you. If anyone with greater knowledge of Linux and bash scripting wants to take my work and improve upon it, all I ask is that you give due credit to somebunny and dicamarques.
Also, if you have any trouble connecting, check, the original tutorial thread, and then double check this one. If you have never been able to get streetpasses on linux, please post in the other thread.
See snailface's post below for a randomized version!