LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Auto MD5 check program (https://www.linuxquestions.org/questions/linux-software-2/auto-md5-check-program-295429/)

APB_4 02-27-2005 06:48 AM

Auto MD5 check program
 
I don't know if there's already a way to do this but I've written a tiny python program to check md5sums. If people like it I'll probably expand it to sha1 as well.

APB_4 02-27-2005 07:28 AM

Anybody got anything to say about this? If somebody thinks it's worth hosting I could make a binary for people who don't have python. Oh yeah if any noobs don't know how to run it here goes.
1. Open a text editor and copy the code into it.
2. Save it
3. Now either set it to run as an executable or go into a shell and type
"python /where/you/put/it"
4. Enter the filename with the directory if the file you want to check is not in the same directory. Press enter.
5. Enter the MD5 sum without the " program" bit. eg. "8d727ffc6ed3dd329ddbf787384f8a25". Press enter.
6. If they match you'll get "Sums OK" if they don't "Sums are not the same!" will be displayed.

APB_4 02-27-2005 10:57 AM


APB_4 02-27-2005 02:00 PM

None of you 43 people have anything to say about this! No better way to do it, or existing way to do it. Or whether it worked! Anything? Has anybody even tried it?

ciyan 02-27-2005 03:14 PM

seems to work well. as its the i only md5 prog i know, i cant compare it but it seems good.well ill be using it so thanks and good job!

APB_4 02-27-2005 03:20 PM

Thanks a lot ciyan :) I'll see what I can do about sha sums as well and post that later.

ahh 02-27-2005 03:22 PM

There is a program called CalcChecksum.

http://calcchecksum.sourceforge.net/

But theres always room for competition.

APB_4 02-27-2005 04:08 PM

Ye but I think I'll keep this command line based so it's not directly competing

qtbb 02-28-2005 08:19 AM

i heard python has md5 module you can use.

by the way, just think, try enter something like this "********; rm -rf /" instead of md5 sums, especially when you are root.

APB_4 02-28-2005 01:58 PM

Oh yeah delete everything great idea qtbb!

ahh 02-28-2005 02:05 PM

Quote:

Originally posted by APB_4
Oh yeah delete everything great idea qtbb! Nob!
I think he was pointing out your script is unsafe in it's present form. If you want others to use it you should add some checking to make sure, for example, the MD5 sum entered is in fact just an alphanumeric string.

APB_4 02-28-2005 02:07 PM

why does that matter? It'll just fail

ahh 02-28-2005 02:55 PM

Because if someone entered what qtbb suggested whatever was entered after the semicolon could be executed.

APB_4 02-28-2005 03:06 PM

Ye maybe. If I hadn't used raw_input which takes anything entered as a string.

ironwalker 02-28-2005 03:13 PM

Debian comes with "debsums"....works quite thoroughly.
Thanx for the lil script though....good backup.

http://www.zevils.com/cgi-bin/man/man2html?debsums+1


All times are GMT -5. The time now is 05:32 AM.