Jami` at-Tirmidhi #1485
The Book on Hunting 18:27
Narrated Abu Laila:
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."