The idea is to make yourself as unattractive to the attacker as possible; some will become disgusted and leave you be.
I understand the theory, but rape is not about the rapist being attracted to the victim, if it were there would only be attractive victims. Rape about rage, domination and control. My point is that making oneself unattractive or disgusting may work for some rapists, but not all, there are just too many sicko's out there.