Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $errorcount = 0;
- for ($i = 0; $i < 100000; $i++) {
- if ($i%1000==0) echo $i, "\n";
- $pepper = md5(mt_rand(0,10000000));
- $username = substr(md5($pepper),0,5);
- $id = uniqid(null,true);
- try {
- $cursor = $users->insert(array(
- 'id' => $id,
- 'account' => array(
- 'username' => $username,
- 'active' => true,
- 'password' => sha1("test123"+$pepper+$salt),
- 'pepper' => $pepper,
- 'cryptmethod' => 'sha1sp'
- ),
- 'profile' => array(
- 'username' => md5($pepper),
- 'biography' => "Some random user",
- 'birthdate' => date('Y-m-d',strtotime(mt_rand(1960,2000).'-'.mt_rand(1,12).'-'.mt_rand(1,28))),
- )
- ),array('safe'=>true));
- } catch(Exception $e) {
- $errorcount++;
- }
- unset($findJs);
- unset($id);
- unset($username);
- unset($pepper);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement