I always used a faster method. If done properly once you won't need repeats. Attend a training class with your dog and speak to the trainer. The quickest method to resolve this is with a prong collar and when the dog lunges or attacks you lift him off the ground swiftly with a good snap and hold for a few seconds then release and tell the dog to sit. You have to know how to use the prong collar the right way so as not to harm your dog, this is why I advised seeking a good training class
And by doing that you could choke th dog, or break it's neck. There are much more HUMANE ways to fix the problem.