One day, while Ibn Masud was delivering a sermon, he noticed a snake crawling along the wall. He paused his sermon, struck it with his staff (Yunus said, with his staff) until he killed it, then said, "I heard the Messenger of Allah ﷺ say, 'Whoever kills a snake is as one who has killed a polytheist whose blood was lawful.'"
حدثنا عبد الله بن يزيد ويونس قالا حدثنا داود يعني ابن الفرات عن محمد بن زيد عن أبي الأعين العبدي
بينما ابن مسعود يخطب ذات يوم فإذا هو بحية تمشي على الجدار فقطع خطبته ثم ضربها بقضيبه أو بقصبة قال يونس بقضيبه حتى قتلها ثم قال سمعت رسول الله ﷺ يقول من قتل حية فكأنما قتل رجلا مشركا قد حل دمه
Its chain of transmission is daif. Muhammad bin Zayd bin Ali Kindi, also said to be Abdi, also said to be Jarmi, the judge of Marw, is trustworthy. Ibn Hibban mentioned him among the trustworthy narrators, and Bukhari gave his biography in Al-Kabir 1/1/84-85. Abu Hatim said, "His hadith is acceptable, there is no harm in him."Abu Aayn Abdi is daif. Ibn Main and Abu Hatim both judged him daif. Ibn Hibban said, "He is the one who narrated from Abu Ahwas from Abdullah, as a marfu report, 'Whoever kills a snake is as if he killed a polytheist.'" This was narrated by Dawud bin Abu Furat from Muhammad bin Zayd from him. Other hadiths have come from him through this same chain, most of which have no basis to rely on. His biography appears in Lisan Mizan 6:342 and in Tajil 464-465.The hadith appears in Majma al-Zawaid 4:45-46, where it is also attributed to Abu Yaala, Bazzar, and Tabarani in Al-Kabir. He said, "The narrators of Bazzar's version are the narrators of the sahih." This is what he said, but I do not know what the chain of Bazzar's version actually is. If it is the same as this chain, then it is daif, and if it is a different one, then perhaps his statement holds.