Sunan an-Nasa'i #4859 · The Book of Oaths (qasamah), Retaliation and Blood Money

Sunan an-Nasa'iIt was narrated from Sahl bin Sa'd As-Saidi that
Sunan an-Nasa'i · Book 45 · The Book of Oaths (qasamah), Retaliation and Blood Money
Sunan an-Nasa'i · كتاب 45 · كتاب الأيمان والقصاص والدية
a man looked through a hole in the door of the Prophet, who had with him a kind of comb with which he was scratching his head, When the Messenger of Allah saw him he said: "If I had known that you were watching me, I would have stabbed you in the eye with this. This rule of asking permission has been ordained so that one may not look unlawfully (into people's houses)
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنِ ابْنِ شِهَابٍ، أَنَّ سَهْلَ بْنَ سَعْدٍ السَّاعِدِيَّ، أَخْبَرَهُ أَنَّ رَجُلاً اطَّلَعَ مِنْ جُحْرٍ فِي بَابِ رَسُولِ اللَّهِ صلى الله عليه وسلم وَمَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم مِدْرَى يَحُكُّ بِهَا رَأْسَهُ فَلَمَّا رَآهُ رَسُولُ اللَّهِ صلى الله عليه وسلم قَالَ ‏
"‏ لَوْ عَلِمْتُ أَنَّكَ تَنْظُرُنِي لَطَعَنْتُ بِهِ فِي عَيْنِكَ إِنَّمَا جُعِلَ الإِذْنُ مِنْ أَجْلِ الْبَصَرِ ‏"‏ ‏.‏
Reference : Sunan an-Nasa'i 4859In-book reference : Book 45, Hadith 154