forked from gchq/CyberChef
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOperationConfig.js
More file actions
4359 lines (4344 loc) · 159 KB
/
OperationConfig.js
File metadata and controls
4359 lines (4344 loc) · 159 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
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import Arithmetic from "../operations/Arithmetic.js";
import Base from "../operations/Base.js";
import Base58 from "../operations/Base58.js";
import Base64 from "../operations/Base64.js";
import BCD from "../operations/BCD.js";
import BitwiseOp from "../operations/BitwiseOp.js";
import ByteRepr from "../operations/ByteRepr.js";
import CharEnc from "../operations/CharEnc.js";
import Cipher from "../operations/Cipher.js";
import Code from "../operations/Code.js";
import Compress from "../operations/Compress.js";
import Convert from "../operations/Convert.js";
import DateTime from "../operations/DateTime.js";
import Diff from "../operations/Diff.js";
import Endian from "../operations/Endian.js";
import Entropy from "../operations/Entropy.js";
import Extract from "../operations/Extract.js";
import Filetime from "../operations/Filetime.js";
import FileType from "../operations/FileType.js";
import Image from "../operations/Image.js";
import Hash from "../operations/Hash.js";
import Hexdump from "../operations/Hexdump.js";
import HTML from "../operations/HTML.js";
import HTTP from "../operations/HTTP.js";
import IP from "../operations/IP.js";
import JS from "../operations/JS.js";
import MAC from "../operations/MAC.js";
import MorseCode from "../operations/MorseCode.js";
import NetBIOS from "../operations/NetBIOS.js";
import PHP from "../operations/PHP.js";
import PGP from "../operations/PGP.js";
import PublicKey from "../operations/PublicKey.js";
import Punycode from "../operations/Punycode.js";
import Regex from "../operations/Regex.js";
import Rotate from "../operations/Rotate.js";
import SeqUtils from "../operations/SeqUtils.js";
import Shellcode from "../operations/Shellcode.js";
import StrUtils from "../operations/StrUtils.js";
import Tidy from "../operations/Tidy.js";
import ToTable from "../operations/ToTable.js";
import Unicode from "../operations/Unicode.js";
import URL_ from "../operations/URL.js";
/**
* Type definition for an OpConf.
*
* @typedef {Object} OpConf
* @property {string} module - The module to which the operation belongs
* @property {html} description - A description of the operation with optional HTML tags
* @property {string} inputType
* @property {string} outputType
* @property {Function|boolean} [highlight] - A function to calculate the highlight offset, or true
* if the offset does not change
* @property {Function|boolean} [highlightReverse] - A function to calculate the highlight offset
* in reverse, or true if the offset does not change
* @property {boolean} [flowControl] - True if the operation is for Flow Control
* @property {ArgConf[]} [args] - A list of configuration objects for the arguments
*/
/**
* Type definition for an ArgConf.
*
* @typedef {Object} ArgConf
* @property {string} name - The display name of the argument
* @property {string} type - The data type of the argument
* @property {*} value
* @property {number[]} [disableArgs] - A list of the indices of the operation's arguments which
* should be toggled on or off when this argument is changed
* @property {boolean} [disabled] - Whether or not this argument starts off disabled
*/
/**
* Operation configuration objects.
*
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2016
* @license Apache-2.0
*
* @constant
* @type {Object.<string, OpConf>}
*/
const OperationConfig = {
"Fork": {
module: "Default",
description: "Split the input data up based on the specified delimiter and run all subsequent operations on each branch separately.<br><br>For example, to decode multiple Base64 strings, enter them all on separate lines then add the 'Fork' and 'From Base64' operations to the recipe. Each string will be decoded separately.",
inputType: "string",
outputType: "string",
flowControl: true,
args: [
{
name: "Split delimiter",
type: "binaryShortString",
value: "\\n"
},
{
name: "Merge delimiter",
type: "binaryShortString",
value: "\\n"
},
{
name: "Ignore errors",
type: "boolean",
value: false
}
]
},
"Merge": {
module: "Default",
description: "Consolidate all branches back into a single trunk. The opposite of Fork.",
inputType: "string",
outputType: "string",
flowControl: true,
args: []
},
"Register": {
module: "Default",
description: "Extract data from the input and store it in registers which can then be passed into subsequent operations as arguments. Regular expression capture groups are used to select the data to extract.<br><br>To use registers in arguments, refer to them using the notation <code>$Rn</code> where n is the register number, starting at 0.<br><br>For example:<br>Input: <code>Test</code><br>Extractor: <code>(.*)</code><br>Argument: <code>$R0</code> becomes <code>Test</code><br><br>Registers can be escaped in arguments using a backslash. e.g. <code>\\$R0</code> would become <code>$R0</code> rather than <code>Test</code>.",
inputType: "string",
outputType: "string",
flowControl: true,
args: [
{
name: "Extractor",
type: "binaryString",
value: "([\\s\\S]*)"
},
{
name: "Case insensitive",
type: "boolean",
value: true
},
{
name: "Multiline matching",
type: "boolean",
value: false
},
]
},
"Jump": {
module: "Default",
description: "Jump forwards or backwards to the specified Label",
inputType: "string",
outputType: "string",
flowControl: true,
args: [
{
name: "Label name",
type: "string",
value: ""
},
{
name: "Maximum jumps (if jumping backwards)",
type: "number",
value: 10
}
]
},
"Conditional Jump": {
module: "Default",
description: "Conditionally jump forwards or backwards to the specified Label based on whether the data matches the specified regular expression.",
inputType: "string",
outputType: "string",
flowControl: true,
args: [
{
name: "Match (regex)",
type: "string",
value: ""
},
{
name: "Invert match",
type: "boolean",
value: false
},
{
name: "Label name",
type: "shortString",
value: ""
},
{
name: "Maximum jumps (if jumping backwards)",
type: "number",
value: 10
}
]
},
"Label": {
module: "Default",
description: "Provides a location for conditional and fixed jumps to redirect execution to.",
inputType: "string",
outputType: "string",
flowControl: true,
args: [
{
name: "Name",
type: "shortString",
value: ""
}
]
},
"Return": {
module: "Default",
description: "End execution of operations at this point in the recipe.",
inputType: "string",
outputType: "string",
flowControl: true,
args: []
},
"Comment": {
module: "Default",
description: "Provides a place to write comments within the flow of the recipe. This operation has no computational effect.",
inputType: "string",
outputType: "string",
flowControl: true,
args: [
{
name: "",
type: "text",
value: ""
}
]
},
"From Base64": {
module: "Default",
description: "Base64 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers.<br><br>This operation decodes data from an ASCII Base64 string back into its raw format.<br><br>e.g. <code>aGVsbG8=</code> becomes <code>hello</code>",
highlight: "func",
highlightReverse: "func",
inputType: "string",
outputType: "byteArray",
args: [
{
name: "Alphabet",
type: "editableOption",
value: Base64.ALPHABET_OPTIONS
},
{
name: "Remove non-alphabet chars",
type: "boolean",
value: Base64.REMOVE_NON_ALPH_CHARS
}
]
},
"To Base64": {
module: "Default",
description: "Base64 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers.<br><br>This operation encodes data in an ASCII Base64 string.<br><br>e.g. <code>hello</code> becomes <code>aGVsbG8=</code>",
highlight: "func",
highlightReverse: "func",
inputType: "ArrayBuffer",
outputType: "string",
args: [
{
name: "Alphabet",
type: "editableOption",
value: Base64.ALPHABET_OPTIONS
},
]
},
"From Base58": {
module: "Default",
description: "Base58 (similar to Base64) is a notation for encoding arbitrary byte data. It differs from Base64 by removing easily misread characters (i.e. l, I, 0 and O) to improve human readability.<br><br>This operation decodes data from an ASCII string (with an alphabet of your choosing, presets included) back into its raw form.<br><br>e.g. <code>StV1DL6CwTryKyV</code> becomes <code>hello world</code><br><br>Base58 is commonly used in cryptocurrencies (Bitcoin, Ripple, etc).",
inputType: "string",
outputType: "byteArray",
args: [
{
name: "Alphabet",
type: "editableOption",
value: Base58.ALPHABET_OPTIONS
},
{
name: "Remove non-alphabet chars",
type: "boolean",
value: Base58.REMOVE_NON_ALPH_CHARS
}
]
},
"To Base58": {
module: "Default",
description: "Base58 (similar to Base64) is a notation for encoding arbitrary byte data. It differs from Base64 by removing easily misread characters (i.e. l, I, 0 and O) to improve human readability.<br><br>This operation encodes data in an ASCII string (with an alphabet of your choosing, presets included).<br><br>e.g. <code>hello world</code> becomes <code>StV1DL6CwTryKyV</code><br><br>Base58 is commonly used in cryptocurrencies (Bitcoin, Ripple, etc).",
inputType: "byteArray",
outputType: "string",
args: [
{
name: "Alphabet",
type: "editableOption",
value: Base58.ALPHABET_OPTIONS
},
]
},
"From Base32": {
module: "Default",
description: "Base32 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers. It uses a smaller set of characters than Base64, usually the uppercase alphabet and the numbers 2 to 7.",
inputType: "string",
outputType: "byteArray",
args: [
{
name: "Alphabet",
type: "binaryString",
value: Base64.BASE32_ALPHABET
},
{
name: "Remove non-alphabet chars",
type: "boolean",
value: Base64.REMOVE_NON_ALPH_CHARS
}
]
},
"To Base32": {
module: "Default",
description: "Base32 is a notation for encoding arbitrary byte data using a restricted set of symbols that can be conveniently used by humans and processed by computers. It uses a smaller set of characters than Base64, usually the uppercase alphabet and the numbers 2 to 7.",
inputType: "byteArray",
outputType: "string",
args: [
{
name: "Alphabet",
type: "binaryString",
value: Base64.BASE32_ALPHABET
}
]
},
"Show Base64 offsets": {
module: "Default",
description: "When a string is within a block of data and the whole block is Base64'd, the string itself could be represented in Base64 in three distinct ways depending on its offset within the block.<br><br>This operation shows all possible offsets for a given string so that each possible encoding can be considered.",
inputType: "byteArray",
outputType: "html",
args: [
{
name: "Alphabet",
type: "binaryString",
value: Base64.ALPHABET
},
{
name: "Show variable chars and padding",
type: "boolean",
value: Base64.OFFSETS_SHOW_VARIABLE
}
]
},
"Disassemble x86": {
module: "Shellcode",
description: "Disassembly is the process of translating machine language into assembly language.<br><br>This operation supports 64-bit, 32-bit and 16-bit code written for Intel or AMD x86 processors. It is particularly useful for reverse engineering shellcode.<br><br>Input should be in hexadecimal.",
inputType: "string",
outputType: "string",
args: [
{
name: "Bit mode",
type: "option",
value: Shellcode.MODE
},
{
name: "Compatibility",
type: "option",
value: Shellcode.COMPATIBILITY
},
{
name: "Code Segment (CS)",
type: "number",
value: 16
},
{
name: "Offset (IP)",
type: "number",
value: 0
},
{
name: "Show instruction hex",
type: "boolean",
value: true
},
{
name: "Show instruction position",
type: "boolean",
value: true
}
]
},
"XOR": {
module: "Default",
description: "XOR the input with the given key.<br>e.g. <code>fe023da5</code><br><br><strong>Options</strong><br><u>Null preserving:</u> If the current byte is 0x00 or the same as the key, skip it.<br><br><u>Scheme:</u><ul><li>Standard - key is unchanged after each round</li><li>Input differential - key is set to the value of the previous unprocessed byte</li><li>Output differential - key is set to the value of the previous processed byte</li></ul>",
highlight: true,
highlightReverse: true,
inputType: "byteArray",
outputType: "byteArray",
args: [
{
name: "Key",
type: "toggleString",
value: "",
toggleValues: BitwiseOp.KEY_FORMAT
},
{
name: "Scheme",
type: "option",
value: BitwiseOp.XOR_SCHEME
},
{
name: "Null preserving",
type: "boolean",
value: BitwiseOp.XOR_PRESERVE_NULLS
}
]
},
"XOR Brute Force": {
module: "Default",
description: "Enumerate all possible XOR solutions. Current maximum key length is 2 due to browser performance.<br><br>Optionally enter a string that you expect to find in the plaintext to filter results (crib).",
inputType: "byteArray",
outputType: "string",
args: [
{
name: "Key length",
type: "number",
value: BitwiseOp.XOR_BRUTE_KEY_LENGTH
},
{
name: "Sample length",
type: "number",
value: BitwiseOp.XOR_BRUTE_SAMPLE_LENGTH
},
{
name: "Sample offset",
type: "number",
value: BitwiseOp.XOR_BRUTE_SAMPLE_OFFSET
},
{
name: "Scheme",
type: "option",
value: BitwiseOp.XOR_SCHEME
},
{
name: "Null preserving",
type: "boolean",
value: BitwiseOp.XOR_PRESERVE_NULLS
},
{
name: "Print key",
type: "boolean",
value: BitwiseOp.XOR_BRUTE_PRINT_KEY
},
{
name: "Output as hex",
type: "boolean",
value: BitwiseOp.XOR_BRUTE_OUTPUT_HEX
},
{
name: "Crib (known plaintext string)",
type: "binaryString",
value: ""
}
]
},
"NOT": {
module: "Default",
description: "Returns the inverse of each byte.",
highlight: true,
highlightReverse: true,
inputType: "byteArray",
outputType: "byteArray",
args: []
},
"AND": {
module: "Default",
description: "AND the input with the given key.<br>e.g. <code>fe023da5</code>",
highlight: true,
highlightReverse: true,
inputType: "byteArray",
outputType: "byteArray",
args: [
{
name: "Key",
type: "toggleString",
value: "",
toggleValues: BitwiseOp.KEY_FORMAT
}
]
},
"OR": {
module: "Default",
description: "OR the input with the given key.<br>e.g. <code>fe023da5</code>",
highlight: true,
highlightReverse: true,
inputType: "byteArray",
outputType: "byteArray",
args: [
{
name: "Key",
type: "toggleString",
value: "",
toggleValues: BitwiseOp.KEY_FORMAT
}
]
},
"ADD": {
module: "Default",
description: "ADD the input with the given key (e.g. <code>fe023da5</code>), MOD 255",
highlight: true,
highlightReverse: true,
inputType: "byteArray",
outputType: "byteArray",
args: [
{
name: "Key",
type: "toggleString",
value: "",
toggleValues: BitwiseOp.KEY_FORMAT
}
]
},
"SUB": {
module: "Default",
description: "SUB the input with the given key (e.g. <code>fe023da5</code>), MOD 255",
highlight: true,
highlightReverse: true,
inputType: "byteArray",
outputType: "byteArray",
args: [
{
name: "Key",
type: "toggleString",
value: "",
toggleValues: BitwiseOp.KEY_FORMAT
}
]
},
"Sum": {
module: "Default",
description: "Adds together a list of numbers. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5</code> becomes <code>18.5</code>",
inputType: "string",
outputType: "BigNumber",
args: [
{
name: "Delimiter",
type: "option",
value: Arithmetic.DELIM_OPTIONS
}
]
},
"Subtract": {
module: "Default",
description: "Subtracts a list of numbers. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5</code> becomes <code>1.5</code>",
inputType: "string",
outputType: "BigNumber",
args: [
{
name: "Delimiter",
type: "option",
value: Arithmetic.DELIM_OPTIONS
}
]
},
"Multiply": {
module: "Default",
description: "Multiplies a list of numbers. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5</code> becomes <code>40</code>",
inputType: "string",
outputType: "BigNumber",
args: [
{
name: "Delimiter",
type: "option",
value: Arithmetic.DELIM_OPTIONS
}
]
},
"Divide": {
module: "Default",
description: "Divides a list of numbers. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5</code> becomes <code>2.5</code>",
inputType: "string",
outputType: "BigNumber",
args: [
{
name: "Delimiter",
type: "option",
value: Arithmetic.DELIM_OPTIONS
}
]
},
"Mean": {
module: "Default",
description: "Computes the mean (average) of a number list. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5 .5</code> becomes <code>4.75</code>",
inputType: "string",
outputType: "BigNumber",
args: [
{
name: "Delimiter",
type: "option",
value: Arithmetic.DELIM_OPTIONS
}
]
},
"Median": {
module: "Default",
description: "Computes the median of a number list. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 1 .5</code> becomes <code>4.5</code>",
inputType: "string",
outputType: "BigNumber",
args: [
{
name: "Delimiter",
type: "option",
value: Arithmetic.DELIM_OPTIONS
}
]
},
"Standard Deviation": {
module: "Default",
description: "Computes the standard deviation of a number list. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5</code> becomes <code>4.089281382128433</code>",
inputType: "string",
outputType: "BigNumber",
args: [
{
name: "Delimiter",
type: "option",
value: Arithmetic.DELIM_OPTIONS
}
]
},
"To Table": {
module: "Default",
description: "Renders data as a table. Data can be split on different characters and output as a HTML or ASCII table with optional header row.",
inputType: "string",
outputType: "html",
highlight: false,
highlightReverse: false,
manualBake: false,
args: [
{
name: "Select separator",
type: "populateOption",
value: ToTable.SEPARATORS,
target: 1
},
{
name: "Separator",
type: "string",
value: ","
},
{
name: "First row header?",
type: "boolean",
value: false
},
{
name: "Format",
type: "option",
value: ToTable.FORMATS
}
]
},
"From Hex": {
module: "Default",
description: "Converts a hexadecimal byte string back into its raw value.<br><br>e.g. <code>ce 93 ce b5 ce b9 ce ac 20 cf 83 ce bf cf 85 0a</code> becomes the UTF-8 encoded string <code>Γειά σου</code>",
highlight: "func",
highlightReverse: "func",
inputType: "string",
outputType: "byteArray",
args: [
{
name: "Delimiter",
type: "option",
value: ByteRepr.HEX_DELIM_OPTIONS
}
]
},
"To Hex": {
module: "Default",
description: "Converts the input string to hexadecimal bytes separated by the specified delimiter.<br><br>e.g. The UTF-8 encoded string <code>Γειά σου</code> becomes <code>ce 93 ce b5 ce b9 ce ac 20 cf 83 ce bf cf 85 0a</code>",
highlight: "func",
highlightReverse: "func",
inputType: "ArrayBuffer",
outputType: "string",
args: [
{
name: "Delimiter",
type: "option",
value: ByteRepr.HEX_DELIM_OPTIONS
}
]
},
"From Octal": {
module: "Default",
description: "Converts an octal byte string back into its raw value.<br><br>e.g. <code>316 223 316 265 316 271 316 254 40 317 203 316 277 317 205</code> becomes the UTF-8 encoded string <code>Γειά σου</code>",
highlight: false,
highlightReverse: false,
inputType: "string",
outputType: "byteArray",
args: [
{
name: "Delimiter",
type: "option",
value: ByteRepr.DELIM_OPTIONS
}
]
},
"To Octal": {
module: "Default",
description: "Converts the input string to octal bytes separated by the specified delimiter.<br><br>e.g. The UTF-8 encoded string <code>Γειά σου</code> becomes <code>316 223 316 265 316 271 316 254 40 317 203 316 277 317 205</code>",
highlight: false,
highlightReverse: false,
inputType: "byteArray",
outputType: "string",
args: [
{
name: "Delimiter",
type: "option",
value: ByteRepr.DELIM_OPTIONS
}
]
},
"From Charcode": {
module: "Default",
description: "Converts unicode character codes back into text.<br><br>e.g. <code>0393 03b5 03b9 03ac 20 03c3 03bf 03c5</code> becomes <code>Γειά σου</code>",
highlight: "func",
highlightReverse: "func",
inputType: "string",
outputType: "byteArray",
args: [
{
name: "Delimiter",
type: "option",
value: ByteRepr.DELIM_OPTIONS
},
{
name: "Base",
type: "number",
value: ByteRepr.CHARCODE_BASE
}
]
},
"To Charcode": {
module: "Default",
description: "Converts text to its unicode character code equivalent.<br><br>e.g. <code>Γειά σου</code> becomes <code>0393 03b5 03b9 03ac 20 03c3 03bf 03c5</code>",
highlight: "func",
highlightReverse: "func",
inputType: "string",
outputType: "string",
args: [
{
name: "Delimiter",
type: "option",
value: ByteRepr.DELIM_OPTIONS
},
{
name: "Base",
type: "number",
value: ByteRepr.CHARCODE_BASE
}
]
},
"From Binary": {
module: "Default",
description: "Converts a binary string back into its raw form.<br><br>e.g. <code>01001000 01101001</code> becomes <code>Hi</code>",
highlight: "func",
highlightReverse: "func",
inputType: "string",
outputType: "byteArray",
args: [
{
name: "Delimiter",
type: "option",
value: ByteRepr.BIN_DELIM_OPTIONS
}
]
},
"To Binary": {
module: "Default",
description: "Displays the input data as a binary string.<br><br>e.g. <code>Hi</code> becomes <code>01001000 01101001</code>",
highlight: "func",
highlightReverse: "func",
inputType: "byteArray",
outputType: "string",
args: [
{
name: "Delimiter",
type: "option",
value: ByteRepr.BIN_DELIM_OPTIONS
}
]
},
"From Decimal": {
module: "Default",
description: "Converts the data from an ordinal integer array back into its raw form.<br><br>e.g. <code>72 101 108 108 111</code> becomes <code>Hello</code>",
inputType: "string",
outputType: "byteArray",
args: [
{
name: "Delimiter",
type: "option",
value: ByteRepr.DELIM_OPTIONS
}
]
},
"To Decimal": {
module: "Default",
description: "Converts the input data to an ordinal integer array.<br><br>e.g. <code>Hello</code> becomes <code>72 101 108 108 111</code>",
inputType: "byteArray",
outputType: "string",
args: [
{
name: "Delimiter",
type: "option",
value: ByteRepr.DELIM_OPTIONS
}
]
},
"From Hexdump": {
module: "Default",
description: "Attempts to convert a hexdump back into raw data. This operation supports many different hexdump variations, but probably not all. Make sure you verify that the data it gives you is correct before continuing analysis.",
highlight: "func",
highlightReverse: "func",
inputType: "string",
outputType: "byteArray",
args: []
},
"To Hexdump": {
module: "Default",
description: "Creates a hexdump of the input data, displaying both the hexadecimal values of each byte and an ASCII representation alongside.",
highlight: "func",
highlightReverse: "func",
inputType: "ArrayBuffer",
outputType: "string",
args: [
{
name: "Width",
type: "number",
value: Hexdump.WIDTH
},
{
name: "Upper case hex",
type: "boolean",
value: Hexdump.UPPER_CASE
},
{
name: "Include final length",
type: "boolean",
value: Hexdump.INCLUDE_FINAL_LENGTH
}
]
},
"From Base": {
module: "Default",
description: "Converts a number to decimal from a given numerical base.",
inputType: "string",
outputType: "BigNumber",
args: [
{
name: "Radix",
type: "number",
value: Base.DEFAULT_RADIX
}
]
},
"To Base": {
module: "Default",
description: "Converts a decimal number to a given numerical base.",
inputType: "BigNumber",
outputType: "string",
args: [
{
name: "Radix",
type: "number",
value: Base.DEFAULT_RADIX
}
]
},
"From HTML Entity": {
module: "Default",
description: "Converts HTML entities back to characters<br><br>e.g. <code>&<span>amp;</span></code> becomes <code>&</code>", // <span> tags required to stop the browser just printing &
inputType: "string",
outputType: "string",
args: []
},
"To HTML Entity": {
module: "Default",
description: "Converts characters to HTML entities<br><br>e.g. <code>&</code> becomes <code>&<span>amp;</span></code>", // <span> tags required to stop the browser just printing &
inputType: "string",
outputType: "string",
args: [
{
name: "Convert all characters",
type: "boolean",
value: HTML.CONVERT_ALL
},
{
name: "Convert to",
type: "option",
value: HTML.CONVERT_OPTIONS
}
]
},
"Strip HTML tags": {
module: "Default",
description: "Removes all HTML tags from the input.",
inputType: "string",
outputType: "string",
args: [
{
name: "Remove indentation",
type: "boolean",
value: HTML.REMOVE_INDENTATION
},
{
name: "Remove excess line breaks",
type: "boolean",
value: HTML.REMOVE_LINE_BREAKS
}
]
},
"URL Decode": {
module: "URL",
description: "Converts URI/URL percent-encoded characters back to their raw values.<br><br>e.g. <code>%3d</code> becomes <code>=</code>",
inputType: "string",
outputType: "string",
args: []
},
"URL Encode": {
module: "URL",
description: "Encodes problematic characters into percent-encoding, a format supported by URIs/URLs.<br><br>e.g. <code>=</code> becomes <code>%3d</code>",
inputType: "string",
outputType: "string",
args: [
{
name: "Encode all special chars",
type: "boolean",
value: URL_.ENCODE_ALL
}
]
},
"Parse URI": {
module: "URL",
description: "Pretty prints complicated Uniform Resource Identifier (URI) strings for ease of reading. Particularly useful for Uniform Resource Locators (URLs) with a lot of arguments.",
inputType: "string",
outputType: "string",
args: []
},
"Unescape Unicode Characters": {
module: "Default",
description: "Converts unicode-escaped character notation back into raw characters.<br><br>Supports the prefixes:<ul><li><code>\\u</code></li><li><code>%u</code></li><li><code>U+</code></li></ul>e.g. <code>\\u03c3\\u03bf\\u03c5</code> becomes <code>σου</code>",
inputType: "string",
outputType: "string",
args: [
{
name: "Prefix",
type: "option",
value: Unicode.PREFIXES
}
]
},
"Escape Unicode Characters": {
module: "Default",
description: "Converts characters to their unicode-escaped notations.<br><br>Supports the prefixes:<ul><li><code>\\u</code></li><li><code>%u</code></li><li><code>U+</code></li></ul>e.g. <code>σου</code> becomes <code>\\u03C3\\u03BF\\u03C5</code>",
inputType: "string",
outputType: "string",
args: [
{
name: "Prefix",
type: "option",
value: Unicode.PREFIXES
},
{
name: "Encode all chars",
type: "boolean",
value: false
},
{
name: "Padding",
type: "number",
value: 4
},
{
name: "Uppercase hex",
type: "boolean",
value: true
}
]
},
"From Quoted Printable": {
module: "Default",
description: "Converts QP-encoded text back to standard text.",
inputType: "string",
outputType: "byteArray",
args: []
},
"To Quoted Printable": {
module: "Default",
description: "Quoted-Printable, or QP encoding, is an encoding using printable ASCII characters (alphanumeric and the equals sign '=') to transmit 8-bit data over a 7-bit data path or, generally, over a medium which is not 8-bit clean. It is defined as a MIME content transfer encoding for use in e-mail.<br><br>QP works by using the equals sign '=' as an escape character. It also limits line length to 76, as some software has limits on line length.",
inputType: "byteArray",
outputType: "string",
args: []
},
"From Punycode": {
module: "Encodings",
description: "Punycode is a way to represent Unicode with the limited character subset of ASCII supported by the Domain Name System.<br><br>e.g. <code>mnchen-3ya</code> decodes to <code>münchen</code>",
inputType: "string",
outputType: "string",
args: [
{
name: "Internationalised domain name",
type: "boolean",
value: Punycode.IDN