Many ships have an ident computer which can be queried to find out things such as the ship's identity, mission, cargo, destination, etc.