Hadithcore
Mishkat al-Masabih, 4138

‘Ikrima told on the authority of Ibn ‘Abbas, saying he was sure that he traced it back to the Prophet, that he used to order snakes to be killed and say, "He who leaves them alone fearing that one will come to take revenge does not belong to us." It is transmitted in <i>Sharh as-sunna.</i>

وَعَن عكرمةَ عَن ابنِ عبَّاسٍ قَالَ: لَا أَعْلَمُهُ إِلَّا رَفَعَ الْحَدِيثَ: أَنَّهُ كَانَ يَأْمُرُ بِقَتْلِ الْحَيَّاتِ وَقَالَ: «مَنْ تَرَكَهُنَّ خَشْيَةَ ثَائِرٍ فَلَيْسَ مِنَّا» . رَوَاهُ فِي شَرْحِ السّنة

References1 variant
In-Book Reference
Book 20, Hadith 73