2026-04-20 22:57:43 -04:00
2026-04-20 22:57:43 -04:00
2026-04-20 22:57:43 -04:00
2026-04-20 22:57:43 -04:00
2026-01-17 23:40:47 -05:00
2026-01-02 01:46:09 -05:00
2026-04-20 22:57:43 -04:00

kramer

kramer is a data recovery utility for optical media.

There are plans to change the project name, but during initial development it will continue to be referred to as kramer.

This is still in very early development, so expect old maps to no longer work.

Where is it at?

At this point, kramer is perhaps more of a solo research project in the sense that I am in way over my head. I lack the necessary experience to take on such a project, but I am more than stubborn enough to keep restarting, making little strides further than previous attempts.

As such, you have been warned.

What have I managed to achieve so far?

So far, by blindly bumbling my ??? through the Sharran darkness, I have managed:

DIRECT_IO reading in Rust on platforms which support it

Effectively bypassing the kernel buffer and other safeties offered by the kernel which inhibit reading past IO failure.

Tracking of recovery progress by mapping disc regions

This includes working map defragmentation. I did not enjoy figuring out all 13 cases for that.

This code and its associated methods need to be reviewed. Current iteration is a really hack and unreadable solution.

Possibly wrapping libdvdcss for SCSI bus encryption

This is yet untested, but I have written a wrapper with the help of bindgen.

I really have two options here:

  1. I don't do any detection of CSS on a disc and risk forcing a system to have a hard shutdown due to the specially allocated memory buffer required for DIRECT_IO. Once the drive stops responding to SCSI commands following enough attempted reads of scrambled sectors, which could be a false positive by the drive (the encryption flag in stored within MPEG-2 PACK headers, and could be bit flipped), the kernel will refuse to deallocate the memory on behalf of the frozen [synchronous] program.
  2. I support only bus decryption through optional libdvdcss integration. False positives are no longer a problem, and the drive will maintain contact with the system, as all reads will be authenticated.

Next Steps

Mostly in order of priority:

  • Total refactor for a plugin-based architecture.
  • Lightweight data scraping plugin. Simple single-pass, for early testing purposes.
  • Tagging-based mapping instead of just region and recovery stage.
    • With support for Ser/De to object notation.
  • Optional CSS bus encryption support via libdvdcss.
  • Async operation
  • Full-featured data scraping plugin.
  • Basic CLI
  • ISO9660 and UDF structure analysis plugin.
  • ISO9660 and UDF structure repair plugin.
  • MPEG2 header structure analysis plugin.
  • MPEG2 header structure repair plugin.
  • TUI
  • i18n
S
Description
No description provided
Readme MIT 179 KiB
Languages
Rust 100%