Posts

Showing posts with the label verify

pyVerify version 2

Following on from my previous post that shows how to verify cd or dvd integrity, I have this following update: The volumeid.sh script now reads the whole isoinfo -d -i from the dvd and pipes it through to md5sum to generate a "signature" that identifies the disk. The thinking here is that it would be near impossible to have have two disk headers that match completely. Even those that share volume ids... For example openSUSE 11.0 i386 and openSUSE 11.0 x86_64 The Verify class now includes checking for more than one row in the database that has the same volume label. ( md5sum result from volumeid.sh ) This is to catch anything that matches for some strange reason. The updated code for all the files is included below. volumeid.sh #!/bin/sh # # small utility to find the md5sum of the isoinfo header information # isoinfo -d -i /dev/cdrom | md5sum | cut -d " " -f 1 verify.sh #!/bin/sh # # Start with verifying CDs # device="/dev/cdrom" checksumtype=$1 #Find de...

Python + Bash + isoinfo + mysql = Python CD Integrity Verifier

I have a requirement to verify by md5sum or sha1sum, CDs or DVDs that I burn - so I wrote a bunch of scripts. I am not saying that this is the best way to skin this particular cat, but it is working. First of all a bit of background info. This stuff only works on Linux because the commands make use of Linux tools such as isoinfo and dd. I am sure Windows command line equivalents exist... I have a mysql database with one table in it that has the following fields: distro_label --- Volume ID of CD or DVD distro_name ---- Name of the CD or DVD hash_type ------ 1 = md5sum, 2 = sha1sum hash_detail ---- Known good md5sum or sha1sum of the particular CD or DVD Here is an example record: distro_label --- Slack11d1 distro_name ---- Slackware 11 Disk 1 hash_type ------ 1 hash_detail ---- a7cfcb4be158beca63af21b3b4dbc69c In case you are wondering how I know the volume id - try this while you have a CD or DVD in your cd / dvd drive: [~]$ isoinfo -d -i /dev/cdrom Requirements T...