I got a bug zapper yesterday because I have been dealing with occasional bursts of fruit flies (still don't know what was attracting them) and was fed up with them.
Then I realized--I have, in my apartment, everything I would need--along with the knowledge--to make my own.
I also, however, had the knowledge that I don't have the proper understanding of safety requirements and would rather not make something that would just shock me too.
aside: that thing is LOUD when it zaps a bug.