Skip to content

Instantly share code, notes, and snippets.

@jimbuck
Forked from 0xdevalias/HackMeSomeUnicoins.md
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimbuck/9917943 to your computer and use it in GitHub Desktop.
Save jimbuck/9917943 to your computer and use it in GitHub Desktop.

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

(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 ) {
        var bal = $('.uc-balance');
        bal.text(parseInt(bal.text())+data.value);
        console.log(data);
      });
    });
  }, 11000);
})(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)

@jimbuck
Copy link
Author

jimbuck commented Apr 1, 2014

Just updated to be easier to copy and paste, as well as update the count on the sidebar.

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