Hi Paul,
The original post is here — for image validation on files with extensions.
The original script that I wrote last Fall was used to validate files with extensions to their actual image type. It won't work with files without extensions, and neither will the UNIX file command, or even Spotlight's mdls utility that thinks image files without extensions are just public.data.
There are no tools available in macOS that can explore the internal image data, and arrive at the accurate extension information — except the third-party exiftool which you indicated was installed last Fall. Am I correct that your current images without extensions are only camera RAW images that may be RAF, CR2, or DNG image types?
This morning, using the same image data as last Fall, I wrote and tested a very short (8 lines) Zsh script that recursively retrieves all subordinate images of a parent directory and uses exiftool to peek inside them for their FileType. This is also the uppercase extension from the first paragraph that should be assigned to the raw image, and I use that in the renaming. When tested against the same images as I used last Fall for your other solution, the renaming was 100% accurate using known raw files.
You can run this script from the Terminal after making it executable. I have a Test4 directory on my Desktop. Do not use tilde path shorthand, as Zsh doesn't expand tilde without additional help:
cd Desktop
chmod +x addext.zsh
./addext.zsh ./Test4
Script has completed.
Copy and paste the following into BBEdit (which you also installed last Fall), and then save on your Desktop as addext.zsh.
#!/bin/zsh
: <<'COMMENT'
Recursively drill into directory hierarchy for image files with no
extension. Exclude text files. Use exiftool to inspect the image
and extract FileType (extension), then rename with that extension.
Requires third-party exiftool installation.
Usage: addext.zsh /path/to/parent/directory
VikingOSX, 2020-05-22, Apple Support Communities, No warranties of any kind.
COMMENT
STARTDIR="$1:a"
setopt extended_glob
for f in ${STARTDIR}/**/*~*.txt(.N);
do
# print "${f}"
EXT=$(/usr/local/bin/exiftool -s3 "-FileType" "${f}")
mv "${f}" "${f}.${EXT}"
done
echo "Script has completed."
Before:

After: