Date
1 - 7 of 7
Function GetMD5File sometimes incorrect? #bugs
Hi all,
I just did some experimenting with the MD5 function - for files ^$GetMD5File(“^%Filename%)$ I used the clip from the Utilities/Message Digests - MD5 of file. I used the Powershell function get-filehash on the same file, and the results were - identical for several small text files I tried - different for a reasonably large .exe file I can’t tell which of the results (NoteTab or Powershell) is wrong - does anyone have any experience with this? I will test with more files of course, to maybe find out if the cause is the size or the file type. and before you ask - I’ve disabled the option “filter binary codes” suspecting that NoteTab might filter the non character codes - but that didn’t help (I tried both settings). The files I analysed were not open in NoteTab (or elsewhere) of course while I tried to calculate the checksum. Kind regards Thomas |
|
Hi all,
I did several more tests - and in most cases the results were identical between NoteTab Pro and Powershell, even for very large .exe files ( above 200 MB in a few tests). the only files where I see a different results are .exe files in the Powershell directory itself (Powershell.exe, Powershell_ise.exe). Very odd - I intend to ignore this. There was a difference in speed when calculating MD5 for the very large files - but it only took a few seconds longer when using the NoteTab function, so no reason to leave that environment I think. Kind regards Thomas |
|
Hi,
I found the reason for this odd behaviour - and of course the function in NT is correct. The reason for the effect I saw is in the 32bit Windows subsystem on 64bit Windows. When checking the file “powershell.exe” from NoteTab, it gets redirected to the file in C:\Windows\sysWOW64\….. which is different from the file powershell.exe under C:\Windows\System32\… that powershell itself accesses. This is because NoteTab is a 32bit application. I found out about this when I looked at the file sizes that powershell and NT report for this file - they were different. So sorry about the false alarm. Kind regards Thomas |
|
MD5 is old and has been deprecated for decades.(
https://en.wikipedia.org/wiki/MD5) says it is broken for cryptographic purposes. It was exploited for by the Flame malware in 2012. Perhaps Eric decided to stop working with it and never fixed his bugs. Tony Becker On Tue, Apr 12, 2022 at 5:02 AM Thomas Gruber <computerhusky@...> wrote: Hi all, |
|
Hi Tony,
you’ll see in my later post that the function is perfectly OK in NoteTab - no blame on Eric. And yes, I’m aware that MD5 is no longer considered secure. I don’t want to use it for any critical purposes, just as a convenient tool to determine if 2 files are identical, as it’s available without having to develop something myself. A simple CRC check would probably have served the same purpose, with reasonable confidence, and may be faster (I don’t know and haven’t tested it). Kind regards Thomas Am 12.04.2022 um 16:57 schrieb Tony Becker <tony.j.becker@...>:Thomas Gruber Phone: +49 4101 512590 mobile: +49 151 2234 2165 eMail: computerhusky@... |
|
joy8388608
All I can suggest is to use several utilities and see if one of them is consistently not agreeing with the others.
Here is a small, portable, reliable program if you want to try it. https://www.nirsoft.net/utils/hash_my_files.html#:~:text=HashMyFiles%20is%20small%20utility%20that,text%2Fhtml%2Fxml%20file. Joy |
|
Hi Joy,
please see the full thread - I found the reason for the differences in result and explained it. It’s not NoteTab, all OK there. Thomas |
|