Emojify your Wi-Fi 📡🙀🔥🔥🔥
Just moved to a new place—while thicker walls are nice in the morning when kitty is meowing that she wants me to wake up and play 😼, our crappy old single-mode wi-fi router wasn’t up to the task of distributing sweet internets to the corner rooms of our abode.
Our old Wi-Fi name was sign-up-for-free-wireless.exe but this time I wanted to try adding an emoji to the mix. Now, with your router, it might be simple—try putting the emoji in where you set your router’s SSID (on Mac OS, you can hit command + control + space to open up the Emoji keyboard). 👌
When I tried that on our brand spanking new TP-Link Archer C1900 router (truly the Ford F-250 of wi-fi routers), things exploded. 💥
What! “Invalid?!” 😡 I’ll show you invalid… hand me my Dev Tools… time to sort this out.
Approach #1: Client-side approval 💻 ✅
Step #1 when working from the outside-in to fix a bug in an unknown codebase is to find where the visuals are coming from. In this case, we’ve got a unique string, so I’ll fire up Chrome Dev Tools, CMD + Alt + F to do a multi-file search, and paste in that string.
Bingo! Let’s take a look around there…
checkSsidname. Let’s see who calls that. checkSsidValid, let’s see who calls that!
How about overriding that variable! I set a breakpoint and it paused when I submitted the form. Let’s write a simple function that always returns true, and set that identifier to that.
Press run, and… success! 😃 Right?? Let’s re-connect.
It appears our friend the emoji 😔 has become its corresponding HTML entity code 😔 en route to the server.
Let’s try a different tack and try doing this at the network level.
Approach #2: Down to the network level 📡
At this point, I’m not sure whether the Wi-Fi name was encoded client-side just before it was sent out, or if this is happening server side which would mean it won’t work with stock firmware at all 😖. Let’s pop open the Chrome Dev Tools Network tab and watch for a non-emojified ssid/password request to come over the wire.
🎼 Do you seeeeee what I seeeeee 🎶
👏 Now let’s use the handy “Copy as cURL” link to get a command we can use to replay this request from the terminal.
Now let’s paste it in, and edit out the placeholder string EMOJIHERE to become an emoji. 👀
Now I decided to set the 2.4ghz Wi-Fi to not include an emoji because apparently some machines can’t handle emojis. Who knew! 😐
Now let’s press enter and…
Cheers! 🍹 Great success. Until next time!