03-10-2024 04:52 AM - edited 03-10-2024 05:10 AM
Hello,
I need to decode data sent via TCP-IP protocol from an external LabVIEW-based application. I don't have the source code of the external application.
The application sent a string which I'm pretty sure it's a the binary representation of a cluster, obtained with the "Flatten to String" function.
My problem is that I don't know the cluster structure and I cannot decode it.
Is there any way to build the cluster structure starting from its binary data string?
Thanks
03-10-2024 05:18 AM
Without some knowledge about what the structure contains in terms of data types and actual values, you’re facing a problem similar to trying to decipher encrypted messages without knowing the encryption key. Not entirely impossible but fairly close.
A flattened data stream simply contains all the binary data neatly serialized in memory, without any padding and other formatting hints.
03-10-2024 06:55 PM
You don't really need the source code, just the documentation. Do you know who wrote it?
How long are these strings? Since you probably know what kind of data it contains (scalars, integers, arrays, etc.) you might be able to reverse engineer with some trial and error. Can you collect a series of raw strings based on known data? For example if only one element changes, you can pinpoint its offset location.
03-11-2024 03:28 AM - edited 03-11-2024 03:29 AM
@altenbach wrote:
You don't really need the source code, just the documentation. Do you know who wrote it?
If it's a typical LabVIEW application, chances that you can somewhere somehow get at the source code are definitely higher than that someone cared to document such "arcane" details. 😁
I didn't say the chances are high, but in my not quite uninformed opinion, it's factors higher than to find the byte stream protocol documented.