Capturing this bullet explosion was like firework photography. When shooting fireworks, I adjust the exposure for something like a 5 second shot on a tripod. This was very similar, but horizontal, and a slightly shorter 3 second exposure.
Obviously shooting any gun in the pitch dark is super dangerous. As safety precautions they (firearms professionals) secured an indoor firing range and further fastened the weapon to the bench. We used a remote camera-trigger to keep me away from the business-end.
We controlled all the lights on the range, but we still had to adjust for the best timing and exposure. When shooting much slower fireworks, I'd press the remote when I heard the boom. In this case, the operator announced a three count and I pressed the remote shutter on two, a beat before the shot was fired.
Lastly, since the shutter was set to three seconds, and I was already open to f/4, I adjusted the ISO (and camera position) until I got a good looking exposure for each particular round. What loud fun we had!