用戶登錄  |  用戶注冊
首 頁源碼下載網絡學院最新源碼源碼排行屏蔽廣告
當前位置:新興網絡 > 網絡學院 > 編程開發 > C/C++

C++ 查看Windows95/98密碼的程序代碼

減小字體 增大字體 作者:佚名  來源:本站整理  發布時間:2011-03-26 17:49:03

 查看Windows95/98密碼的程序,網上看到的,沒測試過。

C/C++ code復制代碼
#include <windows.h>
#include <stdio.h>

typedef struct tagPASSWORD_CACHE_ENTRY {
    WORD cbEntry;                        // size of this entry, in bytes
    WORD cbResource;                // size of resource name, in bytes
    WORD cbPassword;                // size of password, in bytes
    BYTE iEntry;                        // entry index
    BYTE nType;                            // type of entry
    BYTE abResource[1];            // start of resource name
                                                        // password immediately follows resource name
} PASSWORD_CACHE_ENTRY;

char *buf, *ob1;
                                                           
BOOL CALLBACK pce(PASSWORD_CACHE_ENTRY *x, DWORD)
{
    memmove(buf, x->abResource, x->cbResource);
    buf[x->cbResource] = 0;
    CharToOem(buf, ob1);
    printf("%-30s : ", ob1);

    memmove(buf, x->abResource+x->cbResource, x->cbPassword);
    buf[x->cbPassword] = 0;
    CharToOem(buf, ob1);
    printf("%s\n", ob1);

    return TRUE;
}

void main()
{
    buf = new char[1024];
    ob1 = new char[1024];
    puts("No security in this crazy world!\n"
        "Win95 PWL viewer (c) 1997 Vitas Ramanchauskas\n"
        "http://webdon.com, e-mail: [email protected]

			[email protected], ICQ:3024702\n\n"
        "************\n"
        "!DISCLAIMER!\n"
        "!This program intended to be used for legal purpose only!\n"
        "************\n\nPress Enter to begin...\n");
    getchar();

    HINSTANCE hi = LoadLibrary("mpr.dll");
    if(!hi)
    {
        puts("Couldn't load mpr.dll");
        return;
    }
    WORD (__stdcall *enp)(LPSTR, WORD, BYTE, void*, DWORD) =
        (WORD (__stdcall *)(LPSTR, WORD, BYTE, void*, DWORD))GetProcAddress(hi, "WNetEnumCachedPasswords");
    if(!enp)
    {
        puts("Couldn't import function");
        return;
    }
    (*enp)(0,0, 0xff, pce, 0);
    FreeLibrary(hi);
}

Tags:Windows95 密碼查看 C++

作者:佚名
  • 好的評價 如果您覺得此文章好,就請您
      0%(0)
  • 差的評價 如果您覺得此文章差,就請您
      0%(0)

網絡學院評論評論內容只代表網友觀點,與本站立場無關!

   評論摘要(共 0 條,得分 0 分,平均 0 分) 查看完整評論
美国百家乐注册