Question: what are boars afraid of?
Answer: They are afraid of loud noises. So you could yell. Or get some noisemakers. If you are hiking and they show up, you are in danger.