IMHO, the first line of defense anyone has is intuition. Humans have a great ability to ignore their guts, make excuses, and deceive themselves but, assuming you can avoid the worse of the above, it is pretty hard for anyone really dangerous to avoid the condemnation of that little voice that issues warnings. Sociopaths tend to play off peoples weaknesses to avoid potential victims digging deep enough to see through their superficial charm.

Intuition isn't infallible but it is, when it allowed to work and be herd, is a finely tuned machine based on thousands of years of evolution.

The second line of defense is having friends around. Males are never entirely safe. Many a wife, daughter, sister, and coworker has found out that people you can trust for years can have a dark side. Friends can compensate for the momentary or long term failure of one in a group.

Physical defense is a pale third choice. A lot depends on how comfortable, and capable, of putting up a fight you are. Even seemingly decisive weapons like a .38 are not a sure thing. If you are not willing to use deadly force on short notice it tends to get taken away. An acquaintance ran a rape prevention seminar and she had a story about being a girlfriend with a .38 and it being used to pistol whip her. Almost killed her.

She spent weeks in the hospital and months in therapy getting over it. Part of her recovery was getting trained in Krav Maga and teaching rape prevention classes. although she seldom mentioned it she also became quite a shot with a pistol and had won several competitions.

She was the one I picked up intuition and friends as the first and second lines of defense.