Giter Club home page Giter Club logo

break-nerdle's Introduction

break-nerdle

Clone the repo or copy the two .mjs and store them under the same directory.

Download node.js if you don't already have it.

Then, run node break_nerdle.mjs to get the answer of today's Nerdle(https://nerdlegame.com/).

Usage: node break_nerdle.mjs [options] Options: -m or --mini: set mode to "mini". -d or --diff : set the date to the specific date(if -D is used) or today add the number of days. -D or --date : set the date to the specific date. -h or --help: display this information.

The default date will be today. Note that Nerdle uses UTC time.

Example:

If you run the following command,

node break_nerdle.mjs -m -D 2022-02-05 -d 1

you will get the answer of Nerdle on the 6th Feb, 2022. (one day after 5th Feb, 2022).

How it works?

I read the code of Nerdle (https://nerdlegame.com/static/js/main.e25ab9b9.js) and discover how it gets the answer.

Nerdle will fetch a encrpyted answer from the the link https://nerdlegame.com/words/{md5_hash} where md5_hash is the hash of the number of days between today and 20th Jan, 2022, which is 16426368e5 in unix timestamp.

We can actually see this encrpyted answer via the Network tab in the devtool.

We can decode the answer as it is in the source code. It justs add the ascii code of each character in the encrpyted string with 133 and get the remainder by dividing it with 126.

Since they have stored the answer of near future, we can even "predict" the answer of tomorrow.

break-nerdle's People

Contributors

gordon-sau avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.