From 178c0bf5eed5639bdf0fd2fed2ac45374a32dda3 Mon Sep 17 00:00:00 2001 From: Rob Zimmerman Date: Tue, 2 Dec 2014 15:16:17 -0500 Subject: [PATCH] Additional Relays Added additional relays to standard mode. --- .gitignore | 2 ++ README.md | 4 ++++ relaymyhome | 43 +++++++++++++++++++++++++++++-------------- 3 files changed, 35 insertions(+), 14 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0892ff4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ + +.gitattributes diff --git a/README.md b/README.md index 807a636..56d8acb 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ OSX Bash Script for automating the process of getting Nintendo 3DS StreetPass hi What's New ========== +**v 1.1** + +Added the Homepass relay MAC addresses + **v 1.0** Script has been updated for the new "six at a time" feature of StreetPass Relay. The following features have been added/change: diff --git a/relaymyhome b/relaymyhome index 7660710..6da685e 100755 --- a/relaymyhome +++ b/relaymyhome @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # The MIT License (MIT) # @@ -22,18 +22,17 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -# RelayMyHome -- v. 1.0 +# RelayMyHome -- v. 1.1 # Original script by Rob Zimmerman (https://www.github.com/taintedzodiac) # See other generous contributors, plus view the source, readme, and license at https://github.com/taintedzodiac/relaymyhome # Tested in OS X 10.8 (Mountain Lion) and Mavericks - ### The time we will pause on each MAC address relay_time="90" sleep_time="10" -wservice="$(/usr/sbin/networksetup -listallnetworkservices | grep -Ei '(wi-fi|airport)')" -wifi="$(networksetup -listallhardwareports | awk "/${wservice}/,/Ethernet/"' getline { print $2 }')" +wservice=`/usr/sbin/networksetup -listallnetworkservices | grep -Ei '(wi-fi|airport)'` +wifi=$(networksetup -listallhardwareports | awk "/$wservice/,/Ethernet/"' getline { print $2 }') WirelessMAC=$(networksetup -getmacaddress "${wifi}" | awk '{print $3}') echo "Original MAC address is: $WirelessMAC" @@ -104,16 +103,15 @@ then # Create an array for the last octet of the mac address, limited range. Addr=($(for X in {0..159} ; do echo ${X} | awk '{printf "%s%02X ", "4E:53:50:4F:4F:", $1}'; done ;)) - if [[ $1 == "full" ]] ; then - num=7 - echo "Full Mode enabled. Randomly seeding ${num} addresses from full list." - elif [[ $1 == "fuller" ]] ; then - num=99 + if [[ $1 == "full" ]] + then + num=5 + echo "Full Mode enabled. Randomly seeding five addresses from full list." else num=2 echo "Quick Mode enabled. Randomly seeding ${num} addresses from full list." fi - + for ((a=1; a<=$num; a++)); do selectedAddr=${Addr[$RANDOM % ${#Addr[@]} ]} @@ -129,16 +127,33 @@ then else # This set of MACs will be used in standard mode + # Taken from: https://docs.google.com/spreadsheet/ccc?key=0AvvH5W4E2lIwdEFCUkxrM085ZGp0UkZlenp6SkJablE#gid=0 # Usage: ./relaymyhome addr[0]='00:0D:67:15:2D:82' addr[1]='00:0D:67:15:D7:21' addr[2]='00:0D:67:15:D5:44' addr[3]='00:0D:67:15:D2:59' addr[4]='00:0D:67:15:D6:FD' + addr[5]='4E:53:50:4F:4F:40' + addr[6]='4E:53:50:4F:4F:41' + addr[7]='4E:53:50:4F:4F:42' + addr[8]='4E:53:50:4F:4F:43' + addr[9]='4E:53:50:4F:4F:44' + addr[10]='4E:53:50:4F:4F:45' + addr[11]='4E:53:50:4F:4F:46' + addr[12]='4E:53:50:4F:4F:47' + addr[13]='4E:53:50:4F:4F:48' + addr[14]='4E:53:50:4F:4F:49' + addr[15]='4E:53:50:4F:4F:4A' + addr[16]='4E:53:50:4F:4F:4B' + addr[17]='4E:53:50:4F:4F:4C' + addr[18]='4E:53:50:4F:4F:4D' + addr[19]='4E:53:50:4F:4F:4E' + addr[20]='4E:53:50:4F:4F:4F' - echo "Standard Mode enabled. Connecting to five Nintendo World addresses." + echo "Standard Mode enabled. Connecting to the five Nintendo World relays and the sixteen Homepass relays." n=1 - + for a in "${addr[@]}" do echo "Cycling WiFi..." @@ -146,7 +161,7 @@ else networksetup -setairportpower $wifi off sleep ${sleep_time} networksetup -setairportpower $wifi on - echo "Spoofing $wifi to ${a} for ${relay_time} seconds (${n} of 5)" + echo "Spoofing $wifi to $a for 90 seconds ($n of 21)" n=$((n+1)) sleep ${relay_time} done