Hacker News new | ask | show | jobs
by brospars 2655 days ago
I'm virtually rich

var seq = '0000001000011000101000111001001011001101001111010101110110111111'; var index = 0; setInterval(function(){ captureKeyFunc({code : seq[index%seq.length] === '1' ? 'ArrowLeft':'ArrowRight', preventDefault: function () {}}); index++; }, 10);

2 comments

Adapted to use Math.random

setInterval(function(){ captureKeyFunc({code : Math.round(Math.random()) === 1 ? 'ArrowLeft':'ArrowRight', preventDefault: function () {}}); }, 10);

With Math.random you get ~50% win, with the sequence you get 85% because it's an exploit
Why use seq rather than Math.random()?
Because it's an exploit (read top comment)