If you have been around dogs you can usually tell their disposition by their behavior. Stuff you want to watch out for is a lowered head, flattened ears and no warning growls or barks. They will also run directly and without bounding at something, without wagging a tail or looking around at other objects. Before an attack they will remain quiet and almost slink around, following and moving along side but not in front of their target with ears up and alert.
Never had any bother me directly, but we use to get random urbanites who'd let their pit/rott mixes run wild ("it's the country, they can run in the woods we don't own!") and who'd threaten our livestock (mainly sheep, chickens and ducks). Most I shot never had collars, but the few that did would have the collars returned (sans dog) and occasionally by a police officer carrying a bill for property damages.
The dogs who were not intent on attacking would respond to verbal commands or just a challenging stance: yelling sit in a forceful tone/stomping on the ground/etc, which would get unsure dogs to stop and bark or flee (or the ones who knew verbal commands, to come/heel/lay down), but this would break their focus as they become unsure if a target was easy. Dogs who failed to retreat, obey or stop acting aggressive on a warning would get an 8mm or 303 round (surplus ammo was cheap and effective).
Dogs are like people (and vice versa): their body language tells everything and they shouldn't get more than one warning.