I don't understand how an IR tester running on 6 AA batteries can shoot 500v??
Magic!
Or electronics.
Like 12V to 230V inverters, LED torches that run on one AA cell, etc. One way is run an oscillator off the DC supply, to make AC. Then through a transformer to boost the voltage. Then rectify the output if you need DC again.
You have won todays thread resurrection prize.