Sahih Muslim Book 26, Hadith Number 5550.

Chapter : Killing of snakes.

Nafi’ reported that Abu Lubaba b. ‘Abd al-Mundhir al-Ansari (first) lived in Quba. He then shifted to Medina and as he was in the company of ‘Abdullah b. ‘Umar opening a window for him, he suddenly saw a snake in the house. They (the inmates of the house) attempted to kill that. Thereupon Abu Lubaba said: They had been forbidden to make an attempt to kill house snakes and they had been commanded to kill the snakes having small tails, small snakes and those having streaks over them, and it was said: Both of them affect the eyes and cause miscarriage to women.