Al-Adab Al-Mufrad, Book 43, Hadith 32 (In-Book)

Abu Hurayra reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "If someone looks inside, he should not be given permission to enter."

حَدَّثَنَا إِبْرَاهِيمُ بْنُ الْمُنْذِرِ، قَالَ‏:‏ حَدَّثَنَا سُفْيَانُ بْنُ حَمْزَةَ قَالَ‏:‏ حَدَّثَنِي كَثِيرُ بْنُ زَيْدٍ، عَنِ الْوَلِيدِ بْنِ رَبَاحٍ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللهِ صلى الله عليه وسلم قَالَ‏:‏ إِذَا أَدْخَلَ الْبَصَرَ فَلاَ إِذْنَ لَهُ‏.‏

sunnah.com