Snowball Fight

Tools/Skills: Browser's Developer Tools, HTML, JavaScript, Runtime Modifications

SYNOPSIS

Play a snowball fight against Santa and his Elves with another player. If you can, find a way to hack the game to make it a one-player game and/or make it easier to win.

Using Chrome's browser developer tools, I modified the URL to make it a single-player game and changed variables to make it easier to win.

SOLUTION

  1. Clicked on private room

  2. Right Clicked → Inspect

  3. Clicked Console → selected Room

  4. Examined the variables and code

  5. Modified the URL programmatically

    const urlParams = new URLSearchParams(window.location.search);

    urlParams.set('singlePlayer', 'true');

    const newUrl = `${window.location.pathname}?${urlParams}`;

    window.history.replaceState({}, '', newUrl);

    location.reload();

  6. Re-displayed global variables

  7. Changed Variables

PROCESS

I initially saw that I would have to pair up with another player, unless I could find a way to hack the game. I’ve never hacked a game, but decided I wanted to learn.

  1. The Basics: What is the iframe? Where is the client-side code? How can I find the variables?

  2. Updating “Single Player”

  3. Further Exploration

    • What more can I do?

Last updated