A crossbow will do this easily, but do not use this except for survival. "Booby-traps" are illegal. (Know your local laws before using.)
In many States, the above is NOT Legal to deploy... It is considered a "Set Gun" and setting up one is a Felony.... Just so Folks know....