How to tell if extraterrestrial visitors are friend or foe