Random Password Generator PHP Shell Script


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. #!/usr/bin/php -q
  2. <?php
  3. $seed = sha1(uniqid(mt_rand(), true));
  4. $hash1 = sha1(uniqid($seed . mt_rand(), true));
  5. $hash2 = sha1(uniqid($seed . mt_rand(), true)).sha1(uniqid($hash1 . mt_rand(), true));
  6. echo "10: " . substr(sha1(uniqid($hash1 . mt_rand(), true)), 0, 10) . "\n";
  7. echo "20: " . substr(sha1(uniqid($hash1 . mt_rand(), true)), 0, 20) . "\n";
  8. echo "30: " . substr(sha1(uniqid($hash1 . mt_rand(), true)), 0, 30) . "\n";
  9. echo "40: ${hash1}\n";
  10. echo "50: " . substr(sha1(uniqid($hash1 . mt_rand(), true)).sha1(uniqid($hash2 . mt_rand(), true)), 0, 50) . "\n";
  11. echo "60: " . substr(sha1(uniqid($hash1 . mt_rand(), true)).sha1(uniqid($hash2 . mt_rand(), true)), 0, 60) . "\n";
  12. echo "70: " . substr(sha1(uniqid($hash1 . mt_rand(), true)).sha1(uniqid($hash2 . mt_rand(), true)), 0, 70) . "\n";
  13. echo "80: ${hash2}\n";
  14. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.