The Book Pertaining to the Remembrance of Allah, Supplication, Repentance and Seeking Forgiveness (Kitab Al-Dhikr)
Muslim :: Book 35 : Hadith 6581
Abu Huraira reported Allah's Messenger (may peace be upon him) as say- ing. When you listen to the crowing of the cock, ask Allah for His favour as it sees Angels and when you listen to the braying of the donkey, seek refuge in Allah from the Satan for it sees Satan.