-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpackage.json
More file actions
633 lines (633 loc) · 20.2 KB
/
Copy pathpackage.json
File metadata and controls
633 lines (633 loc) · 20.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
{
"name": "vscode-ts-chef",
"displayName": "ts-chef",
"description": "CyberChef-style data transformations directly in VS Code",
"version": "0.8.1",
"icon": "assets/logo.jpg",
"publisher": "michaelweiss",
"repository": {
"type": "git",
"url": "https://github.com/MichaelWeissDEV/ts-chef.git"
},
"bugs": {
"url": "https://github.com/MichaelWeissDEV/ts-chef/issues"
},
"homepage": "https://ts-chef.readthedocs.io/en/latest/",
"engines": {
"vscode": "^1.85.0"
},
"categories": [
"Other"
],
"keywords": [
"cyberchef",
"encoding",
"decoding",
"base64",
"hex",
"hash",
"converter",
"crypto",
"malware-analysis",
"yara",
"pipeline"
],
"activationEvents": [
"onStartupFinished"
],
"main": "./dist/extension.js",
"capabilities": {
"untrustedWorkspaces": {
"supported": "limited",
"description": "Workspace-scoped variables and pipelines are unavailable in Restricted Mode."
}
},
"contributes": {
"commands": [
{
"command": "tschef.quickConvert",
"title": "tschef: Quick Convert Selection"
},
{
"command": "tschef.scanDocument",
"title": "tschef: Scan Document for Patterns"
},
{
"command": "tschef.scanWorkspace",
"title": "tschef: Scan Workspace for Patterns",
"icon": "$(folder-opened)"
},
{
"command": "tschef.followActiveEditorOn",
"title": "tschef: Patterns Follow Active Editor",
"icon": "$(eye-closed)"
},
{
"command": "tschef.followActiveEditorOff",
"title": "tschef: Pin Patterns (Stop Following)",
"icon": "$(eye)"
},
{
"command": "tschef.toggleHighlight",
"title": "tschef: Toggle Pattern Highlighting"
},
{
"command": "tschef.runPipeline",
"title": "tschef: Run Pipeline on Selection"
},
{
"command": "tschef.openPipelineEditor",
"title": "tschef: Open Pipeline Editor"
},
{
"command": "tschef.openPipelineGraph",
"title": "tschef: Open Pipeline Graph",
"icon": "$(type-hierarchy)"
},
{
"command": "tschef.openPipelineInEditor",
"title": "tschef: Open Saved/Standard Pipeline in Editor",
"icon": "$(type-hierarchy-sub)"
},
{
"command": "tschef.setVariable",
"title": "tschef: Set Variable"
},
{
"command": "tschef.showVariables",
"title": "tschef: Show Variables"
},
{
"command": "tschef.clearScanResults",
"title": "tschef: Clear Scan Results",
"icon": "$(trash)"
},
{
"command": "tschef.refreshScan",
"title": "tschef: Refresh Scan",
"icon": "$(refresh)"
},
{
"command": "tschef.runSavedPipelinePicker",
"title": "tschef: Run Saved Pipeline",
"icon": "$(run)"
},
{
"command": "tschef.deepAnalysis",
"title": "tschef: Deep Analysis of Selection"
},
{
"command": "tschef.malwareTriage",
"title": "tschef: Static Malware Triage",
"icon": "$(shield)"
},
{
"command": "tschef.addVariable",
"title": "tschef: Add Variable",
"icon": "$(add)"
},
{
"command": "tschef.loadRecipe",
"title": "tschef: Load into Recipe",
"icon": "$(list-flat)"
},
{
"command": "tschef.browseRecipeLibrary",
"title": "tschef: Browse Standard Recipe Library",
"icon": "$(library)"
},
{
"command": "tschef.yaraScan",
"title": "tschef: YARA Scan Selection/Document",
"icon": "$(shield)"
},
{
"command": "tschef.exportScanResults",
"title": "tschef: Export Scan Results",
"icon": "$(export)"
},
{
"command": "tschef.toggleEntropyMap",
"title": "tschef: Toggle Entropy Heatmap",
"icon": "$(flame)"
},
{
"command": "tschef.smartFormat",
"title": "tschef: Smart Format (Auto-Detect & Beautify)"
},
{
"command": "tschef.makeReadable",
"title": "tschef: Make Readable (Reflow Long Lines)"
},
{
"command": "tschef.runShortcut",
"title": "tschef: Run Registered Shortcut"
},
{
"command": "tschef.configureShortcuts",
"title": "tschef: Configure Keyboard Shortcuts"
},
{
"command": "tschef.repeatLastOperation",
"title": "tschef: Repeat Last Operation"
},
{
"command": "tschef.cycleOperationHistoryBack",
"title": "tschef: Apply Previous Operation in History"
},
{
"command": "tschef.cycleOperationHistoryForward",
"title": "tschef: Apply Next Operation in History"
},
{
"command": "tschef.repeatOperationFromHistory",
"title": "tschef: Repeat Operation from History..."
},
{
"command": "tschef.clearOperationHistory",
"title": "tschef: Clear Operation History"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "tschef-sidebar",
"title": "tschef",
"icon": "media/icon.svg"
}
]
},
"views": {
"tschef-sidebar": [
{
"id": "tschef.operationsView",
"type": "webview",
"name": "Operations",
"contextualTitle": "tschef Operations"
},
{
"id": "tschef.recipeView",
"type": "webview",
"name": "Recipe",
"contextualTitle": "tschef Recipe"
},
{
"id": "tschef.patternsView",
"name": "Found Patterns",
"contextualTitle": "tschef Patterns"
},
{
"id": "tschef.variablesView",
"name": "Variables",
"contextualTitle": "tschef Variables"
},
{
"id": "tschef.pipelinesView",
"name": "Pipelines",
"contextualTitle": "tschef Pipelines"
}
]
},
"viewsWelcome": [
{
"view": "tschef.pipelinesView",
"contents": "No saved pipelines yet.\nBuild a recipe in the Recipe pane and save it, or use an editor:\n[Open Pipeline Editor](command:tschef.openPipelineEditor) · [Open Pipeline Graph](command:tschef.openPipelineGraph)"
},
{
"view": "tschef.variablesView",
"contents": "No variables yet. Variables can be referenced explicitly in inputs as {{name}}. Shell/PowerShell $name expressions are not changed.\n[Add Variable](command:tschef.addVariable)"
},
{
"view": "tschef.patternsView",
"contents": "No patterns found yet.\n[Scan Document](command:tschef.scanDocument)\n[Scan Workspace](command:tschef.scanWorkspace)"
}
],
"menus": {
"editor/context": [
{
"command": "tschef.quickConvert",
"when": "editorHasSelection",
"group": "tschef"
},
{
"command": "tschef.deepAnalysis",
"when": "editorHasSelection",
"group": "tschef"
},
{
"command": "tschef.malwareTriage",
"when": "editorTextFocus",
"group": "tschef"
},
{
"command": "tschef.smartFormat",
"group": "tschef"
},
{
"command": "tschef.makeReadable",
"group": "tschef"
}
],
"view/title": [
{
"command": "tschef.followActiveEditorOff",
"when": "view == tschef.patternsView && tschef.patternsFollow",
"group": "navigation@0"
},
{
"command": "tschef.followActiveEditorOn",
"when": "view == tschef.patternsView && !tschef.patternsFollow",
"group": "navigation@0"
},
{
"command": "tschef.refreshScan",
"when": "view == tschef.patternsView",
"group": "navigation"
},
{
"command": "tschef.scanWorkspace",
"when": "view == tschef.patternsView",
"group": "navigation"
},
{
"command": "tschef.exportScanResults",
"when": "view == tschef.patternsView",
"group": "navigation"
},
{
"command": "tschef.clearScanResults",
"when": "view == tschef.patternsView",
"group": "navigation"
},
{
"command": "tschef.addVariable",
"when": "view == tschef.variablesView",
"group": "navigation"
},
{
"command": "tschef.runSavedPipelinePicker",
"when": "view == tschef.pipelinesView",
"group": "navigation"
},
{
"command": "tschef.openPipelineInEditor",
"when": "view == tschef.pipelinesView",
"group": "navigation@0"
},
{
"command": "tschef.openPipelineGraph",
"when": "view == tschef.pipelinesView",
"group": "navigation@1"
},
{
"command": "tschef.browseRecipeLibrary",
"when": "view == tschef.pipelinesView || view == tschef.recipeView",
"group": "navigation@2"
}
],
"view/item/context": [
{
"command": "tschef.loadRecipe",
"when": "view == tschef.pipelinesView && viewItem =~ /^pipeline-/",
"group": "inline"
},
{
"command": "tschef.openPipelineInEditor",
"when": "view == tschef.pipelinesView && viewItem =~ /^pipeline-/",
"group": "inline@1"
},
{
"command": "tschef.openPipelineGraph",
"when": "view == tschef.pipelinesView && viewItem =~ /^pipeline-/",
"group": "inline@2"
}
]
},
"configuration": {
"title": "tschef",
"properties": {
"tschef.highlightingEnabled": {
"type": "boolean",
"default": true,
"description": "Enable pattern highlighting in the editor"
},
"tschef.confidenceThreshold": {
"type": "number",
"default": 0.65,
"description": "Minimum confidence (0–1) to show hover conversion options"
},
"tschef.hover.enabled": {
"type": "boolean",
"default": true,
"description": "Show instant ts-chef analysis when hovering encoded strings and integer literals."
},
"tschef.hover.onDemand": {
"type": "boolean",
"default": true,
"description": "Analyse the line under the cursor even when the document has not been scanned."
},
"tschef.hover.integerCalculator": {
"type": "boolean",
"default": true,
"description": "Show decimal, hexadecimal, binary, octal and two's-complement values for source-code integer literals."
},
"tschef.hover.decodeChains": {
"type": "boolean",
"default": true,
"description": "Show safe previews and one-click actions for detected multi-step decoding chains."
},
"tschef.hover.maxInputCharacters": {
"type": "number",
"default": 65536,
"minimum": 256,
"maximum": 1048576,
"description": "Maximum number of characters analysed by one instant hover."
},
"tschef.hover.maxPreviewCharacters": {
"type": "number",
"default": 320,
"minimum": 80,
"maximum": 4096,
"description": "Maximum decoded preview length shown in a hover."
},
"tschef.autoScanOnSave": {
"type": "boolean",
"default": false,
"description": "Automatically scan the document when it is saved"
},
"tschef.patterns.followActiveEditor": {
"type": "boolean",
"default": true,
"description": "Let the Found Patterns view follow the active editor and show that file's matches. Turn off (or use the eye button in the view title) to pin the current results so switching editors keeps them."
},
"tschef.patterns.autoScanOnFocus": {
"type": "boolean",
"default": false,
"description": "When following the active editor, automatically scan a document the first time it becomes active (skipped for files larger than 512 KB)."
},
"tschef.entropyMap.enabled": {
"type": "boolean",
"default": false,
"description": "Colour editor lines by Shannon entropy (heatmap) to spot packed, encrypted, or encoded blocks. Toggle at runtime with 'tschef: Toggle Entropy Heatmap'."
},
"tschef.readableLineWidth": {
"type": "number",
"default": 100,
"description": "Target line width used by 'tschef: Make Readable' when reflowing extremely long lines."
},
"tschef.pipelineResultAction": {
"type": "string",
"enum": [
"popup",
"replace",
"copy",
"inline",
"panel"
],
"enumDescriptions": [
"Show an information message with Replace/Copy buttons",
"Replace the selection (or whole document) with the result",
"Copy the result to the clipboard",
"Pin the result inline as a CodeLens row with Replace/Copy/Close",
"Show the result in a reusable webview panel beside the editor"
],
"default": "popup",
"description": "How to present the result of a pipeline or operation"
},
"tschef.defaultPipelineScope": {
"type": "string",
"enum": [
"global",
"workspace"
],
"enumDescriptions": [
"Save to global storage, available in all workspaces",
"Save to the current workspace's .vscode/ts-chef folder"
],
"default": "global",
"description": "Default scope pre-selected when saving a pipeline"
},
"tschef.defaultVariableScope": {
"type": "string",
"enum": [
"global",
"workspace"
],
"enumDescriptions": [
"Save to global storage, available in all workspaces",
"Save to the current workspace's .vscode/ts-chef folder"
],
"default": "global",
"description": "Default scope pre-selected when saving a variable"
},
"tschef.shortcuts": {
"type": "object",
"default": {},
"maxProperties": 1000,
"propertyNames": {
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
},
"additionalProperties": {
"type": "string",
"minLength": 1,
"maxLength": 256000
},
"markdownDescription": "Named operation/pipeline/history shortcuts. Each key registers `tschef.shortcut.<id>` dynamically. Values accept pipe syntax (`From Base64 | JSON Beautify`), `pipeline:<saved name>`, or `history:last`, `history:previous`, `history:next`, `history:<1-based offset>`. No keyboard shortcut is assigned automatically."
},
"tschef.shortcutHistorySize": {
"type": "number",
"default": 100,
"minimum": 1,
"maximum": 10000,
"description": "Maximum number of operations and pipelines retained in the in-memory session history. History is never persisted, so argument secrets are not written to disk."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run build",
"compile": "npm run compile:extension && npm run compile:operations",
"compile:extension": "esbuild src/extension.ts --bundle --outfile=dist/extension.js --external:vscode --external:libbzip2-wasm --external:@alexaltea/capstone-js --external:@blu3r4y/lzma --external:jq-web --external:node-md6 --platform=node --format=cjs --sourcemap --define:require.resolve=false",
"compile:operations": "node scripts/build-operation-chunks.cjs",
"verify:bundle": "node scripts/verify-bundle.cjs && node scripts/verify-operation-chunks.cjs",
"build": "npm run compile && npm run verify:bundle",
"bench:bundle": "npm run build && node --expose-gc scripts/benchmark-bundle.cjs",
"watch": "npm run compile:operations && npm run compile:extension -- --watch",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier --write \"src/**/*.{ts,js,json}\" \"test/**/*.{ts,js,json}\"",
"docs": "npm run docs:catalog",
"docs:api": "typedoc",
"docs:catalog": "node scripts/generate-operation-docs.cjs",
"package": "vsce package",
"release": "npm run build && npm run test && vsce package",
"release:ci": "npm run build && npm test && vsce package",
"lint:check": "eslint . --max-warnings 0",
"upload": "vsce publish"
},
"devDependencies": {
"@babel/core": "^7.29.0",
"@babel/preset-env": "^7.29.5",
"@babel/preset-typescript": "^7.28.5",
"@eslint/js": "^10.0.1",
"@types/bcryptjs": "^2.4.6",
"@types/crypto-js": "^4.2.2",
"@types/d3": "^7.4.3",
"@types/diff": "^7.0.2",
"@types/esprima": "^4.0.6",
"@types/geodesy": "^2.2.8",
"@types/jest": "^29.5.0",
"@types/js-yaml": "^4.0.9",
"@types/jsdom": "^28.0.3",
"@types/jsonwebtoken": "^9.0.10",
"@types/jsrsasign": "^10.5.15",
"@types/jszip": "^3.4.0",
"@types/lz-string": "^1.3.34",
"@types/markdown-it": "^14.1.2",
"@types/moment": "^2.11.29",
"@types/ngeohash": "^0.6.8",
"@types/node": "^20.19.43",
"@types/node-forge": "^1.3.14",
"@types/nwmatcher": "^1.4.4",
"@types/pako": "^2.0.4",
"@types/tar-stream": "^3.1.4",
"@types/uuid": "^10.0.0",
"@types/vkbeautify": "^0.99.4",
"@types/vscode": "^1.85.0",
"@types/xmldom": "^0.1.34",
"@types/xregexp": "^4.3.0",
"@vscode/vsce": "^3.9.2",
"babel-jest": "^30.4.1",
"concat-md": "^0.5.1",
"esbuild": "^0.20.0",
"eslint": "^10.4.0",
"jest": "^29.5.0",
"jest-html-reporters": "^3.1.7",
"prettier": "^3.0.0",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.2",
"typedoc": "^0.28.19",
"typedoc-github-wiki-theme": "^2.1.0",
"typedoc-plugin-markdown": "^4.12.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.59.3"
},
"dependencies": {
"@alexaltea/capstone-js": "^5.0.9",
"@astronautlabs/amf": "^0.0.6",
"@blu3r4y/lzma": "^2.3.3",
"@li0ard/streebog": "^0.2.6",
"@noble/hashes": "^2.2.0",
"@types/cbor": "^5.0.1",
"@types/flat": "^5.0.5",
"@wavesenterprise/crypto-gost-js": "^2.1.0-RC1",
"@xmldom/xmldom": "^0.9.10",
"amf": "^0.1.0",
"avsc": "^5.7.9",
"bcryptjs": "^2.4.3",
"bignumber.js": "^11.1.1",
"blakejs": "^1.2.1",
"bson": "^7.2.0",
"cbor": "^10.0.12",
"codepage": "^1.15.0",
"crypto-api": "^0.7.5",
"crypto-js": "^4.2.0",
"ctph.js": "^0.0.5",
"d3": "^7.9.0",
"d3-hexbin": "^0.2.2",
"es6-promisify": "^7.0.0",
"escodegen": "^2.1.0",
"fernet": "^0.3.3",
"flat": "^6.0.1",
"geodesy": "^2.4.0",
"hash-wasm": "^4.12.0",
"highlight.js": "^11.11.1",
"ieee754": "^1.2.1",
"jimp": "^1.6.1",
"jq-web": "^0.6.2",
"js-sha3": "^0.9.3",
"js-yaml": "^4.1.1",
"jsdom": "^22.1.0",
"json5": "^2.2.3",
"jsonata": "^2.2.2",
"jsonpath-plus": "^10.4.0",
"jsonwebtoken": "^9.0.3",
"jsqr": "^1.4.0",
"jsrsasign": "^11.1.3",
"jszip": "^3.10.1",
"kbpgp": "^2.1.17",
"libbzip2-wasm": "^0.0.4",
"libyara-wasm": "^1.2.1",
"lz-string": "^1.5.0",
"lz4js": "^0.2.0",
"markdown-it": "^14.1.1",
"moment-timezone": "^0.6.2",
"ngeohash": "^0.6.3",
"node-forge": "^1.3.1",
"node-md6": "^0.1.0",
"nodom": "^2.4.0",
"notepack.io": "^3.0.1",
"nwmatcher": "^1.4.4",
"otpauth": "^9.5.1",
"pako": "^2.1.0",
"protobufjs": "^8.7.1",
"qr-image": "^3.2.0",
"reflect-metadata": "^0.2.2",
"rison": "^0.1.1",
"scryptsy": "^2.1.0",
"sql-formatter": "^15.7.4",
"ssdeep.js": "^0.0.3",
"tar-stream": "^3.2.0",
"terser": "^5.49.0",
"tesseract.js": "^7.0.0",
"ua-parser-js": "^2.0.10",
"uuid": "^11.1.1",
"vkbeautify": "^0.99.3",
"xpath": "^0.0.34",
"xregexp": "^5.1.2",
"zlibjs": "^0.3.1"
}
}