如何隐藏在****命令行密码,并获得价值为.bat文件和sh文件 [英] how to hide password in command line with **** and get the value into .bat file and .sh file

查看:416
本文介绍了如何隐藏在****命令行密码,并获得价值为.bat文件和sh文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的.bat文件命令,从命令行获取用户输入的是

My .bat file command to get user input from command line is

set /p weblogicpassword=Enter weblogic password:%=%

我的sh文件命令,从bash脚本获取用户输入的是

My .sh file command to get user input from bash script is

echo -n "Enter weblogic password: "
read weblogicpassword

现在,当我们的密码输入一些值,这些值都在命令行中可见。
我们怎样才能从命令行的密码值应该是不可见的用户喜欢的 * 的*

Now when we enter some values for password, those values are visible in command line. How we can get the password values from command line which should be invisible to users like **

推荐答案

对于bash的读-S

-s静音模式。如果输入来自终端,字符不会。

有关批次似乎要复杂的多。

For batch it seems to be more complicated.

阅读在这里:
我能掩盖一个bat文件的文本输入

这篇关于如何隐藏在****命令行密码,并获得价值为.bat文件和sh文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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