国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

提取win98上網密碼

2019-11-18 18:43:12
字體:
來源:轉載
供稿:網友
unit Unit1;

interface

uses
  Windows, SysUtils, Classes, Forms, ShellAPI, Controls, StdCtrls;

type
  TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    ListBox: TListBox;
    Label1: TLabel;
    Label2: TLabel;
    PRocedure Label1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    hMPR: THandle;
  end;

var
  Form1: TForm1;

const
  Count: Integer = 0;

function WNetEnumCachedPassWords(lp: lpStr; w: Word; b: Byte; PC: PChar; dw: DWord): Word; stdcall;

implementation

{$R *.DFM}
function WNetEnumCachedPasswords(lp: lpStr; w: Word; b: Byte; PC: PChar; dw: DWord): Word; external mpr name 'WNetEnumCachedPasswords';

type
PWinPassword = ^TWinPassword;
TWinPassword = record
  EntrySize: Word;
  ResourceSize: Word;
  PasswordSize: Word;
  EntryIndex: Byte;
  EntryType: Byte;
  PasswordC: Char;
  end;

var
  WinPassword: TWinPassword;

function AddPassword(WinPassword: PWinPassword; dw: DWord): LongBool; stdcall;
var
  Password: String;
  PC: Array[0..$FF] of Char;
begin
  inc(Count);

  Move(WinPassword.PasswordC, PC, WinPassword.ResourceSize);
  PC[WinPassword.ResourceSize] := #0;
  CharToOem(PC, PC);
  Password := StrPas(PC);

  Move(WinPassword.PasswordC, PC, WinPassword.PasswordSize + WinPassword.ResourceSize);
  Move(PC[WinPassword.ResourceSize], PC, WinPassword.PasswordSize);
  PC[WinPassword.PasswordSize] := #0;
  CharToOem(PC, PC);
  Password := Password + ': ' + StrPas(PC);

  Form1.ListBox.Items.Add(Password);
  Result := True;
end;

procedure TForm1.Label1Click(Sender: TObject);
begin
  ShellExecute(GetDesktopWindow, 'open', 'http://www.utilmind.com', nil, nil, 0);
end;

procedure TForm1.FormShow(Sender: TObject);
begin
  if WNetEnumCachedPasswords(nil, 0, $FF, @AddPassword, 0) <> 0 then
  begin
    application.MessageBox('Can''t load passwords: User is not logon.', 'Error', mb_Ok or mb_IconWarning);
    Application.Terminate;
  end
  else
  if Count = 0 then
    ListBox.Items.Add('No passwords found...');
end;

end.

上一篇:取得自從開機到現在CPU運行的周期數,超毫秒級的精度

下一篇:一個從EXE、DLL文件中提取、存取圖標完整程序

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
學習交流
熱門圖片

新聞熱點

疑難解答

圖片精選

網友關注

主站蜘蛛池模板: 肥东县| 萍乡市| 探索| 栾川县| 建湖县| 高唐县| 黄石市| 德江县| 江孜县| 新源县| 庄河市| 杭锦旗| 抚州市| 鲁甸县| 博白县| 鄂州市| 武义县| 鸡西市| 临猗县| 务川| 新邵县| 西丰县| 怀仁县| 锦屏县| 历史| 云和县| 瑞金市| 铜陵市| 阿坝| 房山区| 黄龙县| 寻甸| 宜君县| 登封市| 榆树市| 文登市| 道孚县| 抚远县| 沁源县| 水城县| 伊川县|