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!
Great. Now normally Iād edit this file client-side with Chrome Dev Tools to make it return true at the top of the function, but because Chrome does not let you edit inline javascript on a .htm page, weāll need to try something else.
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. š
Bingo! š
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!