#include "stdafx.h"
#include "SSP2MK.h"
#include "SSP2MKDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#define MSG_INFO 0
#define MSG_HEADER 1
#define MSG_EMPHASIZE 2
#define MSG_NOTIFY 3
#define MSG_WARNING 4
#define MSG_ERROR 5
#define MSG_INFO_TOKEN '-'
#define MSG_HEADER_TOKEN '+'
#define MSG_EMPHASIZE_TOKEN '~'
#define MSG_NOTIFY_TOKEN ':'
#define MSG_WARNING_TOKEN '!'
#define MSG_ERROR_TOKEN '*'
#define MSG_HEADER_RGB_BG RGB(127, 201, 255)
#define MSG_HEADER_RGB_FG RGB( 0, 0, 0)
#define MSG_EMPHASIZE_RGB_BG RGB(185, 225, 255)
#define MSG_EMPHASIZE_RGB_FG RGB( 0, 0, 0)
#define MSG_NOTIFY_RGB_BG RGB( 0, 50, 200)
#define MSG_NOTIFY_RGB_FG RGB(255, 255, 255)
#define MSG_WARNING_RGB_BG RGB(255, 180, 0)
#define MSG_WARNING_RGB_FG RGB( 0, 0, 0)
#define MSG_ERROR_RGB_BG RGB(200, 0, 0)
#define MSG_ERROR_RGB_FG RGB(255, 255, 255)
#define LIST_RGB_ROW_0_COL_0 RGB(248, 248, 248)
#define LIST_RGB_ROW_0_COL_1 RGB(238, 238, 238)
#define LIST_RGB_ROW_1_COL_0 RGB(235, 235, 235)
#define LIST_RGB_ROW_1_COL_1 RGB(225, 225, 225)
#define KEYS_ITEM_ID 0
#define KEYS_ITEM_SN 1
#define KEYS_ITEM_API 2
#define KEYS_ITEM_STATE 3
#define KEYS_ITEM_FAMILY 4
#define KEYS_ITEM_CELLS 5
#define KEYS_ITEM_FORM_FACTOR 6
#define KEYS_ITEM_WP_COUNTER 7
#define KEYS_ITEM_KEY_INFO 8
#define KEYS_ITEM_INFO 9
#define LOG_ITEM_TIME 0
#define LOG_ITEM_SOURCE 1
#define LOG_ITEM_TYPE 2
#define LOG_ITEM_MESSAGE 3
static const char *g_szSNTNLUSB = "SNTNLUSB";
static const char *g_szSPROMEPS = "SPROMEPS";
static const char *g_szFamilySuperPro = "SSP";
static const char *g_szFamilyUltraPro = "ULP";
static const char *g_szFormFactorUSB = "USB";
static const char *g_szFormFactorLPT = "LPT";
static const char *g_szWPCounter = "+++";
static const char *g_szUnknown = "???";
#define STATE_ERROR -1
#define STATE_CONNECTED 0
#define STATE_DUMPED 1
#define STATE_SOLVED 2
static const char *g_szStateError = "Error";
static const char *g_szStateConnected = "Connected";
static const char *g_szStateDumped = "Dumped";
static const char *g_szStateSolved = "Solved";
static const char *g_szLogApp = "Application";
static const char *g_szLogDevice = "Device";
static const char *g_szLogDumper = "Dumper";
static const char *g_szLogSolver = "Solver";
static const char *g_szLogVerifier = "Verifier";
CSSP2MKDlg::CSSP2MKDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSSP2MKDlg::IDD, pParent)
, m_lpSSPDump(NULL)
, m_dwUniqueID(0)
, m_fDumpAlgorithmCells(true)
, m_fDumpAESCells(true)
{
static char szFile[_MAX_PATH];
SecureZeroMemory(&szFile, sizeof(szFile));
SecureZeroMemory(&m_ofnFile, sizeof(m_ofnFile));
m_ofnFile.lStructSize = sizeof(OPENFILENAMEA);
m_ofnFile.nMaxFile = _MAX_PATH;
m_ofnFile.lpstrFile = szFile;
m_rgSSPInterfaces[0] = CSSPFactory::Acquire(CSSPFactory::SNTNLUSB);
m_rgSSPInterfaces[1] = CSSPFactory::Acquire(CSSPFactory::SPROMEPS);
m_lpSSP = m_rgSSPInterfaces[0];
if (!m_lpSSP) m_lpSSP = m_rgSSPInterfaces[1];
VERIFY(m_hIcon = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_MAINFRAME), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hIconEnumerate = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_ENUMERATE), IMAGE_ICON, 24, 24, LR_DEFAULTCOLOR)));
VERIFY(m_hIconEnumerateDisabled = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_ENUMERATE_DISABLED), IMAGE_ICON, 24, 24, LR_DEFAULTCOLOR)));
VERIFY(m_hIconAbort = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_ABORT), IMAGE_ICON, 24, 24, LR_DEFAULTCOLOR)));
VERIFY(m_hIconAbortDisabled = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_ABORT_DISABLED), IMAGE_ICON, 24, 24, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconSaveAs = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_SAVE_AS), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconEnumerate = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_ENUMERATE), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconDumpSafe = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_DUMP_SAFE), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconDumpWP = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_DUMP_WP), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconSolve = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_SOLVE), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconSolveMP = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_SOLVEMP), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconSolveMPGreen = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_SOLVEMP_GREEN), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconSolveMPYellow = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_SOLVEMP_YELLOW), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconSolveMPRed = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_SOLVEMP_RED), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconSolveMPBlack = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_SOLVEMP_BLACK), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconVerify = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_VERIFY), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconLoadDump = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_LOAD_DUMP), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconSaveDump = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_SAVE_DUMP), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconRemoveEntry = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_DELETE), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
VERIFY(m_hMNIconRemoveAll = reinterpret_cast<HICON>(LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MN_REMOVE_ALL), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR)));
}
CSSP2MKDlg::~CSSP2MKDlg()
{
DestroyIcon(m_hIcon);
DestroyIcon(m_hIconEnumerate);
DestroyIcon(m_hIconEnumerateDisabled);
DestroyIcon(m_hIconAbort);
DestroyIcon(m_hIconAbortDisabled);
DestroyIcon(m_hMNIconSaveAs);
DestroyIcon(m_hMNIconEnumerate);
DestroyIcon(m_hMNIconDumpSafe);
DestroyIcon(m_hMNIconDumpWP);
DestroyIcon(m_hMNIconSolve);
DestroyIcon(m_hMNIconSolveMP);
DestroyIcon(m_hMNIconSolveMPGreen);
DestroyIcon(m_hMNIconSolveMPYellow);
DestroyIcon(m_hMNIconSolveMPRed);
DestroyIcon(m_hMNIconSolveMPBlack);
DestroyIcon(m_hMNIconVerify);
DestroyIcon(m_hMNIconLoadDump);
DestroyIcon(m_hMNIconSaveDump);
DestroyIcon(m_hMNIconRemoveEntry);
DestroyIcon(m_hMNIconRemoveAll);
}
void CSSP2MKDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_KEYS, m_lcKeys);
DDX_Control(pDX, IDC_LOG, m_lcLog);
DDX_Control(pDX, IDC_PROGRESS, m_pcProgress);
DDX_Control(pDX, IDC_REGISTRY, m_ecRegistry);
}
BEGIN_MESSAGE_MAP(CSSP2MKDlg, CDialog)
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
//}}AFX_MSG_MAP
ON_WM_CREATE()
ON_WM_SIZE()
ON_WM_SIZING()
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
SSP2MK_dongle_SSP_Dongledumper_SSP2MK_MultiKey_ (238个子文件)
ilKeys.bmp 4KB
ilLog.bmp 2KB
SSP2MKDlg.cpp 72KB
SSPDump.cpp 68KB
SSP.cpp 39KB
MKRegistryEdit.cpp 14KB
SSP2MK.cpp 460B
stdafx.cpp 21B
CRYPT32.dll 486B
SSP2MK.exe 636KB
spromeps.h 28KB
EasySize.h 24KB
SSP.h 10KB
SSP2MKDlg.h 7KB
SSPDump.h 6KB
resource.h 5KB
stdafx.h 1KB
MKRegistryEdit.h 1016B
SSP2MK.h 283B
SSP2MK.ico 26KB
Enumerate.ico 2KB
AbortDisabled.ico 2KB
EnumerateDisabled.ico 2KB
Abort.ico 2KB
MNSolve.ico 1KB
MNSolveMPBlack.ico 1KB
MNCut.ico 1KB
MNSolveMP.ico 1KB
MNLoadDump.ico 1KB
MNUndo.ico 1KB
MNRemoveAll.ico 1KB
MNSelectAll.ico 1KB
MNInsertQRTable.ico 1KB
MNSolveMPRed.ico 1KB
MNDumpWP.ico 1KB
MNCopy.ico 1KB
MNSolveMPGreen.ico 1KB
MNDumpSafe.ico 1KB
MNRemoveQRTable.ico 1KB
MNEnumerate.ico 1KB
MNSolveMPYellow.ico 1KB
MNSaveDump.ico 1KB
MNDelete.ico 1KB
MNPaste.ico 1KB
MNVerify.ico 318B
MNSaveAs.ico 318B
SSP2MK.manifest 683B
xmltok.obj 123KB
xmltok.obj 123KB
xmltok.obj 123KB
xmlparse.obj 72KB
xmlparse.obj 72KB
xmlparse.obj 72KB
sprodcl.obj 63KB
sprodcl.obj 57KB
sprodcl.obj 55KB
util.obj 30KB
util1.obj 29KB
util1.obj 28KB
spnclOth.obj 26KB
spnlowfn.obj 25KB
BusLayer.obj 25KB
BusLayer.obj 25KB
spncldual.obj 25KB
BusLayer.obj 24KB
spncldual.obj 24KB
message.obj 24KB
message.obj 24KB
message.obj 24KB
spnclOth.obj 23KB
spnclOth.obj 23KB
xmlrole.obj 22KB
xmlrole.obj 22KB
xmlrole.obj 22KB
spncldual.obj 22KB
spclipc.obj 21KB
spclipc.obj 21KB
spclipc.obj 21KB
spnlowfn.obj 20KB
spnlowfn.obj 20KB
spclwrapper.obj 20KB
spnclFnd.obj 19KB
spclwrapper.obj 18KB
spnclEnK.obj 18KB
spclwrapper.obj 18KB
softutils.obj 16KB
ThreadSafeIntf.obj 16KB
vintl.obj 15KB
vintl.obj 15KB
ThreadSafeIntf.obj 15KB
vintl.obj 15KB
spnclFnd.obj 14KB
ThreadSafeIntf.obj 14KB
spnclFnd.obj 14KB
netwrp.obj 12KB
netwrp.obj 12KB
netwrp.obj 12KB
USBdcl.obj 12KB
spnclEnK.obj 11KB
spnclEnK.obj 11KB
共 238 条
- 1
- 2
- 3
程籽籽
- 粉丝: 81
- 资源: 4722
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2