HTTP delay and validate clients using javascript cookies when CPU overloaded
Published Mar 18, 2015
Version 1.0Was this article helpful?
Had to change the response because of errors:
<!DOCTYPE html>
<html >
<head >
<script >
function redirect() {
window.location=\"http://$location\";
}
</script >
</head >
<body onload=\"redirect()\" >
<script >
var end=Math.ceil($::basedelay*Math.random()) + $::basedelay;
var start=new Date().getTime();
for (var i=0; i < 1e7; i++) {
if ((new Date().getTime() - start) > end) {
break;
}
}
document.cookie = \"$::cookie=$::token; path=/\";
</script >
</body >
</html >
" "Content-Type" "text/html"
Mostly adding space before the > sign