icoa-cli 2.18.0 โ 2.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/exam.js +1 -116
- package/package.json +1 -1
package/dist/commands/exam.js
CHANGED
|
@@ -567,123 +567,8 @@ export function registerExamCommand(program) {
|
|
|
567
567
|
console.log(chalk.green.bold(' ๐ All questions answered!'));
|
|
568
568
|
console.log();
|
|
569
569
|
if (state.session.examId === 'demo-free') {
|
|
570
|
-
console.log(chalk.white('
|
|
570
|
+
console.log(chalk.white(' Type ') + chalk.bold.cyan('exam submit') + chalk.white(' to see your results!'));
|
|
571
571
|
console.log();
|
|
572
|
-
// Auto-submit demo
|
|
573
|
-
try {
|
|
574
|
-
const { DEMO_ANSWERS } = await import('../lib/demo-exam.js');
|
|
575
|
-
drawProgress(0, 'Grading...');
|
|
576
|
-
await sleep(300);
|
|
577
|
-
let score = 0;
|
|
578
|
-
for (const [qn, ans] of Object.entries(state.answers)) {
|
|
579
|
-
if (DEMO_ANSWERS[Number(qn)] === ans)
|
|
580
|
-
score++;
|
|
581
|
-
}
|
|
582
|
-
drawProgress(100, 'Complete!');
|
|
583
|
-
console.log();
|
|
584
|
-
// Anonymous stats (fire-and-forget)
|
|
585
|
-
const helpInfo = getHelpState(state);
|
|
586
|
-
const statsLang = getConfig().language || 'en';
|
|
587
|
-
fetch('https://practice.icoa2026.au:9090/api/icoa/demo-stats', {
|
|
588
|
-
method: 'POST',
|
|
589
|
-
headers: { 'Content-Type': 'application/json' },
|
|
590
|
-
body: JSON.stringify({
|
|
591
|
-
score,
|
|
592
|
-
total: state.questions.length,
|
|
593
|
-
lang: statsLang,
|
|
594
|
-
helpUsed: helpInfo.used,
|
|
595
|
-
helpMax: helpInfo.max,
|
|
596
|
-
timestamp: new Date().toISOString(),
|
|
597
|
-
}),
|
|
598
|
-
signal: AbortSignal.timeout(5000),
|
|
599
|
-
}).catch(() => { });
|
|
600
|
-
clearExamState();
|
|
601
|
-
const pct = Math.round(score / state.questions.length * 100);
|
|
602
|
-
console.log();
|
|
603
|
-
// โโโ Cinematic results reveal โโโ
|
|
604
|
-
// Part 1: Score banner
|
|
605
|
-
console.log(chalk.cyan(' โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ'));
|
|
606
|
-
console.log();
|
|
607
|
-
console.log(chalk.bold.white(' โโโ โโโโโโโ โโโโโโโ โโโโโโ'));
|
|
608
|
-
console.log(chalk.bold.white(' โโโโโโโโโโโโโโโโโโโโโโโโโโโโ'));
|
|
609
|
-
console.log(chalk.bold.white(' โโโโโโ โโโ โโโโโโโโโโโ'));
|
|
610
|
-
console.log(chalk.bold.white(' โโโโโโ โโโ โโโโโโโโโโโ'));
|
|
611
|
-
console.log(chalk.bold.white(' โโโโโโโโโโโโโโโโโโโโโโโ โโโ'));
|
|
612
|
-
console.log(chalk.bold.white(' โโโ โโโโโโโ โโโโโโโ โโโ โโโ'));
|
|
613
|
-
console.log();
|
|
614
|
-
console.log(chalk.bold(` Score: ${score}/${state.questions.length} (${pct}%)`));
|
|
615
|
-
console.log(chalk.bold(` ${pct >= 60 ? chalk.green('โ PASSED') : chalk.red('โ NOT PASSED')}`));
|
|
616
|
-
console.log();
|
|
617
|
-
console.log(chalk.yellow(' International Cyber Olympiad in AI 2026'));
|
|
618
|
-
console.log(chalk.gray(' Sydney, Australia ยท Jun 27 - Jul 2, 2026'));
|
|
619
|
-
console.log();
|
|
620
|
-
console.log(chalk.cyan(' โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ'));
|
|
621
|
-
await sleep(2000);
|
|
622
|
-
// Part 2: Wrong answers
|
|
623
|
-
const wrong = state.questions.filter((q) => state.answers[q.number] !== DEMO_ANSWERS[q.number]);
|
|
624
|
-
if (wrong.length > 0) {
|
|
625
|
-
console.log();
|
|
626
|
-
console.log(chalk.white(` ${wrong.length} incorrect โ here are the corrections:`));
|
|
627
|
-
console.log();
|
|
628
|
-
for (const q of wrong) {
|
|
629
|
-
const yours = state.answers[q.number];
|
|
630
|
-
const correct = DEMO_ANSWERS[q.number];
|
|
631
|
-
console.log(chalk.red(` Q${q.number}. ${q.text}`));
|
|
632
|
-
console.log(chalk.red(` Your answer: ${yours}. ${q.options[yours]}`));
|
|
633
|
-
console.log(chalk.green(` Correct: ${correct}. ${q.options[correct]}`));
|
|
634
|
-
console.log();
|
|
635
|
-
}
|
|
636
|
-
}
|
|
637
|
-
else {
|
|
638
|
-
console.log();
|
|
639
|
-
console.log(chalk.green.bold(' Perfect score! All answers correct! ๐'));
|
|
640
|
-
console.log();
|
|
641
|
-
}
|
|
642
|
-
await sleep(2000);
|
|
643
|
-
// Part 3: Theory โ CTF intro
|
|
644
|
-
console.log(chalk.gray(' โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ'));
|
|
645
|
-
console.log();
|
|
646
|
-
console.log(chalk.white(' These were theory questions. In the real ICOA'));
|
|
647
|
-
console.log(chalk.white(' competition, everything happens in this terminal.'));
|
|
648
|
-
await sleep(2000);
|
|
649
|
-
// Part 4: CTF history
|
|
650
|
-
console.log();
|
|
651
|
-
console.log(chalk.yellow(' Did you know?'));
|
|
652
|
-
console.log(chalk.gray(' CTF (Capture The Flag) started at DEF CON 4 in 1996,'));
|
|
653
|
-
console.log(chalk.gray(' Las Vegas. Founded by Jeff Moss (Dark Tangent).'));
|
|
654
|
-
console.log(chalk.gray(' 2026 marks 30 years of CTF worldwide.'));
|
|
655
|
-
console.log();
|
|
656
|
-
console.log(chalk.gray(' In a CTF, you solve challenges to find hidden'));
|
|
657
|
-
console.log(chalk.gray(' "flags" โ secret codes like: ') + chalk.green('icoa{w3lc0me_2_ctf}'));
|
|
658
|
-
console.log(chalk.gray(' Find it, submit it, score points!'));
|
|
659
|
-
await sleep(2500);
|
|
660
|
-
// Part 5: Timeline
|
|
661
|
-
console.log();
|
|
662
|
-
console.log(chalk.gray(' 1996 First CTF @ DEF CON, Las Vegas'));
|
|
663
|
-
await sleep(800);
|
|
664
|
-
console.log(chalk.gray(' 2016 DARPA Cyber Grand Challenge โ AI enters CTF'));
|
|
665
|
-
await sleep(800);
|
|
666
|
-
console.log(chalk.white(' 2026 ICOA โ First AI Security Olympiad, Sydney'));
|
|
667
|
-
await sleep(2000);
|
|
668
|
-
// Part 6: Dual tracks
|
|
669
|
-
console.log();
|
|
670
|
-
console.log(chalk.white(' ICOA uses ') + chalk.bold('TWO') + chalk.white(' competition tracks:'));
|
|
671
|
-
console.log();
|
|
672
|
-
await sleep(1000);
|
|
673
|
-
console.log(chalk.green.bold(' AI4CTF') + chalk.white(' โ Use AI to help you solve CTF challenges'));
|
|
674
|
-
console.log(chalk.gray(' AI is your teammate. Chat, ask for hints, work together.'));
|
|
675
|
-
console.log();
|
|
676
|
-
await sleep(1500);
|
|
677
|
-
console.log(chalk.red.bold(' CTF4AI') + chalk.white(' โ Trick the AI (Prompt Injection)'));
|
|
678
|
-
console.log(chalk.gray(' Can you make the AI break its own safety rules?'));
|
|
679
|
-
console.log();
|
|
680
|
-
await sleep(1500);
|
|
681
|
-
// Part 7: Call to action
|
|
682
|
-
console.log(chalk.white(' Want to experience both? Type ') + chalk.bold.cyan('continue'));
|
|
683
|
-
console.log(chalk.gray(' Or type "back" to return to the main menu.'));
|
|
684
|
-
console.log();
|
|
685
|
-
}
|
|
686
|
-
catch { }
|
|
687
572
|
}
|
|
688
573
|
else {
|
|
689
574
|
console.log(chalk.white(' Use: exam review ยท exam submit'));
|