aMule Forum
English => Feature requests => Topic started by: Arichy on December 10, 2005, 06:44:05 PM
-
When a file is to be downloaded, check if the file name contains it's ed2k-hash.
If not, insert "." plus the ed2k-hash before the last "." of the filename. If ther is no "." in the file name, append "." plus the hash to it.
Reason:
If You burn downloaded files to cd or dvd or move it, and want to verify the correct burning or moving process, you have just to calculate the hash from the (moved) file on cd/dcd. If it's that of the filename, you know it's ok.
And it is generally easy to check, if a file is the originally shared one.
Do You agree?
-
If you move a file and its hash changes, would you download it again? Because 'unmove' wont fix the hash.
If you burn a file into a dvd or cd and it has a wrong hash, would you throw it and re-burn a new cd or dvd?
Just curious.
-
sure, what else?
I want an authentic and correct file. If it is not, i throw the dvd or the file away.
Maybe I want to share the file later, also.
-
Why not just create a sha1 or md5 hashlist on the medium? Then you can use " --check
" to check the files.
-
Originally posted by Xaignar
Why not just create a sha1 or md5 hashlist on the medium? Then you can use " --check " to check the files.
Because it's more complicated to deal with extra hash lists than having the hash being part of the file's own name?
Maybe that would be also good for detecting fakes online by their names (if the name's hash is not the file's hash, you can easily see that and use that as an advice, that there could be something incorrect) ?
-
then to files that are to be uploaded and do not have their hash in their name, the hash should also be added to the name (probably with the name of the hash algorithm before it).
-
Dude, you are way too lazy. There's no point in us duplicating this functionality, and no, it offers no extra protection against fakes, it's the same as checking the file's hash via services like donkey-fakes, which still requires extra user-intervention.
-
I am lazy, otherwise I had no computer :D
I did not speak of protection, but of advisary.
If it's the same, then why do extra external checking and extra user-intervention.
-
Actually, using a hash-list will probably be faster and doesn't give you yard-long filenames.
To create (assumes cwd is the contents to be placed on cd):
find -type f -exec sha1sum \{\} \; > hashlist.txt
To check (assumes cwd is the cd):
sha1sum --check hashlist.txt
As for fakechecks, simply having a hash in the file tells you nothing (except that there's a hash in the filename). You would have to look up the hash in a fakes-database in any case, which means that there is nothing gained compared to the current method of looking up the ed2k hash.
-
File would get shared with the new name, name would be longer, name is sent, network overload increases, AND it's annoying to see those stupid hashes.
-
I wrote a python script that does the hash inserting.
For people who might like it also and don't mind some extra bytes overhead for a slightly longer file name, it's attached.
The script inserts ".eD2k-" plus the first 9 hash chars before tha last occurence of a "." in the files name (e.g. "test-movie.avi" will be renamed to "test-movie.eD2k-123456789.avi"). If there is no "." in files name, hash will be added ("test-movie" -> "test-movie.eD2k-123456789")
To get it work, there must be python installed. (check "which python")
Rename insert-ed2k-hash.txt to insert-ed2k-hash.py
And in the command execution option in the files preferences (currently only available in CVS)there should stand something like
sh -c '~/bin/insert-ed2k-hash.py "%FILE" %HASH'
to get it done automatically for every downloaded file (thanks for adding the command execution option to aMule).
I have used the script now for some weeks and I am very happy with it, because before I burn a CD image I want to check fast, if it's the originally downloaded, uncorrupted file, by hashing it and comparing the result with the first hash chars contained in the files name.
Hope You devs don't cut my head off now :D