Add script to project

This commit is contained in:
Rob Zimmerman 2013-08-15 11:31:21 -04:00
parent 79f3b08b77
commit ee26134936

58
relaymyhome Executable file
View file

@ -0,0 +1,58 @@
# The MIT License (MIT)
#
# Copyright (c) 2013 Rob Zimmerman
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# RelayMyHome -- v. 0.1
# by Rob Zimmerman (https://www.github.com/taintedzodiac)
# View the original source, readme, and license at https://github.com/taintedzodiac/relaymyhome
# Tested in OS X 10.8 (Mountain Lion)
#! /bin/bash
# addr[0]='4E:53:50:4F:4F:40'
# addr[1]='4E:53:50:4F:4F:41'
# addr[2]='4E:53:50:4F:4F:42'
# addr[3]='4E:53:50:4F:4F:43'
# addr[4]='4E:53:50:4F:4F:44'
# addr[5]='4E:53:50:4F:4F:45'
# addr[6]='4E:53:50:4F:4F:46'
# addr[7]='4E:53:50:4F:4F:47'
# addr[8]='4E:53:50:4F:4F:48'
# addr[9]='4E:53:50:4F:4F:49'
# addr[10]='4E:53:50:4F:4F:4A'
addr[11]='4E:53:50:4F:4F:4B'
addr[12]='4E:53:50:4F:4F:4C'
addr[13]='4E:53:50:4F:4F:4D'
addr[14]='4E:53:50:4F:4F:4E'
addr[15]='4E:53:50:4F:4F:4F'
for a in "${addr[@]}"
do
echo "Cycling WiFi..."
sudo ifconfig $1 lladdr $a
networksetup -setairportpower $1 off
networksetup -setairportpower $1 on
echo "Spoofing $1 to $a for 60 seconds"
sleep 60
done
echo "Cycling of Relays has completed. Time to check your StreetPasses!"