This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<header> | |
<title>I'm a trusted page</title> | |
</header> | |
<!-- Immediately dispatch the forum when we load--> | |
<body onload="document.hackform.submit()"> | |
<!-- Nothing suspicious... show the user a happy cat! --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import material from 'materialize-css/dist/js/materialize'; | |
let count = 0; | |
// Server simulation | |
async function processCommand() { | |
count += 1; | |
return count; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Mutex } from 'async-mutex'; | |
import material from 'materialize-css/dist/js/materialize'; | |
let count = 0; | |
let clientLock = new Mutex(); | |
// Server Simulation | |
function processCommand() { | |
count += 1; | |
return count; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Mutex, Semaphore } from 'async-mutex'; | |
import material from 'materialize-css/dist/js/materialize'; | |
let count = 0; | |
let clientLock = new Mutex(); | |
let clientSempahore = new Semaphore(2); | |
// Server Simulation | |
function processCommand() { | |
count += 1; |
OlderNewer