cyberchef 9.39.2 → 9.39.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberchef",
3
- "version": "9.39.2",
3
+ "version": "9.39.3",
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",
@@ -5044,7 +5044,7 @@
5044
5044
  },
5045
5045
  "Extract Files": {
5046
5046
  "module": "Default",
5047
- "description": "Performs file carving to attempt to extract files from the input.<br><br>This operation is currently capable of carving out the following formats:\n <ul>\n <li>\n JPG,JPEG,JPE,THM,MPO</li><li>GIF</li><li>PNG</li><li>BMP</li><li>ICO</li><li>TGA</li><li>FLV</li><li>WAV</li><li>MP3</li><li>PDF</li><li>RTF</li><li>DOCX,XLSX,PPTX</li><li>EPUB</li><li>EXE,DLL,DRV,VXD,SYS,OCX,VBX,COM,FON,SCR</li><li>ELF,BIN,AXF,O,PRX,SO</li><li>DYLIB</li><li>ZIP</li><li>TAR</li><li>GZ</li><li>BZ2</li><li>ZLIB</li><li>XZ</li><li>JAR</li><li>LZOP,LZO</li><li>DEB</li><li>SQLITE</li><li>EVT</li><li>EVTX</li><li>DMP</li><li>PF</li><li>PLIST</li><li>KEYCHAIN</li><li>LNK\n </li>\n </ul>Minimum File Size can be used to prune small false positives.",
5047
+ "description": "Performs file carving to attempt to extract files from the input.<br><br>This operation is currently capable of carving out the following formats:\n <ul>\n <li>\n JPG,JPEG,JPE,THM,MPO</li><li>GIF</li><li>PNG</li><li>WEBP</li><li>BMP</li><li>ICO</li><li>TGA</li><li>FLV</li><li>WAV</li><li>MP3</li><li>PDF</li><li>RTF</li><li>DOCX,XLSX,PPTX</li><li>EPUB</li><li>EXE,DLL,DRV,VXD,SYS,OCX,VBX,COM,FON,SCR</li><li>ELF,BIN,AXF,O,PRX,SO</li><li>DYLIB</li><li>ZIP</li><li>TAR</li><li>GZ</li><li>BZ2</li><li>ZLIB</li><li>XZ</li><li>JAR</li><li>LZOP,LZO</li><li>DEB</li><li>SQLITE</li><li>EVT</li><li>EVTX</li><li>DMP</li><li>PF</li><li>PLIST</li><li>KEYCHAIN</li><li>LNK\n </li>\n </ul>Minimum File Size can be used to prune small false positives.",
5048
5048
  "infoURL": "https://forensicswiki.xyz/wiki/index.php?title=File_Carving",
5049
5049
  "inputType": "ArrayBuffer",
5050
5050
  "outputType": "html",
@@ -70,7 +70,7 @@ export const FILE_SIGNATURES = {
70
70
  10: 0x42,
71
71
  11: 0x50
72
72
  },
73
- extractor: null
73
+ extractor: extractWEBP
74
74
  },
75
75
  {
76
76
  name: "Camera Image File Format",
@@ -3032,6 +3032,30 @@ export function extractPNG(bytes, offset) {
3032
3032
  }
3033
3033
 
3034
3034
 
3035
+ /**
3036
+ * WEBP extractor.
3037
+ *
3038
+ * @param {Uint8Array} bytes
3039
+ * @param {number} offset
3040
+ * @returns {Uint8Array}
3041
+ */
3042
+ export function extractWEBP(bytes, offset) {
3043
+ const stream = new Stream(bytes.slice(offset));
3044
+
3045
+ // Move to file size offset.
3046
+ stream.moveForwardsBy(4);
3047
+
3048
+ // Read file size field.
3049
+ const fileSize = stream.readInt(4, "le");
3050
+
3051
+ // Move to end of file.
3052
+ // There is no need to minus 8 from the size as the size factors in the offset.
3053
+ stream.moveForwardsBy(fileSize);
3054
+
3055
+ return stream.carve();
3056
+ }
3057
+
3058
+
3035
3059
  /**
3036
3060
  * BMP extractor.
3037
3061
  *