Any person, association, or corporation, or the agent of any person, association, or corporation, who knowingly purchases, or contracts to purchase, or makes any payment for or on account of any ore which has been taken from any mine or claim, by persons who have taken or may be holding possession of any such mine or claim, contrary to any penal law in force, shall be considered as an accessory after the fact to the unlawful holding or taking of such mine or claim and, upon conviction thereof, shall be subjected to the same punishment to which the principals may be liable.