Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Loris.php

From John's Wiki

Useful little PHP script for holding a connection open for testing.

<?php
// John testing holding a connection open, will clean up. Although I guess if
// you're reading this that was a lie, sorry...
/* Debug
*/
ini_set('display_errors','1');
ini_set('display_startup_errors','1');
error_reporting (E_ALL);

echo "Randomness Begin...";

function random_string($length) {
    $str = random_bytes($length);
    $str = base64_encode($str);
    $str = str_replace(["+", "/", "="], "", $str);
    $str = substr($str, 0, $length);
    return $str;
}

while (True) {
    echo random_string(32) ."\n<br>\n";
}
?>