Sunan an-Nasa'i, Volume 5, Book 45, Hadith 4862 (DarusSalam) ⓘ
It was narrated form Anas bin Malik that: a Bedouin came to the door of the prophet and put his eye to the crack. The Prophet saw him and intended to put his eye out with a sword or a stick. When he saw him, he stopped, and the Prophet said to hi: "If you had persisted, I would have put your eye out."
أَخْبَرَنَا عَمْرُو بْنُ مَنْصُورٍ، قَالَ حَدَّثَنَا مُسْلِمُ بْنُ إِبْرَاهِيمَ، قَالَ حَدَّثَنَا أَبَانُ، قَالَ حَدَّثَنَا يَحْيَى، عَنْ إِسْحَاقَ بْنِ عَبْدِ اللَّهِ بْنِ أَبِي طَلْحَةَ، عَنْ أَنَسِ بْنِ مَالِكٍ، أَنَّ أَعْرَابِيًّا، أَتَى بَابَ رَسُولِ اللَّهِ صلى الله عليه وسلم فَأَلْقَمَ عَيْنَهُ خُصَاصَةَ الْبَابِ فَبَصُرَ بِهِ النَّبِيُّ صلى الله عليه وسلم فَتَوَخَّاهُ بِحَدِيدَةٍ أَوْ عُودٍ لِيَفْقَأَ عَيْنَهُ فَلَمَّا أَنْ بَصُرَ انْقَمَعَ فَقَالَ لَهُ النَّبِيُّ صلى الله عليه وسلم " أَمَا إِنَّكَ لَوْ ثَبَتَّ لَفَقَأْتُ عَيْنَكَ " .
also referenced under: Hadith 4858 (Reference) & Book 45, Hadith 153 (In-Book)