Skip to content

Instantly share code, notes, and snippets.

@GaryCXJk
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GaryCXJk/2ffcfa40e882bb00ac64 to your computer and use it in GitHub Desktop.
Save GaryCXJk/2ffcfa40e882bb00ac64 to your computer and use it in GitHub Desktop.
SpillPass Pi modifications
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>SpillPass for Raspberry Pi - A 3DS Homepass Distro</title>
<style>
table {text-align: left; font-family: monospace;}
td {padding-right:10px;}
</style>
</head>
<body style="color: rgb(204, 204, 204); background-color: black;" alink="#33ccff" link="#3366ff" vlink="red">
<div style="text-align: center;"><br>
<br>
<img style="width: 81px; height: 87px;" alt="" src="TLlogo.jpg" align="middle"> &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; <big style="color: rgb(204, 0, 0);"><big><big><big>SpillPass
for Raspberry Pi</big></big></big></big>
&nbsp;<span style="color: rgb(204, 0, 0);">v1.6</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; <img style="width: 81px; height: 87px;" alt="" src="TRlogo.jpg" align="middle"><br><span style="font-weight: bold;">
A Simple Homebrew Plug and Play 3DS HomePass Relay and Fake "Nintendo Zone" Hotspot</span><br>
<br>
<?php $IP = $_SERVER['SERVER_ADDR']; // Get IP
echo "This SpillPass Pi's Local IP Address Is: <strong>$IP</strong>";
?>
<br>
This IP May Change On Reboot. <br>To Obtain The New Address, Please Connect A Monitor To The SpillPassPi.<br><br><br><br>SSH is open by default for the root user. &nbsp;<br>Please use &nbsp;&nbsp; root&nbsp; / &nbsp;SpillPassPi &nbsp; to authenticate.<br><br><br><br>
<strong>Current data</strong><br>
<?php
$config_contents = file("/tmp/nz_config.conf");
$mac_file = file("/etc/hostapd/mac_nintendozone");
$mac_list = array();
$mac_data = array();
foreach($mac_file as $line) {
if(strlen(trim($line)) == 0 || substr($line, 0, 1) == "#") {
continue;
}
$c_mac = substr($line, 0, 17);
$mac_list[] = $c_mac;
$c_ssid = "attwifi";
$c_desc = "";
if(strlen($line) > 18) {
$tline = substr($line, 18);
$c_len = 0;
if(substr($tline, 0, 1) == "\"") {
$tline = substr($tline, 1);
while($c_len < strlen($tline)) {
$c_char = substr($tline, $c_len, 1);
if($c_char == "\\") {
$c_len++;
$c_char = substr($tline, $c_len, 1);
} else if($c_char == "\"") {
break;
}
$c_len++;
}
} else {
$c_space = strpos($tline, " ");
$c_len = $c_space;
if($c_space === false) {
$c_len = strlen($tline);
}
}
$c_ssid = substr($tline, 0, $c_len);
if(strlen($tline) > $c_len + 1) {
$c_desc = substr($tline, $c_len + 1);
}
}
$mac_data[$c_mac] = array($c_ssid, $c_desc);
}
$ssid = "attwifi";
$bssid = "";
$description = "";
foreach($config_contents as $line) {
if(strpos($line, "ssid=") === 0) {
$ssid = substr($line, 5);
}
if(strpos($line, "bssid=") === 0) {
$bssid = substr($line, 6, 17);
$description = $mac_data[$bssid][1];
}
}
echo "SSID: $ssid<br>";
echo "MAC: $bssid<br>";
if(!empty($description)) {
echo "Location: $description";
}
?>
<br><br><br><br>
<strong>Complete MAC list</strong><br>
<table>
<tr><td><strong>MAC address</strong></td><td><strong>SSID</strong></td><td><strong>Location</strong></td></tr>
<?php
foreach($mac_list as $c_mac) {
$data = $mac_data[$c_mac];
$c_ssid = $data[0];
$c_desc = $data[1];
echo "<tr><td>$c_mac</td><td>$c_ssid</td><td>$c_desc</td></tr>";
}
?>
</table>
<br><br><br><br>
<strong>Current MAC List</strong><br><br>
<table>
<tr><td><strong>MAC address</strong></td><td><strong>SSID</strong></td><td><strong>Location</strong></td></tr>
<?php
$curmaclist = file("/tmp/nz_maclist");
foreach($curmaclist as $curline) {
if(strlen(trim($curline)) == 0 || substr($curline, 0, 1) == "#") {
continue;
}
$curbssid = substr($curline, 0, 17);
$data = $mac_data[$curbssid];
$c_ssid = $data[0];
$c_desc = $data[1];
echo "<tr";
if($curbssid == $bssid) {
echo " style=\"color: #80FF80;\"";
}
echo "><td>$curbssid</td><td>$c_ssid</td><td>$c_desc</td></tr>";
}
?>
</table>
<br><br><br><br>The goal of this project is simplistic plug and play compatibility.<br>It
is entirely possible (and relatively simple with a small amount of linux
knowledge) to modify the internal files on this device to secure it
via WPA keys, add a MAC access list, and to lock down root access.<br><br><br><br>
<form action="refresh.php"><big>
<input value=" Refresh the MAC list " type="submit"></big></form>
<br>
<form action="reboot.php"><big>
<input value=" Reboot the SpillPass Pi " type="submit"></big></form>
<br>
<form action="shutdown.php"><big>
<input value=" Shutdown the SpillPass Pi " type="submit"></big></form>
<div style="text-align: right;"><div style="text-align: center;"><br><br><pre class="screen">This device and it's software come with ABSOLUTELY NO WARRANTY.<br>Nintendo may at any point in time decide to comepletely change their relay communication methods.<br>If that ever becomes the case, enjoy your new re-purposable Raspberry Pi :)<br><br>This Device and it's creators are in no way affiliated with nor endorsed by the wonderful people at Nintendo.<br><br><br><a href="http://www.Spillmonkey.com" target="_blank">www.Spillmonkey.com</a></pre><br></div><br>
</div></div>
</body></html>
4E:53:50:4F:4F:00 attwifi
4E:53:50:4F:4F:01 attwifi
4E:53:50:4F:4F:02 attwifi
4E:53:50:4F:4F:03 attwifi
4E:53:50:4F:4F:04 attwifi
4E:53:50:4F:4F:05 attwifi
4E:53:50:4F:4F:06 attwifi
4E:53:50:4F:4F:07 attwifi
4E:53:50:4F:4F:08 attwifi
4E:53:50:4F:4F:09 attwifi
4E:53:50:4F:4F:10 attwifi
4E:53:50:4F:4F:11 attwifi
4E:53:50:4F:4F:12 attwifi
4E:53:50:4F:4F:13 attwifi
4E:53:50:4F:4F:14 attwifi
4E:53:50:4F:4F:15 attwifi
4E:53:50:4F:4F:16 attwifi
4E:53:50:4F:4F:17 attwifi
4E:53:50:4F:4F:18 attwifi
4E:53:50:4F:4F:19 attwifi
4E:53:50:4F:4F:20 attwifi
4E:53:50:4F:4F:21 attwifi
4E:53:50:4F:4F:21 attwifi
4E:53:50:4F:4F:23 attwifi
4E:53:50:4F:4F:24 attwifi
4E:53:50:4F:4F:25 attwifi
4E:53:50:4F:4F:26 attwifi
4E:53:50:4F:4F:27 attwifi
4E:53:50:4F:4F:28 attwifi
4E:53:50:4F:4F:29 attwifi
4E:53:50:4F:4F:30 attwifi
4E:53:50:4F:4F:31 attwifi
4E:53:50:4F:4F:32 attwifi
4E:53:50:4F:4F:33 attwifi
4E:53:50:4F:4F:34 attwifi
4E:53:50:4F:4F:35 attwifi
4E:53:50:4F:4F:36 attwifi
4E:53:50:4F:4F:37 attwifi
4E:53:50:4F:4F:38 attwifi
4E:53:50:4F:4F:39 attwifi
#########
# PRIME #
#########
4E:53:50:4F:4F:40 attwifi
4E:53:50:4F:4F:41 attwifi
4E:53:50:4F:4F:42 attwifi
4E:53:50:4F:4F:43 attwifi The Legend of Zelda: A Link Between Worlds
4E:53:50:4F:4F:44 attwifi Inazuma Eleven
4E:53:50:4F:4F:45 attwifi Pokemon X/Y
4E:53:50:4F:4F:46 attwifi Main MAC
4E:53:50:4F:4F:47 attwifi Animal Crossing: New Leaf
4E:53:50:4F:4F:48 attwifi Fire Emblem
4E:53:50:4F:4F:49 attwifi Monster Hunter 3G / Monster Hunter 3 Ultimate
4E:53:50:4F:4F:4A attwifi Final Fantasy Theatrhythm
4E:53:50:4F:4F:4B attwifi Kid Icarus: Uprising
4E:53:50:4F:4F:4C attwifi Bravely Default
4E:53:50:4F:4F:4D attwifi Samurai Warriors Chronicles
4E:53:50:4F:4F:4E attwifi KORG M01D
4E:53:50:4F:4F:4F attwifi Denpa Men 2
#
#
#
4E:53:50:4F:4F:50 attwifi
4E:53:50:4F:4F:51 attwifi
4E:53:50:4F:4F:52 attwifi
4E:53:50:4F:4F:53 attwifi
4E:53:50:4F:4F:54 attwifi
4E:53:50:4F:4F:55 attwifi
4E:53:50:4F:4F:56 attwifi
4E:53:50:4F:4F:57 attwifi
4E:53:50:4F:4F:58 attwifi
4E:53:50:4F:4F:59 attwifi
4E:53:50:4F:4F:60 attwifi
4E:53:50:4F:4F:61 attwifi
4E:53:50:4F:4F:62 attwifi
4E:53:50:4F:4F:63 attwifi
4E:53:50:4F:4F:64 attwifi
4E:53:50:4F:4F:65 attwifi
4E:53:50:4F:4F:66 attwifi
4E:53:50:4F:4F:67 attwifi
4E:53:50:4F:4F:68 attwifi
4E:53:50:4F:4F:69 attwifi
4E:53:50:4F:4F:70 attwifi
4E:53:50:4F:4F:71 attwifi
4E:53:50:4F:4F:72 attwifi
4E:53:50:4F:4F:73 attwifi
4E:53:50:4F:4F:73 attwifi
4E:53:50:4F:4F:75 attwifi
4E:53:50:4F:4F:76 attwifi
4E:53:50:4F:4F:77 attwifi
4E:53:50:4F:4F:78 attwifi
4E:53:50:4F:4F:79 attwifi
4E:53:50:4F:4F:80 attwifi
4E:53:50:4F:4F:81 attwifi
4E:53:50:4F:4F:82 attwifi
4E:53:50:4F:4F:83 attwifi
4E:53:50:4F:4F:84 attwifi
4E:53:50:4F:4F:85 attwifi
4E:53:50:4F:4F:86 attwifi
4E:53:50:4F:4F:87 attwifi
4E:53:50:4F:4F:88 attwifi
4E:53:50:4F:4F:89 attwifi
4E:53:50:4F:4F:90 attwifi
4E:53:50:4F:4F:91 attwifi
4E:53:50:4F:4F:92 attwifi
4E:53:50:4F:4F:93 attwifi
4E:53:50:4F:4F:94 attwifi
4E:53:50:4F:4F:95 attwifi
4E:53:50:4F:4F:96 attwifi
4E:53:50:4F:4F:97 attwifi
4E:53:50:4F:4F:98 attwifi
4E:53:50:4F:4F:99 attwifi
4E:53:50:4F:4F:9A attwifi
4E:53:50:4F:4F:9B attwifi
4E:53:50:4F:4F:9C attwifi
4E:53:50:4F:4F:9D attwifi
4E:53:50:4F:4F:9E attwifi
4E:53:50:4F:4F:9F attwifi
##################
# Nintendo World #
##################
00:25:9C:52:1C:6A NDS-Guest Nintendo World NYC
00:0D:67:15:2D:82 attwifi Nintendo World
00:0D:67:15:D7:21 attwifi Nintendo World
00:0D:67:15:D5:44 attwifi Nintendo World
00:0D:67:15:D2:59 attwifi Nintendo World
00:0D:67:15:D6:FD attwifi Nintendo World
############
# McDonald #
############
00:0F:F7:00:2D:82 attwifi McDonalds - Exit 6, I84 in Danbury, CT
50:3D:E5:75:50:62 attwifi McDonalds - Rt. 7 in New Milford, CT
00:3A:99:5B:D0:82 attwifi McDonalds - Waterworks Mall, Fox Chapel, PA
C4:71:FE:5C:2D:F2 attwifi McDonalds, Zionsville, IN, USA (https://goo.gl/maps/M62B6)
00:1D:70:9B:08:62 attwifi McDonalds, Fishers, IN, USA (https://goo.gl/maps/TXhyG)
00:23:68:8F:25:50 BELLWIFI@MCDONALDS 22 Pinbush Rd, Cambridge, Ontario, Canada
#############
# Starbucks #
#############
00:1F:CA:60:42:80 attwifi Starbucks - Coldwater & Victory, North Hollywood, CA
00:1F:9E:D3:84:60 attwifi Starbucks - Third Street Promenade (#1) - Santa Monica, CA
00:0D:BD:AF:DA:4A attwifi Starbucks - Third Street Promenade (#2) - Santa Monica, CA
00:21:D8:34:41:70 attwifi Starbucks, Zionsville, IN, USA (https://goo.gl/maps/HmK99)
00:21:55:B4:E4:00 attwifi Starbucks, Fishers, IN, USA (https://goo.gl/maps/RCJdP)
##################
# Barnes & Noble #
##################
00:11:93:05:CE:F0 attwifi Barnes & Noble, Rogers, AR, USA
58:6D:8F:0F:AD:7B attwifi Barnes & Noble near Northeast Mall, Hurst, Texas, USA
#
#
#
00:3A:9A:8D:D9:B3 attwifi Real Nintendo Zone
00:1A:6C:88:91:22 attwifi Real Nintendo Zone
5C:0A:5B:2F:3E:61 attwifi Gamestop/AE - Towson Town Mall in Towson, Maryland
F0:7D:68:16:B7:2D attwifi FedEx Kinkos 170 University Ave W, Waterloo, ON N2L 3E9
#
E8:40:40:CD:ED:21 attwifi Denver International Airport (SFO) Domestic Ticketing
#
# The Netherlands
#
00:20:A6:E3:5E:09 KPN Safaripark Beekse Bergen (Zoo), NB, NL
FC:0A:81:4F:2F:02 KPN Albert Heijn XL Zaandam, NH, NL
FC:0A:81:4F:65:12 KPN Albert Heijn XL Zaandam, NH, NL
FC:0A:81:4F:8D:52 KPN Albert Heijn XL Zaandam, NH, NL
FC:0A:81:58:AE:E2 KPN Albert Heijn XL Zaandam, NH, NL
FC:0A:81:58:AF:F2 KPN Albert Heijn XL Zaandam, NH, NL
FC:0A:81:58:E8:22 KPN Albert Heijn XL Zaandam, NH, NL
00:14:1C:DE:AF:F0 KPN City hall, Stadshuisplein 100, Zaandam, NH, NL
00:15:62:C8:22:30 KPN KPN Winkel (store), Gedempte Gracht 40, Zaandam, NH, NL
00:02:6F:32:CA:7B KPN ???
#
# Personal HomePass
#
C0:25:06:48:D6:82 "_The Cloud" Personal HomePass
34:08:04:BF:AC:8A attwifi Personal HomePass - jhjsaat - D-Link Router
CC:FE:3C:92:DF:43 attwifi Personal HomePass - KaleoOmega - Android Phone
A6:F3:C1:0B:C6:7E attwifi Personal HomePass - Dartz150 - Windows 8 hostednetwork
62:36:DD:7E:05:B9 attwifi Personal HomePass - someonewhodied - Windows 8 hostednetwork
60:36:DD:7E:05:B8 attwifi Personal HomePass - someonewhodied - Windows 8 hostednetwork
00:EB:2D:D8:62:AA attwifi Personal HomePass - Neocrux
7C:61:93:07:6C:25 attwifi Personal HomePass - somebunny - Smartphone
F4:6D:04:A1:6B:86 attwifi Personal HomePass - somebunny - WiFi Card
00:25:86:D1:D8:A3 attwifi Personal HomePass - somebunny - WiFi Stick
00:02:72:7D:96:0C attwifi Personal HomePass - SignZ - WiFi Stick
06:1B:9E:28:FB:B2 attwifi Personal HomePass - reprep - Win 7 Virtual Hotspot
C0:3F:0E:8F:2B:1A attwifi Personal HomePass - SPjunkie
00:E0:B8:AE:08:04 attwifi Personal HomePass - Azedo
00:0C:F6:C4:88:00 attwifi Personal HomePass - Kimiko
10:68:3F:37:E0:2C attwifi Personal HomePass - hmtk - Nexus 4
00:23:14:A7:FC:11 attwifi Personal HomePass - 2d - Win 7 Virtual Hotspot
90:F6:52:D0:BE:A2 attwifi Personal HomePass - BrianBoffin - WiFi Card
00:17:82:F5:88:38 attwifi Personal HomePass -
00:14:A5:C6:3A:64 attwifi Personal HomePass -
CC:3A:61:08:16:DF attwifi Personal HomePass -
A4:C0:E1:69:0A:F8 attwifi Personal HomePass -
A0:F3:C1:46:1F:9A attwifi Personal HomePass -
90:94:E4:A9:EF:CE attwifi Personal HomePass -
00:1B:B9:8C:65:FF attwifi Personal HomePass -
84:00:D2:B2:51:F1 attwifi Personal HomePass -
88:53:2E:0B:74:5E attwifi Personal HomePass -
F4:EC:38:E1:CC:97 attwifi Personal HomePass -
10:BF:48:B3:C7:94 attwifi Personal HomePass -
8C:A9:82:1F:2C:EE attwifi Personal HomePass -
00:1F:C6:42:41:8C attwifi Personal HomePass -
20:AA:4B:36:D3:86 attwifi Personal HomePass -
90:18:7C:89:30:16 attwifi Personal HomePass -
9C:2A:70:7F:FD:A4 attwifi Personal HomePass -
B4:98:42:ED:FF:6B attwifi Personal HomePass -
#!/bin/bash
trap exit SIGINT SIGTERM
SLEEP_TIME=300
MAC_FILE=/etc/hostapd/mac_nintendozone
STREETPASS_REFRESH=28800
_IP=$(hostname -I)
CONFIG_FILE=/tmp/nz_config.conf
#if [ ! -p $CONFIG_FILE ]; then
# mkfifo $CONFIG_FILE
#fi
while true ; do
MAC_LIST=`sort -R $MAC_FILE`
MAC_LIST_FILE=/tmp/nz_maclist
echo "$MAC_LIST" >> $MAC_LIST_FILE
cat "$MAC_LIST_FILE" | while read MAC LINE ; do
REFRESH_FILE=/tmp/nz_refresh
if [ -e $REFRESH_FILE ] && [ `cat $REFRESH_FILE` = "refresh" ]; then
rm $REFRESH_FILE
echo "~~~~Refreshing MAC Address List~~~~"
break
fi
SSID=""
FOUND_END="false"
START_QUOTE="false"
if [ `expr index "$MAC" "#"` = "1" ] || [ ! -n "$MAC" ]; then
continue
elif [ `expr index "$LINE" "\""` = "1" ]; then
START_QUOTE="true"
LINE=$(expr substr "$LINE" 2 $(expr length "$LINE" - 1))
fi
while [ -n "$LINE" ] && [ "$FOUND_END" = "false" ]; do
CHAR=`expr substr "$LINE" 1 1`
if [ "$START_QUOTE" = "true" ]; then
if [ "$CHAR" = "\\" ]; then
LINE=$(expr substr "$LINE" 2 $(expr length "$LINE" - 1))
CHAR=`expr substr "$LINE" 1 1`
elif [ "$CHAR" = "\"" ]; then
LINE=$(expr substr "$LINE" 2 $(expr length "$LINE" - 1))
FOUND_END="true"
fi
else
if [ "$CHAR" = " " ]; then
FOUND_END="true"
fi
fi
if [ "$FOUND_END" = "false" ]; then
SSID="${SSID}${CHAR}"
fi
LINE=$(expr substr "$LINE" 2 $(expr length "$LINE" - 1))
done
DESCRIPTION="$LINE"
cat > $CONFIG_FILE <<EOF
interface=wlan0
ssid=attwifi
bssid=$MAC
bridge=br0
driver=nl80211
ssid=$SSID
ctrl_interface=wlan0
ctrl_interface_group=0
hw_mode=g
channel=5
wpa=0
rsn_pairwise=CCMP
beacon_int=100
auth_algs=3
macaddr_acl=0
wmm_enabled=0
eap_reauth_period=360000000
EOF
echo
echo
echo
echo "==========================================="
echo " SpillPass Pi Up and Running! "
echo
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
echo
echo "SSID:" $SSID "- BSSID:" $MAC
if [ -n "$DESCRIPTION" ]; then
echo "$DESCRIPTION"
fi
echo
echo "Time before next change:" $SLEEP_TIME "seconds"
echo "Current time:" $(date -u)
echo
echo " To Detach from this screen, "
echo " Press Ctrl + A and then D "
echo
echo "You can SSH to the IP of this device using "
echo " root / SpillPassPi "
echo
echo " Editable MAC List located at "
echo " /etc/hostapd/mac_nintendozone "
echo
echo "==========================================="
echo
echo
echo
echo
echo
timeout $SLEEP_TIME hostapd $CONFIG_FILE
echo ""
echo ""
done
echo "~~~~Looping Back to Beginning~~~~"
done
#!/bin/bash
REFRESH_FILE=/tmp/nz_refresh
cat > $REFRESH_FILE <<_EOF_
refresh
_EOF_
echo "MAC list will be refreshed on the next reload."
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>SpillPass for Raspberry Pi - A 3DS Homepass Distro</title></head>
<body style="color: rgb(204, 204, 204); background-color: black;" alink="#33ccff" link="#3366ff" vlink="red">
<div style="text-align: center;"><br>
<br>
<img style="width: 81px; height: 87px;" alt="" src="TLlogo.jpg" align="middle"> &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; <big style="color: rgb(204, 0, 0);"><big><big><big>SpillPass
for Raspberry Pi</big></big></big></big>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; <img style="width: 81px; height: 87px;" alt="" src="TRlogo.jpg" align="middle"><br>
A Simple Plug and Play 3DS StreetPass Relay and Nintendo Zone Hotspot<br>
<br>
<br style="color: rgb(255, 204, 102); font-weight: bold;"><span style="color: rgb(204, 153, 51); font-weight: bold;">!!MAC address list is now refreshing!!</span><br>
<span style="color: rgb(204, 153, 51); font-weight: bold;">!!The changes will go in effect when a new MAC address is picked!!</span><br><br>You can now press the back button or wait for ten seconds before you're being sent back to the main page.<br><br>
<br>
<form action="reboot.php"><big>
</big></form>
<br>
<br>
<?php
exec('sudo sh /etc/hostapd/nz_refresh.sh');
?>
<script type="text/javascript">
window.setTimeout('history.back();', 10000); // waits 10 seconds before going back
</script>
<br>
</div>
</body></html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment