看雪.CTF2018 By:kwaiching
0x00. 註冊碼: 1995020305to07
0x01. 思路:
程序根據稱骨算命的算法設計, 以3.4兩的命運反推出生日期(農曆), 並排除一九九五年二月初三之外相同出生日期
0x02. 稱骨算命:
出生 年 月 日 時 八字對應不同骨重:
int[] yearWeightArray = { 7, 7, 9, 12, 8, 7, 13, 5, 14, 5, 9, 17, 5, 7, 12, 8, 8, 6, 19, 6, 8, 16, 10, 6, 12, 9, 6, 7, 12, 5, 9, 8, 7, 8, 15, 9, 16, 8, 8, 19, 12, 6, 8, 7, 5, 15, 6, 16, 15, 7, 9, 12, 10, 7, 15, 6, 5, 14, 14, 9 };
int[] monthWeightArray = { 6, 7, 18, 9, 5, 16, 9, 15, 18, 8, 9, 5 };
int[] dayWeightArray = { 5, 10, 8, 15, 16, 15, 8, 16, 8, 16, 9, 17, 8, 17, 10, 8, 9, 18, 5, 15, 10, 9, 8, 9, 15, 18, 7, 8, 16, 6 };
int[] hourWeightArray = { 16, 6, 7, 10, 9, 16, 10, 8, 8, 9, 6, 6 };
骨重相加之和對應不同命運(見附件)
0x03. 註冊碼就是出生年+月+日+時
年份限制在1983-2007之間
getTempDate():
if ((this.tempY <= 1983) || (this.tempY >= 2007)) {
this.tempY = 0;
}
其中各時刻:
子(23:00~01:00)
丑(01:00~03:00)
寅(03:00~05:00)
卯(05:00~07:00)
辰(07:00~09:00)
巳(09:00~11:00)
午(11:00~13:00)
未(13:00~15:00)
申(15:00~17:00)
酉(17:00~19:00)
戌(19:00~21:00)
亥(21:00~23:00)
以字符串替代:
String[] hour = {
"23to01",
"01to03",
"03to05",
"05to07",
"07to09",
"09to11",
"11to13",
"13to15",
"15to17",
"17to19",
"19to21",
"21to23"}
0x04.getLunar函數排除符合結果中除特定年份和月份之外的註冊碼
if ((this.tempY == 1989) || (this.tempY == 2004)) {
this.tempD = 31; // 排除1989 和2004年
}
// 排除特定月份
if ((this.tempM == 1) || (this.tempM == 4) || (this.tempM ==5) || (this.tempM ==7) || (this.tempM ==10) || (this.tempM ==11) || (this.tempM ==12)) {
this.tempY = 1999; // 排除特定月份 注:1999年沒有3.4兩的骨重
}
if ((this.tempY <= 1994) && ((this.tempM == 2) ||(this.tempM == 6) || (this.tempM == 8))) {
this.tempM = 3; // 除1989和2004外 其他年份3月沒有3.4兩骨重
}
if ((this.tempY >= 1996) && ((this.tempM == 2) ||(this.tempM == 6) || (this.tempM == 8))){
this.tempM = 9; // 除1989和2004外 其他年份9月沒有3.4兩骨重
}
if ((this.tempY == 1995) && ((this.tempD > (this.tempM + 2)) || this.tempM == this.tempD )){
this.tempM = 6; // 1995年9月沒有3.4兩骨重
}
0x05. getHourWeight()函數中亦排除二月份卯時出生的八字:
if ((j == 2) && tempH.equals(hour[6])){
return 63; // 6.3兩的時骨重和其他骨重(0.5*3=1.5, )相加超出骨重值7.2錢
}
0x06. 相關稱骨計算詳情見附件FateMe源碼
0x00. 註冊碼: 1995020305to07
0x01. 思路:
程序根據稱骨算命的算法設計, 以3.4兩的命運反推出生日期(農曆), 並排除一九九五年二月初三之外相同出生日期
0x02. 稱骨算命:
出生 年 月 日 時 八字對應不同骨重:
int[] yearWeightArray = { 7, 7, 9, 12, 8, 7, 13, 5, 14, 5, 9, 17, 5, 7, 12, 8, 8, 6, 19, 6, 8, 16, 10, 6, 12, 9, 6, 7, 12, 5, 9, 8, 7, 8, 15, 9, 16, 8, 8, 19, 12, 6, 8, 7, 5, 15, 6, 16, 15, 7, 9, 12, 10, 7, 15, 6, 5, 14, 14, 9 };
int[] monthWeightArray = { 6, 7, 18, 9, 5, 16, 9, 15, 18, 8, 9, 5 };
int[] dayWeightArray = { 5, 10, 8, 15, 16, 15, 8, 16, 8, 16, 9, 17, 8, 17, 10, 8, 9, 18, 5, 15, 10, 9, 8, 9, 15, 18, 7, 8, 16, 6 };
int[] hourWeightArray = { 16, 6, 7, 10, 9, 16, 10, 8, 8, 9, 6, 6 };
骨重相加之和對應不同命運(見附件)
0x03. 註冊碼就是出生年+月+日+時
年份限制在1983-2007之間
getTempDate():
if ((this.tempY <= 1983) || (this.tempY >= 2007)) {
this.tempY = 0;
}
其中各時刻:
子(23:00~01:00)
丑(01:00~03:00)
寅(03:00~05:00)
卯(05:00~07:00)
辰(07:00~09:00)
巳(09:00~11:00)
午(11:00~13:00)
未(13:00~15:00)
申(15:00~17:00)
酉(17:00~19:00)
戌(19:00~21:00)
亥(21:00~23:00)
以字符串替代:
String[] hour = {
"23to01",
"01to03",
"03to05",
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
最后于 2018-12-11 13:12
被kanxue编辑
,原因: