A Romanian hacker has been given a suspended sentence after hacking the U.S. Navy, the Department of Energy and NASA.