"and take a gadget offline if it's infected."
Easier said than done. After all, owners of said infected IoT tat will say that they are not infected, it must be their neighbour.
Just write a bot to infect and brick vulnerable IoT tat... that'll sort it out chop-chop.