It was bait. The best organized groups in oppressed areas are extremists. We saw that when Hosni Mubarak got tossed in Egypt. The Muslim Brotherhood was instantly elected, because they were the most organized. Same goes for Hamas. Who was a serious oppoment to the only group capable of getting anthing actually done in Gaza? Israeli intelligence must have known they were going to get elected.
You can make a completely 3D printed gun that will survive at least one shot. I'm sure if you're using resin or carbon fiber reinforced plastic so you could probably get more than one shot off.