Section 23. Any officer, director, agent or employee of any credit union, who knowingly and wilfully does any act forbidden to him or to such credit union by any provision of chapter one hundred and sixty-seven or one hundred and seventy-one, or who knowingly and wilfully aids or abets the doing of any act so forbidden to such credit union or to any other officer, director, agent or employee thereof, or who knowingly and wilfully fails to do any act required of him by any such provision, or who knowingly and wilfully fails to do any act which is required of such credit union by any such provision the performance of which is imposed on him by the by-laws or regulations of the credit union or by provision of law or the responsibility for the non-performance of which is placed upon him by section twenty-two shall, if no other penalty against him in his aforesaid capacity is specifically provided, be punished by a fine of not more than one thousand dollars or by imprisonment for not more than one year, or both.