I decoded the response of an HTTP request from base64 into binary and it seems like the data is consistent with application/octet-stream as per this website. I am expecting the response to have some sort of structured data format like JSON, but I'm not sure. Is there a way to determine the type of application needed to process this binary data?
Asked
Active
Viewed 305 times
0
-
`application/octet-stream` is just the mime type for any binary data. You can't infer anything from that alone. All you have left is making guesses about the data content based on structure, magic bytes, etc. There are some python libraries over on [pypi](https://pypi.org/) that can help with figuring that out. – Ouroborus May 28 '22 at 03:06
-
Is there a chance it's not any known filetype (and hence cannot be processed by any application on my OS), but data that gets processed by some other js script to render the right output when the website loads? – Christian Adib May 28 '22 at 03:14
-
Of course. Custom data or uncommon data types will be like that. Also, keep in mind that the HTTP mime-type is more of a suggestion. Some servers can just say everything is `application/octet-stream`. After all, the site only really cares that the data is transferred, not that the browsers or user knows what it is. – Ouroborus May 28 '22 at 03:20
-
That's helpful. So there's a chance I may not be able to parse the data at all. – Christian Adib May 28 '22 at 03:22
-
Yes. A large part of it depends on how much time and effort you want to put into it. Even then, it's possible that you need previous data to interpret current data or that you need server access. – Ouroborus May 28 '22 at 03:46