Plex
Plex

Reputation: 3

CMD: Enter code

I would like that the person who uses this batch file in the batch file must be enter the code "7570640".

If the code is right: A message appears saying "The code is correct."

If the code is wrong: A message appears saying "The code is wrong." then the CMD Window should close.

I´m a absolute noob (when creating batch files and in the english language. :P).

I hope someone can help me with my code. Thanks

@echo off

set /p var= Welcome in the HASH (H$) alpha program. [ENTER]

set /p var= Start the Code Generator and type in the code. [ENTER]

set /p pattern= Code: 

pause

Upvotes: 0

Views: 1948

Answers (1)

HackR_360
HackR_360

Reputation: 202

replace pause in your script with this:

if "%pattern%" == "7570640" (echo The code is correct.) else (echo the code is wrong!)
pause

BTW I suggest you to remplace the first two set in your script by an echo
and also convert your .bat to an .exe so the user can't just right click>edit it and see your code:
http://www.f2ko.de/en/b2e.php
EDIT
based on what SomethingDark said, you can use aes encryption/decription tool drom here: http://www.f2ko.de/en/cmd.php

Upvotes: 1

Related Questions