Pi-hole is mainly for blocking ads. But it also can serve to stop malware.
A fairly simple and effective way would be to use
Creation Date of a domain from a simple
whois lookup. If the domain was registered less than a specified period of time ago, it would be pi-holed.
I think it happens rarely that you visit a newly created domain, but it should be opt in anyway.
whois pi-hole.net Domain Name: PI-HOLE.NET .. Creation Date: 2015-03-20T18:00:23Z ...