كتاب الطهارة
3  
Purification
(3b)
Chapter: How to act when relieving oneself - Section 2
(2)
باب آداب الخلاء - الفصل الثاني
Mishkat al-Masabih 358
‘Ali reported God’s messenger as saying, "The covering between the eyes of the jinn and the private parts of the children of Adam when one of them enters the privy is provided by his saying, ‘In the name of God.’” Tirmidhi transmitted it, saying that this is a gharib tradition and that its isnad is not strong.
وَعَنْ عَلِيٍّ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «سَتْرُ مَا بَيْنَ أَعْيُنِ الْجِنِّ وَعَوْرَاتِ بَنِي آدَمَ إِذَا دَخَلَ أَحَدُهُمُ الْخَلَاءَ أَنْ يَقُولَ بِسْمِ اللَّهِ» . رَوَاهُ التِّرْمِذِيُّ وَقَالَ: هَذَا حَدِيثٌ غَرِيبٌ وَإِسْنَاده لَيْسَ بِقَوي
  صَحِيح لغيره   (الألباني) حكم   :
Reference : Mishkat al-Masabih 358
In-book reference : Book 3, Hadith 70