Skip to content

Instantly share code, notes, and snippets.

@0xdevalias
Last active August 29, 2015 13:57
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save 0xdevalias/9905949 to your computer and use it in GitHub Desktop.
Save 0xdevalias/9905949 to your computer and use it in GitHub Desktop.
A quick little hack to automagically mine unicoins (stackoverflow.com April Fools 2014) <3 /dev/alias (www.devalias.net)

First, go to stackoverflow.com then define this in your Javascript console:

var hackMeSomeUnicoins = function(myFkey) {
  console.log("Ok, let's hack you some shiny unicoins! <3 /dev/alias (www.devalias.net)")
  console.log("The powers that be say you can only mine a rock every 10sec, so we do it every 11sec to be sure.")
  window.setInterval(function(){
    $.get( "http://stackoverflow.com/unicoin/rock", function( data ) {
      var rockId = data.rock;
      $.post( "http://stackoverflow.com/unicoin/mine?rock=" + rockId, { fkey: myFkey })
      .done(function( data ) {
        console.log(data);
      });
    });
  }, 11000);
};

Once you have done that, just call this from the console:

hackMeSomeUnicoins(StackExchange.options.user.fkey);

(Thanks to @ouranos for the fkey options string)

You can get your fkey by inspecting the POST made when you successfully (manually) mine a rock. (It's also stored in a data-fkey type value somewhere, but haven't been bothered to find it and automagically pull it out (feel free to contribute some JS to do it)

Pimping this:

@SteamWind
Copy link

Unfortunately, the server give less and less coins while you try to mine...

@0xdevalias
Copy link
Author

ouranos: Cool, thanks for that :)

suhailvs: Definitely a nicer looking version than what I hacked together :)

SteamWind: I noticed that I seemed to be getting a LOT of 0 coins after a while, but still managed to get enough through this to buy all the features :)

@pykler
Copy link

pykler commented Apr 1, 2014

@suhailvs small typo in your setTimeout, should be minec not UniMine

@jimbuck
Copy link

jimbuck commented Apr 1, 2014

Updated with a few more features: https://gist.github.com/JimmyBoh/9917943

@SteamWind
Copy link

Sad it's already finish... :(
Nobody have think about doing a chrome extension to keep it anyway ? ^^

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