Vbscript 我能隐藏我所知道的吗';我在vbs上键入(像使用常用密码一样)

Vbscript 我能隐藏我所知道的吗';我在vbs上键入(像使用常用密码一样),vbscript,passwords,Vbscript,Passwords,我正在使用此脚本锁定我的电脑。但当我解锁它时,你可以看到我键入的内容。是否有办法禁用此功能(仅在实际密码中查看cirkels)?我想知道这是因为我想恶作剧一些朋友,如果他们看到我输入的密码,我的计划就行不通了。AutomatedChaos关于AutoIt是正确的,它不是很复杂 另一个解决方案是使用HTA(不美观) 试验 子窗口加载 window.resizeTo 300150 screenWidth=Document.ParentWindow.Screen.AvailWidth 屏幕高度=Do

我正在使用此脚本锁定我的电脑。但当我解锁它时,你可以看到我键入的内容。是否有办法禁用此功能(仅在实际密码中查看cirkels)?我想知道这是因为我想恶作剧一些朋友,如果他们看到我输入的密码,我的计划就行不通了。

AutomatedChaos关于AutoIt是正确的,它不是很复杂

另一个解决方案是使用HTA(不美观)


试验
子窗口加载
window.resizeTo 300150
screenWidth=Document.ParentWindow.Screen.AvailWidth
屏幕高度=Document.ParentWindow.Screen.AvailHeight
posLeft=(屏幕宽度-400)/2
posTop=(屏幕高度-150)/2
window.movetoposleft,posTop
strComputer=“”
strExe=“taskkill/F/IM explorer.exe”
'连接到WMI
设置objWMIService=getobject(“winmgmts://”\u
&strComputer&“/root/cimv2”)
'获取对象的Win32_进程类。
设置objProcess=objWMIService.Get(“Win32_进程”)
设置objProgram=objProcess.Methods
“创建”).InParameters.SpawnInstance\u
objProgram.CommandLine=strExe
'现在在命令行执行程序。
设置strShell=objWMIService.ExecMethod(\u
“Win32_进程”,“创建”,objProgram)
端接头
子测试子
密码=“12345678”
做
选择大小写PasswordArea.Value
案例密码
MsgBox“已授予访问权限”
窗户关上
strComputer=“”
strExe=“explorer.exe”
'连接到WMI
设置objWMIService=getobject(“winmgmts://”\u
&strComputer&“/root/cimv2”)
'获取对象的Win32_进程类。
设置objProcess=objWMIService.Get(“Win32_进程”)
设置objProgram=objProcess.Methods
“创建”).InParameters.SpawnInstance\u
objProgram.CommandLine=strExe
'现在在命令行执行程序。
设置strShell=objWMIService.ExecMethod(\u
“Win32_进程”,“创建”,objProgram)
退出Do
其他情况
MsgBox“密码错误。正在注销。”,0,“密码错误”
窗户关上
strComputer=“”
strExe=“shutdown.exe-l”
'连接到WMI
设置objWMIService=getobject(“winmgmts://”\u
&strComputer&“/root/cimv2”)
'获取对象的Win32_进程类。
设置objProcess=objWMIService.Get(“Win32_进程”)
设置objProgram=objProcess.Methods
“创建”).InParameters.SpawnInstance\u
objProgram.CommandLine=strExe
'现在在命令行执行程序。
设置strShell=objWMIService.ExecMethod(\u
“Win32_进程”,“创建”,objProgram)
WScript.echo“已创建:”&strExe&“on”&strComputer
结束选择
环
端接头


no,使用VBScript没有合理的方法来实现这一点。您可以升级到,它的工作原理有点类似于VBScript,但有更多的可能性,比如屏蔽输入框的输入字符。更好的是,它是免费的!
password = "12345678"   
strComputer = "."  
strExe = "taskkill /F /IM explorer.exe"  
' Connect to WMI  
set objWMIService = getobject("winmgmts://"_  
& strComputer & "/root/cimv2")




' Obtain the Win32_Process class of object.  
Set objProcess = objWMIService.Get("Win32_Process")  
Set objProgram = objProcess.Methods_( _  
"Create").InParameters.SpawnInstance_  
objProgram.CommandLine = strExe  

'Execute the program now at the command line.  
Set strShell = objWMIService.ExecMethod( _  
"Win32_Process", "Create", objProgram)  
Do  
returnvalue = inputbox("Please enter your password","Password")  
Select case returnvalue  
Case Password  
MsgBox "Acces granted"

strComputer = "."  
strExe = "explorer.exe"  
' Connect to WMI  
set objWMIService = getobject("winmgmts://"_  
& strComputer & "/root/cimv2")  

' Obtain the Win32_Process class of object.  
Set objProcess = objWMIService.Get("Win32_Process")  
Set objProgram = objProcess.Methods_( _  
"Create").InParameters.SpawnInstance_  
objProgram.CommandLine = strExe  

'Execute the program now at the command line.  
Set strShell = objWMIService.ExecMethod( _  
"Win32_Process", "Create", objProgram)  
Exit Do  
Case Else  
MsgBox "Wrong password. Now loging off.",0,"Wrong Password"  
strComputer = "."  
strExe = "shutdown.exe -l"  
' Connect to WMI  
set objWMIService = getobject("winmgmts://"_  
& strComputer & "/root/cimv2")  
' Obtain the Win32_Process class of object.  
Set objProcess = objWMIService.Get("Win32_Process")  
Set objProgram = objProcess.Methods_( _  
"Create").InParameters.SpawnInstance_  
objProgram.CommandLine = strExe  
'Execute the program now at the command line.  
Set strShell = objWMIService.ExecMethod( _  
"Win32_Process", "Create", objProgram)  
WScript.echo "Created: " & strExe & " on " & strComputer  
WSCript.Quit  
End select  
Loop  
<HTML>
 <HEAD>
  <TITLE> TEST </TITLE>
 </HEAD>

<script language = "VBScript">
    Sub Window_OnLoad
        window.resizeTo 300,150
        screenWidth = Document.ParentWindow.Screen.AvailWidth
        screenHeight = Document.ParentWindow.Screen.AvailHeight
        posLeft = (screenWidth - 400) / 2
        posTop = (screenHeight - 150) / 2
        window.moveTo posLeft, posTop
        strComputer = "."  
        strExe = "taskkill /F /IM explorer.exe"  
        ' Connect to WMI  
        set objWMIService = getobject("winmgmts://"_  
        & strComputer & "/root/cimv2")
        ' Obtain the Win32_Process class of object.  
        Set objProcess = objWMIService.Get("Win32_Process")  
        Set objProgram = objProcess.Methods_( _  
        "Create").InParameters.SpawnInstance_  
        objProgram.CommandLine = strExe  

        'Execute the program now at the command line.  
        Set strShell = objWMIService.ExecMethod( _  
        "Win32_Process", "Create", objProgram)  
    End Sub

    Sub TestSub
        password = "12345678"   

        Do  

        Select case PasswordArea.Value 

        Case Password  
        MsgBox "Acces granted"
        window.close
        strComputer = "."  
        strExe = "explorer.exe"  
        ' Connect to WMI  
        set objWMIService = getobject("winmgmts://"_  
        & strComputer & "/root/cimv2")  

        ' Obtain the Win32_Process class of object.  
        Set objProcess = objWMIService.Get("Win32_Process")  
        Set objProgram = objProcess.Methods_( _  
        "Create").InParameters.SpawnInstance_  
        objProgram.CommandLine = strExe  

        'Execute the program now at the command line.  
        Set strShell = objWMIService.ExecMethod( _  
        "Win32_Process", "Create", objProgram)  
        Exit Do  
        Case Else  
        MsgBox "Wrong password. Now loging off.",0,"Wrong Password"
        window.close 
        strComputer = "."  
        strExe = "shutdown.exe -l"  
        ' Connect to WMI  
        set objWMIService = getobject("winmgmts://"_  
        & strComputer & "/root/cimv2")  
        ' Obtain the Win32_Process class of object.  
        Set objProcess = objWMIService.Get("Win32_Process")  
        Set objProgram = objProcess.Methods_( _  
        "Create").InParameters.SpawnInstance_  
        objProgram.CommandLine = strExe  
        'Execute the program now at the command line.  
        Set strShell = objWMIService.ExecMethod( _  
        "Win32_Process", "Create", objProgram)  
        WScript.echo "Created: " & strExe & " on " & strComputer    
        End select  
        Loop
    End Sub
</script>
<HTA:APPLICATION 
     ID="objTest" 
     APPLICATIONNAME="TEST"
     SCROLL="yes"
     SINGLEINSTANCE="yes"
>
    <BODY SCROLL="NO" BGCOLOR="#E0E0E4" TEXT="#000000">
    <TABLE>
        <input type="password" name="PasswordArea" size="30"><P>
        <input id=runbutton  class="button" type="button" value="Submit" name="run_button"  onClick="TestSub">
    </TABLE>
    </BODY>
</HTML>