Attenuation of shock waves by using porous media