-
-
看雪CTF.TSRC 2018 团队赛-第5题
-
发表于: 2018-12-9 13:06 2441
-
1. 条件明确,穷举一下就有结果了, sn: 1995020305to07
public static void test() throws Exception { int[] l_time = new int[] { 16, 6, 7, 10, 9, 16, 10, 8, 8, 9, 6, 6 }; int[] l_day = new int[] { 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[] l_month = new int[] { 6, 7, 18, 9, 5, 16, 9, 15, 18, 8, 9, 5 }; int[] l_year = new int[] { 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 }; String[] t = new String[] { "23to01", "01to03", "03to05", "05to07", "07to09", "09to11", "11to13", "13to15", "15to17", "17to19", "19to21", "21to23" }; for (int year = 1984; year < 2007; year++) { for (int month = 1; month <= 12; month++) { for (int day = 1; day <= 31; day++) { for (int time = 0; time < 12; time++) { int x_year = year; int x_month = month; int x_day = day; int x_time = time; if ((x_year == 1989) || (x_year == 2004)) { x_day = 31; } if (x_month == 1 || x_month == 4 || x_month == 5 || x_month == 7 || x_month == 10 || x_month == 11 || x_month == 12) { x_year = 1999; } if (x_year <= 1994 && (x_month == 2 || x_month == 6 || x_month == 8)) { x_month = 3; } if (x_year >= 1996 && (x_month == 2 || x_month == 6 || x_month == 8)) { x_month = 9; } if (x_year == 1995 && (x_day > x_month + 2 || x_month == x_day)) { x_month = 6; } if (x_month == 2 && x_time == 6) { continue; } int l = 0; try { l = l_year[(x_year - 1900) % 60] + l_month[x_month - 1] + l_day[x_day - 1] + l_time[x_time]; } catch (Exception e) { continue; } if (l == 34) { System.out.println(String.format("%d%02d%02d%s", year, month, day, t[time])); } } } } } }
public static void test() throws Exception { int[] l_time = new int[] { 16, 6, 7, 10, 9, 16, 10, 8, 8, 9, 6, 6 }; int[] l_day = new int[] { 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[] l_month = new int[] { 6, 7, 18, 9, 5, 16, 9, 15, 18, 8, 9, 5 }; int[] l_year = new int[] { 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 }; String[] t = new String[] { "23to01", "01to03", "03to05", "05to07", "07to09", "09to11", "11to13", "13to15", "15to17", "17to19", "19to21", "21to23" }; for (int year = 1984; year < 2007; year++) { for (int month = 1; month <= 12; month++) { for (int day = 1; day <= 31; day++) { for (int time = 0; time < 12; time++) { int x_year = year; int x_month = month; int x_day = day; int x_time = time; if ((x_year == 1989) || (x_year == 2004)) { x_day = 31; } if (x_month == 1 || x_month == 4 || x_month == 5 || x_month == 7 || x_month == 10 || x_month == 11 || x_month == 12) { x_year = 1999; } if (x_year <= 1994 && (x_month == 2 || x_month == 6 || x_month == 8)) { x_month = 3; } if (x_year >= 1996 && (x_month == 2 || x_month == 6 || x_month == 8)) { x_month = 9; } if (x_year == 1995 && (x_day > x_month + 2 || x_month == x_day)) { x_month = 6; } if (x_month == 2 && x_time == 6) { continue; } int l = 0; try { l = l_year[(x_year - 1900) % 60] + l_month[x_month - 1] + l_day[x_day - 1] + l_time[x_time]; } catch (Exception e) { continue; } if (l == 34) { System.out.println(String.format("%d%02d%02d%s", year, month, day, t[time])); } } } } } }
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
赞赏
他的文章
- KCTF2022春季赛 第三题 石像病毒 8855
- KCTF2022春季赛 第二题 末日邀请 16176
- KCTF2021秋季赛 第二题 迷失丛林 18803
- KCTF2020秋季赛 第十题 终焉之战 8861
- KCTF2020秋季赛 第九题 命悬一线 6461
看原图
赞赏
雪币:
留言: