Long story short, I've got some passwords that were improperly salted and hashed in a version of PHP that allowed the crypt() function to fall back to the CRYPT_STD_DES algorithm if the salt was invalid.
However in PHP 5.3.2+:
5.3.2 Fixed Blowfish behaviour on invalid rounds to return "failure" string ("*0" or "*1"), instead of falling back to DES.
What makes this a problem is that the salt contained the "$" character as it was intended to be a blowfish salt (but was unknowingly malformed).
Thus I am unable to manually do something like the following:
crypt($pass, "$a");
since that is not a valid CRYPT_STD_DES salt either now. The salt must be in the range "./0-9A-Za-z". It simply returns "*0" as the PHP devs intended.
How can I validate these malformed passwords in a more recent version of PHP (at least 7.1, ideally)?