A trap is a device which is used to detect , capture and harm to an intruder.
A trap door is a secret entry point into a program that allows someone to gain access without normal methods of access authentication.