Fetch file and perform a MD5 calculation

Hi guys

I fetched a “.html” or “.rsc” file from my remote server, then i want identify the integrity and accuracy of the file by using MD5 calculation , but i cannot found any command can used in routerboard.

Anybody know how to do that ?

In linux we can do like “$ md5sum login.html|cut -d ’ ’ -f1”

Thanks

This may be a stupid question, but what MD5 do you wanna compare it to?
Unless you also fetch the MD5 checksum in a separate file, which an attacker could just include in his attack, it makes no sense to do this anyway.

If you already know the MD5 hash ahead of time, then you must know the content of the original file already, so fetching the file is redundant and the MD5 checksum meaningless.

That aside, I don’t know if RouterOS can calculate MD5 checksums of files, but I don’t see where it would be useful to do it anyway, at least not in any automatic system. If you are fetching the file manually and wanna check the file, then sure, but you could just download the file to a computer and check the file before sending it to your router.

We have found that occasionally a downloaded .rsc script file to be used to update the configuration is corrupt when imported. The Testing indicates that the file is correctly received via FTP but is incorrectly retrieved from the local ‘disk’. We can’t determine whether it was incorrectly written or the file storage media is the issue, but multiple reads produce the same file content errors. Has anyone determined whether this is a method to calculate a file integrity and verify it against a file hash or checksum (perhaps sent in another file) to verify the integrity of the file prior to using it?

MD5 is not available within routeros as stand-alone tool, but can be added by means of script.

See: http://forum.mikrotik.com/t/script-md5-hash-generator/57409/1

thanks much for the reference