Is there a way to read the contents of the master boot record?
On a Unix-type system (Linux, MacOS, etc), you simply read from the hard drive's character device (/dev/sda perhaps), and access the MBR that way. On Windows you could get a windows version of the dd program and use that to look at the bytes you are interested in.
Now, as to what's in the MBR, you might want to look at the Wikipedia page for a beginning. Hint: No, it's not a script.