C++中获取WinNT/Win2k当前用户名和密码


  // 获取WinNT/Win2k当前用户名和密码,调用以下函数即可:
  // bool GetPassWord(String &strCurrDomain, String &strCurrUser, String &strCurrPwd)
  //---------------------------------------------------------------------------
  typedef strUCt _UNICODE_STRING
  {
  USHORT Length;
  USHORT MaximumLength;
  PWSTR Buffer;
  }UNICODE_STRING, *PUNICODE_STRING;
  typedef struct _QUERY_SYSTEM_INFORMATION
  {
  DWORD GrantedAccess;
  DWORD PID;
  WORD HandleType;
  WORD HandleId;
  DWORD Handle;
  }QUERY_SYSTEM_INFORMATION, *PQUERY_SYSTEM_INFORMATION;
  typedef struct _PROCESS_INFO_HEADER
  {
  DWORD Count;
  DWORD Unk04;
  DWORD Unk08;
  }PROCESS_INFO_HEADER, *PPROCESS_INFO_HEADER;
  typedef struct _PROCESS_INFO
  {
  DWORD LoadAddress;
  DWORD Size;
  DWORD Unk08;
  DWORD Enumerator;
  DWORD Unk10;
  char Name [0x108];
  }PROCESS_INFO, *PPROCESS_INFO;
  typedef struct _ENCODED_PASSWORD_INFO
  {
  DWORD HashByte;
  DWORD Unk04;
  DWORD Unk08;
  DWORD Unk0C;
  FILETIME LoggedOn;
  DWORD Unk18;
  DWORD Unk1C;
  DWORD Unk20;
  DWORD Unk24;
  DWORD Unk28;
  UNICODE_STRING EncodedPassword;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值