Take him to the vet to look into the worms, check your temperatures in case the cage is too hot, and if it's not, consider changing your feeding routine. You might consider feeding in a seperate bin, for example. The snake might be expecting food when the cage is opened, and thus striking at movement because it thinks food is coming.