Sunan an-Nasa'i, Book 45, Hadith 156 (In-Book)

It was narrated from Abu Hurairah that the Prophet said: "If a person were to look at you without permission and you were to throw a stone at him and put out his eye, there would be no blame on you."

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

sunnah.com