<?php
$charset = "abcdefghijklmnopqrstuvwxyz0123456789";
$charset_len = strlen($charset); $current_len = 4;
while (true)
{
$carry = true;
// Генерируем пароль и сразу же следующее состояние.
for ($i = 0; $i < $current_len; ++$i) {
$password[$i] = $charset[$state[$i]];
if ($carry) {
if (++$state[$i] !== $charset_len) {
$carry = false;
} else {
$state[$i] = 0;
}
}
}
if ($carry) {
echo "No luck!\n";
break;
}
if (md5($password) == "e7806b130b429fc9b5890608a2c60675") { echo "YES!\n\nPassword is '$password'\n";
break;
}
}
?>
PD9waHAKJGNoYXJzZXQgPSAiYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5IjsKJGNoYXJzZXRfbGVuID0gc3RybGVuKCRjaGFyc2V0KTsKJGN1cnJlbnRfbGVuID0gNDsKJHBhc3N3b3JkID0gc3RyX3JlcGVhdCgnICcsICRjdXJyZW50X2xlbik7CiRzdGF0ZSA9IGFycmF5X2ZpbGwoMCwgJGN1cnJlbnRfbGVuLCAwKTsKCndoaWxlICh0cnVlKQp7CiAgJGNhcnJ5ID0gdHJ1ZTsKICAKICAvLyDQk9C10L3QtdGA0LjRgNGD0LXQvCDQv9Cw0YDQvtC70Ywg0Lgg0YHRgNCw0LfRgyDQttC1INGB0LvQtdC00YPRjtGJ0LXQtSDRgdC+0YHRgtC+0Y/QvdC40LUuCgogIGZvciAoJGkgPSAwOyAkaSA8ICRjdXJyZW50X2xlbjsgKyskaSkgewogICAgJHBhc3N3b3JkWyRpXSA9ICRjaGFyc2V0WyRzdGF0ZVskaV1dOwogICAgCiAgICBpZiAoJGNhcnJ5KSB7CiAgICAgIGlmICgrKyRzdGF0ZVskaV0gIT09ICRjaGFyc2V0X2xlbikgewogICAgICAgICRjYXJyeSA9IGZhbHNlOwogICAgICB9IGVsc2UgewogICAgICAgICRzdGF0ZVskaV0gPSAwOwogICAgICB9CiAgICB9CiAgfQogCiAgaWYgKCRjYXJyeSkgewogICAgZWNobyAiTm8gbHVjayFcbiI7CiAgICBicmVhazsKICB9CgogIGlmIChtZDUoJHBhc3N3b3JkKSA9PSAiZTc4MDZiMTMwYjQyOWZjOWI1ODkwNjA4YTJjNjA2NzUiKSB7CiAgICBlY2hvICJZRVMhXG5cblBhc3N3b3JkIGlzICckcGFzc3dvcmQnXG4iOwogICAgYnJlYWs7CiAgfQp9Cj8+Cg==