If a grand juror, witness, district attorney, clerk, sheriff, or any other officer of the court, disclose the fact of an indictment being found or returned into court against a defendant, or disclose any action or proceeding had in relation thereto, before the finding of the indictment, or in six months thereafter, or until after the defendant shall have been arrested or given bail or recognizance to answer thereto, he shall be fined not more than two hundred dollars.