Before getting into defending yourself during an attack we can look into preventing one. Be aware, looking around and taking a mental notes of who is around you as well can allow you to not fall victim of being caught off guard. Do not flex wealth. Showing off or wearing expensive jewelry, bags, or clothes will certainly catch some eyes, not all welcome. Be sure to carry keys in your hand before reaching your car. This prevents distraction and allows for possible protection if you have to. I would like to note that in an instance of self defense. DO NOT punch, the bones in your hand if unconditioned are easily breakable. If you make contact be sure to use the heel of your palm. This allows for more dynamic movement and force in your blows. Making a fist and taking a swing also telegraphs your movement overall allowing for the attacker, if they are aware, to respond. If you do not believe me, feel free to try this out with a punching bag.
Due to gun laws being prevalent in most states and knives not being allowed restricted areas like federal buildings or bars. While fending off an attacker with a pen is not preferred or practical in most situations however they can and will pull double duty as a self defense weapon in a pinch if you are carrying it on your person when the time comes to need it. After all, nothing stops an attacker quite like being impaled by a chunk of plastic, titanium, steel, or aluminum.
In the instance where you need to defend yourself look aggressive, like most animals, humans also respond to posture. An intimidating animal will tend to ward off predators. Look for opportunities to strike weak points. Taking a low posture allows for responsive movement to take advantage of openings. When an opportunity arrives strike fast and hard. Strike repeatedly until unable. Aggressive fighting styles reward by giving no time to an attacker.
Armpit - Attacking here is arguably better than chest or ribs, the armpit is sensitive and with a well time jab with a sharp object can completely eliminate an arm.
Ears - If you have the opportunity, do an ear clap. This means that with a quick, strong move you hit your attacker right in the ear forcing him to bend his head to the side.
Eyes - An attack here will produce a lot of pain and it will let the attacker disoriented allowing you to escape.
Groin - It will take a while for the attacker to recover from a good hit in the groin allowing you to get to safety or get help.
Knee and Thigh - Incapacitate your attacker with a good kick in the knee or a stab in the thigh. These areas are safe to kick without getting your foot grabbed by the attacker.
Knuckles and Back of Hand - Targeting the hand or knuckles can make it impossible to hold a weapon or even a fist allowing you to make a break for it.
Nose - Aim for the nasal bones. Use the heel of your palm to hit upwards and do it with your entire body.
Ribs Sternum and Solar Plexus - This can be crippling in most cases if hit hard enough. It is right above the stomach, under the ribs. Stabbing or using your elbow or your palm and put your entire body into this hit.
Throat and Neck - Where the main veins are exposed. Hit the hard with your palm or stabbing at the base. The blow must be short and strong.
This should you win you a couple street fights if necessary.