Two men have been praised for their bravery after they used their bodies to protect women and children during a shooting.