1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
cd5
===
Quick and dirty program to compute checksum of individual track
It reports for each track:
- size (read)
- MD5 digest
Version:
--------
- 0.1 (first written and released version)
Supports:
---------
- multi track CD-ROM
- mode 1
- Linux ioctl()
- libmhash
Doesn't support:
----------------
- DVD
- Audio CD
- Multi session
- Other operating system
TODO:
-----
- support options
- support other track format
- support multi session
- support other interfaces (ioctl, packet, ...)
- support other OS
Known problem:
--------------
- Track are often bigger than the data written inside
The program will report an error at the end of the data
I don't know the way to detect the end of data.
The checksum is good, and the size too.
Be aware:
---------
- Track shorter than 4s -> 300 frames -> 614400 bytes are padded
To check the checksum, pad the img/iso file to 614400 and run md5sum
Requires:
---------
To build and run cd5, you need libmhash, or port it to OpenSSL,
Gcrypt or other.
Build:
------
Run "make" or
gcc -W -Wall cd5.c -o cd5 -lmhash
Example:
--------
$ ./cd5
Track 1 to 3 (3 tracks)
ioctl(/dev/cdrom, CDROMREADMODE1(1277)) failed: Input/output error
Track 1, data, 0 + 1429 | 2615296 22597f64d164d509ef988b4ae97d3ad2
ioctl(/dev/cdrom, CDROMREADMODE1(1729)) failed: Input/output error
Track 2, data, 1429 + 452 | 614400 c8605c7db3dd78fba70c2030d339f22b
ioctl(/dev/cdrom, CDROMREADMODE1(4001)) failed: Input/output error
Track 3, data, 1881 + 2272 | 4341760 8084e5945813a02415d08fb027d9ea97
For the ioctl() errors, see above.
Just check that track size match ISO file size (except for file under
614400 bytes).
One rule: if digest mismatch there's an error.
Author:
-------
Yann Droneaud <ydroneaud@meuh.org>
|