Return to Snippet

Revision: 19372
at October 22, 2009 10:21 by AzizLight


Initial Code
#!/usr/bin/php -q
<?php
	$seed = sha1(uniqid(mt_rand(), true));
	$hash1 = sha1(uniqid($seed . mt_rand(), true));
	$hash2 = sha1(uniqid($seed . mt_rand(), true)).sha1(uniqid($hash1 . mt_rand(), true));
	echo "10: " . substr(sha1(uniqid($hash1 . mt_rand(), true)), 0, 10) . "\n";
	echo "20: " . substr(sha1(uniqid($hash1 . mt_rand(), true)), 0, 20) . "\n";
	echo "30: " . substr(sha1(uniqid($hash1 . mt_rand(), true)), 0, 30) . "\n";
	echo "40: ${hash1}\n";
	echo "50: " . substr(sha1(uniqid($hash1 . mt_rand(), true)).sha1(uniqid($hash2 . mt_rand(), true)), 0, 50) . "\n";
	echo "60: " . substr(sha1(uniqid($hash1 . mt_rand(), true)).sha1(uniqid($hash2 . mt_rand(), true)), 0, 60) . "\n";
	echo "70: " . substr(sha1(uniqid($hash1 . mt_rand(), true)).sha1(uniqid($hash2 . mt_rand(), true)), 0, 70) . "\n";
	echo "80: ${hash2}\n";
?>

Initial URL


Initial Description


Initial Title
Random Password Generator PHP Shell Script

Initial Tags


Initial Language
PHP