Abu Hurayrah (may Allah be pleased with him) reported that the Prophet (may Allah's peace and blessings be upon him) said: "If a man – or someone – peeped at you without your permission and you threw a pebble at him that gouged out his eye, you would not be at fault."
عن أبي هُريرة -رضي اللهُ عنه- مرفوعًا: «لو أن رجلا -أو قال: امْرَأً- اطَّلَعَ عليك بغير إِذْنِكَ؛ فَحَذَفْتَهُ بحَصَاةٍ، فَفَقَأْتَ عينه: ما كان عليك جُنَاحٌ».
شرح الحديث :
The Prophet (may Allah's peace and blessings be upon him) says that if someone looks at another from behind a door, from above a wall or something, without his permission, and then one gouges out his eye with a pebble or a skewer, this physical damage will not incur a sin or retribution on its doer. This is because the peeper is the aggressor and guilty for violating the other person's privacy.