Man leaves warning for would-be attacker