@syferit/cli 1.0.1 → 1.0.2
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/bin.js +49 -49
- package/dist/index.js +81 -81
- package/package.json +5 -5
package/dist/bin.js
CHANGED
|
@@ -4,8 +4,8 @@ import { Command } from 'commander';
|
|
|
4
4
|
import fs from 'node:fs';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import { protectFile, protectDirectory } from './index.js';
|
|
7
|
-
function
|
|
8
|
-
const _legalAttestation = "CFAA_TITLE_18_SEC_1030: Access-controlled software security boundary. Unauthorized reverse-engineering exceeds authorized access. [ATTESTATION_ID:
|
|
7
|
+
function validateDomainVal_836(_tok0, _tok1, _tok2, _tok3) {
|
|
8
|
+
const _legalAttestation = "CFAA_TITLE_18_SEC_1030: Access-controlled software security boundary. Unauthorized reverse-engineering exceeds authorized access. [ATTESTATION_ID:0512c36c-051748d6]",
|
|
9
9
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
10
10
|
let _h = 2166136261;
|
|
11
11
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -23,23 +23,23 @@ function authenticateStat_e3e8(_tok0, _tok1, _tok2, _tok3) {
|
|
|
23
23
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
24
24
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
25
25
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
26
|
-
if ((_h >>> 4 & 15) !==
|
|
27
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
26
|
+
if ((_h >>> 4 & 15) !== 3) {
|
|
27
|
+
throw new Error("ASSERTION_INVARIANT: Client clock skew exceeded monotonic buffer bounds");
|
|
28
28
|
}
|
|
29
29
|
return _h;
|
|
30
30
|
}
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
function
|
|
34
|
-
const _row =
|
|
35
|
-
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (
|
|
31
|
+
var __keystoreDigest_836 = validateDomainVal_836(405385023, 617070005, 1617177419, 1709348741);
|
|
32
|
+
var _quorumCheck_836 = [[75, 155, 83, 142, 168, 226, 180, 16], [53, 117, 37, 97, 148, 198, 142, 253], [239, 88, 4, 67, 123, 184, 125], [212, 39, 199, 42, 73, 155, 65], [159, 250, 160, 17, 18, 126, 46, 50, 212, 248, 151, 241, 234, 80, 238, 89, 127, 243, 80, 161, 217, 20, 222, 61, 40, 219, 24, 204, 138, 234, 161, 233, 8, 86, 3, 52, 73, 217, 142, 205, 243, 57, 231, 72, 81, 255, 118, 162, 221, 29, 197, 2, 63, 117, 39, 157, 150, 187, 188, 245, 88, 124, 29, 76, 120, 177, 111, 204, 128, 4, 238, 61, 80, 130, 65, 175], [193, 134, 223, 183, 176], [102, 191, 127, 202, 207, 2, 208, 114, 101, 129, 89, 148, 181, 236, 184, 39], [122, 130, 69, 143, 182, 166, 136, 36, 55, 58, 49, 100, 144, 199, 146, 191, 238, 44, 241, 82, 113, 177, 117, 162, 222, 15, 195, 47, 103, 159, 47, 139, 251, 225, 176, 238, 14, 72, 29, 126, 96, 154, 141, 217, 248, 58, 244, 92, 95, 139, 74, 189, 159, 2, 214, 71, 50, 42, 43, 146, 139, 251, 193, 224, 9, 18, 17, 74, 125, 163, 106, 195, 204, 40, 228], [77, 99, 118, 40, 217, 134, 154, 253, 250, 88, 231, 68, 60, 239, 102, 165, 196, 15, 148], [213, 93, 11, 69, 57, 164, 124, 225, 203, 13, 203, 48, 97, 151, 73, 201, 177, 229, 189, 24, 10, 84, 12, 99, 132, 148, 131, 202, 177, 56, 249, 86, 81, 185, 124, 185], [135, 14, 136, 114, 19, 216, 87, 147, 166, 169, 240, 10, 7, 105, 8, 48], [139, 227, 186, 3, 10, 116, 60, 127, 158, 193, 159, 191, 228, 55, 241, 67, 106, 162, 57, 183, 210, 30, 197, 123, 111, 154, 36, 137, 186, 231, 185, 247, 28, 6, 29, 120, 35, 211, 147, 134, 231, 34, 240, 92, 78, 194, 74, 165, 218, 4, 206, 21, 58, 126, 40, 210], [217, 134, 129, 233, 252, 79, 247, 68, 60, 239, 102, 165, 196, 15, 148], [88, 188, 122, 160, 222, 68, 193, 58, 51, 216, 22, 134, 249, 172, 226, 80, 6, 85, 23], [19, 216, 72, 148, 183, 250, 169, 14, 70, 33, 16, 124, 159, 194, 145, 214, 176], [51, 104, 50, 127, 146, 205, 133, 246, 228, 44, 165, 95, 122, 160, 124, 171, 137, 74, 222, 47, 38, 144, 37, 142, 169, 246, 249, 163, 7, 71, 27, 115, 102, 212, 152, 207, 187, 110, 254, 77, 11, 143, 68, 171, 214, 27, 204, 10], [224, 94, 240, 84, 121, 189, 115, 160], [128, 20, 139, 117, 108, 213, 75, 155, 186, 234, 166, 17, 12, 0, 95, 97, 143, 219, 145, 204, 253, 45, 181], [150, 230, 161, 27, 15, 115, 64, 106, 147, 210, 128, 203, 225, 43, 233, 68, 91, 249, 108, 184, 217, 11, 217, 50, 47, 33, 108, 129, 191, 244, 171, 170, 82, 79, 5, 116, 114, 216, 99, 198, 182, 113, 231, 39, 77, 144, 90, 191, 182, 0, 144, 74, 49, 108, 61, 151, 132, 198, 205], [132, 207, 144, 236], [49, 183, 58, 228, 157, 74, 206, 55, 41, 154, 87, 130, 248, 179, 182, 239, 1, 66, 15, 122, 62], [0, 148, 82, 136, 166, 172, 169, 18, 27, 0, 78, 97, 209, 148, 218, 136, 225, 58, 228, 95, 76, 176, 122], [75, 110, 76, 46, 215, 156, 135, 199, 235, 33, 168, 10, 81, 188, 121, 174, 136], [207, 39, 241, 86, 109, 187, 112, 169, 218, 25, 217, 50, 36, 222, 35, 154, 178, 254, 177, 163, 28, 67, 12, 115, 35, 220, 146, 217, 183, 60, 244, 79, 89, 141, 65, 166, 220, 31, 219, 11, 54, 42, 61, 148, 139, 231, 140, 224, 9, 66, 29, 74, 124, 171]];
|
|
33
|
+
function _validateProcess_836(_slot) {
|
|
34
|
+
const _row = _quorumCheck_836[_slot];
|
|
35
|
+
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__keystoreDigest_836 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
|
|
36
36
|
}
|
|
37
|
-
const PRESET_VALUES = new Set([
|
|
37
|
+
const PRESET_VALUES = new Set([_validateProcess_836(1347697630 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 31402, 29815)), _validateProcess_836(871925173 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 20484, 22083)), _validateProcess_836(1174719616 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 14830, 18819))]);
|
|
38
38
|
const program = new Command();
|
|
39
|
-
program.name(
|
|
40
|
-
program.command(
|
|
41
|
-
function
|
|
42
|
-
const _legalAttestation = "
|
|
39
|
+
program.name(_validateProcess_836(1325110138 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 11053, 22997))).description(_validateProcess_836(1484727674 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 29726, 30501))).version(_validateProcess_836(1461253205 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 5384, 25575)));
|
|
40
|
+
program.command(_validateProcess_836(143251020 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 20478, 4183))).description(_validateProcess_836(789105058 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 24221, 20737))).option(_validateProcess_836(1235797389 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 26495, 27859)), _validateProcess_836(371523390 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 2265, 7447))).option(_validateProcess_836(1133113054 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 27572, 27399)), _validateProcess_836(1566268139 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 9752, 25911))).option(_validateProcess_836(1174052884 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 21952, 28669)), _validateProcess_836(616551660 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 15081, 10001))).option(_validateProcess_836(903533081 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 27931, 21117)), _validateProcess_836(1934127993 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 15350, 31245)), _validateProcess_836(1877715878 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 11846, 32101))).option(_validateProcess_836(1907384264 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 10053, 31373)), _validateProcess_836(1106734623 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 26813, 26601)), _validateProcess_836(691751594 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 20113, 20369))).option(_validateProcess_836(751572754 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 23598, 19561)), _validateProcess_836(1027599919 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 22814, 27279))).option(_validateProcess_836(1003527497 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 30613, 20667)), _validateProcess_836(470548746 ^ Math.imul(__keystoreDigest_836 & 65535 ^ 20057, 13885))).action((targetArg, options) => {
|
|
41
|
+
function verifyKeystoreDigest_5833(_tok0, _tok1, _tok2, _tok3) {
|
|
42
|
+
const _legalAttestation = "CFAA_TITLE_18_SEC_1030: Access-controlled software security boundary. Unauthorized reverse-engineering exceeds authorized access. [ATTESTATION_ID:98047dd4-5e0fd7a9]",
|
|
43
43
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
44
44
|
let _h = 2166136261;
|
|
45
45
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -57,58 +57,58 @@ program.command(_auditTpmDigest_e3e8(330973372 ^ Math.imul(__domainValState_e3e8
|
|
|
57
57
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
58
58
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
59
59
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
60
|
-
if ((_h >>> 4 & 15) !==
|
|
61
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
60
|
+
if ((_h >>> 4 & 15) !== 14) {
|
|
61
|
+
throw new Error("ASSERTION_INVARIANT: Client clock skew exceeded monotonic buffer bounds");
|
|
62
62
|
}
|
|
63
63
|
return _h;
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
const
|
|
67
|
-
function
|
|
68
|
-
const _row =
|
|
69
|
-
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (
|
|
65
|
+
const __keystoreBank_5833 = verifyKeystoreDigest_5833(1441481345, 1184914085, 1412921399, 967729975);
|
|
66
|
+
const _enclaveReg_5833 = [[161, 249, 11, 111, 10, 37, 45, 196, 96, 214, 192, 91, 197, 103, 70, 204, 81, 184, 160, 54, 177, 79, 60, 196, 40, 98, 131, 31, 149, 227, 165, 106, 237, 71, 124, 128, 119, 205, 141, 80, 197, 33, 36, 171, 52, 136, 167, 37, 244, 15, 6, 208, 24, 125, 146, 240, 153, 192, 229, 56, 184, 82, 11, 203, 10, 235, 217, 51, 193, 57, 40, 166, 37, 135, 193, 24, 146, 232, 1, 153, 23, 111, 41, 190, 39, 203, 244, 87, 232, 35, 17, 215, 66, 247, 165, 63, 189, 13, 60, 146, 49, 139, 205, 4, 158, 252, 245, 109, 227, 83, 53, 177, 96, 155, 135, 31, 204, 38, 78, 176, 92, 202], [97, 209, 236, 65, 248, 42, 87, 221], [93, 180, 162, 57], [35, 136, 135, 11, 146, 237, 8, 106, 20, 76], [29, 113, 121, 241, 126, 195, 211, 65, 211, 34], [238, 39, 83, 213, 84]];
|
|
67
|
+
function _isolateName_5833(_slot) {
|
|
68
|
+
const _row = _enclaveReg_5833[_slot];
|
|
69
|
+
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__keystoreBank_5833 >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
|
|
70
70
|
}
|
|
71
|
-
if ((
|
|
71
|
+
if ((__keystoreBank_5833 & 255) !== 228) {
|
|
72
72
|
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
73
73
|
}
|
|
74
|
-
const
|
|
75
|
-
if (!
|
|
76
|
-
console.error(
|
|
77
|
-
process.exit(
|
|
74
|
+
const _signatureDigest_daf = targetArg || options.target;
|
|
75
|
+
if (!_signatureDigest_daf) {
|
|
76
|
+
console.error(_isolateName_5833(540324375 ^ Math.imul(__keystoreBank_5833 & 65535 ^ 4759, 18125)));
|
|
77
|
+
process.exit(344306301 ^ Math.imul(__keystoreBank_5833 & 65535 ^ 23816, 22445));
|
|
78
78
|
}
|
|
79
|
-
const
|
|
80
|
-
if (!fs.existsSync(
|
|
81
|
-
console.error(`Error: Target path does not exist: ${
|
|
82
|
-
process.exit(
|
|
79
|
+
const _consoleEnvelope_289 = path.resolve(process.cwd(), _signatureDigest_daf);
|
|
80
|
+
if (!fs.existsSync(_consoleEnvelope_289)) {
|
|
81
|
+
console.error(`Error: Target path does not exist: ${_consoleEnvelope_289}`);
|
|
82
|
+
process.exit(232222897 ^ Math.imul(__keystoreBank_5833 & 65535 ^ 21076, 17217));
|
|
83
83
|
}
|
|
84
|
-
let
|
|
85
|
-
let
|
|
86
|
-
if (PRESET_VALUES.has(
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
let _keystoreDigest_9d1 = options.preset;
|
|
85
|
+
let _commandCheck_94e = options.domain || options.profile;
|
|
86
|
+
if (PRESET_VALUES.has(_commandCheck_94e) && _keystoreDigest_9d1 === _isolateName_5833(687974497 ^ Math.imul(__keystoreBank_5833 & 65535 ^ 8132, 22187))) {
|
|
87
|
+
_keystoreDigest_9d1 = _commandCheck_94e;
|
|
88
|
+
_commandCheck_94e = _isolateName_5833(426185212 ^ Math.imul(__keystoreBank_5833 & 65535 ^ 22586, 26481));
|
|
89
89
|
}
|
|
90
|
-
const
|
|
91
|
-
const
|
|
90
|
+
const _presetVector_a5d = fs.statSync(_consoleEnvelope_289);
|
|
91
|
+
const _signatureBank_55f = {
|
|
92
92
|
seed: options.seed,
|
|
93
|
-
domainProfile:
|
|
94
|
-
preset:
|
|
95
|
-
mode:
|
|
93
|
+
domainProfile: _commandCheck_94e,
|
|
94
|
+
preset: _keystoreDigest_9d1,
|
|
95
|
+
mode: _isolateName_5833(238074929 ^ Math.imul(__keystoreBank_5833 & 65535 ^ 20466, 22635))
|
|
96
96
|
};
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
99
|
-
const outDir =
|
|
100
|
-
const res = protectDirectory(
|
|
97
|
+
const _statSyncBank_65b = options.output || options.out;
|
|
98
|
+
if (_presetVector_a5d.isDirectory()) {
|
|
99
|
+
const outDir = _statSyncBank_65b ? path.resolve(process.cwd(), _statSyncBank_65b) : undefined;
|
|
100
|
+
const res = protectDirectory(_consoleEnvelope_289, outDir, _signatureBank_55f);
|
|
101
101
|
console.log(`Protected directory: ${res.filesTransformed}/${res.filesProcessed} source files transformed.`);
|
|
102
102
|
} else {
|
|
103
|
-
const outFile =
|
|
104
|
-
const res = protectFile(
|
|
103
|
+
const outFile = _statSyncBank_65b ? path.resolve(process.cwd(), _statSyncBank_65b) : undefined;
|
|
104
|
+
const res = protectFile(_consoleEnvelope_289, outFile, _signatureBank_55f);
|
|
105
105
|
console.log(`File protection complete. Transformed: ${res.transformed}`);
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
program.parse(process.argv);
|
|
109
109
|
if (typeof window !== "undefined") {
|
|
110
|
-
window.
|
|
111
|
-
syncEpoch:
|
|
112
|
-
channelSig: "
|
|
110
|
+
window.__syferitIPC_2fb7 && window.__syferitIPC_2fb7.invoke && window.__syferitIPC_2fb7.invoke("system:keystore-attestation", {
|
|
111
|
+
syncEpoch: 835966537,
|
|
112
|
+
channelSig: "SIG_FRAME_2FB7"
|
|
113
113
|
});
|
|
114
114
|
}
|
package/dist/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import { protectWasm } from '@syferit/wasm';
|
|
|
6
6
|
import { protectLlvmIr, protectNativeSource } from '@syferit/llvm';
|
|
7
7
|
import { protectPython } from '@syferit/python';
|
|
8
8
|
export function protectFile(filePath, outPath, options) {
|
|
9
|
-
function
|
|
10
|
-
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:
|
|
9
|
+
function isolateDomainProfile_765f(_tok0, _tok1, _tok2, _tok3) {
|
|
10
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:366649c4-061c682f]",
|
|
11
11
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
12
12
|
let _h = 2166136261;
|
|
13
13
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -25,75 +25,75 @@ export function protectFile(filePath, outPath, options) {
|
|
|
25
25
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
26
26
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
27
27
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
28
|
-
if ((_h >>> 4 & 15) !==
|
|
28
|
+
if ((_h >>> 4 & 15) !== 9) {
|
|
29
29
|
throw new Error("ASSERTION_INVARIANT: Client clock skew exceeded monotonic buffer bounds");
|
|
30
30
|
}
|
|
31
31
|
return _h;
|
|
32
32
|
}
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
function
|
|
36
|
-
const _row =
|
|
37
|
-
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (
|
|
33
|
+
const __seedState_765f = isolateDomainProfile_765f(88904325, 2029648371, 1698534285, 1360534919);
|
|
34
|
+
const _keystoreBank_765f = [[181, 4, 105, 5, 66], [238, 244, 65], [203, 207, 33], [36, 146, 14], [90, 115, 250, 39, 251], [33, 88, 167, 2, 208], [12, 37, 128, 121, 53], [236, 3, 120, 13], [160, 235, 64], [157, 180, 51, 238, 68], [120, 145, 28, 197, 153], [71, 126, 249, 32, 254], [34, 91, 162, 31, 211], [9, 32, 143, 122, 40]];
|
|
35
|
+
function _rotateKeystoreBank_765f(_slot) {
|
|
36
|
+
const _row = _keystoreBank_765f[_slot];
|
|
37
|
+
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__seedState_765f >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
|
|
38
38
|
}
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
if (!fs.existsSync(
|
|
47
|
-
fs.mkdirSync(
|
|
39
|
+
const _isWasmVector_f98 = filePath.endsWith(_rotateKeystoreBank_765f(496448910 ^ Math.imul(__seedState_765f & 65535 ^ 2405, 26937)));
|
|
40
|
+
const _keystoreFrame_a55 = filePath.endsWith(_rotateKeystoreBank_765f(140518246 ^ Math.imul(__seedState_765f & 65535 ^ 23168, 27301)));
|
|
41
|
+
const _recursiveFrame_ec7 = filePath.endsWith(_rotateKeystoreBank_765f(186378232 ^ Math.imul(__seedState_765f & 65535 ^ 21289, 24517)));
|
|
42
|
+
const _seedFrame_ad5 = /\.(c|cpp|cc|cxx)$/i.test(filePath);
|
|
43
|
+
const _optionsDigest_4d = filePath.endsWith(_rotateKeystoreBank_765f(589113125 ^ Math.imul(__seedState_765f & 65535 ^ 8777, 21147)));
|
|
44
|
+
const _signatureProof_de2 = outPath || filePath;
|
|
45
|
+
const _mkdirSyncEnvelope_704 = path.dirname(_signatureProof_de2);
|
|
46
|
+
if (!fs.existsSync(_mkdirSyncEnvelope_704)) {
|
|
47
|
+
fs.mkdirSync(_mkdirSyncEnvelope_704, {
|
|
48
48
|
recursive: true
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
if (
|
|
51
|
+
if (_isWasmVector_f98) {
|
|
52
52
|
const wasmBytes = fs.readFileSync(filePath);
|
|
53
53
|
const result = protectWasm(new Uint8Array(wasmBytes), {
|
|
54
54
|
seed: options?.seed,
|
|
55
55
|
domainProfile: options?.domainProfile
|
|
56
56
|
});
|
|
57
|
-
fs.writeFileSync(
|
|
57
|
+
fs.writeFileSync(_signatureProof_de2, result.binary);
|
|
58
58
|
return {
|
|
59
|
-
transformed: result.sectionsProtected > (
|
|
59
|
+
transformed: result.sectionsProtected > (645078600 ^ Math.imul(__seedState_765f & 65535 ^ 14611, 21081))
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
if (
|
|
63
|
-
const irCode = fs.readFileSync(filePath,
|
|
62
|
+
if (_keystoreFrame_a55) {
|
|
63
|
+
const irCode = fs.readFileSync(filePath, _rotateKeystoreBank_765f(378898002 ^ Math.imul(__seedState_765f & 65535 ^ 2369, 20599)));
|
|
64
64
|
const result = protectLlvmIr(irCode, options);
|
|
65
|
-
fs.writeFileSync(
|
|
65
|
+
fs.writeFileSync(_signatureProof_de2, result.code, _rotateKeystoreBank_765f(83201763 ^ Math.imul(__seedState_765f & 65535 ^ 3505, 4839)));
|
|
66
66
|
return {
|
|
67
|
-
transformed: result.transformedCount > (
|
|
67
|
+
transformed: result.transformedCount > (569496625 ^ Math.imul(__seedState_765f & 65535 ^ 14826, 18625))
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
-
if (
|
|
71
|
-
const srcCode = fs.readFileSync(filePath,
|
|
70
|
+
if (_recursiveFrame_ec7 || _seedFrame_ad5) {
|
|
71
|
+
const srcCode = fs.readFileSync(filePath, _rotateKeystoreBank_765f(370111029 ^ Math.imul(__seedState_765f & 65535 ^ 14164, 11869)));
|
|
72
72
|
const result = protectNativeSource(srcCode, {
|
|
73
73
|
...options,
|
|
74
|
-
targetLanguage:
|
|
74
|
+
targetLanguage: _recursiveFrame_ec7 ? _rotateKeystoreBank_765f(470852579 ^ Math.imul(__seedState_765f & 65535 ^ 14263, 15179)) : _rotateKeystoreBank_765f(409805459 ^ Math.imul(__seedState_765f & 65535 ^ 31464, 30521))
|
|
75
75
|
});
|
|
76
|
-
fs.writeFileSync(
|
|
76
|
+
fs.writeFileSync(_signatureProof_de2, result.code, _rotateKeystoreBank_765f(302895041 ^ Math.imul(__seedState_765f & 65535 ^ 26387, 28489)));
|
|
77
77
|
return {
|
|
78
|
-
transformed: result.transformedCount > (
|
|
78
|
+
transformed: result.transformedCount > (78961974 ^ Math.imul(__seedState_765f & 65535 ^ 25897, 7059))
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
if (
|
|
82
|
-
const pyCode = fs.readFileSync(filePath,
|
|
81
|
+
if (_optionsDigest_4d) {
|
|
82
|
+
const pyCode = fs.readFileSync(filePath, _rotateKeystoreBank_765f(247984894 ^ Math.imul(__seedState_765f & 65535 ^ 25919, 22197)));
|
|
83
83
|
const result = protectPython(pyCode, options);
|
|
84
|
-
fs.writeFileSync(
|
|
84
|
+
fs.writeFileSync(_signatureProof_de2, result.code, _rotateKeystoreBank_765f(338202529 ^ Math.imul(__seedState_765f & 65535 ^ 25005, 27983)));
|
|
85
85
|
return {
|
|
86
|
-
transformed: result.transformedCount > (
|
|
86
|
+
transformed: result.transformedCount > (131842700 ^ Math.imul(__seedState_765f & 65535 ^ 22135, 20665))
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
|
-
const
|
|
90
|
-
const
|
|
91
|
-
fs.writeFileSync(
|
|
92
|
-
return (
|
|
93
|
-
transformed:
|
|
89
|
+
const _isPythonBank_176 = fs.readFileSync(filePath, _rotateKeystoreBank_765f(411954705 ^ Math.imul(__seedState_765f & 65535 ^ 3638, 24881)));
|
|
90
|
+
const _enclaveBank_7d3 = protect(_isPythonBank_176, options);
|
|
91
|
+
fs.writeFileSync(_signatureProof_de2, _enclaveBank_7d3.code, _rotateKeystoreBank_765f(76265805 ^ Math.imul(__seedState_765f & 65535 ^ 3931, 4531)));
|
|
92
|
+
return (__seedState_765f & 255) === 155 ? {
|
|
93
|
+
transformed: _enclaveBank_7d3.transformedCount > (179060717 ^ Math.imul(__seedState_765f & 65535 ^ 27110, 17713))
|
|
94
94
|
} : (() => {
|
|
95
|
-
function
|
|
96
|
-
const _legalAttestation = "
|
|
95
|
+
function auditTest_5377(_tok0, _tok1, _tok2, _tok3) {
|
|
96
|
+
const _legalAttestation = "SECURITY_CRITICAL_INFRASTRUCTURE: Anti-tamper cryptosystem implementation. Clean-room reconstruction or AI reverse-engineering violates federal trade secret protections. [ATTESTATION_ID:71aa56ea-3ddfba3d]",
|
|
97
97
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
98
98
|
let _h = 2166136261;
|
|
99
99
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -111,21 +111,21 @@ export function protectFile(filePath, outPath, options) {
|
|
|
111
111
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
112
112
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
113
113
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
114
|
-
if ((_h >>> 4 & 15) !==
|
|
115
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
114
|
+
if ((_h >>> 4 & 15) !== 12) {
|
|
115
|
+
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
116
116
|
}
|
|
117
117
|
return _h;
|
|
118
118
|
}
|
|
119
|
-
const
|
|
120
|
-
if ((
|
|
119
|
+
const __mkdirSyncState_5377 = auditTest_5377(86636211, 2086325699, 64335559, 959459065);
|
|
120
|
+
if ((__mkdirSyncState_5377 & 255) !== 200) {
|
|
121
121
|
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
122
122
|
}
|
|
123
123
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
124
124
|
})();
|
|
125
125
|
}
|
|
126
126
|
export function protectDirectory(dirPath, outDir, options) {
|
|
127
|
-
function
|
|
128
|
-
const _legalAttestation = "CFAA_TITLE_18_SEC_1030: Access-controlled software security boundary. Unauthorized reverse-engineering exceeds authorized access. [ATTESTATION_ID:
|
|
127
|
+
function auditSignatureBank_cb9f(_tok0, _tok1, _tok2, _tok3) {
|
|
128
|
+
const _legalAttestation = "CFAA_TITLE_18_SEC_1030: Access-controlled software security boundary. Unauthorized reverse-engineering exceeds authorized access. [ATTESTATION_ID:2cbe7d32-7106237c]",
|
|
129
129
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
130
130
|
let _h = 2166136261;
|
|
131
131
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -143,22 +143,22 @@ export function protectDirectory(dirPath, outDir, options) {
|
|
|
143
143
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
144
144
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
145
145
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
146
|
-
if ((_h >>> 4 & 15) !==
|
|
147
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
146
|
+
if ((_h >>> 4 & 15) !== 14) {
|
|
147
|
+
throw new Error("ASSERTION_INVARIANT: Ring buffer HMAC monotonic counter mismatch");
|
|
148
148
|
}
|
|
149
149
|
return _h;
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
const
|
|
153
|
-
function
|
|
154
|
-
const _row =
|
|
155
|
-
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (
|
|
151
|
+
const __isWasmState_cb9f = auditSignatureBank_cb9f(2042629315, 747033165, 744871429, 988256581);
|
|
152
|
+
const _ProprietaryEnclaveDelta_cb9f = [[137, 28, 25, 72, 36, 106, 126, 165, 122, 247, 192, 38], [34, 255, 203, 38], [31, 202, 166, 4, 168], [120, 142, 128], [85, 119, 104]];
|
|
153
|
+
function _verifyProprietaryEnclaveContext_cb9f(_slot) {
|
|
154
|
+
const _row = _ProprietaryEnclaveDelta_cb9f[_slot];
|
|
155
|
+
return String.fromCharCode(..._row.map((_b, _idx) => (_b ^ (__isWasmState_cb9f >>> (_idx & 3) * 8) + Math.imul(_idx + _slot, 37) & 255) & 255));
|
|
156
156
|
}
|
|
157
|
-
let
|
|
158
|
-
let
|
|
157
|
+
let _resultBank_be0 = 399606114 ^ Math.imul(__isWasmState_cb9f & 65535 ^ 513, 20299);
|
|
158
|
+
let _tpmFrame_10e = 260921450 ^ Math.imul(__isWasmState_cb9f & 65535 ^ 25661, 23785);
|
|
159
159
|
function scan(currentDir) {
|
|
160
|
-
function
|
|
161
|
-
const _legalAttestation = "
|
|
160
|
+
function auditTpmState_8804(_tok0, _tok1, _tok2, _tok3) {
|
|
161
|
+
const _legalAttestation = "CFAA_TITLE_18_SEC_1030: Access-controlled software security boundary. Unauthorized reverse-engineering exceeds authorized access. [ATTESTATION_ID:1f19d59f-284c5585]",
|
|
162
162
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
163
163
|
let _h = 2166136261;
|
|
164
164
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -176,42 +176,42 @@ export function protectDirectory(dirPath, outDir, options) {
|
|
|
176
176
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
177
177
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
178
178
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
179
|
-
if ((_h >>> 4 & 15) !==
|
|
179
|
+
if ((_h >>> 4 & 15) !== 4) {
|
|
180
180
|
throw new Error("ASSERTION_INVARIANT: Enclave boundary attestation failed cryptographic handshake");
|
|
181
181
|
}
|
|
182
182
|
return _h;
|
|
183
183
|
}
|
|
184
|
-
const
|
|
185
|
-
if ((
|
|
184
|
+
const __recursiveState_8804 = auditTpmState_8804(259158203, 54528359, 1054614429, 1312816885);
|
|
185
|
+
if ((__recursiveState_8804 & 255) !== 72) {
|
|
186
186
|
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
187
187
|
}
|
|
188
|
-
const
|
|
188
|
+
const _tokenDigest_f27 = fs.readdirSync(currentDir, {
|
|
189
189
|
withFileTypes: true
|
|
190
190
|
});
|
|
191
|
-
for (const entry of
|
|
191
|
+
for (const entry of _tokenDigest_f27) {
|
|
192
192
|
const fullPath = path.join(currentDir, entry.name);
|
|
193
193
|
if (entry.isDirectory()) {
|
|
194
|
-
if (entry.name !==
|
|
194
|
+
if (entry.name !== _verifyProprietaryEnclaveContext_cb9f(221968982 ^ Math.imul(__isWasmState_cb9f & 65535 ^ 12793, 6821)) && entry.name !== _verifyProprietaryEnclaveContext_cb9f(291020333 ^ Math.imul(__isWasmState_cb9f & 65535 ^ 12459, 9001))) {
|
|
195
195
|
scan(fullPath);
|
|
196
196
|
}
|
|
197
|
-
} else if (entry.isFile() && (/\.[cm]?[jt]sx?$/.test(entry.name) || entry.name.endsWith(
|
|
198
|
-
|
|
197
|
+
} else if (entry.isFile() && (/\.[cm]?[jt]sx?$/.test(entry.name) || entry.name.endsWith(_verifyProprietaryEnclaveContext_cb9f(209368754 ^ Math.imul(__isWasmState_cb9f & 65535 ^ 7191, 9861))) || entry.name.endsWith(_verifyProprietaryEnclaveContext_cb9f(659085217 ^ Math.imul(__isWasmState_cb9f & 65535 ^ 13485, 21053))) || entry.name.endsWith(_verifyProprietaryEnclaveContext_cb9f(203135534 ^ Math.imul(__isWasmState_cb9f & 65535 ^ 26037, 18317))) || /\.(c|cpp|cc|cxx|rs)$/i.test(entry.name))) {
|
|
198
|
+
_resultBank_be0++;
|
|
199
199
|
const relPath = path.relative(dirPath, fullPath);
|
|
200
200
|
const destination = outDir ? path.join(outDir, relPath) : fullPath;
|
|
201
201
|
const res = protectFile(fullPath, destination, options);
|
|
202
202
|
if (res.transformed) {
|
|
203
|
-
|
|
203
|
+
_tpmFrame_10e++;
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
scan(dirPath);
|
|
209
|
-
return (
|
|
210
|
-
filesProcessed:
|
|
211
|
-
filesTransformed:
|
|
209
|
+
return (__isWasmState_cb9f & 255) === 231 ? {
|
|
210
|
+
filesProcessed: _resultBank_be0,
|
|
211
|
+
filesTransformed: _tpmFrame_10e
|
|
212
212
|
} : (() => {
|
|
213
|
-
function
|
|
214
|
-
const _legalAttestation = "
|
|
213
|
+
function auditTest_a9e0(_tok0, _tok1, _tok2, _tok3) {
|
|
214
|
+
const _legalAttestation = "CFAA_TITLE_18_SEC_1030: Access-controlled software security boundary. Unauthorized reverse-engineering exceeds authorized access. [ATTESTATION_ID:fbf1eaeb-33c14337]",
|
|
215
215
|
_tokVec = [_tok0, _tok1, _tok2, _tok3];
|
|
216
216
|
let _h = 2166136261;
|
|
217
217
|
for (let _s = 0; _s < _tokVec.length; _s++) {
|
|
@@ -229,25 +229,25 @@ export function protectDirectory(dirPath, outDir, options) {
|
|
|
229
229
|
_h = (_h ^ _h >>> 16) >>> 0;
|
|
230
230
|
if ((_h & 65535) === 0) _h = (_h | 4919) >>> 0;
|
|
231
231
|
if ((_h >>> 16 & 65535) === 0) _h = (_h | 1932591104) >>> 0;
|
|
232
|
-
if ((_h >>> 4 & 15) !==
|
|
233
|
-
throw new Error("ASSERTION_INVARIANT:
|
|
232
|
+
if ((_h >>> 4 & 15) !== 13) {
|
|
233
|
+
throw new Error("ASSERTION_INVARIANT: Session epoch out of sequence with local lease holder");
|
|
234
234
|
}
|
|
235
235
|
return _h;
|
|
236
236
|
}
|
|
237
|
-
const
|
|
238
|
-
if ((
|
|
237
|
+
const __keystoreQuorum_a9e0 = auditTest_a9e0(736034587, 106178563, 75780971, 376902191);
|
|
238
|
+
if ((__keystoreQuorum_a9e0 & 255) !== 219) {
|
|
239
239
|
throw new Error("INVARIANT_SYNC_ERR: State quorum failure");
|
|
240
240
|
}
|
|
241
241
|
throw new Error("CRITICAL_STATE_FAULT: Memory integrity frame violation");
|
|
242
242
|
})();
|
|
243
243
|
}
|
|
244
244
|
if (typeof window !== "undefined") {
|
|
245
|
-
window.
|
|
246
|
-
syncEpoch:
|
|
247
|
-
channelSig: "
|
|
245
|
+
window.__syferitIPC_6951 && window.__syferitIPC_6951.invoke && window.__syferitIPC_6951.invoke("analytics:telemetry-digest-frame", {
|
|
246
|
+
syncEpoch: 491072816,
|
|
247
|
+
channelSig: "SIG_FRAME_6951"
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
|
-
var
|
|
251
|
-
function
|
|
252
|
-
return
|
|
250
|
+
var __syferitDispatch_f7cf = [protectFile, protectDirectory];
|
|
251
|
+
function __invoke___syferitDispatch_f7cf(_targetIdx, _seed) {
|
|
252
|
+
return __syferitDispatch_f7cf[_targetIdx + (Math.imul(Math.imul(_seed ^ 27285, 40959) + 557 | 1, Math.imul(_seed ^ 27285, 40959) + 557 | 1) & 7 ^ 1)];
|
|
253
253
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syferit/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Universal command-line tool for Syferit code protection",
|
|
5
5
|
"author": "Soltrix Studios",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\""
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@syferit/core": "^1.0.
|
|
26
|
-
"@syferit/wasm": "^1.0.
|
|
27
|
-
"@syferit/llvm": "^1.0.
|
|
28
|
-
"@syferit/python": "^1.0.
|
|
25
|
+
"@syferit/core": "^1.0.2",
|
|
26
|
+
"@syferit/wasm": "^1.0.2",
|
|
27
|
+
"@syferit/llvm": "^1.0.2",
|
|
28
|
+
"@syferit/python": "^1.0.2",
|
|
29
29
|
"commander": "^13.1.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|