كتاب الذكر والدعاء والتوبة والاستغفار
48
The Book Pertaining to the Remembrance of Allah, Supplication, Repentance and Seeking Forgiveness
(20)
Chapter: It Is Recommend To Say Supplication When A Rooster Crows
(20)
باب اسْتِحْبَابِ الدُّعَاءِ عِنْدَ صِيَاحِ الدِّيكِ
Sahih Muslim 2729

Abu Huraira reported Allah's Messenger (ﷺ) 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.

حَدَّثَنِي قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا لَيْثٌ، عَنْ جَعْفَرِ بْنِ رَبِيعَةَ، عَنِ الأَعْرَجِ، عَنْ أَبِي، هُرَيْرَةَ أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏ "‏ إِذَا سَمِعْتُمْ صِيَاحَ الدِّيَكَةِ فَاسْأَلُوا اللَّهَ مِنْ فَضْلِهِ فَإِنَّهَا رَأَتْ مَلَكًا وَإِذَا سَمِعْتُمْ نَهِيقَ الْحِمَارِ فَتَعَوَّذُوا بِاللَّهِ مِنَ الشَّيْطَانِ فَإِنَّهَا رَأَتْ شَيْطَانًا ‏"‏ ‏.‏
Reference : Sahih Muslim 2729
In-book reference : Book 48, Hadith 112
USC-MSA web (English) reference : Book 35, Hadith 6581
  (deprecated numbering scheme)