loading

Hey Guys!

I created an awesome batch password generator.Totally batch here is the download and the code.

===================================================================================

@echo off
color 12

cls

echo.

echo Password Generator 3000 (Example)

echo.

echo Write first name.

echo.

set /p fname=

echo.

echo Write last name.

echo.

set /p lname=

echo.

echo Generating password......

echo.

pause

set password=%random%%fname%%random%%lname%%random%

cls

color 21

echo.

echo

%password%

echo.

echo Passwordgenerated!

echo.

pause

:verification

cls

echo.

echo Write password.

echo.

set /p p=

if %p% equ %password% goto correct

if %p% neq %password% goto wrong

:correct

color 12

cls

echo.

echo Password correct!

echo. echo

Your balance %random%.

echo.

pause

exit

:wrong

color 04

cls

echo.

echo Password wrong!

echo.

pause

exit

===============================================================================

Its a fair sized amount of code.In the next few steps i will tell you how i did it.

Step 1: Step 1 of 2

In this step i will tell you how i made it happen.

I used the %random% command.

When ever you use this command in a batch file it generates

a random 4 or 5 digit number so i simply set the password to %random%%fname%%random%

%lname%%random%

to produce a random password.Some of you guys might be wondering what is lname and fname

fname stands for first name and lname stands for last name.I set this because not everybody using the password generator will have the same last name and also first name.

Step 2: Step 2 of 2

In this step i will tell you how i actually made it using strings.One of the most popular feature of batch is strings.

We can set any string like i did with set password=%random%.........

I used this almost everywhere in my password generator.

Like set /p name= and also set /p password=

The command that i used to indicate that the password was correct or wrong was the if command by writing

if %p% equ %password% goto correct and

if %p% neq %password% goto wrong

I hope you understood!

Thank you for reading!

<p>Hello <a href="https://www.instructables.com/member/OzonerPlays" rel="nofollow">OzonerPlays</a>, you said to comment what we want you to make next. How about helping me improve my artificial intelligence chatbot. It has 1,500 lines of code and is capable of verbally responding to user input. It is the instructable I have posted so far.</p>
Mine is not working
<p>Also visit my next instructable Teaching Java and JavaScript.</p><p><a href="https://www.instructables.com/id/Teaching-Java-and-JavaScript" rel="nofollow">https://www.instructables.com/id/Teaching-Java-and-JavaScript</a></p>
<p>Please tell me if there are any mistakes in this syntax i will do my best to correct them.</p>
<p>hello I love this please do Java then I will like every thing and follow ??????</p>
<p>Ok Ahmed.I will do java tutorials and also java script.</p>
<p>Please comment of what you want me to make next.</p>

About This Instructable

52views

1favorite

Bio: I am just a simple guy who wants to do many things and i will share those things with you.
More by OzonerPlays:Make Your Own Stylus at Home Password Generator With Batch Teaching Java and JavaScript 
Add instructable to: