Whoever, in any Territory or District, or within or upon any place within the exclusive jurisdiction of the United States, willfully and maliciously trespasses upon or enters upon any railroad train, railroad car, or railroad locomotive, with the intent to commit murder or robbery, shall be fined under this title or imprisoned not more than twenty years, or both.
Whoever, within such jurisdiction, willfully and maliciously trespasses upon or enters upon any railroad train, railroad car, or railroad locomotive, with intent to commit any unlawful violence upon or against any passenger on said train, or car, or upon or against any engineer, conductor, fireman, brakeman, or any officer or employee connected with said locomotive, train, or car, or upon or against any express messenger or mail agent on said train or in any car thereof, or to commit any crime or offense against any person or property thereon, shall be fined under this title or imprisoned not more than one year, or both.
Upon the trial of any person charged with any offense set forth in this section, it shall not be necessary to set forth or prove the particular person against whom it was intended to commit the offense, or that it was intended to commit such offense against any particular person.