Laws against rape, murder, and burglary are effective tools to prevent the harassment of women. As long as violators are prosecuted to the full extent of the law women will remain protected. Gun laws also allow women to carry firearms in a concealed manner. This affords them additional personal protection.
Women and men will never and really never have had true protection.
There is no law that can truly protect someone from all the harm there is.
But really in the case of men and women both of them can do wrongs.
Humans have free will and laws are the best shield we have at the moment.