Maggots live on rotting flesh. That is what they thrive on. You take away their food source, and they won’t survive. Depending on what you have the infestation on, there are a couple things you could try. Boiling water will kill them instantly. You know what it’s like to burn your hand with hot water. Bleach water will kill them too. Bleach kills a lot of things. Not to long ago, I found a kitten outside that had been malled by something, and it actually had maggots infesting it’s rear end. I soaked the kittens’ bottom in peroxide, and then rinsed in warm water and repeated. I had to do this a few times, but it seemed to help.