icoa-cli 2.19.253 → 2.19.254
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/lib/exam-setup.d.ts
CHANGED
|
@@ -7,4 +7,13 @@ interface ExamSetupState {
|
|
|
7
7
|
export declare function getExamSetup(): ExamSetupState | null;
|
|
8
8
|
export declare function saveExamSetup(state: ExamSetupState): void;
|
|
9
9
|
export declare function isExamSetupComplete(): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Papers that are MCQ / short-answer only (no Python, no Unix tooling, no
|
|
12
|
+
* practical/CTF questions) skip the `exam setup` gate entirely — running it
|
|
13
|
+
* would be pointless and could block a valid token.
|
|
14
|
+
*
|
|
15
|
+
* - Paper C: exam_id ends in `-c` (e.g. `zz-2026-c`)
|
|
16
|
+
* - SIMOC / Paper M: exam_id starts `simoc-` (e.g. `simoc-2026-g6`)
|
|
17
|
+
*/
|
|
18
|
+
export declare function examIdSkipsSetupGate(examId: string): boolean;
|
|
10
19
|
export {};
|
package/dist/lib/exam-setup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{existsSync as t,readFileSync as e,writeFileSync as n}from"node:fs";import{join as r}from"node:path";import{getIcoaDir as o}from"./config.js";const u=()=>r(o(),"exam-setup.json");export function getExamSetup(){try{return t(u())?JSON.parse(e(u(),"utf-8")):null}catch{return null}}export function saveExamSetup(t){try{n(u(),JSON.stringify(t,null,2))}catch{}}export function isExamSetupComplete(){return null!==getExamSetup()}
|
|
1
|
+
import{existsSync as t,readFileSync as e,writeFileSync as n}from"node:fs";import{join as r}from"node:path";import{getIcoaDir as o}from"./config.js";const u=()=>r(o(),"exam-setup.json");export function getExamSetup(){try{return t(u())?JSON.parse(e(u(),"utf-8")):null}catch{return null}}export function saveExamSetup(t){try{n(u(),JSON.stringify(t,null,2))}catch{}}export function isExamSetupComplete(){return null!==getExamSetup()}export function examIdSkipsSetupGate(t){return!!t&&(t.endsWith("-c")||t.startsWith("simoc-"))}
|
package/dist/lib/hint-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(a,b){const v=a0b,c=a();while(!![]){try{const d=-parseInt(v(0x17b))/(0x1495+0x1*0x1107+-0x259b*0x1)+parseInt(v(0x183))/(0x1a37+-0x2*-0x975+0x1*-0x2d1f)*(parseInt(v(0x16e))/(0x78c+-0x2302*-0x1+-0x2a8b*0x1))+parseInt(v(0x16f))/(-0x20c4+-0x723*0x4+0x3d54)*(parseInt(v(0x172))/(-0x336+-0x1bd5+0x1f10))+-parseInt(v(0x171))/(-0x816+-0x7bb+-0x5*-0x32b)*(-parseInt(v(0x173))/(0x79*0x4+-0x1*0x258b+0x23ae))+parseInt(v(0x188))/(-0x14a6+-0x26dd+0x13d9*0x3)+-parseInt(v(0x170))/(0x265*-0xd+-0x20*0xa9+0x344a)+parseInt(v(0x174))/(0x1*0x86f+-0x1ef+-0x676)*(parseInt(v(0x18a))/(0x7c*0x7+0xfb3+-0xd4*0x17));if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}}(a0a,0x29*0x6+0x190a8+0x26c6*0x1));function a0b(a,b){a=a-(-0x172b+-0xda8+-0x220*-0x12);const c=a0a();let d=c[a];if(a0b['HuDxVe']===undefined){var e=function(i){const j='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let l='',m='';for(let n=-0x29*-0x21+0xd46*-0x2+0x1543,o,p,q=-0x13*0x199+-0x83e+0x2699;p=i['charAt'](q++);~p&&(o=n%(-0x1*0xfef+-0x3d5+-0x698*-0x3)?o*(-0x1511*0x1+0xf*-0x73+-0x31e*-0x9)+p:p,n++%(0x3*-0xca7+0x1*-0x1d5d+0x4356))?l+=String['fromCharCode'](0x1*-0x1e19+0x49b*0x2+0x15e2&o>>(-(0x1*-0x1cb7+0x13cf*-0x1+-0x3088*-0x1)*n&0x165*-0x1+0x52a+-0x3bf)):-0x1ae6+0x486*0x3+-0x355*-0x4){p=j['indexOf'](p);}for(let r=-0x95*0x17+-0xbcb*0x3+0x1*0x30c4,s=l['length'];r<s;r++){m+='%'+('00'+l['charCodeAt'](r)['toString'](0x1*0x1041+-0x1d4f+0xd1e))['slice'](-(-0x1141+-0x9d+-0x478*-0x4));}return decodeURIComponent(m);};a0b['ICSKtz']=e,a0b['tZCLeX']={},a0b['HuDxVe']=!![];}const f=c[0x1b88+0x276*0x9+-0x31ae],g=a+f,h=a0b['tZCLeX'][g];return!h?(d=a0b['ICSKtz'](d),a0b['tZCLeX'][g]=d):d=h,d;}import{getConfig as a0c}from'./config.js';function a0a(){const x=['C3rYAw5NAwz5','zxHHBuLK','BgfUz3vHz2u','yxbWBgLJyxrPB24VANnVBG','AgLUDcbYzxf1zxn0igzHAwXLzcaO','mK1zzMXPsG','Bgv2zwW','ue9tva','C3rHDhvZ','y2f0y2G','otKXnJHQsvnVz1a','DgLTzw91Da','nJKYodLTv3D0uMK','y3rMzfvYBa','l2HPBNq','Ahr0Chm6lY9WCMfJDgLJzs5Py29HmJaYnI5HDq','BwvZC2fNzq','B2jQzwn0','ndiZnJK5zeHwsMTY','nty5nZjJt2HeAfO','mtKWntuWn1rIrfDcza','nMjVENP5vG','mtvds2Ddq2W','mtuWotKYogntt2jkvW','mtmWDM9VtgnO','CxvLC3rPB24','zgf0yq','AgLUDcbbueKGDw5YzwfJAgfIBgu','ANnVBG','l2fWAs9Py29Hl2v4yw1ZlW','C3vJy2vZCW','mty5ndG2sfvpyxPe','DgLTzw91De1Z','BgfUzW'];a0a=function(){return x;};return a0a();}export async function requestHint(d){const w=a0b,f=a0c(),g=f[w(0x18b)]||w(0x18d),h=d[w(0x17d)]||f[w(0x180)]||'en',j=d[w(0x17c)]??0x139*0x1+-0x20fd+0x3f04,k=[g+w(0x179)+d['examId']+w(0x18c),g+':9090/api/icoa/exams/'+d[w(0x17f)]+w(0x18c)];let l=null;for(const p of k)try{const q=await fetch(p,{'method':w(0x185),'headers':{'Content-Type':w(0x181),'User-Agent':'icoa-cli'},'body':JSON[w(0x17e)]({'token':d['token'],'question':d[w(0x175)],'level':d[w(0x184)],'lang':h}),'signal':AbortSignal[w(0x189)](j)}),r=await q[w(0x178)]()[w(0x187)](()=>({}));if(!q['ok']||!(-0x83e+0x9fb+-0x1bc)===r[w(0x17a)]){if(l={'status':q[w(0x186)],'message':r?.[w(0x18e)]||w(0x182)+q[w(0x186)]+')'},q[w(0x186)]>=-0x1*0xfef+-0x3d5+-0x222*-0xa&&q['status']<-0x1511*0x1+0xf*-0x73+-0xee1*-0x2)throw l;continue;}return r[w(0x176)];}catch(u){if(u&&w(0x16d)==typeof u&&w(0x186)in u)throw u;l={'status':0x0,'message':u?.[w(0x18e)]||'network\x20error'};}const m={};m[w(0x186)]=0x0,m['message']=w(0x177);throw l||m;}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "icoa-cli",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.254",
|
|
4
4
|
"description": "ICOA CLI — The world's first CLI-native cyber & AI security olympiad terminal: AI4CTF (Day 1), CTF4AI (Day 2), VLA4CTF (Pioneer Round — embodied AI)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|