如何使批处理文件具有密码char [英] How to make a batch file have a password char

查看:135
本文介绍了如何使批处理文件具有密码char的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在批量编码中输入密码,当您输入密码时,它会显示密码,因此不太安全。任何想法?

I have been trying to make a password in batch coding and when you type in the password it shows the password so it is not as safe. Any Ideas?

推荐答案

这很简单。使用下面的代码来输入密码





This is very simple. Use the code below to make a password


<br />
@echo off<br />
set password=password<br />
set /p input=What is the password?: <br />
if %input%==%password% (<br />
echo your right!<br />
echo The password was %input%<br />
rem Note: You can replace %input% with %password%. They are the same!<br />
pause<br />
exit<br />
) else (<br />
echo Wrong password!<br />
echo Goodbye!<br />
pause<br />
exit<br />
)<br />





编辑----------------------

我知道你的意思。我不认为这是完全可能的,也许使用选择命令

与每个字母一样。对不好的答案感到抱歉。但做一些像选择EVERYLETTER的东西比当他们点击一封信时提示添加一个星。我相信这会奏效。这将是我所知道的唯一已知方法。



EDIT----------------------
I know see what you meant. I dont think this is exactly possible, maybe using choice commands
like with every letter. Sorry about the bad answer. But do something like choice EVERYLETTER Than have the prompt add a star when they hit a letter. I believe this will work. This would be the only known method I know of.


这篇关于如何使批处理文件具有密码char的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆