His father reported that the Messenger of Allah ﷺ was asked about the snakes found in houses. He said, "If you see any of them in your dwellings, say, 'I adjure you by the covenant that Nuh took from you, and I adjure you by the covenant that Sulayman took from you, that you do not harm us.' If they return after that, then kill them."
حدثنا سعيد بن سليمان عن علي بن هاشم قال حدثنا ابن أبي ليلى عن ثابت البناني
عن أبيه أن رسول الله ﷺ سئل عن حيات البيوت فقال إذا رأيتم منهن شيئا في مساكنكم فقولوا أنشدكن العهد الذي أخذ عليكن نوح أنشدكن العهد الذي أخذ عليكن سليمان أن لا تؤذونا فإن عدن فاقتلوهن
No references are available.
[Its chain of transmission is daif] Reported by Tirmidhi, Hunting, chapter on what has been said about killing snakes, hadith: 1485, from the hadith of Muhammad bin Abdul-Rahman bin Abu Layla, through this route, and he said, hasan gharib. Muhammad bin Abu Layla is daif, as mentioned previously, hadith 752.