Safari, Chrome, and Firefox add extended attributes to files downloaded in OS X, so the OS can stupidly warn you not to open things you downloaded. The xattr property is ‘com.apple.quarantine’.
Safari and Chrome (and maybe Firefox) also add the optional ‘com.apple.metadata:kMDItemWhereFroms’ property, which stores the URL that the file was downloaded from. If you can get past Item Where Froms without banging your head, you’ll be pleased to know that it is stored as a Binary Property List, a binary version of the regular Property List, a long-winded XML document that Apple uses for every damn thing.
Anyway, one-liner mixture of bash and perl to display the property in a readable form:
UPDATE : Again, without perl. I didn’t know about xxd.
UPDATE 2 : Err, yeah. There it is.