Advertisement
miraip0ts

PassGen

Dec 25th, 2017
755
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1. <?php
  2.  // WARNING: PassGen
  3.  $password = "";
  4.  $charset = "abcdefghijkl&^*?mnopqrstu@#!vwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  5.  
  6.  for($i = 0; $i < 8; $i++)
  7.  {
  8.     $random_int = mt_rand();
  9.      $password .= $charset[$random_int % strlen($charset)];
  10.  }
  11.  
  12. echo $password, "\n";
  13.  
  14. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement