1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Determining format of an unknown file type

Discussion in 'Software Development' started by minimustangs, Feb 15, 2019.

Advertisement
  1. minimustangs

    minimustangs Thread Starter

    Joined:
    Jul 5, 2009
    Messages:
    380
    This isn't exactly programming, but came to me that this might be the best place to ask this question, and the filetype isn't unknown pre se, its just unknown how the data is stored, and unknown to Windows OS. Filetype is a .STO file, a setupfile of sorts.

    I want to read the contents of a file (a proprietary filetype) outside of the native application. The data can be exported to HTML from within the app, and I'm thinking its mostly alpha-numeric values.

    All I want to do deally is compare data values from one file against another file to review the differences.
    Whn I do look at the exported HTML file, its in a horrible format, that doesn't really relate to the way the data is displayed in the App, thus making comparisons difficult.

    I guess I figure that if I could read the data, I could reorder it somehow, maybe as an Excel document... for the purpose of comparison.

    Tx

    S~
     
  2. Xsage

    Xsage

    Joined:
    Jan 8, 2016
    Messages:
    244
    First Name:
    Dave
    Hello,

    If you just want to see if the files are different without actually seeing the plain text differences this is very easy, if you know anything about programming, you can hash the files and compare the strings of the hashes to see if they are the same.

    Otherwise the first thing to check is the contents of the .STO files by right clicking on them and selecting "Open With" and choosing notepad. If they display plain text then you are in luck, if it shows a bunch of weird characters it is encoded, you can try to decode it using online tools, but that will only work if they use standard encoding methods.

    If the .STO file istelf doesn't help you, then you will need to resort to the HTML files. You can use "Notepad++" with an independent compare plugin found here https://github.com/jsleroy/compare-plugin

    Or you can paste the file contents into an online tool like https://www.diffchecker.com/diff

    If you don't mine uploading the two files you want to compare I can have a crack at it.
     
    dlipman likes this.
  3. minimustangs

    minimustangs Thread Starter

    Joined:
    Jul 5, 2009
    Messages:
    380
    Here are two that are similar but different. Be curious to see what you find out
     

    Attached Files:

  4. managed

    managed Trusted Advisor Spam Fighter

    Joined:
    May 24, 2003
    Messages:
    11,025
    First Name:
    Allan
    Why not open the HTML exports in a browser ?
     
  5. jevanpipitone

    jevanpipitone

    Joined:
    Nov 10, 2014
    Messages:
    14
    First Name:
    Jevan
  6. minimustangs

    minimustangs Thread Starter

    Joined:
    Jul 5, 2009
    Messages:
    380
    That would require exporting from the native software, and you can only export a file under a given profile. To access and then export a different set of files, you have restart the application an go through the export process. Its intentionally designed to be inconvenient. The format of the export is confusing/difficult to make heads or tails out of.
     
  7. minimustangs

    minimustangs Thread Starter

    Joined:
    Jul 5, 2009
    Messages:
    380
    What does Binary same mean?
    The two files are very likely close to being the same, but there would be values for certain fields that would be different.
    Ultimately I'm trying to figure out if there is a way to read the file into a format that could be imported into a spreadsheet. Something a little more user friendly.

    At the moment to make comparisons I have to use my phone to capture the screen with data on it and the compare the pic on my phone to the other data set as it is displayed on the screen. I suppose a screen shot would be as effective as a picture...
     
  8. jevanpipitone

    jevanpipitone

    Joined:
    Nov 10, 2014
    Messages:
    14
    First Name:
    Jevan
    Can you post the name and URL of what the actual software you are using is, generating these .sto files and exporting .html files, so I can search for information about that particular software? Also when I open the .sto files that you attached it just looks like rubbish in a text editor such as atom, maybe it needs a hex editor to view it, I would like to search for a PDF explaining how to decode/understand it's format, or maybe you can get one from the software manufacturer if you email them? Also can you post some of the HTML exports that you are trying to compare, or don't you want to use those? If you understand the format you can write a c#.net program in visual studio community edition to convert it into whatever other format you want. Also can you post here an example of the two screen images from your mobile app and desktop PC that you are comparing, so I can see exactly what you are talking about?

    Binary same means the contents of the file is identical however metadata things such as the timestamp on the file, could differ.

    If it was textually the same, carriage return then newline, might be considered the same as just carriage return... at the end of a line.. and multiple spaces might be considered the same as one space. But that would not be binary same.
     
    Last edited: Mar 20, 2019 at 10:17 AM
  9. Xsage

    Xsage

    Joined:
    Jan 8, 2016
    Messages:
    244
    First Name:
    Dave
    I'm curious why you think the files are different.

    I wrote a quick bit of software to read the individual bytes of each file and put them through a mathematical hashing algorithm. I used SHA265.
    These where my results:

    Contents of file:
    [​IMG]

    Hash Results:
    [​IMG]

    So as you can see the strings of File 1 Hash and File 2 Hash are the same, meaning every single byte inside of the files are exactly the same.
    If I where you change any tiny detail, such as changing a single character, adding a space, a carriage return / line feed or attempt to tamper with the file in any other way, the hash will change and I have tested this to make sure it is the case.

    As for the contents of the file, I've got no idea what it is but if you provide us with the HTML equivilent I might be able to knock out a quick bit of software to compare the differences for you.
     
    Last edited: Mar 20, 2019 at 3:12 PM
  10. minimustangs

    minimustangs Thread Starter

    Joined:
    Jul 5, 2009
    Messages:
    380
    Xsage:

    I know they are different, since they are configuration files, and at least 1 value is different between the two.
    I will find a more dissimilar pair of files and the HTML output of those two files....
     
  11. Xsage

    Xsage

    Joined:
    Jan 8, 2016
    Messages:
    244
    First Name:
    Dave
    I'm not sure the .STO files contain what you think they do. Or if you are sure they are configuration files, it may be that they contain a compressed version of the whole configuration of the software and not just one individual part. Maybe the HTML version will shed some light on this.
     
  12. minimustangs

    minimustangs Thread Starter

    Joined:
    Jul 5, 2009
    Messages:
    380
    Her are two of the setup files, and thier HTML exported outputs.
    Converting every file to an HTML only takes one click, but it can only occur from within the environment and that takes a while to get to. Frr every file I may just want to peek at 1 value for a few seconds... thats a lot...
     

    Attached Files:

  13. Xsage

    Xsage

    Joined:
    Jan 8, 2016
    Messages:
    244
    First Name:
    Dave
    I'm guessing the first two STO files you uploaded where the same one by mistake thats why computingforus and I came to the conclusion they where the same. The two STO files in this instance are indeed different.

    Now as to comparing the differences:
    There is no way for us to compare the STO files unless we are able to work out how to decode them, and I'll be honest, I've got no idea.
    We can compare the HTML files easily enough, but the effort to develop something to individually compare two files that will need to be manually exported anyway, is far greater than just looking at the two files or using the two methods mentioned in my first post. As there isn't much in the html files to filter out, its a bit overkill to create something to just show the differences.

    I can see that these files are related to iracing and a quick google search shows that you are not the first to ask this question over the years. But unless the developers of the software change the format of their setup files to a more common format such as JSON or XML then you will have to do it the old fasioned way.

    However if you might find my hashing software useful just to see if the two .STO files are different and warrent further manual investigation let me know and I'll see if I can expand on it to make it able to search through all STO files in directory and subfolders to return a list of files that are the same - or different, its up to you.
     
  14. jevanpipitone

    jevanpipitone

    Joined:
    Nov 10, 2014
    Messages:
    14
    First Name:
    Jevan
    I am using BeyondCompare (http://www.scootersoftware.com/) paid version, and I can easily see the differences between your two html files. See attachment screen image so you can decide if it would be useful to you.

    https://www.iracing.com/contact/
    Technical issues and product questions: Support at iRacing.com
    I would email them your issue, maybe they can improve the software.
     

    Attached Files:

    Last edited: Mar 22, 2019 at 1:59 AM
  15. minimustangs

    minimustangs Thread Starter

    Joined:
    Jul 5, 2009
    Messages:
    380
    I can see the differences in the HTML file if I open them in a browser. What would be beneficial would be to see that data from the STO files. The HTML files were only provided for reference of the values contained by the STO. I highly doubt iracing invented a new file storage format, so figuring out how the file was created would allow the data to be filtered, exported and ultimately viewed. It would be great if I could import a STO in a spreadsheet. That would be ideal....

    Iracing would prefer the files can only be access by their platform, which I fully understand and completely makes good business sense. There is no need to contact them to ask them change this.

    There are times though when looking at the setup data outside of the environment, and to do that I need to view the setup information somehow. the HTML file isn't available by default, so if it hasn't been specifically exported, it wont be available. This was the only reason I interested trying to view the STO data .

    As it turns out, just within the last day or so, a new telemetry utility has demonstrated some promise. MOTEC reads telemetry files and displays all sorts of information, probably too much. Part of what it sees are the setup values, so in an indirect way, the data is there. This also requires an extra step though, you have had to have driven at least one lap with a specific setup to have generated a telemetry file. And the telemetry files are not named and correlated by setup name.
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...

Short URL to this thread: https://techguy.org/1223154

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice