(1) As used in this section, the term "dangerous weapon" means a firearm silencer, machine gun, short shotgun, short rifle, or ballistic knife.
(2) As used in this section, the term "illegal weapon" means a blackjack, a gas gun, or metallic knuckles.
(3) A person who knowingly possesses a dangerous weapon commits a class 5 felony. Each subsequent violation of this subsection (3) by the same person shall be a class 4 felony.
(4) A person who knowingly possesses an illegal weapon commits a class 1 misdemeanor.
(5) It shall be an affirmative defense to the charge of possessing a dangerous weapon, or to the charge of possessing an illegal weapon, that the person so accused was a peace officer or member of the armed forces of the United States or Colorado National Guard acting in the lawful discharge of his duties, or that said person has a valid permit and license for possession of such weapon.