icoa-cli 2.16.9 → 2.16.11
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 +32 -7
- package/dist/repl.js +23 -2
- package/package.json +1 -1
package/dist/commands/exam.js
CHANGED
|
@@ -600,13 +600,39 @@ export function registerExamCommand(program) {
|
|
|
600
600
|
console.log();
|
|
601
601
|
console.log(chalk.cyan(' ═══════════════════════════════════════'));
|
|
602
602
|
console.log();
|
|
603
|
-
|
|
603
|
+
// Show wrong answers
|
|
604
|
+
const wrong = state.questions.filter((q) => state.answers[q.number] !== DEMO_ANSWERS[q.number]);
|
|
605
|
+
if (wrong.length > 0) {
|
|
606
|
+
console.log(chalk.white(` ${wrong.length} incorrect — here are the corrections:`));
|
|
607
|
+
console.log();
|
|
608
|
+
for (const q of wrong) {
|
|
609
|
+
const yours = state.answers[q.number];
|
|
610
|
+
const correct = DEMO_ANSWERS[q.number];
|
|
611
|
+
console.log(chalk.red(` Q${q.number}. ${q.text}`));
|
|
612
|
+
console.log(chalk.red(` Your answer: ${yours}. ${q.options[yours]}`));
|
|
613
|
+
console.log(chalk.green(` Correct: ${correct}. ${q.options[correct]}`));
|
|
614
|
+
console.log();
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
console.log(chalk.green.bold(' Perfect score! All answers correct! 🎉'));
|
|
619
|
+
console.log();
|
|
620
|
+
}
|
|
621
|
+
console.log(chalk.gray(' ─────────────────────────────────────────'));
|
|
622
|
+
console.log();
|
|
623
|
+
console.log(chalk.white(' These were theory questions. In the real ICOA competition,'));
|
|
624
|
+
console.log(chalk.white(' everything happens inside this terminal — no other tools allowed.'));
|
|
604
625
|
console.log();
|
|
605
626
|
console.log(chalk.yellow(' Did you know?'));
|
|
606
|
-
console.log(chalk.gray(' CTF
|
|
607
|
-
console.log(chalk.gray('
|
|
627
|
+
console.log(chalk.gray(' CTF (Capture The Flag) started at DEF CON 4 in 1996,'));
|
|
628
|
+
console.log(chalk.gray(' Las Vegas. Founded by Jeff Moss (Dark Tangent).'));
|
|
629
|
+
console.log(chalk.gray(' 2026 marks 30 years of CTF competitions worldwide.'));
|
|
630
|
+
console.log();
|
|
631
|
+
console.log(chalk.gray(' 1996 First CTF @ DEF CON'));
|
|
632
|
+
console.log(chalk.gray(' 2016 DARPA Cyber Grand Challenge — AI enters CTF'));
|
|
633
|
+
console.log(chalk.gray(' 2026 ICOA — First AI Security Olympiad, Sydney'));
|
|
608
634
|
console.log();
|
|
609
|
-
console.log(chalk.white(' ICOA
|
|
635
|
+
console.log(chalk.white(' ICOA uses ') + chalk.bold('TWO') + chalk.white(' competition tracks:'));
|
|
610
636
|
console.log();
|
|
611
637
|
console.log(chalk.green.bold(' AI4CTF') + chalk.white(' — Use AI to help you solve CTF challenges'));
|
|
612
638
|
console.log(chalk.gray(' AI is your teammate. Chat, ask for hints, work together.'));
|
|
@@ -614,9 +640,8 @@ export function registerExamCommand(program) {
|
|
|
614
640
|
console.log(chalk.red.bold(' CTF4AI') + chalk.white(' — Trick the AI (Prompt Injection)'));
|
|
615
641
|
console.log(chalk.gray(' Can you make the AI break its own safety rules?'));
|
|
616
642
|
console.log();
|
|
617
|
-
console.log(chalk.white('
|
|
618
|
-
console.log(chalk.
|
|
619
|
-
console.log(chalk.red.bold(' ctf4ai') + chalk.gray(' Trick the AI — make it say "koala"'));
|
|
643
|
+
console.log(chalk.white(' Want to experience both? Type ') + chalk.bold.cyan('continue'));
|
|
644
|
+
console.log(chalk.gray(' Or type "back" to return to the main menu.'));
|
|
620
645
|
console.log();
|
|
621
646
|
}
|
|
622
647
|
catch { }
|
package/dist/repl.js
CHANGED
|
@@ -379,6 +379,27 @@ export async function startRepl(program, resumeMode) {
|
|
|
379
379
|
return;
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
|
+
// "continue" — after demo, guide to ai4ctf then ctf4ai
|
|
383
|
+
if (input.toLowerCase() === 'continue') {
|
|
384
|
+
console.log();
|
|
385
|
+
console.log(chalk.green.bold(' ═══ AI4CTF — AI as Your Teammate ═══'));
|
|
386
|
+
console.log();
|
|
387
|
+
console.log(chalk.white(' In AI4CTF, you solve cybersecurity challenges'));
|
|
388
|
+
console.log(chalk.white(' with AI by your side.'));
|
|
389
|
+
console.log();
|
|
390
|
+
console.log(chalk.white(' In competition, you get AI help at 3 levels:'));
|
|
391
|
+
console.log(chalk.yellow(' hint a') + chalk.gray(' General guidance (50 uses)'));
|
|
392
|
+
console.log(chalk.yellow(' hint b') + chalk.gray(' Deep analysis (10 uses)'));
|
|
393
|
+
console.log(chalk.yellow(' hint c') + chalk.gray(' Critical assist (2 uses)'));
|
|
394
|
+
console.log();
|
|
395
|
+
console.log(chalk.white(' Try it now! Type: ') + chalk.bold.green('ai4ctf'));
|
|
396
|
+
console.log(chalk.gray(' Chat freely with your AI teammate. Type "exit" when done.'));
|
|
397
|
+
console.log();
|
|
398
|
+
console.log(chalk.gray(' After ai4ctf, try: ') + chalk.bold.red('ctf4ai') + chalk.gray(' — trick the AI into saying "koala"'));
|
|
399
|
+
console.log();
|
|
400
|
+
rl.prompt();
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
382
403
|
// ICOA exam token detection (e.g., "ICOA-PE-001")
|
|
383
404
|
if (/^ICOA-[A-Z]{2,3}-\d{1,6}$/i.test(input.trim())) {
|
|
384
405
|
processing = true;
|
|
@@ -464,7 +485,7 @@ export async function startRepl(program, resumeMode) {
|
|
|
464
485
|
}
|
|
465
486
|
const cmd = input.split(/\s+/)[0].toLowerCase();
|
|
466
487
|
// ─── Mode-based command filtering ───
|
|
467
|
-
const selectionCommands = ['exam', 'demo', 'nations', 'next', 'prev', 'setup', 'lang', 'ref', 'ai4ctf', 'ctf4ai'];
|
|
488
|
+
const selectionCommands = ['exam', 'demo', 'nations', 'next', 'prev', 'continue', 'setup', 'lang', 'ref', 'ai4ctf', 'ctf4ai'];
|
|
468
489
|
const organizerCommands = ['join', 'exam', 'demo', 'next', 'prev', 'logout', 'setup', 'lang', 'ref', 'ctf'];
|
|
469
490
|
if (mode === 'selection' && !selectionCommands.includes(cmd)) {
|
|
470
491
|
console.log(chalk.gray(' Not available in Selection mode.'));
|
|
@@ -501,7 +522,7 @@ export async function startRepl(program, resumeMode) {
|
|
|
501
522
|
'scoreboard', 'sb', 'status', 'time', 'hint', 'hint-b', 'hint-c',
|
|
502
523
|
'hint-budget', 'ref', 'shell', 'files', 'connect', 'note',
|
|
503
524
|
'log', 'lang', 'setup', 'env', 'ai4ctf', 'model', 'ctf',
|
|
504
|
-
'exam', 'demo', 'nations', 'next', 'prev', 'logout', 'ctf4ai',
|
|
525
|
+
'exam', 'demo', 'nations', 'next', 'prev', 'continue', 'logout', 'ctf4ai',
|
|
505
526
|
];
|
|
506
527
|
if (!knownCommands.includes(cmd)) {
|
|
507
528
|
// Block dangerous commands
|