icoa-cli 1.8.2 → 1.8.4
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/env.js +8 -6
- package/dist/index.js +1 -1
- package/dist/repl.js +17 -4
- package/package.json +1 -1
package/dist/commands/env.js
CHANGED
|
@@ -21,7 +21,7 @@ const PYTHON_LIBS = [
|
|
|
21
21
|
{ name: 'paramiko', check: 'python3 -c "import paramiko"', install: 'paramiko==3.4.0', category: 'Web & Network' },
|
|
22
22
|
// Crypto & Math
|
|
23
23
|
{ name: 'sympy', check: 'python3 -c "import sympy"', install: 'sympy==1.12', category: 'Crypto & Math' },
|
|
24
|
-
{ name: 'gmpy2', check: 'python3 -c "import gmpy2"', install: 'gmpy2
|
|
24
|
+
{ name: 'gmpy2', check: 'python3 -c "import gmpy2"', install: 'gmpy2>=2.2.0', category: 'Crypto & Math' },
|
|
25
25
|
{ name: 'cryptography', check: 'python3 -c "import cryptography"', install: 'cryptography==42.0.0', category: 'Crypto & Math' },
|
|
26
26
|
// Binary & RE
|
|
27
27
|
{ name: 'capstone', check: 'python3 -c "import capstone"', install: 'capstone==5.0.1', category: 'Binary & RE' },
|
|
@@ -375,10 +375,13 @@ async function installAll() {
|
|
|
375
375
|
catch { /* ignore */ }
|
|
376
376
|
}
|
|
377
377
|
console.log();
|
|
378
|
-
//
|
|
379
|
-
|
|
378
|
+
// Build environment for native extensions (gmpy2 etc.)
|
|
379
|
+
const buildEnv = { ...process.env };
|
|
380
380
|
if (os === 'darwin') {
|
|
381
|
-
|
|
381
|
+
buildEnv['CFLAGS'] = `-I/opt/homebrew/include ${buildEnv['CFLAGS'] || ''}`.trim();
|
|
382
|
+
buildEnv['LDFLAGS'] = `-L/opt/homebrew/lib ${buildEnv['LDFLAGS'] || ''}`.trim();
|
|
383
|
+
buildEnv['C_INCLUDE_PATH'] = `/opt/homebrew/include:${buildEnv['C_INCLUDE_PATH'] || ''}`;
|
|
384
|
+
buildEnv['LIBRARY_PATH'] = `/opt/homebrew/lib:${buildEnv['LIBRARY_PATH'] || ''}`;
|
|
382
385
|
}
|
|
383
386
|
// Install Python libraries
|
|
384
387
|
let pipInstalled = 0;
|
|
@@ -395,8 +398,7 @@ async function installAll() {
|
|
|
395
398
|
}
|
|
396
399
|
process.stdout.write(chalk.gray(` ⏳ ${lib.name}...`));
|
|
397
400
|
try {
|
|
398
|
-
|
|
399
|
-
execSync(cmd, { stdio: 'ignore', shell: '/bin/bash' });
|
|
401
|
+
execSync(`${pipCmd} install ${pipFlag} ${lib.install}`, { stdio: 'ignore', env: buildEnv });
|
|
400
402
|
process.stdout.write('\r');
|
|
401
403
|
console.log(chalk.green(` ✓ ${lib.name}`) + chalk.gray(` (${lib.install})`));
|
|
402
404
|
pipInstalled++;
|
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 v1.8.
|
|
39
|
+
${chalk.gray('CLI-Native Competition Terminal v1.8.4')}
|
|
40
40
|
|
|
41
41
|
${LINE}
|
|
42
42
|
`;
|
package/dist/repl.js
CHANGED
|
@@ -8,7 +8,7 @@ import { ensureSandbox, runInSandbox, isDockerAvailable } from './lib/sandbox.js
|
|
|
8
8
|
import { logCommand } from './lib/logger.js';
|
|
9
9
|
import { startLogSync, stopLogSync } from './lib/log-sync.js';
|
|
10
10
|
const INTERCEPT = '__REPL_NO_EXIT__';
|
|
11
|
-
const VERSION = '1.8.
|
|
11
|
+
const VERSION = '1.8.4';
|
|
12
12
|
export async function startRepl(program, resumeMode) {
|
|
13
13
|
const config = getConfig();
|
|
14
14
|
const connected = isConnected();
|
|
@@ -193,20 +193,33 @@ export async function startRepl(program, resumeMode) {
|
|
|
193
193
|
'log', 'lang', 'setup', 'env', 'model', 'ctf',
|
|
194
194
|
];
|
|
195
195
|
if (!knownCommands.includes(cmd)) {
|
|
196
|
+
// Force Python 3.12 — rewrite python3/python/pip3 to 3.12 binaries
|
|
197
|
+
let resolvedInput = input;
|
|
198
|
+
if (process.platform === 'darwin') {
|
|
199
|
+
const py12 = '/opt/homebrew/opt/python@3.12/bin/python3.12';
|
|
200
|
+
const pip12 = '/opt/homebrew/opt/python@3.12/bin/pip3.12';
|
|
201
|
+
resolvedInput = resolvedInput
|
|
202
|
+
.replace(/^python3?\s/, `${py12} `)
|
|
203
|
+
.replace(/^pip3?\s/, `${pip12} `);
|
|
204
|
+
if (resolvedInput === 'python3' || resolvedInput === 'python')
|
|
205
|
+
resolvedInput = py12;
|
|
206
|
+
if (resolvedInput === 'pip3' || resolvedInput === 'pip')
|
|
207
|
+
resolvedInput = pip12;
|
|
208
|
+
}
|
|
196
209
|
// Route to Docker sandbox if available, otherwise system shell
|
|
197
210
|
processing = true;
|
|
198
211
|
try {
|
|
199
212
|
if (isDockerAvailable()) {
|
|
200
213
|
const ready = await ensureSandbox();
|
|
201
214
|
if (ready) {
|
|
202
|
-
await runInSandbox(
|
|
215
|
+
await runInSandbox(resolvedInput, rl);
|
|
203
216
|
}
|
|
204
217
|
else {
|
|
205
|
-
await runSystemCommand(
|
|
218
|
+
await runSystemCommand(resolvedInput, rl);
|
|
206
219
|
}
|
|
207
220
|
}
|
|
208
221
|
else {
|
|
209
|
-
await runSystemCommand(
|
|
222
|
+
await runSystemCommand(resolvedInput, rl);
|
|
210
223
|
}
|
|
211
224
|
}
|
|
212
225
|
catch {
|