Abu Huraira reported Messenger of Allah ﷺ 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. (Using translation from Muslim 2729)
قَالَ رَسُولُ اللهِ ﷺ إِذَا سَمِعْتُمْ نُهَاقَ الْحَمِيرِ بِاللَّيْلِ فَتَعَوَّذُوا بِاللهِ مِنْ شَرِّهَا فَإِنَّهَا رَأَتْ شَيْطَانًا وَإِذَا سَمِعْتُمْ صِيَاحَ الدِّيَكَةِ بِاللَّيْلِ فَاسْأَلُوا اللهَ مِنْ فَضْلِهِ فَإِنَّهَا رَأَتْ مَلَكًا