Posts

Secure checksums: SHA256

The recent MD5 post reminded me that of course MD5 is not a cryptographically secure checksum - it can be spoofed. Especially, when getting files from untrusted sources an MD5 checksum is not a proof of a valid file. But it is a fast algorithm that can be used for your own storage and backup needs. A secure algorithm is the SHA256, which can be also calculated on Windows without any additional downloads. A quick sample batch file could look like this: @echo off echo. echo Running certutil... echo. certutil -hashfile [filepath] sha256 echo. echo Should be SHA256: echo BD708C0E71E75BD73C636A957451A0CC2C84D7E587AB8FC549141074EF01AF7D echo. pause A more detailed discussion of pros and cons follows below: MD5 (Message-Digest Algorithm 5) Pros: Speed and Low Overhead: Computes faster than SHA-256, making it lightweight for scanning massive drives or deduplicating huge ...

Markdown from Word (.md, pandoc)

Markdown is widely used these days. But we still have lots of old documents that once in a while need to be brought into that scope. pandoc [Path to Word document].docx -o [Path to Word document].md

RapidCRC Replacement: Powershell (Get-FileHash)

For ages I was using RapidCRC to create checksums. Originally, CRC checksums, but already for a few years MD5 checksums. But alas, as virtual machines took over much of the daily work and they hardly are all well set up for an extended toolset, I step back to what is available on any Windows machine, be it Windows 11 or Windows Server. Get-FileHash "file" -Algorithm MD5

Windows Server Time and Time Zone issues

A Windows Server machine connected to a domain must be synced with the domain controller. Otherwise this leads to all kinds of hard to debug issues. If it is out of sync with its actual time zone or the time is incorrectly changed the following steps should get it back on track: Make sure the Windows service "Windows Time" is running. Set the correct time zone, e.g. tzutil /s "W. Europe Standard Time" w32tm /config /manualpeerlist:time.windows.com /syncfromflags:MANUAL w32tm /config /update

Windows 10 / Server 2016 Windows Update Problems

The longer a Windows machine is up and running being years into its lifetime the more frequent inconsistencies can occur. For such a reason modern deployments try to work with an image-based approach - pets vs cattle. If one has to stick on a legacy machine with the pet that is continuously updated the following might help resolve Windows Update issues: If Windows update repeatedly fails to update (e.g. hangs after Downloading 100% or gets stuck in the installation procedure) one can try to install that update "by hand": https://www.catalog.update.microsoft.com/Search.aspx?q=<KB#> , e.g. https://www.catalog.update.microsoft.com/Search.aspx?q=kb4589210 If that does not resolve the issue, one quick first step is to use the System File Checker tool: sfc /scannnow It might be necessary to wait a couple of minutes after system bootup, because in the beginning Windows might report a conflict with another process. That usually resolves itself af...

Dates in JSON

What format is the right one in JSON? "Or best? Is there any sort of standard on this?" "DateTimes in JSON are hard. The problem comes from the JSON spec itself: there is no literal syntax for dates in JSON. The spec has objects, arrays, strings, integers, and floats, but it defines no standard for what a date looks like." A common date/time-format used is ISO 8601. It is also used widely in libraries such as JavaScript's toJSON-method and Json.NET . In principle this turns the DateTime string into: <YYYY-MM-DD>T<HH:MM>[:SS.SSS][[+|-]HH:MM[:SS]|Z] Example: { "lastPlayedDateTime": "2021-12-28T23:30:00+01:00" } What's the Z? Z depicts the shorthand notation for UTC times, e.g. "2009-02-15T00:00Z" . Sources: Serializing Dates in JSON StackOverflow What is the "right" JSON date format? Wikipedia on ISO 8601 toJSON-method JSON spec

Use additional computer as secondary display

"The quick answer is to use the Microsoft “Connect” app that is already installed on Windows 10 devices along with the Project option that shows up in the Windows Notification Center (Win + P)." Sources: How to Use an Additional Computer as a Secondary Display