Page 1 of 1
Password for bat Access!!
Posted: 03 Apr 2010 06:17
by jamesfui
hi every batch scripters,
i have a secret.bat & like to have password protection in it
so that whenever the bat need to run, it will prompt the user
to input the correct access passcode.
if passcode is correct, proceed & run!
but if wrong, access denied & show message 'passcode wrong, please try again & exit'
thanks!!
Re: Password for bat Access!!
Posted: 05 Apr 2010 02:39
by fanwars
Why?
Although the bat was succesfully password protected,
it would be easy to crack the protection away...
Re: Password for bat Access!!
Posted: 05 Apr 2010 20:05
by phillid
You could do a piece of code something like:
set /P %password% = "Please enter the password:"
if %password% == your_password (
echo Password correct!
[your code]
) else (
echo Password incorrect!
exit /B
)
This would be easily hacked by opening the batch file for editing unless you download a program called BAT to EXE converter (
http://www.brothersoft.com/downloads/bat-to-exe-converter.html) and convert your batch file. After conversion, there will be a *.EXE file and a *.BAT. The EXE will not be readable if opened in a text editor. There might be a few bits of software out there but you might be able to use your password program to stop people from using the floppy drive or something so they can't install anything like that. This will probably be
very secure for average users. Give it a try and tell us how it goes!
Re: Password for bat Access!!
Posted: 06 Apr 2010 02:52
by jamesfui
thanks for the bat2exe info..
is a very good & friendly applications!!
i love it but how to you use the
decompiler feature?
i only know how to set for its icon & version description..
the
ADD part in the second tab what is it use for?
thanks!
Re: Password for bat Access!!
Posted: 07 Apr 2010 07:36
by ENU_USER*.*
Jamesfui... I personally like to use Quick Batch File Compiler Standalone
which is a lot more user friendler and since its a standalone does not need
to be installed, and if you work with .vbs you can also use ScriptCryptor Compiler
that will also convert to .exe and allow you to use your own custom icon
to give your .bat or .cmd a more professional look.BTW can you share the code
you used in your bat file to created your p/w protected script to the group.
Re: Password for bat Access!!
Posted: 07 Apr 2010 20:03
by phillid
I am using one of the first versions of Bat to Exe converter. It doesn't have a decompiler feature, does the latest version? It's standalone so it doesn't require any installation, it just comes with a .exe and a .hlp. In my version of it, The ADD function just lets you have extra information in the EXE like the version, copyright, publisher and all that other stuff. I think this can only be seen in windows, because DOS wasn't made to have fancy things like that. You don't absolutely need to put anything in there, but just in case someone somehow copies your program, you should put a copyright and a company in there. If you don't own a company, just put your first and last name.
Hope I helped!
Re: Password for bat Access!!
Posted: 07 Apr 2010 20:15
by phillid
Oh! I just realised!!! anybody who has access to your computer could simply press 'up' on the key board and see what you just typed in! There must be a way to delete what you have typed in...
Re: Password for bat Access!!
Posted: 08 Apr 2010 02:27
by ---saster---
that´s doskey
doskey remember the commands that you use
press [ALT+F7] to delete the command list & press [F7] to see all the commands that you write
Re: Password for bat Access!!
Posted: 09 Apr 2010 19:16
by phillid
OH! Cool! Thanks. All this password stuff has inspired me to make my own script. I've always wondered what DOSKEY did. But now that I know, it's really good!
PS: You can download and try the script from
http://www.en-gin.ueuo.com/passwordscript/The password is MSDOS. It is case sensitive.