Any person who aids or attempts to aid the enemy or any hostile force with arms, ammunition, supplies, money, or other thing or who without proper authority knowingly harbors, or protects, or gives intelligence to, or communicates or corresponds with, or holds any intercourse with the enemy or any hostile force, either directly or indirectly, shall be punished as a court-martial directs.