The attacker can attack for many reasons. If you figure out what the attacker intends to do, that will help you make your move effectively. For example, if the attacker attempts to kidnap you, your focus should be stopping the attacker from doing that.
You might punch him or do something, but in the end, if the attacker kidnaps you, you will be in more trouble. You do not know what would happen after that. And the most important thing is, the attacker is in control after kidnapping you successfully.
The attacker might grab you from behind and grab your mouth as well so that you cannot make any sound. You can watch this video to see what the situation would look like. In your training, while practicing, you might apply this technique and release yourself easily, but when the thing gets real, it might be different.
After grabbing you like this, the kidnapper might drag you and move you from there. When someone grabs you like this, the first thing you should do is to prevent the attacker from leaning you back. You cannot use your strength and technique once the attacker leans you back. Otherwise, the attacker will have more control of that situation.
In case the attacker leans you back and you lose your balance, regain your balance first. Then you can grab the attacker's hand that he keeps on your mouth and turn. You have to do this suddenly and quickly without letting the kidnapper know what you are about to do. From there, you can strike the attacker, throw him and get rid of that.
When you see the kidnapper is in pain, don't just stay there. The kidnapper might try to kidnap you again. Leave the place and get out of there as soon as you can.
If you are aware of your surroundings, it will help you a lot to prevent possible attacks or attempt to kidnap.