A horn that is loud might cause enough distraction for the dog to break off the attack, as well as attract attention from passers-by who can assist you.