使用C#检索Windows密码 [英] Windows Password retriving using C#

查看:114
本文介绍了使用C#检索Windows密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以从C#访问Windows密码吗?我尝试编写程序并在网上搜索.我发现我们无法访问您的密码.任何人都可以正确回答我的问题吗?

Can we access windows password from our C# ?I tried write the programm and searched on net .I found that we cant access uer password.Could any one answer correctly to my question?

推荐答案

Windows密码是一种单向哈希密码.您可以通过大量的努力来检索密码的哈希值.但是您无法获得实际的密码.
即时获取Windows 7密码哈希 [ ^ ]
Windows Password is a One way Hash password. With lot of effort you can retrieve the hash value of your password. But you cannot get the actual password itself.
Retrieve the Windows 7 Password Hash on the Fly[^]


您可以使用WindowsIdentity.GetCurrent()获取当前线程正在其下运行的用户(不一定是登录用户)的当前身份.或者,您可以通过Environment.UserName属性获取登录的用户名.但是,不能保证是正在运行当前进程的用户.

没有Windows API可以获取用户密码,因为密码未存储在Windows中.

看看在C#中重置Windows管理员帐户密码 [ ^ ]
You can get the current identity of the user under which the current thread is running (not necessarily the logged in user) using WindowsIdentity.GetCurrent(). Alternatively you can get the logged in user name via the Environment.UserName property. It is not guaranteed to be the user running the current process however.

There is no Windows API to get a user''s password as passwords aren''t stored in Windows.

Have a look on Reset Windows Administrator Account Password in C#[^]


这篇关于使用C#检索Windows密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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