bin/detect: simplified.