Hamlet:
There's letters seal'd, and my two schoolfellows,
Whom I will trust as I will adders fang'd—
They bear the mandate, they must sweep my way
And marshal me to knavery. Let it work;
For 'tis the sport to have the enginer
Hoist with his own petard, an't shall go hard
But I will delve one yard below their mines
And blow them at the moon.
Hamlet Act 3, scene 4, 202–209
A petard was a bomb, in this case one that blows up prematurely and does in the one who is placing it. It was a little bomb, used to breach gates in Late Medieval warfare, and its name, petard, comes from the French which means, believe it or not, "fart." You know how that French food is. Perhaps that line about "your aunties" in Monty Python and the Holy Grail had some real tactical significance after all. At least they had body metaphors back in the day, instead of the lifeless abstraction of war language we use today.