icoa-cli 1.7.0 → 1.7.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/env.js +120 -108
- package/dist/index.js +1 -1
- package/dist/repl.js +1 -1
- package/package.json +1 -1
package/dist/commands/env.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { execSync } from 'node:child_process';
|
|
3
3
|
import { platform } from 'node:os';
|
|
4
|
+
// Target Python version for full compatibility
|
|
5
|
+
const PYTHON_TARGET = '3.12';
|
|
4
6
|
// ══════════════════════════════════════════════════════════
|
|
5
7
|
// 27 Python Libraries — ALL LOCKED VERSIONS
|
|
6
8
|
// Tested on Python 3.12.x (recommended)
|
|
@@ -41,101 +43,103 @@ const PYTHON_LIBS = [
|
|
|
41
43
|
{ name: 'pyserial', check: 'python3 -c "import serial"', install: 'pyserial==3.5', category: 'Security Tools' },
|
|
42
44
|
];
|
|
43
45
|
// ══════════════════════════════════════════════════════════
|
|
44
|
-
// 82 System Tools —
|
|
46
|
+
// 82 System Tools — brew (Mac) / apt (Ubuntu) / choco (Win)
|
|
45
47
|
// ══════════════════════════════════════════════════════════
|
|
48
|
+
const W = process.platform === 'win32';
|
|
49
|
+
const CMD = (unix, win) => W ? (win || `where ${unix}`) : `which ${unix}`;
|
|
46
50
|
const SYSTEM_TOOLS = [
|
|
47
51
|
// Editors & Terminal (5)
|
|
48
|
-
{ name: 'vim', check: '
|
|
49
|
-
{ name: 'nano', check: '
|
|
50
|
-
{ name: 'tmux', check: '
|
|
51
|
-
{ name: 'screen', check: '
|
|
52
|
-
{ name: 'less', check: '
|
|
52
|
+
{ name: 'vim', check: CMD('vim'), brew: 'vim', apt: 'vim', choco: 'vim', category: 'Editors & Terminal' },
|
|
53
|
+
{ name: 'nano', check: CMD('nano'), brew: 'nano', apt: 'nano', choco: 'nano', category: 'Editors & Terminal' },
|
|
54
|
+
{ name: 'tmux', check: CMD('tmux'), brew: 'tmux', apt: 'tmux', category: 'Editors & Terminal' },
|
|
55
|
+
{ name: 'screen', check: CMD('screen'), brew: 'screen', apt: 'screen', category: 'Editors & Terminal' },
|
|
56
|
+
{ name: 'less', check: CMD('less'), category: 'Editors & Terminal' },
|
|
53
57
|
// Compilers & Build (8)
|
|
54
|
-
{ name: 'gcc', check: '
|
|
55
|
-
{ name: 'g++', check: '
|
|
56
|
-
{ name: 'make', check: '
|
|
57
|
-
{ name: 'nasm', check: '
|
|
58
|
-
{ name: 'cmake', check: '
|
|
59
|
-
{ name: 'as', check: '
|
|
60
|
-
{ name: 'ld', check: '
|
|
61
|
-
{ name: 'pkg-config', check: '
|
|
58
|
+
{ name: 'gcc', check: CMD('gcc'), brew: 'gcc', apt: 'gcc', choco: 'mingw', category: 'Compilers & Build' },
|
|
59
|
+
{ name: 'g++', check: CMD('g++'), brew: 'gcc', apt: 'g++', choco: 'mingw', category: 'Compilers & Build' },
|
|
60
|
+
{ name: 'make', check: CMD('make'), brew: 'make', apt: 'make', choco: 'make', category: 'Compilers & Build' },
|
|
61
|
+
{ name: 'nasm', check: CMD('nasm'), brew: 'nasm', apt: 'nasm', choco: 'nasm', category: 'Compilers & Build' },
|
|
62
|
+
{ name: 'cmake', check: CMD('cmake'), brew: 'cmake', apt: 'cmake', choco: 'cmake', category: 'Compilers & Build' },
|
|
63
|
+
{ name: 'as', check: CMD('as'), category: 'Compilers & Build' },
|
|
64
|
+
{ name: 'ld', check: CMD('ld'), category: 'Compilers & Build' },
|
|
65
|
+
{ name: 'pkg-config', check: CMD('pkg-config'), brew: 'pkg-config', apt: 'pkg-config', category: 'Compilers & Build' },
|
|
62
66
|
// Python (3)
|
|
63
|
-
{ name: 'python3', check: 'python3 --version', brew: 'python@3.12', apt: 'python3', category: 'Python Runtime' },
|
|
64
|
-
{ name: 'pip3', check: 'pip3 --version', category: 'Python Runtime' },
|
|
65
|
-
{ name: 'python3-venv', check: 'python3 -c "import venv"', apt: 'python3-venv', category: 'Python Runtime' },
|
|
67
|
+
{ name: 'python3', check: W ? 'python --version' : 'python3 --version', brew: 'python@3.12', apt: 'python3', choco: 'python312', category: 'Python Runtime' },
|
|
68
|
+
{ name: 'pip3', check: W ? 'pip --version' : 'pip3 --version', category: 'Python Runtime' },
|
|
69
|
+
{ name: 'python3-venv', check: W ? 'python -c "import venv"' : 'python3 -c "import venv"', apt: 'python3-venv', category: 'Python Runtime' },
|
|
66
70
|
// Networking (12)
|
|
67
|
-
{ name: 'curl', check: '
|
|
68
|
-
{ name: 'wget', check: '
|
|
69
|
-
{ name: 'nc', check: '
|
|
70
|
-
{ name: 'socat', check: '
|
|
71
|
-
{ name: 'nmap', check: '
|
|
72
|
-
{ name: 'ssh', check: '
|
|
73
|
-
{ name: 'dig', check: '
|
|
74
|
-
{ name: 'whois', check: '
|
|
75
|
-
{ name: 'ping', check: '
|
|
76
|
-
{ name: 'traceroute', check: '
|
|
77
|
-
{ name: 'tcpdump', check: '
|
|
78
|
-
{ name: 'tshark', check: '
|
|
71
|
+
{ name: 'curl', check: CMD('curl'), brew: 'curl', apt: 'curl', choco: 'curl', category: 'Networking' },
|
|
72
|
+
{ name: 'wget', check: CMD('wget'), brew: 'wget', apt: 'wget', choco: 'wget', category: 'Networking' },
|
|
73
|
+
{ name: 'nc', check: CMD('nc', 'where ncat'), brew: 'netcat', apt: 'netcat-openbsd', choco: 'nmap', category: 'Networking' },
|
|
74
|
+
{ name: 'socat', check: CMD('socat'), brew: 'socat', apt: 'socat', category: 'Networking' },
|
|
75
|
+
{ name: 'nmap', check: CMD('nmap'), brew: 'nmap', apt: 'nmap', choco: 'nmap', category: 'Networking' },
|
|
76
|
+
{ name: 'ssh', check: CMD('ssh'), apt: 'openssh-client', category: 'Networking' },
|
|
77
|
+
{ name: 'dig', check: CMD('dig'), brew: 'bind', apt: 'dnsutils', category: 'Networking' },
|
|
78
|
+
{ name: 'whois', check: CMD('whois'), brew: 'whois', apt: 'whois', choco: 'whois', category: 'Networking' },
|
|
79
|
+
{ name: 'ping', check: CMD('ping'), apt: 'iputils-ping', category: 'Networking' },
|
|
80
|
+
{ name: 'traceroute', check: CMD('traceroute', 'where tracert'), brew: 'traceroute', apt: 'traceroute', category: 'Networking' },
|
|
81
|
+
{ name: 'tcpdump', check: CMD('tcpdump'), brew: 'tcpdump', apt: 'tcpdump', category: 'Networking' },
|
|
82
|
+
{ name: 'tshark', check: CMD('tshark'), brew: 'wireshark', apt: 'tshark', choco: 'wireshark', category: 'Networking' },
|
|
79
83
|
// Debuggers & Tracing (5)
|
|
80
|
-
{ name: 'gdb', check: '
|
|
81
|
-
{ name: 'ltrace', check: '
|
|
82
|
-
{ name: 'strace', check: '
|
|
83
|
-
{ name: 'objdump', check: '
|
|
84
|
-
{ name: 'readelf', check: '
|
|
84
|
+
{ name: 'gdb', check: CMD('gdb'), brew: 'gdb', apt: 'gdb', choco: 'mingw', category: 'Debuggers' },
|
|
85
|
+
{ name: 'ltrace', check: CMD('ltrace'), apt: 'ltrace', category: 'Debuggers' },
|
|
86
|
+
{ name: 'strace', check: CMD('strace'), apt: 'strace', category: 'Debuggers' },
|
|
87
|
+
{ name: 'objdump', check: CMD('objdump'), category: 'Debuggers' },
|
|
88
|
+
{ name: 'readelf', check: CMD('readelf'), category: 'Debuggers' },
|
|
85
89
|
// Reverse Engineering (4)
|
|
86
|
-
{ name: 'radare2', check: '
|
|
87
|
-
{ name: 'rabin2', check: '
|
|
88
|
-
{ name: 'upx', check: '
|
|
89
|
-
{ name: 'strings', check: '
|
|
90
|
+
{ name: 'radare2', check: CMD('r2'), brew: 'radare2', apt: 'radare2', choco: 'radare2', category: 'Reverse Engineering' },
|
|
91
|
+
{ name: 'rabin2', check: CMD('rabin2'), category: 'Reverse Engineering' },
|
|
92
|
+
{ name: 'upx', check: CMD('upx'), brew: 'upx', apt: 'upx', choco: 'upx', category: 'Reverse Engineering' },
|
|
93
|
+
{ name: 'strings', check: CMD('strings'), category: 'Reverse Engineering' },
|
|
90
94
|
// Forensics (7)
|
|
91
|
-
{ name: 'binwalk', check: '
|
|
92
|
-
{ name: 'foremost', check: '
|
|
93
|
-
{ name: 'exiftool', check: '
|
|
94
|
-
{ name: 'steghide', check: '
|
|
95
|
-
{ name: 'file', check: '
|
|
96
|
-
{ name: 'xxd', check: '
|
|
97
|
-
{ name: 'pdftotext', check: '
|
|
95
|
+
{ name: 'binwalk', check: CMD('binwalk'), brew: 'binwalk', apt: 'binwalk', category: 'Forensics' },
|
|
96
|
+
{ name: 'foremost', check: CMD('foremost'), apt: 'foremost', category: 'Forensics' },
|
|
97
|
+
{ name: 'exiftool', check: CMD('exiftool'), brew: 'exiftool', apt: 'exiftool', choco: 'exiftool', category: 'Forensics' },
|
|
98
|
+
{ name: 'steghide', check: CMD('steghide'), apt: 'steghide', category: 'Forensics' },
|
|
99
|
+
{ name: 'file', check: CMD('file'), category: 'Forensics' },
|
|
100
|
+
{ name: 'xxd', check: CMD('xxd'), brew: 'vim', apt: 'xxd', category: 'Forensics' },
|
|
101
|
+
{ name: 'pdftotext', check: CMD('pdftotext'), brew: 'poppler', apt: 'poppler-utils', category: 'Forensics' },
|
|
98
102
|
// Crypto & Password (4)
|
|
99
|
-
{ name: 'john', check: '
|
|
100
|
-
{ name: 'hashcat', check: '
|
|
101
|
-
{ name: 'openssl', check: '
|
|
102
|
-
{ name: 'gpg', check: '
|
|
103
|
+
{ name: 'john', check: CMD('john'), brew: 'john', apt: 'john', choco: 'john', category: 'Crypto & Password' },
|
|
104
|
+
{ name: 'hashcat', check: CMD('hashcat'), brew: 'hashcat', apt: 'hashcat', choco: 'hashcat', category: 'Crypto & Password' },
|
|
105
|
+
{ name: 'openssl', check: CMD('openssl'), category: 'Crypto & Password' },
|
|
106
|
+
{ name: 'gpg', check: CMD('gpg'), brew: 'gnupg', apt: 'gpg', choco: 'gnupg', category: 'Crypto & Password' },
|
|
103
107
|
// Data Processing (8)
|
|
104
|
-
{ name: 'jq', check: '
|
|
105
|
-
{ name: 'sqlite3', check: '
|
|
106
|
-
{ name: 'base64', check: '
|
|
107
|
-
{ name: 'hexdump', check: '
|
|
108
|
-
{ name: 'od', check: '
|
|
109
|
-
{ name: 'sort', check: '
|
|
110
|
-
{ name: 'uniq', check: '
|
|
111
|
-
{ name: 'wc', check: '
|
|
108
|
+
{ name: 'jq', check: CMD('jq'), brew: 'jq', apt: 'jq', choco: 'jq', category: 'Data Processing' },
|
|
109
|
+
{ name: 'sqlite3', check: CMD('sqlite3'), brew: 'sqlite', apt: 'sqlite3', choco: 'sqlite', category: 'Data Processing' },
|
|
110
|
+
{ name: 'base64', check: CMD('base64'), category: 'Data Processing' },
|
|
111
|
+
{ name: 'hexdump', check: CMD('hexdump'), category: 'Data Processing' },
|
|
112
|
+
{ name: 'od', check: CMD('od'), category: 'Data Processing' },
|
|
113
|
+
{ name: 'sort', check: CMD('sort'), category: 'Data Processing' },
|
|
114
|
+
{ name: 'uniq', check: CMD('uniq'), category: 'Data Processing' },
|
|
115
|
+
{ name: 'wc', check: CMD('wc'), category: 'Data Processing' },
|
|
112
116
|
// Archive (6)
|
|
113
|
-
{ name: 'unzip', check: '
|
|
114
|
-
{ name: 'zip', check: '
|
|
115
|
-
{ name: 'tar', check: '
|
|
116
|
-
{ name: 'gzip', check: '
|
|
117
|
-
{ name: 'bzip2', check: '
|
|
118
|
-
{ name: 'xz', check: '
|
|
117
|
+
{ name: 'unzip', check: CMD('unzip'), brew: 'unzip', apt: 'unzip', category: 'Archive' },
|
|
118
|
+
{ name: 'zip', check: CMD('zip'), brew: 'zip', apt: 'zip', category: 'Archive' },
|
|
119
|
+
{ name: 'tar', check: CMD('tar'), category: 'Archive' },
|
|
120
|
+
{ name: 'gzip', check: CMD('gzip'), category: 'Archive' },
|
|
121
|
+
{ name: 'bzip2', check: CMD('bzip2'), category: 'Archive' },
|
|
122
|
+
{ name: 'xz', check: CMD('xz'), brew: 'xz', apt: 'xz-utils', category: 'Archive' },
|
|
119
123
|
// Core Unix (16)
|
|
120
|
-
{ name: 'cat', check: '
|
|
121
|
-
{ name: 'grep', check: '
|
|
122
|
-
{ name: 'sed', check: '
|
|
123
|
-
{ name: 'awk', check: '
|
|
124
|
-
{ name: 'find', check: '
|
|
125
|
-
{ name: 'head', check: '
|
|
126
|
-
{ name: 'tail', check: '
|
|
127
|
-
{ name: 'diff', check: '
|
|
128
|
-
{ name: 'patch', check: '
|
|
129
|
-
{ name: 'chmod', check: '
|
|
130
|
-
{ name: 'chown', check: '
|
|
131
|
-
{ name: 'ln', check: '
|
|
132
|
-
{ name: 'cp', check: '
|
|
133
|
-
{ name: 'mv', check: '
|
|
134
|
-
{ name: 'mkdir', check: '
|
|
135
|
-
{ name: 'rm', check: '
|
|
124
|
+
{ name: 'cat', check: CMD('cat'), category: 'Core Unix' },
|
|
125
|
+
{ name: 'grep', check: CMD('grep'), category: 'Core Unix' },
|
|
126
|
+
{ name: 'sed', check: CMD('sed'), category: 'Core Unix' },
|
|
127
|
+
{ name: 'awk', check: CMD('awk'), category: 'Core Unix' },
|
|
128
|
+
{ name: 'find', check: CMD('find'), category: 'Core Unix' },
|
|
129
|
+
{ name: 'head', check: CMD('head'), category: 'Core Unix' },
|
|
130
|
+
{ name: 'tail', check: CMD('tail'), category: 'Core Unix' },
|
|
131
|
+
{ name: 'diff', check: CMD('diff'), category: 'Core Unix' },
|
|
132
|
+
{ name: 'patch', check: CMD('patch'), category: 'Core Unix' },
|
|
133
|
+
{ name: 'chmod', check: CMD('chmod'), category: 'Core Unix' },
|
|
134
|
+
{ name: 'chown', check: CMD('chown'), category: 'Core Unix' },
|
|
135
|
+
{ name: 'ln', check: CMD('ln'), category: 'Core Unix' },
|
|
136
|
+
{ name: 'cp', check: CMD('cp'), category: 'Core Unix' },
|
|
137
|
+
{ name: 'mv', check: CMD('mv'), category: 'Core Unix' },
|
|
138
|
+
{ name: 'mkdir', check: CMD('mkdir'), category: 'Core Unix' },
|
|
139
|
+
{ name: 'rm', check: CMD('rm'), category: 'Core Unix' },
|
|
136
140
|
// Version Control & Container (2)
|
|
137
|
-
{ name: 'git', check: '
|
|
138
|
-
{ name: 'docker', check: '
|
|
141
|
+
{ name: 'git', check: CMD('git'), brew: 'git', apt: 'git', choco: 'git', category: 'Git & Docker' },
|
|
142
|
+
{ name: 'docker', check: CMD('docker'), brew: '--cask docker', choco: 'docker-desktop', category: 'Git & Docker' },
|
|
139
143
|
];
|
|
140
144
|
function isInstalled(check) {
|
|
141
145
|
try {
|
|
@@ -186,7 +190,11 @@ export function registerEnvCommand(program) {
|
|
|
186
190
|
}
|
|
187
191
|
function showStatus() {
|
|
188
192
|
console.log();
|
|
193
|
+
const os = platform();
|
|
194
|
+
const osName = os === 'darwin' ? 'macOS' : os === 'linux' ? 'Linux' : 'Windows';
|
|
195
|
+
const pm = os === 'darwin' ? 'brew' : os === 'linux' ? 'apt' : 'choco';
|
|
189
196
|
console.log(chalk.bold.white(' ICOA Competition Environment (109 commands)'));
|
|
197
|
+
console.log(chalk.gray(` Platform: ${osName} | Package Manager: ${pm} | Python: ${PYTHON_TARGET}.x`));
|
|
190
198
|
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
191
199
|
// Python version check
|
|
192
200
|
const pyVer = getPythonMajorMinor();
|
|
@@ -261,36 +269,40 @@ async function installAll() {
|
|
|
261
269
|
console.log(chalk.yellow(` Note: Python ${pyVer} detected. Python 3.12.x recommended.`));
|
|
262
270
|
console.log();
|
|
263
271
|
}
|
|
264
|
-
// Install system tools via brew (macOS)
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
missingSystem.push(tool);
|
|
272
|
-
}
|
|
272
|
+
// Install system tools via brew (macOS) / apt (Linux) / choco (Windows)
|
|
273
|
+
const missingSystem = [];
|
|
274
|
+
for (const tool of SYSTEM_TOOLS) {
|
|
275
|
+
if (!isInstalled(tool.check)) {
|
|
276
|
+
const pkg = os === 'darwin' ? tool.brew : os === 'linux' ? tool.apt : tool.choco;
|
|
277
|
+
if (pkg)
|
|
278
|
+
missingSystem.push(tool);
|
|
273
279
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}
|
|
280
|
+
}
|
|
281
|
+
if (missingSystem.length > 0) {
|
|
282
|
+
const pmName = os === 'darwin' ? 'brew' : os === 'linux' ? 'apt' : 'choco';
|
|
283
|
+
console.log(chalk.bold.white(` System Tools via ${pmName} (${missingSystem.length} missing)`));
|
|
284
|
+
console.log(chalk.gray(' ─────────────────────────────────────────────'));
|
|
285
|
+
for (const tool of missingSystem) {
|
|
286
|
+
const pkg = os === 'darwin' ? tool.brew : os === 'linux' ? tool.apt : tool.choco;
|
|
287
|
+
process.stdout.write(chalk.gray(` ⏳ ${tool.name}...`));
|
|
288
|
+
try {
|
|
289
|
+
let cmd;
|
|
290
|
+
if (os === 'darwin')
|
|
291
|
+
cmd = `brew install ${pkg}`;
|
|
292
|
+
else if (os === 'linux')
|
|
293
|
+
cmd = `sudo apt-get install -y ${pkg}`;
|
|
294
|
+
else
|
|
295
|
+
cmd = `choco install -y ${pkg}`;
|
|
296
|
+
execSync(cmd, { stdio: 'ignore' });
|
|
297
|
+
process.stdout.write('\r');
|
|
298
|
+
console.log(chalk.green(` ✓ ${tool.name}`));
|
|
299
|
+
}
|
|
300
|
+
catch {
|
|
301
|
+
process.stdout.write('\r');
|
|
302
|
+
console.log(chalk.red(` ✗ ${tool.name}`) + chalk.gray(` (${pmName} install ${pkg})`));
|
|
291
303
|
}
|
|
292
|
-
console.log();
|
|
293
304
|
}
|
|
305
|
+
console.log();
|
|
294
306
|
}
|
|
295
307
|
// Install Python libraries
|
|
296
308
|
let pipInstalled = 0;
|
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.7.
|
|
39
|
+
${chalk.gray('CLI-Native Competition Terminal v1.7.1')}
|
|
40
40
|
|
|
41
41
|
${LINE}
|
|
42
42
|
`;
|
package/dist/repl.js
CHANGED
|
@@ -6,7 +6,7 @@ import { isActivated, activateToken, isFreeCommand, isDeviceMatch, recordExit, r
|
|
|
6
6
|
import { resetTerminalTheme } from './lib/theme.js';
|
|
7
7
|
import { ensureSandbox, runInSandbox, isDockerAvailable } from './lib/sandbox.js';
|
|
8
8
|
const INTERCEPT = '__REPL_NO_EXIT__';
|
|
9
|
-
const VERSION = '1.7.
|
|
9
|
+
const VERSION = '1.7.1';
|
|
10
10
|
export async function startRepl(program, resumeMode) {
|
|
11
11
|
const config = getConfig();
|
|
12
12
|
const connected = isConnected();
|