Hacker News new | ask | show | jobs
by 0cf8612b2e1e 1120 days ago
I am trying and failing to find an article where a poker website published their source code, including how they shuffled cards and seeded their randomness. The seed was the current timestamp. Someone realized an efficient way to reduce the search space, assuming vaguely accurate clocks, and predict every card distributed at the table after viewing only a small number of cards.
2 comments

This is probably the article you are looking for: https://www.developer.com/guides/how-we-learned-to-cheat-at-...

The timestamp was down to a fraction of a second, so instead of having 52! possible decks (about 2^226) there were only 2^32 possible decks that could be generated by the algorithm.

Also: https://blog.codinghorror.com/shuffling/

This sounds similar https://github.com/ech0ii/forceitbox

Also for an example of exploiting a gambling site that used javascript's Math.random https://jonasnick.github.io/blog/2015/07/08/exploiting-csgoj...