I want to be able to write the simplest possible script that is able to contact a Bitcoin full node (given it's IP and port) and get the latest block hash.
I don't need to verify blocks or send transactions or even be a good peer.
Are the messages all http? And how many messages (handshake? Network magic bytes? Service bits?) are required to get to the point where I can get useful information?