Is "Hijab" really an Immunity?

I have heard that in some parts of the world (middle east) some politicians claim that hijab is some sort of immunity for men against the harm that some men are posing toward them. Then my question is: If "Hijab" as explained and defined by your rules is somehow an immunity, couldn't it be contradictory while taking a look at these pictures? 
Sometimes "NO HIJAB" is even less exposing and thus dangerous for women as I've seen in images such as these: