View Full Version : Checking MD5 value of uploaded files
Starman*
09-14-2007, 01:50 PM
I have some large files that I want to check for completeness after they are uploaded. I'm looking for a script or utility that can measure the MD5 value of an uploaded file using either FTP or the Bluehost File Manager or a script. No, I don't want to download them! Each took 10 hours upload via phone modem.
My FTP clients (WS FTP/FileZilla) do the standard checks (fine for small files).
Starman*
09-22-2007, 12:03 AM
As I got no replies, here is what I found:
I could not find any scripts that can measure the MD5 value of an uploaded file. Help Desk could only suggest going to SSH.
I only found one FTP client that can check the upload MD5 values, FTPGetter. Unfortunately it had a terrible user interface, almost worthless instructions and did not seem capable of checking a previously uploaded file.
I resolved my problem by other means. The files were all zips so I extracted them in Control Panel/File Manager. As everyone who has downloaded a bum zip file knows, only one bit needs to be out to stop the zip unzipping on checksum failure. This method therefore worked perfectly - any file that would not unzip I uploaded until it did.
adddfico
09-22-2007, 08:44 AM
<form action="?action=ha****" method="POST">
URL: <input type="text" name="address">
<input type="submit" value="Hash">
</form>
<?php
if ($_GET['action']=="ha****"){
$hashed = md5_file($_REQUEST['address']);
}
echo $hashed;
?>
----------------
Put that in a php file and run it.
All it wants is the URL to the file or a relative link (ie ../folder/file )
adddfico
09-22-2007, 08:49 AM
Doh, my variable contains a vulgarity.. (was supposed to be 'hash it')
<form action="?action=hash" method="POST">
URL: <input type="text" name="address">
<input type="submit" value="Hash">
</form>
<?php
if ($_GET['action']=="hash){
$hashed = md5_file($_REQUEST['address']);
}
echo $hashed;
?>
Starman*
10-06-2007, 01:27 AM
Thanks adddfico, I'll pardon your vulgarity!
Took me a bit of time to figure out how to run the file once I made it. I've run cgi before but not php. Most guides for php don't mention that you only need to enter the url of the php file in your browser to run it. Seems to work fine for the few files I've tried so far.
How come the Help Desk could not come up with something like this when I asked?
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.