cyberchef 9.38.9 → 9.39.0
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/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/src/core/config/Categories.json +2 -1
- package/src/core/config/OperationConfig.json +10 -0
- package/src/core/config/modules/Default.mjs +2 -0
- package/src/core/config/scripts/newMinorVersion.mjs +1 -1
- package/src/core/lib/Stream.mjs +4 -2
- package/src/core/operations/ELFInfo.mjs +913 -0
- package/src/core/operations/index.mjs +2 -0
- package/src/node/index.mjs +5 -0
- package/tests/operations/index.mjs +1 -0
- package/tests/operations/tests/ELFInfo.mjs +86 -0
- package/tests/samples/Executables.mjs +375 -0
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,9 @@ All major and minor version changes will be documented in this file. Details of
|
|
|
13
13
|
|
|
14
14
|
## Details
|
|
15
15
|
|
|
16
|
+
### [9.39.0] - 2022-06-09
|
|
17
|
+
- Added 'ELF Info' operation [@n1073645] | [#1364]
|
|
18
|
+
|
|
16
19
|
### [9.38.0] - 2022-05-30
|
|
17
20
|
- Added 'Parse TCP' operation [@n1474335] | [a895d1d]
|
|
18
21
|
|
|
@@ -291,6 +294,7 @@ All major and minor version changes will be documented in this file. Details of
|
|
|
291
294
|
|
|
292
295
|
|
|
293
296
|
|
|
297
|
+
[9.39.0]: https://github.com/gchq/CyberChef/releases/tag/v9.39.0
|
|
294
298
|
[9.38.0]: https://github.com/gchq/CyberChef/releases/tag/v9.38.0
|
|
295
299
|
[9.37.0]: https://github.com/gchq/CyberChef/releases/tag/v9.37.0
|
|
296
300
|
[9.36.0]: https://github.com/gchq/CyberChef/releases/tag/v9.36.0
|
|
@@ -508,3 +512,4 @@ All major and minor version changes will be documented in this file. Details of
|
|
|
508
512
|
[#1244]: https://github.com/gchq/CyberChef/pull/1244
|
|
509
513
|
[#1313]: https://github.com/gchq/CyberChef/pull/1313
|
|
510
514
|
[#1326]: https://github.com/gchq/CyberChef/pull/1326
|
|
515
|
+
[#1364]: https://github.com/gchq/CyberChef/pull/1364
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cyberchef",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.39.0",
|
|
4
4
|
"description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
|
|
5
5
|
"author": "n1474335 <n1474335@gmail.com>",
|
|
6
6
|
"homepage": "https://gchq.github.io/CyberChef",
|
|
@@ -4141,6 +4141,16 @@
|
|
|
4141
4141
|
}
|
|
4142
4142
|
]
|
|
4143
4143
|
},
|
|
4144
|
+
"ELF Info": {
|
|
4145
|
+
"module": "Default",
|
|
4146
|
+
"description": "Implements readelf-like functionality. This operation will extract the ELF Header, Program Headers, Section Headers and Symbol Table for an ELF file.",
|
|
4147
|
+
"infoURL": "https://www.wikipedia.org/wiki/Executable_and_Linkable_Format",
|
|
4148
|
+
"inputType": "ArrayBuffer",
|
|
4149
|
+
"outputType": "string",
|
|
4150
|
+
"flowControl": false,
|
|
4151
|
+
"manualBake": false,
|
|
4152
|
+
"args": []
|
|
4153
|
+
},
|
|
4144
4154
|
"Encode NetBIOS Name": {
|
|
4145
4155
|
"module": "Default",
|
|
4146
4156
|
"description": "NetBIOS names as seen across the client interface to NetBIOS are exactly 16 bytes long. Within the NetBIOS-over-TCP protocols, a longer representation is used.<br><br>There are two levels of encoding. The first level maps a NetBIOS name into a domain system name. The second level maps the domain system name into the 'compressed' representation required for interaction with the domain name system.<br><br>This operation carries out the first level of encoding. See RFC 1001 for full details.",
|
|
@@ -33,6 +33,7 @@ import DefangURL from "../../operations/DefangURL.mjs";
|
|
|
33
33
|
import DetectFileType from "../../operations/DetectFileType.mjs";
|
|
34
34
|
import Divide from "../../operations/Divide.mjs";
|
|
35
35
|
import DropBytes from "../../operations/DropBytes.mjs";
|
|
36
|
+
import ELFInfo from "../../operations/ELFInfo.mjs";
|
|
36
37
|
import EncodeNetBIOSName from "../../operations/EncodeNetBIOSName.mjs";
|
|
37
38
|
import EscapeString from "../../operations/EscapeString.mjs";
|
|
38
39
|
import EscapeUnicodeCharacters from "../../operations/EscapeUnicodeCharacters.mjs";
|
|
@@ -201,6 +202,7 @@ OpModules.Default = {
|
|
|
201
202
|
"Detect File Type": DetectFileType,
|
|
202
203
|
"Divide": Divide,
|
|
203
204
|
"Drop bytes": DropBytes,
|
|
205
|
+
"ELF Info": ELFInfo,
|
|
204
206
|
"Encode NetBIOS Name": EncodeNetBIOSName,
|
|
205
207
|
"Escape string": EscapeString,
|
|
206
208
|
"Escape Unicode Characters": EscapeUnicodeCharacters,
|
|
@@ -131,7 +131,7 @@ const getFeature = function() {
|
|
|
131
131
|
|
|
132
132
|
// PR IDs
|
|
133
133
|
prIDs.forEach(prID => {
|
|
134
|
-
changelogData = changelogData.replace(/(\n\[#[^\]]+\]: https:\/\/github.com\/gchq\/CyberChef\/pull\/[^\n]+\n)\n
|
|
134
|
+
changelogData = changelogData.replace(/(\n\[#[^\]]+\]: https:\/\/github.com\/gchq\/CyberChef\/pull\/[^\n]+\n)\n*$/, "$1" + prID + "\n\n");
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
fs.writeFileSync(path.join(process.cwd(), "CHANGELOG.md"), changelogData);
|
package/src/core/lib/Stream.mjs
CHANGED
|
@@ -48,12 +48,14 @@ export default class Stream {
|
|
|
48
48
|
* Interpret the following bytes as a string, stopping at the next null byte or
|
|
49
49
|
* the supplied limit.
|
|
50
50
|
*
|
|
51
|
-
* @param {number} numBytes
|
|
51
|
+
* @param {number} [numBytes=-1]
|
|
52
52
|
* @returns {string}
|
|
53
53
|
*/
|
|
54
|
-
readString(numBytes) {
|
|
54
|
+
readString(numBytes=-1) {
|
|
55
55
|
if (this.position > this.length) return undefined;
|
|
56
56
|
|
|
57
|
+
if (numBytes === -1) numBytes = this.length - this.position;
|
|
58
|
+
|
|
57
59
|
let result = "";
|
|
58
60
|
for (let i = this.position; i < this.position + numBytes; i++) {
|
|
59
61
|
const currentByte = this.bytes[i];
|