(1) As used in this section, the term “dangerous weapon” means a firearm silencer, machine gun, rapid-fire device, short shotgun, or short rifle.
(2) As used in this section, the term “illegal weapon” means a blackjack, gas gun, ballistic knife, or metallic knuckles.
(3) A person who knowingly possesses a dangerous weapon commits a class 5 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.