Skip to main content

Split binary files on content boundaries

Project description

Command-line tool like unix csplit but which splits binary files based on content boundaries rather than index boundaries.

This is particularly useful for salvaging jpegs from a corrupted disk image.

Example usage:

$ csplitb –prefix photo –suffix .jpg –number 4 ffd8ffe1 corrupted-disk-image.raw

This will split the disk image, keeping the header, into photo0000.jpg, photo0001.jpg, etc. Because a disk image represents a potentially fragmented file system, some (or all) of the jpeg files may be corrupted.

The “ffd8ffe1” here is a jpeg header. I’m not an expert on the jpeg format, so it’s possible that you may need to use a different hex search term. Use a hex editor or viewer such as xxd to find what content you want to split on.

Installation

pip install csplitb

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csplitb-1.0.2.tar.gz (9.1 kB view details)

Uploaded Source

File details

Details for the file csplitb-1.0.2.tar.gz.

File metadata

  • Download URL: csplitb-1.0.2.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for csplitb-1.0.2.tar.gz
Algorithm Hash digest
SHA256 018a8e2aa20f7bb1f27e2b538637b53f1199320cd50cb7cdb2a493378a4e27d1
MD5 ee29da3c46814f1820c4b3b136ffb782
BLAKE2b-256 208d5e7a49cd5e41f39c1d4f6c3a0344111c90eb2049f370453d9acddc95faf7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page