Were I an evil terrorist, I'd be looking much more at other, completely legal things. Items such as two-part epoxies could be used to make a crude but effective knife, lithium batteries are trivially short-circuitable to cause a fire, etc. But, such things are much less glamorous and scary than a plastic derringer that's about as dangerous to the wielder as anyone else.
Even today, I see pilots open the cockpit during flight to use the toilet. Usually, the FA blocks the passageway with a cart. It seems plausible to me that there's a short period of time that a well-trained ninja-like attacker could leave their first class seat, and obtain cockpit access.
But I guess it'd be too expensive to provide full pilot separation.
Back in the 90s I still remember the day when a kind flight attendant came to my seat and took me to the cockpit of the 767 we were flying to Florida in.
Back then aircraft were occasionally hijacked, they'd be forced to divert or land somewhere and some ridiculous demands made before, more often than not, everyone was allowed to go home unhurt.
Could be at any domestic airport since once you get your badguy stuff inside the wall, you can carry it anywhere inside the system before using it.
There are a lot of potential attack vectors but I do not feel safe to talk about them in detail.
Any single shot pistol is going to be a useless weapon. Less dangerous than a knife in my opinion. Knives don't need to be reloaded and have unlimited ammunition.