I think you're confused. Sounds like intestinal worms to me, not maggots. Maggots are fly larvae, & there's no way that flies can lay eggs inside your snake, so if these are truly maggots (not worms), eggs were laid on the snake feces that has been left sitting in the cage for long enough that they developed into maggots. Only live worms of some type could be freshly coming out of your snake or out of freshly expelled feces. And there's plenty they can do to treat a snake with intestinal worms...it's called deworming.