{"@attributes":{"version":"2.0"},"channel":{"title":"JavaScript on LockBlock-dev blog","link":"https:\/\/lockblock-dev.github.io\/tags\/javascript\/","description":"Recent content in JavaScript on LockBlock-dev blog","generator":"Hugo","language":"en-us","lastBuildDate":"Wed, 15 Jul 2026 00:00:00 +0000","item":{"title":"Breaking Math.Random to win","link":"https:\/\/lockblock-dev.github.io\/posts\/breaking-math-random-to-win\/","pubDate":"Mon, 03 Mar 2025 00:00:00 +0000","guid":"https:\/\/lockblock-dev.github.io\/posts\/breaking-math-random-to-win\/","description":"<p>I was talking with <a href=\"https:\/\/github.com\/MasterIO02\">MasterIO<\/a> about Yuna, the Discord bot of <a href=\"https:\/\/ordr.issou.best\/\">o!rdr<\/a>, when I said that I could win big money.<\/p>\n<p>Big money in this story means virtual currency from a Discord bot. Sadly I did not buy a house with JavaScript.<\/p>\n<p>He told me to &ldquo;win against <code>Math.random<\/code>&rdquo;.<\/p>\n<p>So I did what any reasonable person would do. I googled how to break <code>Math.random<\/code>.<\/p>\n<h2 id=\"javascript-moment\">JavaScript moment<\/h2>\n<p><code>Math.random()<\/code> is not magic. It does not call the universe and ask it politely for a number. It is pseudo-random, which means that it uses an internal state to generate numbers that look random enough for most things.<\/p>"}}}