{"id":9331,"date":"2020-01-03T14:51:00","date_gmt":"2020-01-03T19:51:00","guid":{"rendered":"https:\/\/www.ezrasf.com\/wplog\/?p=9331"},"modified":"2020-01-03T14:55:00","modified_gmt":"2020-01-03T19:55:00","slug":"windows-md5-checksum","status":"publish","type":"post","link":"https:\/\/www.ezrasf.com\/wplog\/2020\/01\/03\/windows-md5-checksum\/","title":{"rendered":"Windows md5 checksum"},"content":{"rendered":"\n<p>I was sent a script to run by an analyst who advised to verify the MD5 hash. This is good advice to ensure that I receive the correct content. And happens to be the advise I gave the DBA manager before restoring backup files that was going to take hours to download.<\/p>\n\n\n\n<p>The idea is creating an MD5 hash from the file contents is a fingerprint that tells me whether the file is the same or different quickly and easily. The analyst tells me the hash of the file on the source. I generate a hash on the destination and compare. If they differ, then we have a problem.<\/p>\n\n\n\n<p>I do this all the time on Linux. However, the application I was working with is on Windows. And uploading the file to a Linux server from my workstation wouldn&#8217;t really tell me if the file on the Windows server has the correct hash as corruption (ever so unlikely) could have happened over one upload but not the other. <\/p>\n\n\n\n<p>So, I was curious if there was a way to do this on Windows. Turns out there is.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>certutil -hashfile C:\\scripts\\filename.sql MD5<\/p><\/blockquote>\n\n\n\n<p>The <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-server\/administration\/windows-commands\/certutil\">certutil.exe<\/a> command is a program installed as part of Certificate Services used typically to view SSL information. (I used it via Powershell, but I bet it works via CMD too.) The various flags available makes it look like something extremely useful to know exists. And, I am surprised at never having seen it prior to today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was sent a script to run by an analyst who advised to verify the MD5 hash. This is good advice to ensure that I receive the correct content. And happens to be the advise I gave the DBA manager before restoring backup files that was going to take hours to download. The idea is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[621],"tags":[3528,3526,3527,3059,3012,207],"class_list":["post-9331","post","type-post","status-publish","format-standard","hentry","category-microsoft","tag-certuil","tag-checksum","tag-md5","tag-microsoft","tag-script","tag-windows"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1rUBW-2qv","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/posts\/9331","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/comments?post=9331"}],"version-history":[{"count":0,"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/posts\/9331\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/media?parent=9331"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/categories?post=9331"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ezrasf.com\/wplog\/wp-json\/wp\/v2\/tags?post=9331"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}