diff --git a/README.md b/README.md index 8462711..5874b3c 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Pick the file for your computer from the **[latest release](https://github.com/s - **Scan soon.** The longer the drive is used, the more deleted data gets overwritten. - **Names may change.** Reclaim finds files by their contents, so most come back with new names like `Image 0001.jpg` and without their original folders. Open them to see what they are. - **Some files may be damaged or incomplete**, even if they appear in the list. Check them before relying on them. -- **Large files:** most file types are limited to 64 MiB, so very large videos or archives may not come back. +- **Large files:** WAV, RF64, BW64, AVI, MKV, WebM, AIFF, AIFC, AU, Ogg, SQLite, TAR, 7z, and supported classic ZIP files can exceed 64 MiB. Other formats that require whole-file buffering may still hit that limit. - **Results are not saved** when you close Reclaim. Recover what you need first. - **No deletion dates.** Reclaim can't tell when a file was deleted. - **Works with the keyboard.** In the results, press Tab to reach the list, use the arrow keys to move between files, Space to tick one and Enter to see its details. Reclaim also follows your system's reduce-motion setting. @@ -89,7 +89,7 @@ Pick the file for your computer from the **[latest release](https://github.com/s | Documents and ebooks | PDF, Word, Excel, PowerPoint, OpenDocument, EPUB | | Archives | ZIP, 7z, RAR5, CAB, TAR, GZIP, XAR, JAR, APK | | Programs and installers | EXE, DLL, ELF, MSI, DEB, RPM, DEX, PKG | -| Audio and video | WAV, AIFF, AU, MIDI, AVI, Ogg Vorbis, Opus, Theora, Flash (SWF) | +| Audio and video | WAV, RF64, BW64, AIFF, AU, MIDI, AVI, MKV, WebM, Ogg Vorbis, Opus, Theora, Flash (SWF) | | Databases | SQLite | Common video formats such as MP4 and MOV can't be found yet. Technical details are in the [format report](docs/FILE_FORMAT_RESEARCH.md). diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 138ec75..dc57b1d 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -75,9 +75,10 @@ See [file-format research and coverage](FILE_FORMAT_RESEARCH.md) for primary sou Reclaim is not a complete filesystem recovery suite. A signature match does not establish that a file was deleted or that all its contents are usable. Overwritten or TRIM-erased data cannot be reconstructed by the scanner. -- Most candidates are limited to 64 MiB each. Carving streams results without a fixed result count. Classic ZIP archives with known local entry sizes can exceed 64 MiB (up to the classic ZIP offset range) using bounded-memory directory checks; large ZIP-based packages are reported as ZIP. ZIP entry payloads are not decompressed or CRC-verified. Captured NTFS resident data has a separate 64 MiB memory budget. +- Whole-file carving probes are capped at 64 MiB. WAV, AVI, AIFF, AIFC and AU can exceed that threshold using declared lengths. SQLite checks page one, TAR checks entry headers, 7z checks its start and next-header CRCs, and Ogg checks one page at a time. These paths use bounded memory during scanning and export. Carving streams results without a fixed result count. Classic ZIP archives with known local entry sizes can exceed 64 MiB (up to the classic ZIP offset range) using bounded-memory directory checks; large ZIP-based packages are reported as ZIP. ZIP entry payloads are not decompressed or CRC-verified. Captured NTFS resident data has a separate 64 MiB memory budget. - Original folder reconstruction, restoring timestamps, fragmented-file reconstruction, and APFS allocation maps are not implemented. NTFS runlists are read for the MFT/$Bitmap allocation map only, not general deleted-file reconstruction. Split NTFS attributes needing ATTRIBUTE_LIST extents and whole-disk MBR/GPT sources are rejected; select a formatted volume instead. - `scan_unused_reader` is the desktop entry point. `scan_reader` remains a full-source API for tests and explicit lower-level use. Deleted resident NTFS recovery inside allocated MFT clusters is excluded from the desktop unused-space mode. +- MKV and WebM carving requires one finite EBML segment containing Info, Tracks, and a Cluster. RF64 and BW64 carving follows the 64-bit size fields in a table-free `ds64` chunk. These probes check container framing and skip payload decoding. - ZIP64/multipart archives, ZIP archives over 64 MiB that require data descriptors, unknown-length AU streams, and multi-segment OpenDML AVI are unsupported. - Mounted or changing sources can produce inconsistent results. For repeatable work, scan a raw disk image. - Language preference persists; appearance choices and scan results are session-local. diff --git a/docs/FILE_FORMAT_RESEARCH.md b/docs/FILE_FORMAT_RESEARCH.md index 7b817c8..fb670b6 100644 --- a/docs/FILE_FORMAT_RESEARCH.md +++ b/docs/FILE_FORMAT_RESEARCH.md @@ -80,10 +80,20 @@ and content independently of signature carving. - `tests/new_formats.rs` verifies cross-block carving, exact exports, truncation, mutated headers, short reads, cancellation, checksum rejection, neighbouring GZIP members, XAR DTD rejection, and bounded work for common MZ noise. -- Probes retain the existing 64 MiB candidate limit; the earlier bounded-memory - large-classic-ZIP path is separate. Loops, table counts, inflated output and XML +- Whole-file probes retain a 64 MiB candidate limit. The bounded-memory paths + for WAV, RF64, BW64, AVI, MKV, WebM, AIFF, AIFC, AU, Ogg, SQLite, TAR, 7z + and supported classic ZIP + can discover and export larger files. Loops, table counts, inflated output and XML depth have limits. These bounds do not establish a wall-clock deadline for a blocked drive read. +- MKV and WebM use finite EBML segment lengths and verify top-level element + framing, including Info, Tracks, and Cluster. + [EBML](https://www.rfc-editor.org/rfc/rfc8794.html) and + [Matroska](https://www.rfc-editor.org/rfc/rfc9559.html). +- RF64 and BW64 require a table-free `ds64` chunk and use its 64-bit lengths + to walk aligned WAVE chunks. + [EBU Tech 3306](https://tech.ebu.ch/docs/tech/tech3306v1_1.pdf) and + [ITU-R BS.2088](https://www.itu.int/dms_pubrec/itu-r/rec/bs/R-REC-BS.2088-2-202511-I%21%21PDF-E.pdf). - Header buckets are built from the signature table at compile time. Most bytes need no signature comparisons. Impossible MZ pointers are rejected from the streaming scan buffer before extra I/O. GZIP uses a persistent decoder so each diff --git a/src/detection.rs b/src/detection.rs index 0b4b84c..dcb252a 100644 --- a/src/detection.rs +++ b/src/detection.rs @@ -24,12 +24,20 @@ use std::{ }; pub(crate) fn sqlite_end(bytes: &[u8]) -> CandidateEnd { - use CandidateEnd::{Complete, Invalid, More}; + match sqlite_size(bytes) { + Ok(size) if size <= bytes.len() as u64 => CandidateEnd::Complete(to_usize(size)), + Ok(_) => CandidateEnd::More, + Err(state) => state, + } +} + +pub(crate) fn sqlite_size(bytes: &[u8]) -> Result { + use CandidateEnd::{Invalid, More}; if bytes.len() < 100 { - return More; + return Err(More); } if !bytes.starts_with(b"SQLite format 3\0") { - return Invalid; + return Err(Invalid); } let short = |p| u16::from_be_bytes([bytes[p], bytes[p + 1]]) as usize; let long = |p| crate::bytes::u32_be(bytes, p); @@ -56,23 +64,17 @@ pub(crate) fn sqlite_end(bytes: &[u8]) -> CandidateEnd { || long(36) >= pages || long(52) > pages { - return Invalid; + return Err(Invalid); } - let Some(size) = u64::from(pages) - .checked_mul(page as u64) - .filter(|n| *n <= LIMIT as u64) - else { - return Invalid; - }; if bytes.len() < 108 { - return More; + return Err(More); } // Page one contains the sqlite_schema table, so its root must be a table // b-tree. Check its cell directory before accepting the declared file size. let header = match bytes[100] { 5 => 12, 13 => 8, - _ => return Invalid, + _ => return Err(Invalid), }; let usable = page - usize::from(bytes[20]); let cells_end = 100 + header + short(103) * 2; @@ -86,25 +88,21 @@ pub(crate) fn sqlite_end(bytes: &[u8]) -> CandidateEnd { || bytes[107] > 60 || (free != 0 && (free < cells_end || free + 4 > usable)) { - return Invalid; + return Err(Invalid); } if bytes.len() < page { - return More; + return Err(More); } if header == 12 && (long(108) == 0 || long(108) > pages) { - return Invalid; + return Err(Invalid); } for at in (100 + header..cells_end).step_by(2) { let cell = short(at); if cell < content || cell >= usable { - return Invalid; + return Err(Invalid); } } - if bytes.len() < to_usize(size) { - More - } else { - Complete(to_usize(size)) - } + Ok(u64::from(pages) * page as u64) } const fn crc_table() -> [u32; 256] { @@ -154,6 +152,11 @@ impl Ogg { } } + pub(crate) fn push_page(&mut self, page: &[u8], cancel: &AtomicBool) -> CandidateEnd { + self.cursor = 0; + self.push(page, cancel) + } + pub(crate) fn push(&mut self, bytes: &[u8], cancel: &AtomicBool) -> CandidateEnd { use CandidateEnd::{Complete, Invalid, More}; loop { diff --git a/src/formats.rs b/src/formats.rs index 678fcf3..3b4d04e 100644 --- a/src/formats.rs +++ b/src/formats.rs @@ -339,12 +339,16 @@ fn elf(b: &[u8]) -> Probe { Ok(end) } +pub(crate) fn seven_header_valid(b: &[u8]) -> bool { + b.len() >= 32 + && b.starts_with(b"7z\xbc\xaf\x27\x1c") + && b[6] == 0 + && crc32fast::hash(&b[12..32]) == crate::bytes::u32_le(b, 8) +} + fn seven(b: &[u8]) -> Probe { need(b, 32)?; - if !b.starts_with(b"7z\xbc\xaf\x27\x1c") - || b[6] != 0 - || crc32fast::hash(&b[12..32]) != crate::bytes::u32_le(b, 8) - { + if !seven_header_valid(b) { return Err(CandidateEnd::Invalid); } let start = span(32, le64(b, 12))?; diff --git a/src/large.rs b/src/large.rs new file mode 100644 index 0000000..a380d4e --- /dev/null +++ b/src/large.rs @@ -0,0 +1,267 @@ +//! Seek-based probes for formats with reliable boundaries independent of payload size. +use crate::{LIMIT, Validation, bytes, declared_size, detection, formats, read_chunk}; +use std::{ + io::{self, Read, Seek, SeekFrom}, + sync::atomic::AtomicBool, +}; + +mod containers; + +pub(crate) struct Candidate { + pub size: u64, + pub kind: &'static str, + pub validation: Validation, +} + +pub(crate) fn supports(kind: &str) -> bool { + seek_only(kind) || matches!(kind, "riff" | "aiff" | "au" | "sqlite" | "tar" | "7z") +} + +pub(crate) fn supports_result(kind: &str) -> bool { + kind != "ebml" + && (seek_only(kind) + || matches!( + kind, + "wav" | "avi" | "aiff" | "aifc" | "au" | "sqlite" | "tar" | "7z" + )) +} + +pub(crate) fn seek_only(kind: &str) -> bool { + matches!( + kind, + "ogg" | "opus" | "ogv" | "ebml" | "mkv" | "webm" | "rf64" | "bw64" + ) +} + +pub(crate) fn inspect( + input: &mut (impl Read + Seek), + start: u64, + kind: &str, + cancel: &AtomicBool, +) -> io::Result> { + let (size, kind, validation) = match kind { + "riff" | "wav" | "avi" | "aiff" | "aifc" | "au" => { + let mut header = [0; 24]; + if !read_at(input, start, &mut header, cancel)? { + return Ok(None); + } + let (base, kind) = match (header.get(..4), header.get(8..12)) { + (Some(b"RIFF"), Some(b"WAVE")) => ("riff", "wav"), + (Some(b"RIFF"), Some(b"AVI ")) => ("riff", "avi"), + (Some(b"FORM"), Some(b"AIFF")) => ("aiff", "aiff"), + (Some(b"FORM"), Some(b"AIFC")) => ("aiff", "aifc"), + (Some(b".snd"), _) => ("au", "au"), + _ => return Ok(None), + }; + let Ok(size) = declared_size(base, &header) else { + return Ok(None); + }; + (size, kind, Validation::Unverified) + } + "sqlite" => { + let mut header = vec![0; 65536]; + if !read_at(input, start, &mut header, cancel)? { + return Ok(None); + } + let Ok(size) = detection::sqlite_size(&header) else { + return Ok(None); + }; + (size, "sqlite", Validation::StructureChecked) + } + "ogg" | "opus" | "ogv" => { + return ogg(input, start, cancel); + } + "ebml" | "mkv" | "webm" => { + let Some((size, kind)) = containers::matroska(input, start, cancel)? else { + return Ok(None); + }; + (size, kind, Validation::StructureChecked) + } + "rf64" | "bw64" => { + let Some((size, kind)) = containers::wave64(input, start, cancel)? else { + return Ok(None); + }; + (size, kind, Validation::StructureChecked) + } + "tar" => { + let Some(size) = tar(input, start, cancel)? else { + return Ok(None); + }; + (size, "tar", Validation::StructureChecked) + } + "7z" => { + let Some(size) = seven(input, start, cancel)? else { + return Ok(None); + }; + (size, "7z", Validation::StructureChecked) + } + _ => return Ok(None), + }; + let Some(last) = start.checked_add(size).and_then(|end| end.checked_sub(1)) else { + return Ok(None); + }; + if (!seek_only(kind) && size <= LIMIT as u64) || !read_at(input, last, &mut [0], cancel)? { + return Ok(None); + } + Ok(Some(Candidate { + size, + kind, + validation, + })) +} + +fn read_at( + input: &mut (impl Read + Seek), + offset: u64, + buffer: &mut [u8], + cancel: &AtomicBool, +) -> io::Result { + // Out-of-range seeks may fail on devices that reject seeks beyond EOF. + match input.seek(SeekFrom::Start(offset)) { + Err(error) if error.kind() == io::ErrorKind::InvalidInput => return Ok(false), + Err(error) => return Err(error), + Ok(_) => {} + } + read_full(input, buffer, cancel) +} + +fn read_full( + input: &mut impl Read, + mut buffer: &mut [u8], + cancel: &AtomicBool, +) -> io::Result { + while !buffer.is_empty() { + let count = read_chunk(input, buffer, cancel)?; + if count == 0 { + return Ok(false); + } + let Some(remaining) = buffer.get_mut(count..) else { + return Err(io::Error::other("Reader returned an invalid byte count")); + }; + buffer = remaining; + } + Ok(true) +} + +fn tar(input: &mut (impl Read + Seek), start: u64, cancel: &AtomicBool) -> io::Result> { + let mut offset = start; + let mut header = [0; formats::TAR_HEADER_SIZE]; + for entries in 0..100_000 { + if !read_at(input, offset, &mut header, cancel)? { + break; + } + if header == [0; formats::TAR_HEADER_SIZE] { + if entries > 0 + && let Some(end) = offset.checked_add(1024) + && end - start > LIMIT as u64 + && read_at(input, end - 512, &mut header, cancel)? + && header == [0; formats::TAR_HEADER_SIZE] + { + return Ok(Some(end - start)); + } + break; + } + let Some(size) = formats::tar_entry_size(&header) else { + break; + }; + let Some(next) = (size as u64) + .checked_next_multiple_of(512) + .and_then(|padded| padded.checked_add(512)) + .and_then(|span| offset.checked_add(span)) + else { + break; + }; + offset = next; + } + Ok(None) +} + +fn seven( + input: &mut (impl Read + Seek), + start: u64, + cancel: &AtomicBool, +) -> io::Result> { + let mut head = [0; 32]; + if !read_at(input, start, &mut head, cancel)? || !formats::seven_header_valid(&head) { + return Ok(None); + } + let length = bytes::u64_le(&head, 20); + let Some((next, end)) = bytes::u64_le(&head, 12) + .checked_add(32) + .and_then(|next| next.checked_add(length).map(|end| (next, end))) + else { + return Ok(None); + }; + if end <= LIMIT as u64 || length == 0 || start.checked_add(end).is_none() { + return Ok(None); + } + let mut crc = crc32fast::Hasher::new(); + let mut chunk = vec![0; 32768]; + let mut at = next; + while at < end { + let count = bytes::to_usize((end - at).min(chunk.len() as u64)); + let Some(block) = chunk.get_mut(..count) else { + return Ok(None); + }; + if !read_at(input, start + at, block, cancel)? + || (at == next && !matches!(block.first(), Some(1 | 0x17))) + { + return Ok(None); + } + crc.update(block); + at += count as u64; + } + Ok((crc.finalize() == bytes::u32_le(&head, 28)).then_some(end)) +} + +fn ogg( + input: &mut (impl Read + Seek), + start: u64, + cancel: &AtomicBool, +) -> io::Result> { + let mut ogg = detection::Ogg::default(); + // One maximum-size page: fixed header, lacing table and packet data. + let mut page = vec![0; 27 + 255 + 255 * 255]; + input.seek(SeekFrom::Start(start))?; + let mut offset = start; + loop { + let Some((header, body)) = page.split_at_mut_checked(27) else { + return Ok(None); + }; + if !read_full(input, header, cancel)? || !header.starts_with(b"OggS") { + return Ok(None); + } + let Some(&segments) = header.last() else { + return Ok(None); + }; + let Some((lacing, payload)) = body.split_at_mut_checked(usize::from(segments)) else { + return Ok(None); + }; + if !read_full(input, lacing, cancel)? { + return Ok(None); + } + let size = lacing.iter().map(|&n| usize::from(n)).sum::(); + let end = header.len() + lacing.len() + size; + let Some((next, payload)) = offset.checked_add(end as u64).zip(payload.get_mut(..size)) + else { + return Ok(None); + }; + if !read_full(input, payload, cancel)? { + return Ok(None); + } + let Some(current_page) = page.get(..end) else { + return Ok(None); + }; + match ogg.push_page(current_page, cancel) { + crate::CandidateEnd::Invalid => return Ok(None), + crate::CandidateEnd::More => offset = next, + crate::CandidateEnd::Complete(_) => { + return Ok(Some(Candidate { + size: next - start, + kind: ogg.kind(), + validation: Validation::StructureChecked, + })); + } + } + } +} diff --git a/src/large/containers.rs b/src/large/containers.rs new file mode 100644 index 0000000..7c42452 --- /dev/null +++ b/src/large/containers.rs @@ -0,0 +1,199 @@ +//! Boundary checks for finite EBML segments and table-free RF64/BW64 WAVE files. +use super::read_at; +use crate::bytes; +use std::{ + io::{self, Read, Seek}, + sync::atomic::AtomicBool, +}; + +struct Element { + id: u32, + data: u64, + end: u64, +} + +// RFC 8794 §§4–6. Keep the marker in IDs and strip it from sizes. +fn vint(raw: &[u8], max: usize, id: bool) -> Option<(usize, u64)> { + let first = *raw.first()?; + let width = first.leading_zeros() as usize + 1; + if width > max { + return None; + } + let (first, rest) = raw.get(..width)?.split_first()?; + let marker = 0x80 >> (width - 1); + let value = if id { *first } else { *first & (marker - 1) }; + let value = rest.iter().fold(u64::from(value), |value, &byte| { + (value << 8) | u64::from(byte) + }); + (id || value != (1u64 << (7 * width)) - 1).then_some((width, value)) +} + +fn element( + input: &mut (impl Read + Seek), + at: u64, + limit: u64, + cancel: &AtomicBool, +) -> io::Result> { + let mut header = [0; 12]; + let length = bytes::to_usize(limit.saturating_sub(at).min(header.len() as u64)); + let Some(header) = header.get_mut(..length) else { + return Ok(None); + }; + if !read_at(input, at, header, cancel)? { + return Ok(None); + } + let Some((id_width, id)) = vint(header, 4, true) else { + return Ok(None); + }; + let Some((size_width, size)) = header.get(id_width..).and_then(|raw| vint(raw, 8, false)) + else { + return Ok(None); + }; + let Some(data) = at.checked_add((id_width + size_width) as u64) else { + return Ok(None); + }; + let Some(end) = data.checked_add(size).filter(|end| *end <= limit) else { + return Ok(None); + }; + Ok(Some(Element { + id: u32::try_from(id).unwrap_or_default(), + data, + end, + })) +} + +pub(super) fn matroska( + input: &mut (impl Read + Seek), + start: u64, + cancel: &AtomicBool, +) -> io::Result> { + let Some(header) = element(input, start, u64::MAX, cancel)? else { + return Ok(None); + }; + if header.id != 0x1a45_dfa3 || header.end - header.data > 4096 { + return Ok(None); + } + let mut at = header.data; + let mut kind = None; + while at < header.end { + let Some(child) = element(input, at, header.end, cancel)? else { + return Ok(None); + }; + if child.id == 0x4282 { + if kind.is_some() { + return Ok(None); + } + let mut name = [0; 8]; + let Some(name) = name.get_mut(..bytes::to_usize(child.end - child.data)) else { + return Ok(None); + }; + if !read_at(input, child.data, name, cancel)? { + return Ok(None); + } + kind = match &*name { + b"matroska" => Some("mkv"), + b"webm" => Some("webm"), + _ => return Ok(None), + }; + } + at = child.end; + } + let Some(kind) = kind else { + return Ok(None); + }; + let Some(segment) = element(input, at, u64::MAX, cancel)? else { + return Ok(None); + }; + if segment.id != 0x1853_8067 { + return Ok(None); + } + + // Require actual media framing before skipping payloads on the main scan. + at = segment.data; + let mut seen = 0; + for _ in 0..1_000_000 { + if at == segment.end { + return Ok((seen == 7).then_some((at - start, kind))); + } + let Some(child) = element(input, at, segment.end, cancel)? else { + break; + }; + if child.data < child.end { + seen |= match child.id { + 0x1549_a966 => 1, // Info + 0x1654_ae6b => 2, // Tracks + 0x1f43_b675 => 4, // Cluster + _ => 0, + }; + } + at = child.end; + } + Ok(None) +} + +pub(super) fn wave64( + input: &mut (impl Read + Seek), + start: u64, + cancel: &AtomicBool, +) -> io::Result> { + let mut header = [0; 48]; + if !read_at(input, start, &mut header, cancel)? + || header.get(4..16) != Some(b"\xff\xff\xff\xffWAVEds64") + || bytes::u32_le(&header, 16) != 28 + || bytes::u32_le(&header, 44) != 0 + { + return Ok(None); + } + + let kind = match header.get(..4) { + Some(b"RF64") => "rf64", + Some(b"BW64") => "bw64", + _ => return Ok(None), + }; + + // EBU Tech 3306 and ITU-R BS.2088. ds64 replaces the RIFF and data size sentinels. + let size = bytes::u64_le(&header, 20); + let data_size = bytes::u64_le(&header, 28); + let Some(end) = start.checked_add(8).and_then(|at| at.checked_add(size)) else { + return Ok(None); + }; + let Some(mut at) = start.checked_add(48) else { + return Ok(None); + }; + let mut format_seen = false; + let mut data_seen = false; + let mut chunk = [0; 8]; + for _ in 0..100_000 { + if at == end { + return Ok((format_seen && data_seen).then_some((end - start, kind))); + } + let Some(body) = at.checked_add(8).filter(|body| *body <= end) else { + break; + }; + if !read_at(input, at, &mut chunk, cancel)? { + break; + } + let length = bytes::u32_le(&chunk, 4); + let length = match (chunk.get(..4), length) { + (Some(b"data"), u32::MAX) if format_seen && !data_seen && data_size != 0 => { + data_seen = true; + data_size + } + (Some(b"data"), _) | (_, u32::MAX) => break, + (Some(b"fmt "), length) if length >= 16 && !format_seen => { + format_seen = true; + u64::from(length) + } + (Some(b"fmt "), _) => break, + (_, length) => u64::from(length), + }; + let Some(next) = length + .checked_next_multiple_of(2) + .and_then(|padded| body.checked_add(padded)) + else { + break; + }; + at = next; + } + Ok(None) +} diff --git a/src/lib.rs b/src/lib.rs index 4ed8eeb..9ffb226 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,7 @@ mod allocation; mod bytes; mod detection; mod formats; +mod large; use detection::{CandidateEnd, LIMIT}; pub mod i18n; mod ntfs; @@ -39,7 +40,8 @@ pub fn category_index(kind: &str) -> usize { "pdf" | "docx" | "xlsx" | "pptx" | "docm" | "xlsm" | "pptm" | "odt" | "ods" | "odp" | "epub" | "ole" | "txt" | "csv" | "json" | "xml" | "md" | "html" | "log" | "sqlite" => 2, "zip" | "7z" | "cab" | "rar" | "tar" | "gz" | "xar" => 3, - "wav" | "aiff" | "aifc" | "au" | "mp3" | "ogg" | "opus" | "mid" | "m4a" => 4, + "wav" | "rf64" | "bw64" | "aiff" | "aifc" | "au" | "mp3" | "ogg" | "opus" | "mid" + | "m4a" => 4, "avi" | "mp4" | "ogv" | "mov" | "3gp" | "mkv" | "webm" => 5, "jar" | "apk" | "exe" | "dll" | "elf" | "msi" | "msp" | "mst" | "deb" | "rpm" | "dex" | "pkg" | "swf" => 6, @@ -179,6 +181,21 @@ struct Format { ext: &'static str, } static FORMATS: &[Format] = &[ + Format { + head: b"\x1a\x45\xdf\xa3", + tail: b"", + ext: "ebml", + }, + Format { + head: b"RF64", + tail: b"", + ext: "rf64", + }, + Format { + head: b"BW64", + tail: b"", + ext: "bw64", + }, Format { head: b"MThd", tail: b"", @@ -362,66 +379,9 @@ fn candidate_end(fmt: &Format, bytes: &[u8], from: usize, cancel: &AtomicBool) - _ => {} } if fmt.tail.is_empty() { - let size = match fmt.ext { - "riff" | "aiff" => { - if bytes.len() < 12 { - return CandidateEnd::More; - } - let kind = &bytes[8..12]; - let n = if fmt.ext == "riff" { - if !matches!(kind, b"WAVE" | b"WEBP" | b"AVI ") { - return CandidateEnd::Invalid; - } - bytes::u32_le(bytes, 4) - } else { - if !matches!(kind, b"AIFF" | b"AIFC") { - return CandidateEnd::Invalid; - } - bytes::u32_be(bytes, 4) - }; - if n < 4 { - return CandidateEnd::Invalid; - } - u64::from(n) + 8 - } - "au" => { - if bytes.len() < 24 { - return CandidateEnd::More; - } - let read = |i| bytes::u32_be(bytes, i); - let (offset, data) = (read(4), read(8)); - // Unknown-length AU streams cannot be bounded reliably in a disk image. - if offset < 24 || data == u32::MAX || data == 0 || read(16) == 0 || read(20) == 0 { - return CandidateEnd::Invalid; - } - u64::from(offset) + u64::from(data) - } - "bmp" => { - if bytes.len() < 14 { - return CandidateEnd::More; - } - if bytes[6..10] != [0; 4] { - return CandidateEnd::Invalid; - } - let n = bytes::u32_le(bytes, 2); - if n < 14 { - return CandidateEnd::Invalid; - } - if bytes.len() < 18 { - return CandidateEnd::More; - } - let dib = bytes::u32_le(bytes, 14); - let pixel_offset = bytes::u32_le(bytes, 10); - if !matches!(dib, 12 | 40 | 52 | 56 | 64 | 108 | 124) - || u64::from(dib) + 14 > u64::from(n) - || u64::from(pixel_offset) < u64::from(dib) + 14 - || pixel_offset >= n - { - return CandidateEnd::Invalid; - } - u64::from(n) - } - _ => return CandidateEnd::Invalid, + let size = match declared_size(fmt.ext, bytes) { + Ok(size) => size, + Err(state) => return state, }; if size > LIMIT as u64 { return CandidateEnd::Invalid; @@ -463,6 +423,71 @@ fn candidate_end(fmt: &Format, bytes: &[u8], from: usize, cancel: &AtomicBool) - CandidateEnd::More } +fn declared_size(kind: &str, bytes: &[u8]) -> Result { + let size = match kind { + "riff" | "aiff" => { + if bytes.len() < 12 { + return Err(CandidateEnd::More); + } + let form = &bytes[8..12]; + let n = if kind == "riff" { + if !matches!(form, b"WAVE" | b"WEBP" | b"AVI ") { + return Err(CandidateEnd::Invalid); + } + bytes::u32_le(bytes, 4) + } else { + if !matches!(form, b"AIFF" | b"AIFC") { + return Err(CandidateEnd::Invalid); + } + bytes::u32_be(bytes, 4) + }; + if n < 4 { + return Err(CandidateEnd::Invalid); + } + u64::from(n) + 8 + } + "au" => { + if bytes.len() < 24 { + return Err(CandidateEnd::More); + } + let read = |i| bytes::u32_be(bytes, i); + let (offset, data) = (read(4), read(8)); + // Unknown-length AU streams cannot be bounded reliably in a disk image. + if offset < 24 || data == u32::MAX || data == 0 || read(16) == 0 || read(20) == 0 { + return Err(CandidateEnd::Invalid); + } + u64::from(offset) + u64::from(data) + } + "bmp" => { + if bytes.len() < 14 { + return Err(CandidateEnd::More); + } + if bytes[6..10] != [0; 4] { + return Err(CandidateEnd::Invalid); + } + let n = bytes::u32_le(bytes, 2); + if n < 14 { + return Err(CandidateEnd::Invalid); + } + if bytes.len() < 18 { + return Err(CandidateEnd::More); + } + let dib = bytes::u32_le(bytes, 14); + let pixel_offset = bytes::u32_le(bytes, 10); + if !matches!(dib, 12 | 40 | 52 | 56 | 64 | 108 | 124) + || u64::from(dib) + 14 > u64::from(n) + || u64::from(pixel_offset) < u64::from(dib) + 14 + || pixel_offset >= n + { + return Err(CandidateEnd::Invalid); + } + u64::from(n) + } + _ => return Err(CandidateEnd::Invalid), + }; + Ok(size) +} + /// What follows a PDF `%%EOF`. #[derive(Debug, PartialEq, Eq)] enum PdfAfterEof { @@ -759,6 +784,7 @@ pub(crate) fn same_format_family(kind: &str, detected: &str) -> bool { "mov" | "3gp" | "m4a" => "mp4", "webm" => "mkv", "aifc" => "aiff", + "rf64" | "bw64" => "wav", "msi" | "msp" | "mst" | "ole" => "cfb", other => other, } @@ -1004,14 +1030,13 @@ pub(crate) fn scan_reader_with_filter( let position = file.stream_position()?; file.seek(SeekFrom::Start(offset))?; let mut candidate = Vec::new(); - let mut ogg = detection::Ogg::default(); let mut gzip = formats::Gzip::default(); let mut pdf = PdfScan::default(); let mut end = None; let mut kind = fmt.ext; let mut checked = Validation::Unverified; let mut chunk = vec![0u8; 8192]; - let mut rejected_zip = false; + let mut rejected = false; let mut candidate_limit = LIMIT; if fmt.ext == "zip" { event(Event::Checking { @@ -1021,16 +1046,25 @@ pub(crate) fn scan_reader_with_filter( }); match zip::inspect(file, offset, cancel)? { zip::Inspection::Complete(size) if size > LIMIT as u64 => { - end = Some(to_usize(size)); + end = Some(size); checked = Validation::StructureChecked; } zip::Inspection::Complete(size) => candidate_limit = to_usize(size), - zip::Inspection::Invalid => rejected_zip = true, + zip::Inspection::Invalid => rejected = true, zip::Inspection::Unsupported => {} } file.seek(SeekFrom::Start(offset))?; } - while !rejected_zip + if large::supports(fmt.ext) { + if let Some(result) = large::inspect(file, offset, fmt.ext, cancel)? { + end = Some(result.size); + kind = result.kind; + checked = result.validation; + } + rejected |= large::seek_only(fmt.ext); + file.seek(SeekFrom::Start(offset))?; + } + while !rejected && end.is_none() && candidate.len() < candidate_limit && !cancel.load(Ordering::Relaxed) @@ -1063,8 +1097,6 @@ pub(crate) fn scan_reader_with_filter( } Err(state) => state, } - } else if fmt.ext == "ogg" { - ogg.push(&candidate, cancel) } else if fmt.ext == "gz" { gzip.push(&candidate, cancel) } else { @@ -1072,13 +1104,8 @@ pub(crate) fn scan_reader_with_filter( }; match boundary { CandidateEnd::Complete(size) => { - kind = xar_kind.unwrap_or_else(|| { - if fmt.ext == "ogg" { - ogg.kind() - } else { - candidate_kind(fmt, &candidate[..size]) - } - }); + kind = + xar_kind.unwrap_or_else(|| candidate_kind(fmt, &candidate[..size])); event(Event::Checking { offset, kind, @@ -1092,7 +1119,7 @@ pub(crate) fn scan_reader_with_filter( }; if let Some(validation) = validation { checked = validation; - end = Some(size); + end = Some(size as u64); } break; } @@ -1115,18 +1142,18 @@ pub(crate) fn scan_reader_with_filter( next_format = Some(&TAR_FORMAT); } if let Some(size) = end - && readable(offset, size as u64) + && readable(offset, size) { if matches!( checked, Validation::ImageDecoded | Validation::StructureChecked ) || fmt.ext == "zip" { - skip_until = offset + size as u64; + skip_until = offset + size; } event(Event::Found(Found { offset, - size: size as u64, + size, kind, selected: true, validation: checked, @@ -1295,7 +1322,8 @@ fn stage_recovery( if (found.size == 0 && found.resident_data.is_none()) || (found.size > LIMIT as u64 && found.extents.is_none() - && !(found.kind == "zip" && found.size <= u64::from(u32::MAX) + 65557)) + && !(found.kind == "zip" && found.size <= u64::from(u32::MAX) + 65557) + && !large::supports_result(found.kind)) || found .resident_data .as_ref() @@ -1323,7 +1351,23 @@ fn stage_recovery( "Source changed or candidate is truncated", )); } - if found.extents.is_some() + if (found.size > LIMIT as u64 || large::seek_only(found.kind)) + && large::supports_result(found.kind) + && (found.extents.is_none() || matches!(found.validation, Validation::StructureChecked)) + { + let cancel = AtomicBool::new(false); + let actual = large::inspect(output.as_file_mut(), 0, found.kind, &cancel)?; + if !actual.is_some_and(|result| { + result.size == found.size + && result.kind == found.kind + && result.validation == found.validation + }) { + return Err(io::Error::new( + io::ErrorKind::InvalidData, + "Recovered file failed format checks. The source may have changed since scanning.", + )); + } + } else if found.extents.is_some() && !matches!( found.validation, Validation::ImageDecoded | Validation::StructureChecked diff --git a/tests/large_carving.rs b/tests/large_carving.rs new file mode 100644 index 0000000..1ba3b48 --- /dev/null +++ b/tests/large_carving.rs @@ -0,0 +1,188 @@ +use reclaim::{Event, Validation, recover_reader, scan_reader}; +use std::{ + io::{Seek, SeekFrom, Write}, + sync::atomic::AtomicBool, +}; + +#[test] +fn large_wav_is_exported_and_truncated_or_changed_candidates_are_rejected() { + let mut disk = tempfile::tempfile().unwrap(); + let payload = 65 * 1024 * 1024u32; + let size = u64::from(payload) + 44; + let offset = 512; + disk.seek(SeekFrom::Start(offset)).unwrap(); + let mut header = Vec::new(); + header.extend_from_slice(b"RIFF"); + header.extend_from_slice(&(payload + 36).to_le_bytes()); + header.extend_from_slice(b"WAVEfmt \x10\0\0\0\x01\0\x01\0"); + header.extend_from_slice(&8000u32.to_le_bytes()); + header.extend_from_slice(&8000u32.to_le_bytes()); + header.extend_from_slice(b"\x01\0\x08\0data"); + header.extend_from_slice(&payload.to_le_bytes()); + disk.write_all(&header).unwrap(); + + let scan = |disk: &mut std::fs::File| { + let mut results = Vec::new(); + scan_reader(disk, &AtomicBool::new(false), |event| { + if let Event::Found(file) = event + && file.kind == "wav" + { + results.push(file); + } + }) + .unwrap(); + results + }; + disk.set_len(offset + size - 1).unwrap(); + assert!(scan(&mut disk).is_empty()); + disk.set_len(offset + size).unwrap(); + let files = scan(&mut disk); + assert_eq!(files.len(), 1); + let found = &files[0]; + assert_eq!( + (found.offset, found.size, found.validation), + (offset, size, Validation::Unverified) + ); + + let dir = tempfile::tempdir().unwrap(); + let output = dir.path().join("audio.wav"); + recover_reader(&mut disk, &output, found).unwrap(); + assert_eq!(std::fs::metadata(output).unwrap().len(), size); + + disk.seek(SeekFrom::Start(offset + 4)).unwrap(); + disk.write_all(&(payload + 34).to_le_bytes()).unwrap(); + let output = dir.path().join("changed.wav"); + assert!(recover_reader(&mut disk, &output, found).is_err()); + assert!(!output.exists()); +} + +#[test] +fn large_tar_uses_entry_lengths_and_preserves_the_following_file() { + let mut disk = tempfile::tempfile().unwrap(); + let payload = 65 * 1024 * 1024u64; + let size = payload + 1536; + let mut header = [0; 512]; + header[..5].copy_from_slice(b"a.bin"); + header[124..135].copy_from_slice(format!("{payload:011o}").as_bytes()); + header[148..156].fill(b' '); + header[156] = b'0'; + header[257..263].copy_from_slice(b"ustar\0"); + let checksum = header.iter().map(|&byte| u32::from(byte)).sum::(); + header[148..154].copy_from_slice(format!("{checksum:06o}").as_bytes()); + header[154] = 0; + disk.write_all(&header).unwrap(); + disk.seek(SeekFrom::Start(size)).unwrap(); + disk.write_all(include_bytes!("fixtures/plain.zip")) + .unwrap(); + + let mut found = Vec::new(); + scan_reader(&mut disk, &AtomicBool::new(false), |event| { + if let Event::Found(file) = event { + found.push(file); + } + }) + .unwrap(); + assert_eq!(found.len(), 2); + assert_eq!( + (found[0].kind, found[0].size, found[0].validation), + ("tar", size, Validation::StructureChecked) + ); + assert_eq!(found[1].offset, size); + + let dir = tempfile::tempdir().unwrap(); + let output = dir.path().join("archive.tar"); + recover_reader(&mut disk, &output, &found[0]).unwrap(); + assert_eq!(std::fs::metadata(output).unwrap().len(), size); + + disk.seek(SeekFrom::Start(size - 1)).unwrap(); + disk.write_all(b"x").unwrap(); + let output = dir.path().join("changed.tar"); + assert!(recover_reader(&mut disk, &output, &found[0]).is_err()); + assert!(!output.exists()); +} + +#[test] +fn matroska_and_webm_carve_only_finite_segments_with_media() { + for (doc_type, kind) in [ + (b"matroska".as_slice(), "mkv"), + (b"webm".as_slice(), "webm"), + ] { + let mut data = vec![ + 0x1a, + 0x45, + 0xdf, + 0xa3, + 0x83 + u8::try_from(doc_type.len()).unwrap(), + ]; + data.extend_from_slice(&[0x42, 0x82, 0x80 + u8::try_from(doc_type.len()).unwrap()]); + data.extend_from_slice(doc_type); + data.extend_from_slice(&[0x18, 0x53, 0x80, 0x67]); + let segment_size = data.len(); + data.push(0x92); + for id in [0x1549_a966u32, 0x1654_ae6b, 0x1f43_b675] { + data.extend_from_slice(&id.to_be_bytes()); + data.extend_from_slice(&[0x81, 0]); + } + + let scan = |bytes: &[u8]| { + let mut candidates = Vec::new(); + scan_reader( + &mut std::io::Cursor::new(bytes), + &AtomicBool::new(false), + |event| { + if let Event::Found(file) = event + && file.kind == kind + { + candidates.push(file); + } + }, + ) + .unwrap(); + candidates + }; + let files = scan(&data); + assert_eq!(files.len(), 1); + assert_eq!(files[0].size, data.len() as u64); + let dir = tempfile::tempdir().unwrap(); + let output = dir.path().join(kind); + recover_reader(&mut std::io::Cursor::new(&data), &output, &files[0]).unwrap(); + assert_eq!(std::fs::read(output).unwrap(), data); + assert!(scan(&data[..data.len() - 1]).is_empty()); + data[segment_size] = 0xff; + assert!(scan(&data).is_empty()); + } +} + +#[test] +fn rf64_and_bw64_use_64_bit_lengths_above_four_gib() { + use std::sync::atomic::Ordering; + + let payload = 1u64 << 32; + let size = payload + 80; + for (signature, kind) in [(b"RF64", "rf64"), (b"BW64", "bw64")] { + let mut disk = tempfile::tempfile().unwrap(); + disk.write_all(signature).unwrap(); + disk.write_all(b"\xff\xff\xff\xffWAVEds64\x1c\0\0\0") + .unwrap(); + disk.write_all(&(size - 8).to_le_bytes()).unwrap(); + disk.write_all(&payload.to_le_bytes()).unwrap(); + disk.write_all(&[0; 12]).unwrap(); + disk.write_all( + b"fmt \x10\0\0\0\x01\0\x01\0\x40\x1f\0\0\x40\x1f\0\0\x01\0\x08\0data\xff\xff\xff\xff", + ) + .unwrap(); + disk.set_len(size).unwrap(); + + let cancel = AtomicBool::new(false); + let mut found = None; + scan_reader(&mut disk, &cancel, |event| { + if let Event::Found(file) = event { + found = Some(file); + cancel.store(true, Ordering::Relaxed); + } + }) + .unwrap(); + let found = found.unwrap(); + assert_eq!((found.kind, found.size), (kind, size)); + } +} diff --git a/website/src/i18n/ar.ts b/website/src/i18n/ar.ts index b258ad4..98d1b19 100644 --- a/website/src/i18n/ar.ts +++ b/website/src/i18n/ar.ts @@ -111,7 +111,7 @@ const ar: Dict = { { name: 'المستندات والكتب الإلكترونية', list: 'PDF, Word, Excel, PowerPoint, OpenDocument, EPUB' }, { name: 'الملفات المضغوطة', list: 'ZIP, 7z, RAR5, CAB, TAR, GZIP, XAR, JAR, APK' }, { name: 'البرامج وملفات التثبيت', list: 'EXE, DLL, ELF, MSI, DEB, RPM, DEX, PKG' }, - { name: 'الصوت والفيديو', list: 'WAV, AIFF, AU, MIDI, AVI, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, + { name: 'الصوت والفيديو', list: 'WAV, RF64, BW64, AIFF, AU, MIDI, AVI, MKV, WebM, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, { name: 'قواعد البيانات', list: 'SQLite' }, ], more: 'قائمة الصيغ الكاملة', @@ -123,7 +123,7 @@ const ar: Dict = { items: [ 'لا يمكن استعادة البيانات التي كُتب فوقها أو مسحتها ميزة TRIM في أقراص SSD.', 'لا تُستعاد أسماء الملفات والمجلدات الأصلية، بل تحصل الملفات على أسماء مولّدة.', - 'حجم معظم الملفات محدود بـ 64 MiB، وقد تُستعاد الملفات المجزأة ناقصة.', + 'يمكن استرداد بعض التنسيقات بأحجام تتجاوز 64 MiB. قد تُستعاد الملفات المجزأة ناقصة.', 'لا يمكن بعد فحص الأقراص الداخلية لأجهزة Mac ‏(APFS) ولا أقسام Linux بنظام Btrfs أو XFS ولا صور الأقراص الكاملة التي تحتوي على جدول أقسام.', 'لا تُحفظ النتائج بعد إغلاق التطبيق، فاحفظ ما تحتاجه أولًا.', ], diff --git a/website/src/i18n/de.ts b/website/src/i18n/de.ts index 080e275..53d81c3 100644 --- a/website/src/i18n/de.ts +++ b/website/src/i18n/de.ts @@ -111,7 +111,7 @@ const de: Dict = { { name: 'Dokumente und E-Books', list: 'PDF, Word, Excel, PowerPoint, OpenDocument, EPUB' }, { name: 'Archive', list: 'ZIP, 7z, RAR5, CAB, TAR, GZIP, XAR, JAR, APK' }, { name: 'Programme und Installer', list: 'EXE, DLL, ELF, MSI, DEB, RPM, DEX, PKG' }, - { name: 'Audio und Video', list: 'WAV, AIFF, AU, MIDI, AVI, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, + { name: 'Audio und Video', list: 'WAV, RF64, BW64, AIFF, AU, MIDI, AVI, MKV, WebM, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, { name: 'Datenbanken', list: 'SQLite' }, ], more: 'Vollständige Formatliste', @@ -123,7 +123,7 @@ const de: Dict = { items: [ 'Überschriebene oder per SSD-TRIM gelöschte Daten lassen sich nicht zurückholen.', 'Ursprüngliche Dateinamen und Ordner werden nicht wiederhergestellt; Dateien erhalten generierte Namen.', - 'Die meisten Dateien sind auf 64 MiB begrenzt, fragmentierte Dateien können unvollständig sein.', + 'Einige Formate lassen sich auch über 64 MiB wiederherstellen. Fragmentierte Dateien können unvollständig bleiben.', 'Interne Mac-Laufwerke (APFS), Linux-Partitionen mit Btrfs oder XFS und komplette Disk-Images mit Partitionstabelle können noch nicht durchsucht werden.', 'Ergebnisse gehen beim Beenden verloren, also speichere zuerst, was du brauchst.', ], diff --git a/website/src/i18n/en.ts b/website/src/i18n/en.ts index 107363b..48c5ae5 100644 --- a/website/src/i18n/en.ts +++ b/website/src/i18n/en.ts @@ -109,7 +109,7 @@ const en = { { name: 'Documents and ebooks', list: 'PDF, Word, Excel, PowerPoint, OpenDocument, EPUB' }, { name: 'Archives', list: 'ZIP, 7z, RAR5, CAB, TAR, GZIP, XAR, JAR, APK' }, { name: 'Programs and installers', list: 'EXE, DLL, ELF, MSI, DEB, RPM, DEX, PKG' }, - { name: 'Audio and video', list: 'WAV, AIFF, AU, MIDI, AVI, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, + { name: 'Audio and video', list: 'WAV, RF64, BW64, AIFF, AU, MIDI, AVI, MKV, WebM, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, { name: 'Databases', list: 'SQLite' }, ], more: 'Full format coverage', @@ -121,7 +121,7 @@ const en = { items: [ 'Overwritten data, or data erased by an SSD’s TRIM, cannot be brought back.', 'Original file names and folders are not restored; files get generated names.', - 'Most files are limited to 64 MiB, and fragmented files may come back incomplete.', + 'Some formats can be recovered above 64 MiB. Fragmented files may come back incomplete.', 'Mac built-in drives (APFS), Linux partitions using Btrfs or XFS, and whole-disk images with partition tables can’t be scanned yet.', 'Scan results are not kept after you quit, so save what you need first.', ], diff --git a/website/src/i18n/es.ts b/website/src/i18n/es.ts index 0bd2388..7916314 100644 --- a/website/src/i18n/es.ts +++ b/website/src/i18n/es.ts @@ -111,7 +111,7 @@ const es: Dict = { { name: 'Documentos y libros electrónicos', list: 'PDF, Word, Excel, PowerPoint, OpenDocument, EPUB' }, { name: 'Archivos comprimidos', list: 'ZIP, 7z, RAR5, CAB, TAR, GZIP, XAR, JAR, APK' }, { name: 'Programas e instaladores', list: 'EXE, DLL, ELF, MSI, DEB, RPM, DEX, PKG' }, - { name: 'Audio y vídeo', list: 'WAV, AIFF, AU, MIDI, AVI, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, + { name: 'Audio y vídeo', list: 'WAV, RF64, BW64, AIFF, AU, MIDI, AVI, MKV, WebM, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, { name: 'Bases de datos', list: 'SQLite' }, ], more: 'Cobertura completa de formatos', @@ -123,7 +123,7 @@ const es: Dict = { items: [ 'Los datos sobrescritos, o borrados por el TRIM de un SSD, no se pueden recuperar.', 'No se restauran los nombres ni las carpetas originales; los archivos reciben nombres generados.', - 'La mayoría de los archivos están limitados a 64 MiB, y los fragmentados pueden quedar incompletos.', + 'Algunos formatos se pueden recuperar por encima de 64 MiB. Los archivos fragmentados pueden quedar incompletos.', 'Aún no se pueden analizar los discos internos de Mac (APFS), las particiones de Linux con Btrfs o XFS ni las imágenes de disco completo con tabla de particiones.', 'Los resultados no se conservan al cerrar la aplicación: guarda primero lo que necesites.', ], diff --git a/website/src/i18n/fr.ts b/website/src/i18n/fr.ts index 34aa54b..dced2ba 100644 --- a/website/src/i18n/fr.ts +++ b/website/src/i18n/fr.ts @@ -111,7 +111,7 @@ const fr: Dict = { { name: 'Documents et livres numériques', list: 'PDF, Word, Excel, PowerPoint, OpenDocument, EPUB' }, { name: 'Archives', list: 'ZIP, 7z, RAR5, CAB, TAR, GZIP, XAR, JAR, APK' }, { name: 'Programmes et installateurs', list: 'EXE, DLL, ELF, MSI, DEB, RPM, DEX, PKG' }, - { name: 'Audio et vidéo', list: 'WAV, AIFF, AU, MIDI, AVI, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, + { name: 'Audio et vidéo', list: 'WAV, RF64, BW64, AIFF, AU, MIDI, AVI, MKV, WebM, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, { name: 'Bases de données', list: 'SQLite' }, ], more: 'Liste complète des formats', diff --git a/website/src/i18n/he.ts b/website/src/i18n/he.ts index e1f916e..7c208ce 100644 --- a/website/src/i18n/he.ts +++ b/website/src/i18n/he.ts @@ -116,7 +116,7 @@ const he: Dict = { { name: 'מסמכים וספרים דיגיטליים', list: 'PDF, Word, Excel, PowerPoint, OpenDocument, EPUB' }, { name: 'קובצי ארכיון', list: 'ZIP, 7z, RAR5, CAB, TAR, GZIP, XAR, JAR, APK' }, { name: 'תוכנות וקובצי התקנה', list: 'EXE, DLL, ELF, MSI, DEB, RPM, DEX, PKG' }, - { name: 'שמע ווידאו', list: 'WAV, AIFF, AU, MIDI, AVI, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, + { name: 'שמע ווידאו', list: 'WAV, RF64, BW64, AIFF, AU, MIDI, AVI, MKV, WebM, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, { name: 'מסדי נתונים', list: 'SQLite' }, ], more: 'לרשימת הפורמטים המלאה', @@ -128,7 +128,7 @@ const he: Dict = { items: [ 'מידע שנדרס, או שנמחק בפקודת TRIM בכונן SSD, אינו ניתן לשחזור.', 'שמות הקבצים והתיקיות המקוריים אינם משוחזרים. לכל קובץ משוחזר מוקצה שם באופן אוטומטי.', - 'לרוב סוגי הקבצים יש מגבלת גודל של 64 MiB, והשחזור של קבצים שמאוחסנים במקטעים עשוי להיות חלקי.', + 'אפשר לשחזר חלק מסוגי הקבצים גם מעל 64 MiB. השחזור של קבצים שמאוחסנים במקטעים עשוי להיות חלקי.', 'עדיין אי אפשר לסרוק את הכונן הפנימי של מחשבי Mac‏ (APFS), מחיצות Linux מסוג Btrfs או XFS וקובצי דימות של דיסק שלם הכוללות טבלת מחיצות.', 'תוצאות הסריקה אינן נשמרות לאחר סגירת התוכנה. שחזרו את הקבצים הדרושים לפני הסגירה.', ], diff --git a/website/src/i18n/ru.ts b/website/src/i18n/ru.ts index 2591f53..f6721c0 100644 --- a/website/src/i18n/ru.ts +++ b/website/src/i18n/ru.ts @@ -111,7 +111,7 @@ const ru: Dict = { { name: 'Документы и электронные книги', list: 'PDF, Word, Excel, PowerPoint, OpenDocument, EPUB' }, { name: 'Архивы', list: 'ZIP, 7z, RAR5, CAB, TAR, GZIP, XAR, JAR, APK' }, { name: 'Программы и установщики', list: 'EXE, DLL, ELF, MSI, DEB, RPM, DEX, PKG' }, - { name: 'Аудио и видео', list: 'WAV, AIFF, AU, MIDI, AVI, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, + { name: 'Аудио и видео', list: 'WAV, RF64, BW64, AIFF, AU, MIDI, AVI, MKV, WebM, Ogg Vorbis, Opus, Theora, Flash (SWF)' }, { name: 'Базы данных', list: 'SQLite' }, ], more: 'Полный список форматов',