📄 encrypt.cpp
字号:
// encrypt.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include "encrypt.h"
#include "stdio.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
// This is an example of an exported function.
ENCRYPT_API char* FAR PASCAL GetPassword(char* filedir)
{
char *password = 0;
BYTE source[13];
BYTE data[200];
FILE *fp;
int len = 0;
int i = 0;
memset(data,0,200);
source[0] = 0x86;
source[1] = 0xFB;
source[2] = 0xEC;
source[3] = 0x37;
source[4] = 0x5D;
source[5] = 0x44;
source[6] = 0x9C;
source[7] = 0xFA;
source[8] = 0xC6;
source[9] = 0x5E;
source[10] = 0x28;
source[11] = 0xE6;
source[12] = 0x13;
fp = fopen(filedir,"r+b");
if (fp == NULL)
{
*password = '\0';
return password;
}
len = fread(data,1,100,fp);
if (len == 0)
{
*password = '\0';
return password;
}
for(i=0; i<13; i++)
{
if( source[i] == data[67 + i] )
{
*password = '\0';
return password;
}
else
{
*password++ = (char)data[67 + i];
}
}
*password = '\0';
fclose(fp);
return password;
}
// This is the constructor of a class that has been exported.
// see encrypt.h for the class definition
CEncrypt::CEncrypt()
{
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -