That the Messenger of Allah ﷺ said: "When a snake appears in your dwellings then say to it: We ask you - by covenant of Nuh, and by the covenant of Sulaiman bin Dawud - that you do not harm us.' If it returns, then kill it." (Using translation from Tirmidhī 1485)
"إذا ظَهَرت الحيَّةُ في المسكَنِ فقولوا لها: إنَّا نسْألكِ بْعهدِ نُوحٍ وبعهْدِ سُليمانَ بنِ داودَ ألا تُؤذِينا فإنْ عَادتْ فاقْتُلوها".