Mishkat al-MasabihChapter 3Hadith 312
Full Sharh — Mishkat al-Masabih 312
وَعَنْ أَنَسٍ قَالَ: كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا دَخَلَ الْخَلَاءَ يَقُولُ: «اللَّهُمَّ إِنِّي أَعُوذُ بِكَ مِنَ الْخبث والخبائث»
English Translation
Anas reported that when God’s messenger entered the privy he used to say, "O God, I seek refuge in Thee from male and female devils.”* *One might be inclined to translate this phrase as "from infidelity and act of disobedience,” but the tradition from Zaid b. Arqam (p. 76) is very explicit, and so the translation above is probably the correct one. PT-2 (12-71.) (Bukhari and Muslim).
Source
Mishkat al-Masabih(مشكاة المصابيح)
Purification
Hadith Number
312