Rangana Hirath took five wickets to put Sri Lanka in control of the second and final Test against Bangladesh