If any person or persons . . . shall discharge any gun, pistol or any other fire arm at any train, car, locomotive or tender . . . or shall aid or abet or procure any of the above mentioned acts to be done or attempted shall be deemed guilty of a misdemeanor, and upon conviction thereof be punished by a fine not exceeding five hundred dollars, or by imprisonment in the county jail not exceeding fifty days, or by both such fine and imprisonment for such offense.