function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
function randomHeader()
{
var values = '1234567890QWERTYUIOPASDFGHJKLZXCVBNM'
var str = '';
for (var i=0; i < 12; i++)
{
str += values[getRandomInt(0, 36)];
}
return str;
}
String.prototype.replaceAt=function(index, replacement) {
return this.substr(0, index) + replacement+ this.substr(index + 1);
}
var index = 0;
var def = "REKTWARE.NET";
function indexToChar(i) {
return String.fromCharCode(i); //97 in ASCII is 'a', so i=0 returns 'a',
// i=1 returns 'b', etc
}
var brute_index = 0;
function replaceAt(string, index, replace) {
return string.substring(0, index) + replace + string.substring(index + 1);
}
var brute_interval = null;
function bruteforceHeader()
{
var baseee = "TEN.ERAWTKER";
var html = $('#header_animation').html();
if (html[index] != def[index])
{
//html.replaceAt(index, baseee[brute_index]);
html= html.substring(0, def.length);
html = replaceAt(html, index, baseee[brute_index]);
$('#header_animation').html(html);
if (brute_index < 12)
brute_index ++;
}
else
{
brute_index = 0;
if (index < 11)
index++;
else
{
window.clearInterval(brute_interval);
index = 0;
setTimeout(headerAnimation, 2000);
}
}
}
function headerAnimation()
{
$('#header_animation').html(randomHeader());
brute_interval = setInterval(bruteforceHeader, 50);
}
window.onload = function() {
setTimeout(headerAnimation, 1000);
};