Narrated Sahl bin Sa'd As-Sa'idi:
A man peeped through a hole in the door of Allah's Apostle's house, and at that time, Allah's Apostle had a Midri (an iron comb or bar) with which he was rubbing his head. So when Allah's Apostle saw him, he said (to him), "If I had been sure that you were looking at me (through the door), I would have poked your eye with this (sharp iron bar)." Allah's Apostle added, "The asking for permission to enter has been enjoined so that one may not look unlawfully (at what there is in the house without the permission of its people)."
حَدَّثَنَا أَبُو النُّعْمَانِ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ عُبَيْدِ اللَّهِ بْنِ أَبِي بَكْرِ بْنِ أَنَسٍ، عَنْ أَنَسٍ ـ رضى الله عنه ـ أَنَّ رَجُلاً، اطَّلَعَ فِي بَعْضِ حُجَرِ النَّبِيِّ صلى الله عليه وسلم فَقَامَ إِلَيْهِ بِمِشْقَصٍ أَوْ بِمَشَاقِصَ وَجَعَلَ يَخْتِلُهُ لِيَطْعُنَهُ.
Sahih al-Bukhari, 6901
Sahih al-Bukhari, Vol. 9, Book of Blood Money, Hadith 38
Sahih al-Bukhari, Book of Blood Money, Hadith 38