Abdullah bin Masud reported,

We were with the Messenger of Allah ﷺ on the night of Arafah, the one before the Day of Arafah, when suddenly there was the sound of a snake. The Messenger of Allah ﷺ said, "Kill it." It slipped into the crevice of a hole, so we inserted a stick and dug out part of the hole. Then we took a palm branch and set it on fire inside.The Messenger of Allah ﷺ said, "Allah protected it from your harm and protected you from its harm."

Nasai 2887

Sahih

أخبرنا عمرو بن علي قال حدثنا يحيى قال حدثنا ابن جريج أخبرني أبو الزبير عن مجاهد

عن أبي عبيدة عن أبيه قال

كنا مع رسول الله ﷺ ليلة عرفة التي قبل يوم عرفة فإذا حس الحية فقال رسول الله ﷺ اقتلوها فدخلت شق جحر فأدخلنا عودا فقلعنا بعض الجحر فأخذنا سعفة فأضرمنا فيها نارا فقال رسول الله ﷺ وقاها الله شركم ووقاكم شرها

النسائي 2887صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Rituals of Hajj
Chapter
Killing snakes in the sanctuary
Numbering
Darussalam 2887
Nasai 2887