Section 14. Money or other thing of value drawn as a prize or share thereof in a lottery, and all property disposed of or offered to be disposed of by illegal gaming, including games of chance or device under the pretext mentioned in section seven, by an inhabitant of or a resident within the commonwealth, and all money or other thing of value received by such person by reason of his being the owner or holder of a ticket or share of a ticket in a lottery or pretended lottery, or of a share or right in any such scheme of chance or such device, contrary to this chapter, shall be forfeited, and may be recovered by an information filed or by an action for money had and received brought by the attorney general or a district attorney in the name and on behalf of the commonwealth.