A reverse image search to detect dirty xtc pills.
https://pillscanner.app/
Also I don't see how this solves anything, just because a pill "looks" like another doesn't mean it is that, it could still be anything.
Knock-offs tend to turn up later, be of inferior quality physically, and have worse reviews online and in the clubs / social circles.