|
[结束][第二阶段◇第一题]看雪论坛.腾讯公司2008软件安全技术竞赛
000 10005 1111A55 4441AA552 9944AAA5223 9994877222333 9888877776363 8BBBBBB6666 对应图形 这样的输出符合要求吗?还是一定要象下面文档中那样的示例? 00000 0000000 10000000A 11100000AAA 11111111AAAAA 11111111AAAAAAA 22227111AAAABBBBB 22227771AAAABBBBBBB 222277774444BBBB5BBB3 222277774444BBBB555B333 2222977774444555555533333 222299977774444555553333333 999999967774444555583338333 9999966674444555588838883 99996666666666688888888 999966666666688888888 |
|
|
|
[讨论]kanxue-tencent 第一阶段第三题
原来如此。学习了。 |
|
[原创]第一阶段第二题crackme设计说明
原来Google可以这么用啊 闷头搞了两天不知所以然 shoooo就是shoooo |
|
[结束][第一阶段◇第二题]看雪论坛.腾讯公司2008软件安全技术竞赛
[QUOTE=海风月影;517983]楼上的int dwTempd[16] 应该改成 int dwTempd[6][4][/QUOTE] 在源代码中没看到它对应的空间大小,从实现上看应该是个2维数组,而且第二维应该是4, 因为程序中用到shl 4,不知6从何得出? |
|
[结束][第一阶段◇第二题]看雪论坛.腾讯公司2008软件安全技术竞赛
不知道逆的对不对,刚才看了netwind贴出的说明才明白大致的模型原理,一直没想明白注册机该从何下手。 if (strlen(g_szRegName) != 0xC) return 1; for(i=0; i<strlen(g_szRegName); i++) { if (g_szRegName[i] < 0x61) return 1; if (g_szRegName[i] >= 0x7A) return 1; } //dwSortIndex数组存放注册名中各字母按从小到大排序的名次 for(j=0; j<0xC; j++) { n = g_szRegName[0]; l = 0; for(i = 1; i < strlen(g_szRegName); i++) { if ((n == g_szRegName[i]) && (n != 0x7A)) return 1; if (n > g_szRegName[i]) { n = g_szRegName[i]; l = i; } } dwSortIndex[l] = j; g_szRegName[l] = 0x7A; } if (strlen(g_szRegCode) < 0x35) return 1; for(i=0; i<strlen(g_szRegCode); i++) { if (var_2B0[i] = g_szRegCode[i]-0x30) > 3) return 1; } chOutBuf[24] = 0; fn(&var_2B0, &chOutBuf, &dwSortIndex); pchOutBuf = &chOutBuf; for(k=0; k<2; k++,pchOutBuf += 0xC) { for(j=0; j<0xC; j++) { n = pchOutBuf[0]; l = 0; for(i=1; i<strlen(pchOutBuf)&&(i<0xC); var4++) { if (n == pchOutBuf[i]) && (n != 0x7A) return 1; if (n > pchOutBuf[i]) { n = pchOutBuf[i]; l = i; } } if (k == 0) dwOutSortIndex1[l] = j; else dwOutSortIndex2[l] = j; pchOutBuf[l] = 0x7A; } } //只要出来的两组数据按字母从小到大排序后和注册名的一致就算成功 for(i=0; i<0xC; i++) { if (dwSortIndex[i] != dwOutSortIndex1[i])||(dwSortIndex[i] != dwOutSortIndex2[i])||(dwOutSortIndex1[i] != dwOutSortIndex2[i]) return 1; } return 0; void fn(int dwRegCode[53], char chOutBuf[24], int dwSortIndex[12]) { int i, j, k, l, m, n, p, q, r, s, t, x, y; int dwTemps[12]; int dwTempd[48]; l = 0; for(i=0; i<0xC; i++) dwTemps[i] = 0x1E; m = 0; if (dwRegCode[0] > 0) m = 0xC/dwRegCode[0]; n = 0; for(r=0; r<2; r++) { if (n > 0) dwTemps[dwSortIndex[n-1]] = 0x1E; for(n=0; n<0xC;) { if (n > 0) dwTemps[dwSortIndex[n-1]] = 0x28; if (r == 0) dwTemps[dwSortIndex[n]] = 0x28; if (r == 1) dwTemps[dwSortIndex[n]] = 0x14; n++; for(k=0,i=0; i<dwRegCode[0]; i++) { for(j=0; j<m; j++) { dwTempd[i*4+j] = dwTemps[k]; k++; } } p = 0; q = 0; for(i=0; i<m; i++) { p += dwTempd[dwRegCode[1]*4+i]; q += dwTempd[dwRegCode[2]*4+i]; } if (p == q) { if (dwTempd[dwRegCode[3]*4+dwRegCode[4]] == dwTempd[dwRegCode[5]*4+dwRegCode[6]]) { if (dwTempd[dwRegCode[7]*4+dwRegCode[8]] == dwTempd[dwRegCode[9]*4+dwRegCode[10]]) { chOutBuf[l] = 0x6C; l++; } else { chOutBuf[l] = 0x6B; l++; } } else { if (dwTempd[dwRegCode[7]*4+dwRegCode[8]] == dwTempd[dwRegCode[9]*4+dwRegCode[10]]) { chOutBuf[l] = 0x6A; l++; } else { chOutBuf[l] = 0x69; l++; } } } if (p > q) { dwTempd[dwRegCode[1]*4+dwRegCode[11]] = dwTempd[dwRegCode[12]*4+dwRegCode[13]]; dwTempd[dwRegCode[1]*4+dwRegCode[14]] = dwTempd[dwRegCode[15]*4+dwRegCode[16]]; dwTempd[dwRegCode[1]*4+dwRegCode[17]] = dwTempd[dwRegCode[18]*4+dwRegCode[19]]; dwTempd[dwRegCode[2]*4+dwRegCode[20]] = dwTempd[dwRegCode[21]*4+dwRegCode[22]]; dwTempd[dwRegCode[2]*4+dwRegCode[23]] = dwTempd[dwRegCode[24]*4+dwRegCode[25]]; dwTempd[dwRegCode[2]*4+dwRegCode[26]] = dwTempd[dwRegCode[27]*4+dwRegCode[28]]; s = 0; t = 0; for(i=0; i<m; i++) { s += dwTempd[dwRegCode[1]*4+i]; t += dwTempd[dwRegCode[2]*4+i]; } if (s > t) { if (dwTempd[dwRegCode[29]*4+dwRegCode[30]] == dwTempd[dwRegCode[31]*4+dwRegCode[32]]) { chOutBuf[l] = 0x65; l++; } else { chOutBuf[l] = 0x61; l++; } } if (s < t) { if (dwTempd[dwRegCode[33]*4+dwRegCode[34]] > dwTempd[dwRegCode[35]*4+dwRegCode[36]]) { chOutBuf[l] = 0x67; l++; } if (dwTempd[dwRegCode[33]*4+dwRegCode[34]] < dwTempd[dwRegCode[35]*4+dwRegCode[36]]) { chOutBuf[l] = 0x66; l++; } if (dwTempd[dwRegCode[33]*4+dwRegCode[34]] == dwTempd[dwRegCode[35]*4+dwRegCode[36]]) { chOutBuf[l] = 0x68; l++; } } if (s == t) { k = 0; for(i=0; i<dwRegCode[0]; i++) { for(j=0; j<m; j++) { dwTempd[i*4+j] = dwTemps[k]; k++; } } if (dwTempd[dwRegCode[37]*4+dwRegCode[38]] > dwTempd[dwRegCode[39]*4+dwRegCode[40]]) { chOutBuf[l] = 0x62; l++; } if (dwTempd[dwRegCode[37]*4+dwRegCode[38]] < dwTempd[dwRegCode[39]*4+dwRegCode[40]]) { chOutBuf[l] = 0x63; l++; } if (dwTempd[dwRegCode[37]*4+dwRegCode[38]] == dwTempd[dwRegCode[39]*4+dwRegCode[40]]) { chOutBuf[l] = 0x64; l++; } } } if (p < q) { dwTempd[dwRegCode[1]*4+dwRegCode[11]] = dwTempd[dwRegCode[12]*4+dwRegCode[13]]; dwTempd[dwRegCode[1]*4+dwRegCode[14]] = dwTempd[dwRegCode[15]*4+dwRegCode[16]]; dwTempd[dwRegCode[1]*4+dwRegCode[17]] = dwTempd[dwRegCode[18]*4+dwRegCode[19]]; dwTempd[dwRegCode[2]*4+dwRegCode[20]] = dwTempd[dwRegCode[21]*4+dwRegCode[22]]; dwTempd[dwRegCode[2]*4+dwRegCode[23]] = dwTempd[dwRegCode[24]*4+dwRegCode[25]]; dwTempd[dwRegCode[2]*4+dwRegCode[26]] = dwTempd[dwRegCode[27]*4+dwRegCode[28]]; x = 0; y = 0; for(i=0; i<m; i++) { x += dwTempd[dwRegCode[1]*4+i]; y += dwTempd[dwRegCode[2]*4+i]; } if (x > y) { if (dwTempd[dwRegCode[41]*4+dwRegCode[42]] > dwTempd[dwRegCode[43]*4+dwRegCode[44]]) { chOutBuf[l] = 0x66; l++; } if (dwTempd[dwRegCode[41]*4+dwRegCode[42]] < dwTempd[dwRegCode[43]*4+dwRegCode[44]]) { chOutBuf[l] = 0x67; l++; } if (dwTempd[dwRegCode[41]*4+dwRegCode[42]] < dwTempd[dwRegCode[43]*4+dwRegCode[44]]) { chOutBuf[l] = 0x68; l++; } } if (x < y) { if (dwTempd[dwRegCode[45]*4+dwRegCode[46]] == dwTempd[dwRegCode[47]*4+dwRegCode[48]]) { chOutBuf[l] = 0x65; l++; } else { chOutBuf[l] = 0x61; l++; } } if (x == y) { k = 0; for(i=0; i<dwRegCode[0]; i++) { for(j=0; j<m; j++) { dwTempd[i*4+j] = dwTemps[k]; k++; } } if (dwTempd[dwRegCode[49]*4+dwRegCode[50]] > dwTempd[dwRegCode[51]*4+dwRegCode[52]]) { chOutBuf[l] = 0x63; l++; } if (dwTempd[dwRegCode[49]*4+dwRegCode[50]] < dwTempd[dwRegCode[51]*4+dwRegCode[52]]) { chOutBuf[l] = 0x62; l++; } if (dwTempd[dwRegCode[49]*4+dwRegCode[50]] == dwTempd[dwRegCode[51]*4+dwRegCode[52]]) { chOutBuf[l] = 0x64; l++; } } } } } } |
|
[结束][第一阶段◇第二题]看雪论坛.腾讯公司2008软件安全技术竞赛
我自己的感觉是只要注册名中的各个字符按从小到大排序的名次顺序一致,它们的注册码就可以完全一样,比如abcdefghijkl和mnopqrstuvwx完全可以套用同一个注册码。 |
|
[结束][第一阶段◇第二题]看雪论坛.腾讯公司2008软件安全技术竞赛
明白,谢谢楼下的兄弟! |
|
|
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值