Not sure if this counts as it relates to a weapon release mechanism rather than the weapon itself, but during World War II, an American B-17 bomber crew apparently used a toilet to better control dropping jellied gasoline onto German fighters which approached them from below.
This account is related by Lt. Dewayne Bennett, a B-17 pilot of the 384th Bombardment Group, 545th Squadron, while based at Grafton Underwood in England in 1944. The story appears as Toilet Stool Ace, in Dewayne 'Ben' Bennett’s Stories of a B-17 Bomber Pilot. It is also printed in a compilation, How We Won the War, Or, Ya Gotta be Kiddin'!, You Got Away with That?! by Charles G. Pefinis.
"Lead Group, 41st C Combat Wing - 18 June 1944 - Laon/Athies, France." Bennett is standing centre back row. Source: USAAF 384th Bombardment Group
According to Bennett, German fighters would target bombers from below, especially those with apparently inoperative ball turret gunners. The fighter pilot would
Snake his way up under the wounded B-17, pull up sharply, hanging the
fighter on the prop, and pour deadly 20mm fire into the unprotected
Looking for a way to counter this, his crew came up with various ideas, eventually hitting upon jellied gasoline in 5 gallon cans. The idea was to release it in one big gob. However, this wasn’t as effective as the crew had hoped as the slipstream tore the gob apart. The problem was how to prevent this happening. Then, one member of the crew had an idea while sitting “on the crapper”:
"When I flushed the stool I noticed the water rushed out of the tank
into the bowl, and it swirled and fell out of the bowl in a mass. If
we could rig up a toilet stool in the bomb bay, close to the bottom of
the plane it would fall in a gob”
Bennett’s’ crew got a “toilet stool complete with a tank” (filched from a senior officer's quarters) and mounted it in the bomb bay with bailing wire tied to the flush valve so that it could be pulled at the right moment. On May 13, 1944, during a mission to Stettin (north of Berlin), their plane was approached from below by an ME-109:
He was climbing, coming at our belly, when the ball turret gunner
I immediately jerked the bailing wire, and the ball turret gunner
started firing...the jellied gasoline had been ignited.
Looking down, I saw the German fighter with all the fabric burned off
the control surfaces, and the pilot wriggling the stick wondering what
had happened to his control...the pilot bailed out.
Bennett goes on to say:
After we had gotten out third enemy fighter our crew chief painted
three small toilets up under the pilot’s window....
The crew were found out by HQ after they had dispatched their fifth fighter. Bennett was reprimanded by the officer whose toilet they had taken, and told to return the toilet and revert to using more ‘conventional’ equipment.