Narrated 'Abdullah (radiallaahu `anhu):
While we were in the company of the Prophet (sallallaahu `alayhi wasallam) in a cave at Mina, when Surat-wal-Mursalat were revealed and he recited it and I heard it (directly) from his mouth as soon as he recited its revelation. Suddenly a snake sprang at us and the Prophet (sallallaahu `alayhi wasallam) said (ordered us): "Kill it." We ran to kill it but it escaped quickly. The Prophet (sallallaahu `alayhi wasallam) said, "It has escaped your evil and you too have escaped its evil."
Kill the snakes wherever you find them, whenever you find them. Even in Salah. Yes.
The Prophet (peace and blessings of Allaah be upon him) said:
Kill the two black ones during prayer, the snake and the scorpion.
(Narrated by the authors of Sunan and classed as saheeh by Ibn Hibbaan).
If you can kill it whilst still praying, without moving more than what is regarded as acceptable, then this is OK and the prayer is still valid.
That is not permitted. The person who grills a snake then eats it has obeyed the Shaytaan. There is something in it which is inherently devilish and something which is connected to the shaytaateen (devils); it is a like riding beast for them or something like that. Whoever mixes its flesh with his flesh [by eating it] should be avoided because of that.
From Fataawa Samaahat al-Shaykh Muhammad ibn Ibraaheem (may Allaah have mercy on him) p.1/95