in reply to Reading encoded file with Perl

Without knowing the structure of the file, it's impossible to say what to do. Even if you could determine which fragments are passwords and which aren't, just replacing the passwords with something else may corrupt the file; there could be a checksum somewhere, and some of your other 65+ tools may no longer be able to open the file. Also, if you don't know the structure, you don't know whether a byte sequence is a string in some encoding, a numeric value in some encoding, or something else. Which makes it impossible to find an pack/unpack string for.