Sahih Bukhari Volume 4, Book 54, Hadith Number 522.

Narated By Abu Huraira : The Prophet said, “When you hear the crowing of cocks, ask for Allah’s Blessings for (their crowing indicates that) they have seen an angel. And when you hear the braying of donkeys, seek Refuge with Allah from Satan for (their braying indicates) that they have seen a Satan.”