I bought a couple of small cattle prods in Oz before I left for this reason. These were designed for small cattle. They are about the size of a torch. Tried it out on one dog in Oz and when ever it saw me after that it ran away. A couple chances to use here I didn't have it with me.
Use to see a dog regularly around the bar area here in CM and sometimes gave it food and seemed ok and I never threatened him. One night I was heading to the area down a back soi. He was lying under a bush. He looked up as I walked past. I saw out the corner of my eye as I did pass he got up and started following me., thought nothing of it. Next thing, ouch, bit me on the back of the leg, drew blood. A course of Rabies injections followed but could not get the dog to pay for them.