A gun stuffed into a sofa led police to a “revenge” shooting where a gang opened fired on their victim through a house window.