First of all, anytime you dream of being attacked always exercise extreme caution for the next several weeks as this is first and foremost a warning dream.
If the attacker in your dream is an animal, watch out for that type of an animal, but also notice how some people act like animals.
If you dream that you have attacked someone, that is also a warning that your ill mood or temper fits may cause you to harm another and bring chaos down on your head.
If you are attacked by someone you know you may have to withstand an attack on your character and defend your honor, so to speak.
If you are attacked by an animal be very careful of walking the dark streets or putting your self in the places where you could possibly be attacked by a mugger, etc..
If you dream that you repel your attacker then you will meet with success in your current endeavor, and if you kill an attacking animal then will your life be saved by a stranger.