Skip to content

Instantly share code, notes, and snippets.

@sean-smith
Last active October 17, 2023 03:06
Show Gist options
  • Save sean-smith/0febe398c8cb8e3d2b74f99c6694f15c to your computer and use it in GitHub Desktop.
Save sean-smith/0febe398c8cb8e3d2b74f99c6694f15c to your computer and use it in GitHub Desktop.

๐Ÿš€ Wifi

image

So naturally the first thing I wanted to do when we got fiber internet was to rename the wifi network to something sexier than "CenturyLink0483". I decided on ๐Ÿš€.

To do so I navigated to the router setup page at 192.168.0.1, cringing with all the 90's tech it employs.

Then I added ๐Ÿš€ and tried to update.

Sadly it failed validation saying it didn't support non-text characters.

Not to be deterred I took a look at the client side code.

I found a file called wirelesssetup_basicsettings.html that contains the following: ๐Ÿค”

function do_Apply() {
    var input_ssid = document.querySelector("#WB_1_N_TextInput").value

    if ( input_ssid.length > 32 || input_ssid.length == 0 )
        dialogMsg("The SSID must be alphanumeric with special characters excluding the use of a space.")
    else if ( is_ssid_valid_char(input_ssid) == false)
        dialogMsg("An unsupported character is included in the SSID.  Please rename the SSID.")
    else if ( is_ssid_leading_trailing_space(input_ssid) == false)
        dialogMsg("The SSID prohibits leading and trailing spaces.")
    else if ( is_unique_ssid( 'Device.WiFi.SSID.1', input_ssid ) == false)
        dialogMsg("The SSID name entered is in use with another SSID.  Please enter a unique SSID name.")
    else if ( document.querySelector("#WB_2_S_DropDown").value != 'None' && document.querySelector("#WB_3_SR_Custom").checked == true && 
        is_wpakey_valid_char(document.querySelector("#WB_3_ST_CustomPassword").value) == false )
        dialogMsg("Invalid WPA key.  Please re-enter a valid WPA key with a character length of 8 to 63.")
    else if ( document.querySelector("#WB_2_S_DropDown").value == 'None' ){
        dialogMsg('Disabling security allows any wireless device to access your wireless network creating an unsecured environment.Press OK to continue or Cancel to set up wireless security.', {
            cancel: true,
            ok: true,
            okfunc: function() {
                setting()
            }
        })
    }else
        setting()
}

So I pasted the following into the chrome js console (Command+Control+Shift+I):

function is_ssid_valid_char(input_ssid) { return true }
function subHtmAsc(str) { return str }

I clicked update and waited ๐Ÿคž.

image

Voila! Emojis for the masses.

@sean-smith
Copy link
Author

Thanks @Silver-Linda!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment