585a7a28dd
- settings: study.mode fast|normal and study.parallel 1-5 - normal mode: one headless browser per video, visibility keep-alive, auto-degrade when the platform enforces order - report study/log/detail/save before isComplete; drop lastProgressTime on completion - complete periodType 10/13 container nodes and recompute counters via PUT calFinalScore - capture mode: POST /api/capture records all XHR/fetch including new tabs - UI: study mode in settings, capture / stop-capture menu items
20 lines
632 B
JavaScript
20 lines
632 B
JavaScript
// Compute the site's strEnc(data, k1, k2, k3) using the original des.js.
|
|
// usage: node desenc.js <data> [k1] [k2] [k3]
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
const vm = require('vm');
|
|
|
|
const desPath = path.join(__dirname, 'des.js');
|
|
const code = fs.readFileSync(desPath, 'utf8');
|
|
const ctx = { console };
|
|
vm.createContext(ctx);
|
|
vm.runInContext(code, ctx);
|
|
|
|
const [data, k1 = '1', k2 = '2', k3 = '3'] = process.argv.slice(2);
|
|
if (data === undefined) {
|
|
console.error('usage: node desenc.js <data> [k1] [k2] [k3]');
|
|
process.exit(2);
|
|
}
|
|
const out = ctx.strEnc(data, k1, k2, k3);
|
|
process.stdout.write(String(out));
|