Running MD5's from a website

Request features that you'd like to see in future versions of hkSFV.

Moderators: Big-O Ryan, Big-O Mark

Post Reply
jve
Just Registered
Just Registered
Posts: 2
Joined: Sun May 04, 2003 9:46 pm
Location: Minnesota
Contact:

Running MD5's from a website

Post by jve »

I work at a website that specializes in providing free downloads of computer games. We would like to provide a link to an MD5 sum for a given file that, upon clicking, would automatically start a pre-installed program on the user's computer that would use the MD5 sum and filename from the *.md5 content and verify the file that they have just downloaded.

hkSFV is so-o-o close to being able to do what I need!

I downloaded and tried v2.0.1.

I created a "filename.md5" file on the website and fed that to MSIE. It got the file but just displayed it. So I decided it needed a mime type to trigger hkSFV.

I edited the Folder Type prefs to use "application/x-sfv-md5" for *.MD5. (I just made this mime type up - I don't know if there's a standard for MD5 files).

I edited the webserver config to use that mime type on *.md5 files.

Et voila! MSIE now asks whether to open or save. I choose open. hkSVF runs, displays the filename from within the md5 file in the left pane. So far so good.

It then starts looking for the file. But the name in that modal window is the name of the temporary file that MSIE passed to it (e.g. filename[1].md5) - not the name in the *.md5 file itself. So it never finds it. I suppose it's looking for filename[1].zip instead of filename.zip?

So my "feature request" is to get this capability working. :)

1) Upon installation, register in the type list with mime type "application/x-sfv-md5" (or whatever is appropriate) instead of leaving it blank.

2) Most users download to a specific directory. The choice of this default directory needs to be made during the installation process and then be reconfigurable thereafter. This directory would be searched, first, before the system wide(?) search. Maybe default that to C:\My Downloads?

3) When an md5 file is passed as an argument to hkSFV, it should look for the file(s) named within the md5 file in the current directory, first, then in the user's alternate directory as defined in #2 above.

I have set up a test in my home directory that you can use:

http://www.3dgamers.com/~jve/dm19spat.zip (531 kB)
http://www.3dgamers.com/~jve/dm19spat.md5

I hope others also find this feature useful (so it can get high priority on the fairly minor changes to hkSVF that are needed for it).

Thanks.
fuuucckkers
Moderator
Moderator
Posts: 815
Joined: Sun Sep 22, 2002 3:33 pm
Contact:

Post by fuuucckkers »

I tried the provided .MD5 link and it did as you said...

It tried checking the temp file instead of the original .. the temp being filename[1].md5

I'm assuming this is a Windows problem.. moreso than hkSFV. When you open a file from the internet (instead of choosing Save), Windows automatically takes that file, and puts it in your Temporary Internet Files.. thus renaming it with the added "[1]" on the end of the filename.

Maybe there's a way to fix that.. or make it check the original...instead of that temp file? I have no idea though..
User avatar
Big-O Ryan
Developer
Developer
Posts: 612
Joined: Fri Oct 19, 2001 11:00 pm
Location: Big-O Software
Contact:

Post by Big-O Ryan »

I would definitely like to make hkSFV the tool that you would recommend to your users for md5 purposes. I'm always interested in making the md5 format useful for more people, and exposing it to potential users.

The mime-type registration would certainly be simple to add to hkSFV's installer (and sounds like a good idea).

The problem with hkSFV not finding the file is that it only looks for the listed files in the same directory as the .MD5 file (which is, in this case, the IE 'temporary files' folder -- not where the user is likely to download their ZIPs). After its initial check, if there are failed or missing files, it looks for possible renames in the same folder.

I do think that a solution to this problem would be a valuable addition to hkSFV, and may be something that I can add quickly.

I will reply here sometime within the week to let you know how it's coming. I'm not exactly sure how I will work this into the interface, yet, so if you have any suggestions or ideas, let me know.
-Ryan
Big-O Software
jve
Just Registered
Just Registered
Posts: 2
Joined: Sun May 04, 2003 9:46 pm
Location: Minnesota
Contact:

Post by jve »

Ryan,

Thanks for the explanation about how hkSFV looks for the file. That explains why it took so long - my cache directory is pretty big, no doubt.

I discovered where MSIE keeps its Download Directory setting.

HKEY_CURRENT_USER -> Software -> Microsoft -> Internet Explorer
The key named "Download Directory" has it.

Maybe you don't need a Setup question about the alternate directory.

When you can't find the file to be checksummed in the current directory, before looking for renames, take a peek in the directory defined by the above key (if the key and the directory both exist) and if the file is there, use it. It'll only work for MSIE users, but for a proof of concept test it's all I need.

After making that part work, you can add something to accomodate non-MSIE users.

For example, after not finding the file in the current directory and not finding the key or not finding the file in the directory specified by the key, pop up the Windows Browse box and allow the user to specify where the file is, and then remember the directory in the registry for future use.

I'm not a Windows programmer so I don't know what's involved in invoking the Browse dialog. Lots of effort required?

Thanks for your efforts in making this fly.

We get well over a million visitors a month, most of whom are coming to download a file, so the potential exposure for hkSFV would be pretty good.
Sesquipedalian Verbiage Eschews Obfuscation
User avatar
Big-O Mark
Shortbus Driver
Shortbus Driver
Posts: 804
Joined: Sun Jan 20, 2002 5:20 pm
Location: Big-O Software
Contact:

Post by Big-O Mark »

This feature has been added for the next release of hkSFV.

If you are checking an .SFV or .MD5 and hkSFV cannot find the files, a dialog box pops up and asks you which directory your files are located in and then will check them. hkSFV will remember which directory you last looked in, so the next time files are not found it, the dialog box will still pop up, but will automatically be pointing to the last directory used.
-Mark
Big-O Software
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest