0

I have data file which looks like this image below. File is used by warehouse management software. It is custom-made software build with C or Assembler (I believe). It runs on windows machine. This file contains information such as what item is in which shop and how many of items are left.

I'm building e-shop and my task is to connect this application with e-shop. To show if item is available or not.

File has extension of .san and I haven't found anything about such extension on Google. Screenshot is from first lines of the file from Notepad++ Hex viewer plugin.

Here is start of the file: https://www.dropbox.com/s/56lpcind56nexua/part1.san?dl=0

php is worst language for such things. I agree. But i have to do web API access to data from this file. It will use only twice per day with crontab, so no problem if it's slow. If you know a way with any other language which I could use on linux or windows - please give your ideas.

Right now I have this PHP script, which tries to read at least partly that file. Script is here: http://pastebin.com/TQGgv5X4

It partly reads data and can tell me if some SKU code is anywhere in file or not. It's better then nothing, but I need to get more information about item like where it is and how many of item is left in shop.

If you need any extra info, please add comments.

enter image description here

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Lukas Liesis
  • 24,652
  • 10
  • 111
  • 109
  • Only solution is to identify whatever documentation is available for the custom-made warehousing software, and/or the developers who maintain it currently to ask them – Mark Baker Oct 31 '14 at 15:17
  • You could try to identify if the items are equally spaced (take the same amount of bytes). This would allow you to read the items blockwise and further analyze them. Another possibility is that the file is working with something linke linked lists, so you could try to identify byte offsets pointing to data. Edit: furthermore if you have access to the software modifying these files you could add/remove single items and see how the files has changed. – matthias Oct 31 '14 at 16:43
  • Thanks for commenting. The developer, who built software is not reachable and there is no documentation at all and that software was built maybe 10 years ago. I will wait for more answers, maybe someone will have a solution how to read it. Change & check solution. Already tried, but maybe there are some better ways to interpret such things. – Lukas Liesis Oct 31 '14 at 17:37
  • Again I would try to check if can idenitfy a certain block length. Probably the 0x00 bytes do not contain any information and are just for padding specific fields to a pre-defined length. Another option would be to reverse engineer the old software. If this causes too much work maybe it's better to shift to a modern, open-source warehousing software or another commercial one, which is well documented. ;) – matthias Nov 04 '14 at 08:59
  • I'm for shift to modern applications, but not the workers and owners of company. They know how to use that old stuff and it works. It would cost a lot to move to new software. You have to count software and training costs. IT training is huge thing for 35+ people. Reverse engineering. Tried and failed. If no-one will give me any solution, I will stick to what I have already. there's a link to php code in question. But it does not fully decoding, but it's enough to tell if item is in any warehouse or not, so i can at least show in e-shop, if item is available at all or not anymore. – Lukas Liesis Nov 04 '14 at 09:18

0 Answers0