It has been demonstrated many times in many countries that such "defensive" attacks are not lawful. A PI friend in Florida once advised that you can generally make a good case for blowing out the brains of an intruder (so long as he doesn't survive) but if you set booby traps to cause injury you're in deep [censored] (why do I get the feeling that's going to get auto-censored).

In any case, as another poster pointed out, it's a bad idea to set any kind of a trap that you're unwilling to be accidently snared by yourself.

Rob