According to the laws of war the government at war is solely responsible for the safety of civilians within a combat area. So when Hamas operates among civilians they are solely responsible for what happens to them.
If I have to choose which one is the lesser evil to support then I choose which ever one of them is the only democracy in the region who allows women's rights and full, legal citizenship to immigrants.