Show DevBest Password Generator Script

Jan 17, 2012
649
166
Hello,

I got bored so I made a password generator script in a few minutes. All you have to do is put these codes in the correct file names.

index.php
HTML:
<html>
    <head>
        <title>Password Generator Script</title>
    </head>
<body>
   
    <h2>Password Generator</h2><br />
   
    <form action="result.php" method="post" />Choose number<br />
        <input type="text" name="number" /><br />
        <input type="submit" value="Generate Password" />
    </form>
   
   
</body>
</html>

result.php
PHP:
<?php
$string = '';
$number = $_POST['number'];
 
switch($number)
{
    case 6:
    $string = "abc123";
    echo $string/2;
    break;
   
    case 7:
    $string = "abc1234";
    echo $string/2;
    break;
   
    case 8:
    $string = "abcd1234";
    echo $string/2;
    break;
   
    case 9:
    $string = "abcd12345";
    echo $string/2;
    break;
   
    case 10:
    $string = "abcde12345";
    echo $string/2;
    break;
   
    default:
    echo 'Invalid number.';
}
    $string_shuffled = str_shuffle($string);
    echo $string_shuffled;
 
?>
 

LoW

Learner.
Jun 16, 2011
600
105
Hello,

I got bored so I made a password generator script in a few minutes. All you have to do is put these codes in the correct file names.

index.php
HTML:
<html>
    <head>
        <title>Password Generator Script</title>
    </head>
<body>
 
    <h2>Password Generator</h2><br />
 
    <form action="result.php" method="post" />Choose number<br />
        <input type="text" name="number" /><br />
        <input type="submit" value="Generate Password" />
    </form>
 
 
</body>
</html>

result.php
PHP:
<?php
$string = '';
$number = $_POST['number'];
 
switch($number)
{
    case 6:
    $string = "abc123";
    echo $string/2;
    break;
 
    case 7:
    $string = "abc1234";
    echo $string/2;
    break;
 
    case 8:
    $string = "abcd1234";
    echo $string/2;
    break;
 
    case 9:
    $string = "abcd12345";
    echo $string/2;
    break;
 
    case 10:
    $string = "abcde12345";
    echo $string/2;
    break;
 
    default:
    echo 'Invalid number.';
}
    $string_shuffled = str_shuffle($string);
    echo $string_shuffled;
 
?>
how this one works?
 

Mastah

the funny thing is \r\n i did
Oct 25, 2010
739
41
No. It's just something for you to put on your site for visitors.


These sorts of generators are for people who can't make a safe password, they can have a password that is save and no one can guess therefore these have been made.

Therefore these things have been made they are the most common thing on the INTERNET so i won't take it that this is the only generator script around because if you search it up then you would find a lot of more generators and a lot of generation scripts.
 

Ignorance

Active Member
Jul 29, 2012
178
25
Nice release will be using this if I ever make a website, might try making it compatible on a hotel aswell for the users that are like 11, etc so they can have harder passwords, because we all know younger you are easier the passwords are!
 

Ecko

23:37 [autobots] -!- eckostylez [[email protected]]
Nov 25, 2012
1,397
961
PHP:
<?php 
echo substr(str_shuffle('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$'), 0, 10); 
?>
Much better password generator than the one posted:



Just refresh to get a new generated password.
 
Jan 17, 2012
649
166
Nice release.
No, it isn't.
Nice release will be using this if I ever make a website, might try making it compatible on a hotel aswell for the users that are like 11, etc so they can have harder passwords, because we all know younger you are easier the passwords are!
I don't recommend using this, has provided a better and more secure one.
 

Shard

Member
Feb 16, 2013
52
9
because we all know younger you are easier the passwords are!

I know for a fact that that statement is not true. When I was eleven, my password was "jaffacake" or "password"

PWND.

===
O/T:

Eh. Usable script I guess. Needs work.
 

Ignorance

Active Member
Jul 29, 2012
178
25
I know for a fact that that statement is not true. When I was eleven, my password was "jaffacake" or "password"

PWND.

===
O/T:

Eh. Usable script I guess. Needs work.
Lmfao?
No, it isn't.

I don't recommend using this, has provided a better and more secure one.
Very true, but eh! Worth a try when I'm bored
 

Users who are viewing this thread

Top