All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Allaah The Almighty granted the Jinn the ability to appear in different forms. They may appear in the form of humans. Once, a devil came to Abu Hurayrah in the form of a poor man and took from food set aside for charity. [Al-Bukhari]
They may appear in the form of animals, such as black dogs. The Prophet, sallallaahu ‘alayhi wa sallam , mentioned that the black dog is a devil. [Muslim] Ibn Taymiyyah stated that Jinn frequently take the form of black dogs and black cats.
They may also appear in the form of snakes. On the authority of Abu Lubaabah, may Allah be pleased with him, the Prophet, sallallaahu ‘alayhi wa sallam, forbade killing snakes that are found inside houses lest the killed snake be a Jinn that had embraced Islam. [Al-Bukhari and Muslim] On the authority of Abu Sa‘eed Al-Khudri the Prophet, sallallaahu ‘alayhi wa sallam, mentioned that some Jinn in Madeenah had embraced Islam and he ordered the Companions that if they saw a snake they should give it respite for three days. Then, if they found it again after the three days had passed, they should kill it because in that case it was a devil. [Muslim]
Muslims should fortify themselves with remembrance of Allaah The Almighty and seek refuge with Him from the evils of the Jinn and the devils.
Allaah Knows best.