It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "Snakes are the transformed form of the jinn, just as the apes and swine from the Children of Israel were transformed."
Abu Hatim al-Busti (may Allah have mercy on him) narrated it through the chain of Abdullah bin Ahmad bin Musa, Abu Kamil al-Jahdari and Abd al-Aziz bin al-Mukhtar.