Section 24. Whoever assaults a person with intent to commit a rape shall be punished by imprisonment in the state prison for not more than twenty years or by imprisonment in a jail or house of correction for not more than two and one-half years; and whoever commits a second or subsequent such offense shall be punished by imprisonment in the state prison for life or for any term of years. Whoever commits any offense described in this section while armed with a firearm, rifle, shotgun, machine gun or assault weapon shall be punished by imprisonment in the state prison for not less than five years. Whoever commits a second or subsequent such offense shall be punished by imprisonment in the state prison for life or for any term of years, but not less than 20 years.
No person serving a sentence for a second or subsequent such offense shall be eligible for furlough, temporary release, or education, training or employment programs established outside a correctional facility until such person shall have served two-thirds of such minimum sentence or if such person has two or more sentences to be served otherwise than concurrently, two-thirds of the aggregate of the minimum terms of such several sentences.