In Hawaii, if a dog attacks you, you cannot legally shoot it. (animal cruelty) 
If it is attacking your livestock, it is fair game. 
You sure about that Rock?
§ 711-1108.5 Cruelty to animals in the first degree.
(1) A person commits the offense of cruelty to animals in the first degree if the person intentionally or knowingly :
(b) Kills or attempts to kill any pet animal belonging to another person, without first obtaining legal authority or the consent of the pet animal's owner.
(3) Subsection (1)(b) shall not apply to:
(b) Conduct which the actor believes to be necessary to avoid an imminent harm or evil to the actor, another person, or an animal; provided that the harm or evil sought to be avoided by such conduct is greater than that sought to be prevented by this section and is justifiable as provided in section 703-302 for choice of evils; provided further that, for purposes of this paragraph, as the justification described in section 703-302 shall also apply to conduct which the actor believes to be necessary to avoid an imminent harm or evil to an animal.
§703-302 Choice of evils. (1) Conduct which the actor believes to be necessary to avoid an imminent harm or evil to the actor or to another is justifiable provided that:
(a) The harm or evil sought to be avoided by such conduct is greater than that sought to be prevented by the law defining the offense charged;
(b) Neither the Code nor other law defining the offense provides exceptions or defenses dealing with the specific situation involved; and
(c) A legislative purpose to exclude the justification claimed does not otherwise plainly appear.
(2) When the actor was reckless or negligent in bringing about the situation requiring a choice of harms or evils or in appraising the necessity for the actor's conduct, the justification afforded by this section is unavailable in a prosecution for any offense for which recklessness or negligence, as the case may be, suffices to establish culpability.
(3) In a prosecution for escape under section 710-1020 or 710-1021, the defense available under this section is limited to an affirmative defense consisting of the following elements:
(a) The actor receives a threat, express or implied, of death, substantial bodily injury, or forcible sexual attack;
(b) Complaint to the proper prison authorities is either impossible under the circumstances or there exists a history of futile complaints;
(c) Under the circumstances there is no time or opportunity to resort to the courts;
(d) No force or violence is used against prison personnel or other innocent persons; and
(e) The actor promptly reports to the proper authorities when the actor has attained a position of safety from the immediate threat. [L 1972, c 9, pt of §1; am L 1986, c 314, §6; gen ch 1993]
Attacking you or anyone or any animal on your property. Shoot ‘em if can’t scare ‘em off .
Walking down the road. You’re fawked or use suggestions noted previously. Could always use a pig spear as a walking stick.
I am not a lawyer
Edited to include referenced 703-302