To dream of a whip, often seen as an instrument of punishment, indicates far more. You may be in a physically or mentally abusive relationship. Something in your waking life may be causing you guilt or shame. Conversely, the whip may simply mean that you have lost control over your waking life and need to reassert yourself and your self-control.
To you dream that you are whipping an attacker is an indication that the trials and obstacles will be worth it once you realize your goals. Once you have passed them by, you will see great respect, honor, and wealth.