能力值:
( LV15,RANK:2473 )
|
-
-
51 楼
我的代码风格基本上属于模仿ida里F5的,所以和你自己F5出来的效果也差不多了
#include <windows.h>
#include <stdio.h>
#include <commctrl.h>
#include "resource.h"
#pragma comment (lib, "comctl32")
BYTE raw[7][6];
BYTE t[16];
/*
原始模型
BYTE raw[7][6] = { {'.','.','.','.','.','.'},
{'.','4','9','9','6','.'},
{'.','4','9','9','6','.'},
{'.','5','8','8','7','.'},
{'.','5','0','1','7','.'},
{'.','2',' ',' ','3','.'},
{'.','.','.','.','.','.'}};
81步基本解:0A3F7A8555240F5A8F143055298A3F1F507025058A1E5F7F6A954530105F4A9F60750023855A4A0F9A351400504F2B9A3E6F7095361A0550402F3A9F7A65051555409F1A0A6F70118035259A0F1F802495
*/
void MovBlock(BYTE Block,BYTE dir)
{
int x,y,x1,x2,y1,y2,x3,y3,x4,y4;
int i,j;
BYTE idx;
x = -1;
y = -1;
for (j=1;y<0&&j<6;j++)
{
for (i=1;x<0&&i<5;i++)
{
if (raw[j][i] == Block)
{
x = i;
y = j;
}
}
}
for (idx=0;idx<10;idx++)
{
if (t[idx] == Block)
{
break;
}
}
switch(idx)
{
case 0:
case 1:
case 2:
case 3:
if (dir == 0)
{
x1 = x;
y1 = y - 1;
}
else if (dir == 1)
{
x1 = x + 1;
y1 = y;
}
else if (dir == 2)
{
x1 = x;
y1 = y + 1;
}
else
{
x1 = x - 1;
y1 = y;
}
x2 = x1;
y2 = y1;
x3 = x;
y3 = y;
x4 = x3;
y4 = y3;
break;
case 4:
case 5:
case 6:
case 7:
if (dir == 0)
{
x1 = x;
y1 = y - 1;
x2 = x1;
y2 = y1;
x3 = x;
y3 = y + 1;
x4 = x3;
y4 = y3;
}
else if (dir == 1)
{
x1 = x + 1;
y1 = y;
x2 = x1;
y2 = y1 + 1;
x3 = x;
y3 = y;
x4 = x3;
y4 = y3 + 1;
}
else if (dir == 2)
{
x1 = x;
y1 = y + 2;
x2 = x1;
y2 = y1;
x3 = x;
y3 = y;
x4 = x3;
y4 = y3;
}
else
{
x1 = x - 1;
y1 = y;
x2 = x1;
y2 = y1 + 1;
x3 = x;
y3 = y;
x4 = x3;
y4 = y3 + 1;
}
break;
case 8:
if (dir == 0)
{
x1 = x;
y1 = y - 1;
x2 = x1 + 1;
y2 = y1;
x3 = x;
y3 = y;
x4 = x3 + 1;
y4 = y3;
}
else if (dir == 1)
{
x1 = x + 2;
y1 = y;
x2 = x1;
y2 = y1;
x3 = x;
y3 = y;
x4 = x3;
y4 = y3;
}
else if (dir == 2)
{
x1 = x;
y1 = y + 1;
x2 = x1 + 1;
y2 = y1;
x3 = x;
y3 = y;
x4 = x3 + 1;
y4 = y3;
}
else
{
x1 = x - 1;
y1 = y;
x2 = x1;
y2 = y1;
x3 = x + 1;
y3 = y;
x4 = x3;
y4 = y3;
}
break;
case 9:
if (dir == 0)
{
x1 = x;
y1 = y - 1;
x2 = x1 + 1;
y2 = y1;
x3 = x;
y3 = y + 1;
x4 = x3 + 1;
y4 = y3;
}
else if (dir == 1)
{
x1 = x + 2;
y1 = y;
x2 = x1;
y2 = y1 + 1;
x3 = x;
y3 = y;
x4 = x3;
y4 = y3 + 1;
}
else if (dir == 2)
{
x1 = x;
y1 = y + 2;
x2 = x1 + 1;
y2 = y1;
x3 = x;
y3 = y;
x4 = x3 + 1;
y4 = y3;
}
else
{
x1 = x - 1;
y1 = y;
x2 = x1;
y2 = y1 + 1;
x3 = x + 1;
y3 = y;
x4 = x3;
y4 = y3 + 1;
}
break;
default:
return;
break;
}
if ((raw[y1][x1] == 10) && (raw[y2][x2] == 10))
{
raw[y1][x1] = raw[y][x];
raw[y2][x2] = raw[y][x];
raw[y3][x3] = 10;
raw[y4][x4] = 10;
}
}
DWORD Check(HWND hDlg)
{
char szName[0x100];
char szCode[0x400];
int NameLen;
int CodeLen;
DWORD NameKey;
BYTE tt[16];
BYTE x;
int i,j;
NameLen = GetDlgItemText(hDlg, IDC_EDIT_NAME, szName, 0x10);
CodeLen = GetDlgItemText(hDlg, IDC_EDIT_CODE, szCode, 0x100);
if ((NameLen >= 3) && CodeLen)
{
for (i=0;i<CodeLen;i++)
{
if (!isxdigit(szCode[i]))
{
return 0;
}
}
for (i=0;i<0x10;i++)
{
t[i] = i;
}
NameKey = 0;
for (i=0;i<NameLen;i++)
{
NameKey += szName[i];
NameKey <<= 3;
NameKey ^= 0x9357ECA6;
}
for (i=0;i<10;i++)
{
x = t[NameKey%10];
t[NameKey%10] = t[i];
t[i] = x;
NameKey /= 10;
}
for (j=0;j<7;j++)
{
for (i=0;i<6;i++)
{
raw[j][i] = t[11+((i+j)%5)];
}
}
raw[1][1] = t[4];
raw[2][1] = t[4];
raw[3][1] = t[5];
raw[4][1] = t[5];
raw[5][1] = t[2];
raw[1][2] = t[9];
raw[2][2] = t[9];
raw[1][3] = t[9];
raw[2][3] = t[9];
raw[1][4] = t[6];
raw[2][4] = t[6];
raw[3][4] = t[7];
raw[4][4] = t[7];
raw[5][4] = t[3];
raw[3][2] = t[8];
raw[3][3] = t[8];
raw[4][2] = t[0];
raw[4][3] = t[1];
raw[5][2] = t[10];
raw[5][3] = t[10];
for (i=0;i<CodeLen/2;i++)
{
tt[0] = 0;
sscanf(&szCode[2*i],"%02X",tt);
MovBlock(tt[0]>>4,tt[0]&3);
MovBlock(tt[0]>>4,(tt[0]>>2)&3);
}
if ((raw[5][2] == raw[5][3]) && (raw[4][2] == raw[4][3]) && (raw[5][2] == raw[4][3]) && (raw[5][2] < 10))
{
MessageBox(hDlg,"OK!","crackme01",MB_OK);
}
}
return 1;
}
int CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (uMsg == WM_COMMAND)
{
if (LOWORD(wParam) == ID_TEST)
{
Check(hDlg);
return 1;
}
else if (LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, wParam);
return 1;
}
}
return 0;
}
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
InitCommonControls();
DialogBox(hInstance, MAKEINTRESOURCE(IDD_MSTEST), NULL, (DLGPROC)DlgProc);
return 0;
}
|
能力值:
( LV15,RANK:2473 )
|
-
-
52 楼
状态演示图:
Step 1 :
4 9 9 6
4 9 9 6
5 8 8 7
5 1 7
2 0 3
Step 2 :
4 9 9 6
4 9 9 6
5 8 8 7
5 1 7
2 0 3
Step 3 :
4 9 9 6
4 9 9 6
5 8 8
5 1 7
2 0 3 7
Step 4 :
4 9 9 6
4 9 9 6
5 8 8
5 1 7
2 0 3 7
Step 5 :
4 9 9 6
4 9 9 6
5 8 8
5 1 7
2 0 3 7
Step 6 :
4 9 9 6
4 9 9 6
5 8 8
2 5 1 7
0 3 7
Step 7 :
4 9 9 6
4 9 9 6
5 8 8
2 5 1 7
0 3 7
Step 8 :
4 9 9 6
4 9 9 6
8 8
2 5 1 7
0 5 3 7
Step 9 :
4 9 9 6
4 9 9 6
8 8
2 5 1 7
0 5 3 7
Step 10 :
4 9 9 6
4 9 9 6
8 8 1
2 5 7
0 5 3 7
Step 11 :
4 9 9 6
4 9 9 6
8 8 3 1
2 5 7
0 5 7
Step 12 :
4 9 9 6
4 9 9 6
8 8 3 1
2 5 7
0 5 7
Step 13 :
4 9 9 6
4 9 9 6
8 8 3 1
5 7
0 2 5 7
Step 14 :
4 9 9 6
4 9 9 6
3 1
8 8 5 7
0 2 5 7
Step 15 :
4 9 9 6
4 9 9 6
3 1
8 8 5 7
0 2 5 7
Step 16 :
4 9 9 6
4 9 9 6
3 1
8 8 5 7
0 2 5 7
Step 17 :
4 9 9 6
4 9 9 6
3 1 5
8 8 5 7
0 2 7
Step 18 :
4 9 9 6
4 9 9 6
3 1 5 7
8 8 5 7
0 2
Step 19 :
4 9 9 6
4 9 9 6
3 1 5 7
8 8 5 7
0 2
Step 20 :
4 9 9 6
4 9 9 6
3 1 5 7
8 8 5 7
0 2
Step 21 :
4 9 9 6
4 9 9 6
3 1 5 7
5 7
8 8 0 2
Step 22 :
4 9 9 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 8
Step 70 :
4 5 6
4 5 6
9 9 0 7
9 9 1 7
2 3 8 8
Step 71 :
4 5 6 7
4 5 6 7
9 9 0
9 9 1
2 3 8 8
Step 72 :
4 5 6 7
4 5 6 7
9 9 0 1
9 9
2 3 8 8
Step 73 :
4 5 6 7
4 5 6 7
9 9 0 1
9 9 8 8
2 3
Step 74 :
4 5 6 7
4 5 6 7
9 9 0 1
9 9 8 8
2 3
Step 75 :
4 5 6 7
4 5 6 7
9 9 0 1
9 9 8 8
2 3
Step 76 :
4 5 6 7
4 5 6 7
0 1
9 9 8 8
9 9 2 3
Step 77 :
4 5 6 7
4 5 6 7
0 1
9 9 8 8
9 9 2 3
Step 78 :
4 5 6 7
4 5 6 7
0 1
9 9 8 8
9 9 2 3
Step 79 :
4 5 6 7
4 5 6 7
0 1 8 8
9 9
9 9 2 3
Step 80 :
4 5 6 7
4 5 6 7
0 1 8 8
9 9 2
9 9 3
Step 81 :
4 5 6 7
4 5 6 7
0 1 8 8
9 9 2
9 9 3
|
能力值:
( LV2,RANK:10 )
|
-
-
53 楼
好好学习源码
|
能力值:
( LV9,RANK:230 )
|
-
-
54 楼
看着都晕。
难怪我感觉很吃力。
山重水复疑无路,
柳暗花明源码来,
我为菜鸟任人戏,
知难偏向虎山行。
横批:无可奈何
|
能力值:
(RANK:410 )
|
-
-
55 楼
F5真的很强大,真的几乎一模一样....
|
能力值:
( LV9,RANK:230 )
|
-
-
56 楼
是啊。强大的IDA,怪不得高手都用IDA。
学习了。
|
能力值:
( LV2,RANK:10 )
|
-
-
58 楼
此帖于 2008-03-14 13:34 被 ccfer 编辑. 原因: 改字体颜色
|
能力值:
(RANK:210 )
|
-
-
59 楼
都不是人 不是人
|
能力值:
(RANK:1060 )
|
-
-
60 楼
为啥我的F5出来跟真的不一样
|
能力值:
(RANK:410 )
|
-
-
61 楼
hehe,RPWT.
数据结构如果定义与源码一致,F5效果很好,就是里面的指针比较乱.
|
能力值:
( LV2,RANK:10 )
|
-
-
62 楼
我看不懂啊。
|
能力值:
( LV9,RANK:230 )
|
-
-
63 楼
这位大侠好高的效率!!!
佩服之余,
好奇之心,
好学之性,
高效之处?
大侠如能指点一两招,我能菜鸟立马成仙也未可知。
虚心请教中........
|
能力值:
(RANK:10 )
|
-
-
64 楼
D一下源码123456
|
能力值:
( LV2,RANK:10 )
|
-
-
65 楼
大家说的F5是啥?指定不是OD就是了~~偶尝试之后竟然是窗口最大化……
另外的问题是,如何看懂源码…………
|
能力值:
( LV2,RANK:10 )
|
-
-
66 楼
crackme 有没有批量下载的地方啊?
|
能力值:
( LV2,RANK:10 )
|
-
-
67 楼
太牛了
能给个算法分析不
|
能力值:
( LV2,RANK:10 )
|
-
-
68 楼
没答案呢,现在
|