icoa-cli 2.1.1 → 2.1.3
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/index.js +1 -1
- package/dist/repl.js +16 -3
- package/package.json +1 -1
- package/refs/hint.txt +8 -2
- package/refs/icoa.txt +55 -33
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ ${LINE}
|
|
|
36
36
|
${chalk.white('Sydney, Australia')} ${chalk.gray('Jun 27 - Jul 2, 2026')}
|
|
37
37
|
${chalk.cyan.underline('https://icoa2026.au')}
|
|
38
38
|
|
|
39
|
-
${chalk.gray('CLI-Native Competition Terminal v2.1.
|
|
39
|
+
${chalk.gray('CLI-Native Competition Terminal v2.1.3')}
|
|
40
40
|
|
|
41
41
|
${LINE}
|
|
42
42
|
`;
|
package/dist/repl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createInterface } from 'node:readline';
|
|
2
|
-
import { spawn } from 'node:child_process';
|
|
2
|
+
import { spawn, execSync as execSyncFn } from 'node:child_process';
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { isConnected, getConfig } from './lib/config.js';
|
|
5
5
|
import { isActivated, activateToken, isFreeCommand, isDeviceMatch, recordExit, recordResume, isFirstRunOrUpgrade, markVersionSeen } from './lib/access.js';
|
|
@@ -27,7 +27,7 @@ const BLOCKED_COMMANDS = new Set([
|
|
|
27
27
|
'iptables', 'ufw', // firewall
|
|
28
28
|
]);
|
|
29
29
|
const INTERCEPT = '__REPL_NO_EXIT__';
|
|
30
|
-
const VERSION = '2.1.
|
|
30
|
+
const VERSION = '2.1.3';
|
|
31
31
|
export async function startRepl(program, resumeMode) {
|
|
32
32
|
const config = getConfig();
|
|
33
33
|
const connected = isConnected();
|
|
@@ -221,7 +221,7 @@ export async function startRepl(program, resumeMode) {
|
|
|
221
221
|
rl.prompt();
|
|
222
222
|
return;
|
|
223
223
|
}
|
|
224
|
-
// Force Python 3.12 — rewrite python3
|
|
224
|
+
// Force Python 3.12 — rewrite python/python3 to correct binary
|
|
225
225
|
let resolvedInput = input;
|
|
226
226
|
if (process.platform === 'darwin') {
|
|
227
227
|
const py12 = '/opt/homebrew/opt/python@3.12/bin/python3.12';
|
|
@@ -229,6 +229,19 @@ export async function startRepl(program, resumeMode) {
|
|
|
229
229
|
.replace(/^python3?\s/, `${py12} `)
|
|
230
230
|
.replace(/^(python3|python)$/, py12);
|
|
231
231
|
}
|
|
232
|
+
else {
|
|
233
|
+
// Linux/WSL: python → python3 (or python3.12 if available)
|
|
234
|
+
const py12 = (() => { try {
|
|
235
|
+
execSyncFn('which python3.12', { stdio: 'ignore' });
|
|
236
|
+
return 'python3.12';
|
|
237
|
+
}
|
|
238
|
+
catch {
|
|
239
|
+
return 'python3';
|
|
240
|
+
} })();
|
|
241
|
+
resolvedInput = resolvedInput
|
|
242
|
+
.replace(/^python\s/, `${py12} `)
|
|
243
|
+
.replace(/^python$/, py12);
|
|
244
|
+
}
|
|
232
245
|
// Ensure workspace directory
|
|
233
246
|
const cwd = ensureWorkspace();
|
|
234
247
|
// Route to Docker sandbox if available, otherwise system shell (in workspace)
|
package/package.json
CHANGED
package/refs/hint.txt
CHANGED
|
@@ -21,8 +21,14 @@ LEVELS
|
|
|
21
21
|
- No flags
|
|
22
22
|
- Requires confirmation before use
|
|
23
23
|
|
|
24
|
+
COMMANDS
|
|
25
|
+
hint <question> Level A hint
|
|
26
|
+
hint-b <question> Level B hint
|
|
27
|
+
hint-c <question> Level C hint (requires confirmation)
|
|
28
|
+
hint budget Check remaining budget
|
|
29
|
+
|
|
24
30
|
USAGE TIPS
|
|
25
|
-
1. Open a challenge first:
|
|
31
|
+
1. Open a challenge first: open <id>
|
|
26
32
|
This sets context for better hints.
|
|
27
33
|
|
|
28
34
|
2. Be specific in your question:
|
|
@@ -33,7 +39,7 @@ USAGE TIPS
|
|
|
33
39
|
3. Start with Level A — it's cheap (50 uses).
|
|
34
40
|
Only escalate to B/C when A isn't enough.
|
|
35
41
|
|
|
36
|
-
4. Check your budget:
|
|
42
|
+
4. Check your budget: hint budget
|
|
37
43
|
|
|
38
44
|
TOKEN CAP
|
|
39
45
|
All AI usage shares a 50,000 token cap.
|
package/refs/icoa.txt
CHANGED
|
@@ -1,36 +1,58 @@
|
|
|
1
|
-
ICOA CLI — Quick Reference
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
ICOA CLI v2 — Quick Reference
|
|
2
|
+
==============================
|
|
3
|
+
|
|
4
|
+
GETTING STARTED
|
|
5
|
+
activate <token> Unlock with your access token
|
|
6
|
+
join <url> Connect to CTFd competition
|
|
7
|
+
env Check tool environment (109 commands)
|
|
8
|
+
env setup One-click install all tools
|
|
9
|
+
help Show all commands
|
|
10
|
+
|
|
11
|
+
COMPETITION
|
|
12
|
+
challenges (ch) List all challenges
|
|
13
|
+
open <id> View challenge details
|
|
14
|
+
submit <id> <flag> Submit a flag
|
|
15
|
+
scoreboard (sb) View rankings
|
|
16
|
+
status Hint budget, score, rank, time
|
|
17
|
+
time Competition countdown
|
|
18
|
+
|
|
19
|
+
AI HINTS
|
|
20
|
+
hint <question> Level A — General guidance (50 uses)
|
|
21
|
+
hint-b <question> Level B — Deep analysis (10 uses)
|
|
22
|
+
hint-c <question> Level C — Critical assist (2 uses)
|
|
23
|
+
hint budget Show remaining budget
|
|
24
|
+
|
|
25
|
+
TOOLS
|
|
26
|
+
ref <topic> Quick reference (38 topics)
|
|
27
|
+
files <id> Download challenge files
|
|
28
|
+
connect <id> Connect to remote target
|
|
29
|
+
note <text> Personal notepad
|
|
30
|
+
log Session history
|
|
31
|
+
log stats Session statistics
|
|
32
|
+
log export Export audit trail (JSON)
|
|
33
|
+
|
|
34
|
+
SYSTEM COMMANDS
|
|
35
|
+
python solve.py Run Python (forced to 3.12.13)
|
|
36
|
+
nano solve.py Edit files
|
|
37
|
+
gcc -o pwn pwn.c Compile code
|
|
38
|
+
Any Linux command Runs in ~/icoa-workspace/
|
|
39
|
+
|
|
40
|
+
SETTINGS
|
|
41
|
+
setup Configure API keys
|
|
42
|
+
lang <code> Switch language (en/zh/ja/ko/es)
|
|
43
|
+
clear Clear screen
|
|
44
|
+
exit Save session & quit
|
|
45
|
+
|
|
46
|
+
SHORTCUTS
|
|
47
|
+
ch = challenges
|
|
48
|
+
sb = scoreboard
|
|
49
|
+
flag = submit
|
|
30
50
|
|
|
31
51
|
TIPS
|
|
32
|
-
- Use '
|
|
33
|
-
- Level A hints are cheap — use
|
|
52
|
+
- Use 'open <id>' before 'hint' to set challenge context
|
|
53
|
+
- Level A hints are cheap — use freely for direction
|
|
34
54
|
- Level C hints require confirmation — use wisely
|
|
35
|
-
- All
|
|
36
|
-
-
|
|
55
|
+
- All commands are logged for audit
|
|
56
|
+
- python/python3 always uses Python 3.12.13
|
|
57
|
+
- System commands run in ~/icoa-workspace/ (sandboxed)
|
|
58
|
+
- Use 'ref <topic>' for zero-cost tool references
|