They should be hanged until death. In country like India they roam freely and every now and then rape happens, nowadays they won't even spare small kids. Every country should have rule like Saudi where they kill them in the middle of the road, so that fear should be in their minds.
If you say that in Saudi Arabia, rapists are killed near the road it means that such measures are not effective, and there still are such cases. It may be better to have each girl had a gun she could punish the rapist? Such a measure I think is better because you can use a gun in crime rather than wait for the punishment after.
Yes, it is better that every girl has a weapon and she could defend herself. It would also be nice for the girls to learn the techniques of street self-defense so that they are not defenseless against criminals. This will be more effective, because the rapist will be able to escape and escape from execution.