The Messenger of Allah ﷺ said, "Kill snakes, especially the one with two white stripes on its back and the short-tailed one, for they cause blindness and miscarriage."Abdullah used to kill every snake he came across. Then Abu Lubabah, or Zayd bin Khattab, saw him chasing a snake and said to him, "The killing of household snakes has been forbidden."
حدثنا مسدد حدثنا سفيان عن الزهري
أن رسول الله ﷺ قال اقتلوا الحيات وذا الطفيتين والأبتر فإنهما يلتمسان البصر ويسقطان الحبل قال وكان عبد الله يقتل كل حية وجدها فأبصره أبو لبابة أو زيد بن الخطاب وهو يطارد حية فقال إنه قد نهي عن ذوات البيوت
Narrated by Muslim, chapter on Peace, section on killing snakes and other creatures, no. 2233, from the hadith of Sufyan. And Bukhari, chapter on the Beginning of Creation, section on the saying of Allah Almighty "and dispersed throughout it every kind of creature", no. 3297, from the hadith of Zuhri, through the same chain.