Section 36. Whoever makes, or offers to make, any contract of bucketing or bucket-shopping, or who is the keeper of any bucket shop, shall be punished by a fine of not more than one thousand dollars or by imprisonment for not more than one year. Whoever shall be convicted of a second offence shall be punished by imprisonment for not more than five years. The continuing of the keeping of a bucket shop, by any person, after the first conviction therefor, shall be deemed a second offence hereunder. If a domestic corporation shall be convicted of a second offence, the supreme judicial court may, upon an information in equity in the name of the attorney general, at the relation of the commissioner of revenue, dissolve the corporation; and if a foreign corporation shall be convicted of a second offence, the supreme judicial court may, in the same manner, restrain it from doing business in this commonwealth.