Section 45. Whoever violates any provision of the five preceding sections shall be punished by a fine of not more than five hundred dollars or by imprisonment for not more than six months, or both.