Shlok 181

If for some reason a female makes advances towards a Brahmchari then he may use words such as “Go away from here - stay away from me!”  in order to prevent the woman from coming any closer.  If such words fail then he may show contempt towards her by using harsh words or anger towards her.  In this way he should prevent any direct confrontation and send her on her way.

This again is in order to uphold the Brahmcharis Vrata of Brahmcharya as this duty is his greatest.  After showing contempt or speaking with her, the Brahmchari should perform Prayaschit in order to intone for his sin of speaking with a woman.