Rig up a small magneto (some racing cars use magnetos, lawnmowers, or chainsaws) and drive two nails in a tree and turn it on.
One man got rid of borers on his elm tree and able to rid all on his property with the electric shocks.
Adjust settings of frequency or shock voltage to see what works best on insects you want to send packing.