كتاب السلام
39  
The Book of Greetings
(37)
Chapter: Killing Snakes Etc.
(37)
باب قَتْلِ الْحَيَّاتِ وَغَيْرِهَا ‏‏
Sahih Muslim 2233 h

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.
حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا عَبْدُ الْوَهَّابِ، - يَعْنِي الثَّقَفِيَّ - قَالَ سَمِعْتُ يَحْيَى، بْنَ سَعِيدٍ يَقُولُ أَخْبَرَنِي نَافِعٌ، أَنَّ أَبَا لُبَابَةَ بْنَ عَبْدِ الْمُنْذِرِ الأَنْصَارِيَّ، - وَكَانَ مَسْكَنُهُ بِقُبَاءٍ فَانْتَقَلَ إِلَى الْمَدِينَةِ - فَبَيْنَمَا عَبْدُ اللَّهِ بْنُ عُمَرَ جَالِسًا مَعَهُ يَفْتَحُ خَوْخَةً لَهُ إِذَا هُمْ بِحَيَّةٍ مِنْ عَوَامِرِ الْبُيُوتِ فَأَرَادُوا قَتْلَهَا فَقَالَ أَبُو لُبَابَةَ إِنَّهُ قَدْ نُهِيَ عَنْهُنَّ - يُرِيدُ عَوَامِرَ الْبُيُوتِ - وَأُمِرَ بِقَتْلِ الأَبْتَرِ وَذِي الطُّفْيَتَيْنِ وَقِيلَ هُمَا اللَّذَانِ يَلْتَمِعَانِ الْبَصَرَ وَيَطْرَحَانِ أَوْلاَدَ النِّسَاءِ ‏.‏
Reference : Sahih Muslim 2233h
In-book reference : Book 39, Hadith 183
USC-MSA web (English) reference : Book 26, Hadith 5550
  (deprecated numbering scheme)