Wordle Reverse Engineered

Wordle Share Grid

I’ve been seeing posts for this wordle game on my facebook, and it seems to be alight on Twitter as well. I decided to try the game today and was able to get it on my fourth try! It was pretty fun. But, I wanted to see if there was an easier way to determine the word just for fun.

Inspecting the network requests when entering a guess showed no activity. Which means the correct word must be already cached locally and isn’t hitting a server for validation.

Doing some source code viewing, there is a word hash at the top along with the main.js:

Source Code

Browsing the sourcecode, there are several thousand lines of code. Most importantly are two arrays La, and Ta. Ta appears to be all the valid words in alphabetical order. La appears to be all words in game order.

Wordle chooses a new word every day, the offset is based off of its date of creation, June 19, 2021. On mine above you can see 226. There are 2315 words available which is enough to go through 2027.

If you copy the full La array to the console and access the 226th item, you get today’s answer:

Answers for today and tomorrow

I manually set my date time to tomorrow on my linux VM and tested 227s word and sure enough it confirmed that var La is the answers for each day:

neat

And now my share screen is the following for tomorrow:

Wordle 227 1/6

🟩🟩🟩🟩🟩

It’s a simple game that is fun for many online, and I was definitely surprised all of the answers were stored plain text in an array like that. Very interesting!

Comments

No comments available.

Leave a Reply

Your email address will not be published.