Hey, Afaik, OpenBSD doesn't ship a libmagic implementation by default, but it does ship a version of file(1) as well as a magic(5) db that you can look at. If you look at the source of the file command, you might be able to work out how to make use of the file(5) db or just lift the code from there. Alternatively, libmagic is in ports. Hope that helps!
---
Previous in thread (3 of 10): 🗣️ Omar Polo (op (a) omarpolo.com)
Next in thread (5 of 10): 🗣️ Solène Rapenne (solene (a) perso.pw)