View Issue Details

IDProjectCategoryView StatusLast Update
0000128file[All Projects] Generalpublic2020-02-15 01:02
Reporterroberto beltramiAssigned Tochristos 
PriorityhighSeveritymajorReproducibilitysometimes
Status resolvedResolutionfixed 
PlatformintelOSwindowsOS Versionall
Product Version5.38 
Target VersionFixed in VersionHEAD 
Summary0000128: wrong detection of .pnx data files
Description.pnx are data files for our cad/cam system. I attacched 3 files, good.pnx is correctly detected as 'data' while err1 and err2 are detected as '68k Blit mpx/mux executable'. can you solve this?

many thanks
TagsNo tags attached.

Activities

roberto beltrami

2020-01-10 10:40

reporter  

err1.pnx (128,654 bytes)
err2.PNX (193,278 bytes)
good.pnx (30,370 bytes)

christos

2020-01-17 17:49

manager   ~0003345

What's the CAD system name? Did you develop it internally or is it a commercial product? Where is the file format described?

roberto beltrami

2020-01-20 08:54

reporter   ~0003347

The CAD system is NAXOS and we develop it internally. The file format is reserved. Most data is compressed and encrypted, so we don't have control over the byte sequences generated

roberto beltrami

2020-02-13 07:40

reporter   ~0003355

no news?

christos

2020-02-13 20:39

manager   ~0003359

Sorry, I've been busy. If there is no standard header in your files and they can contain any byte sequence, file(1) can't recognize them and different pnx files can will end up producing spurious matches. This cannot be fixed until the system produces files that have standard header...

roberto beltrami

2020-02-14 09:19

reporter   ~0003362

I'm sure you understand that we cannot change our format just because your software detect as '68k Blit mpx/mux executable' a file that is something else.
If it can help you, starting from offset 4 you find a 16bytes string (zero terminated) with letter P followed by the sw version that produced the file. for example, 'P19.1607.1627.0' or 'P20.1629.1631.0 '. please let me know

best regards
roberto

roberto beltrami

2020-02-14 09:22

reporter   ~0003363

BTW, the numbers often change because we release new versions almost every month. so you should rely on the structure of the string Pxx.xxxx.xxxx.x and not the exact numbers

roberto beltrami

2020-02-14 09:23

reporter   ~0003364

x are always 0-9, no letters nor special chars

christos

2020-02-15 01:02

manager   ~0003365

Well, that pattern can be used as a magic number and I've already added it! The next version of the program will recognize PNX files:

[8:02pm] 348>./file -m ../magic/magic.mgc *.pnx
err1.pnx: NAXOS CAD System file from version P19.1629.1630.0
err2.pnx: NAXOS CAD System file from version P19.1607.1628.0
good.pnx: NAXOS CAD System file from version P19.1607.1615.0

Issue History

Date Modified Username Field Change
2020-01-10 10:40 roberto beltrami New Issue
2020-01-10 10:40 roberto beltrami File Added: good.pnx
2020-01-10 10:40 roberto beltrami File Added: err2.PNX
2020-01-10 10:40 roberto beltrami File Added: err1.pnx
2020-01-17 17:48 christos Assigned To => christos
2020-01-17 17:48 christos Status new => assigned
2020-01-17 17:49 christos Status assigned => feedback
2020-01-17 17:49 christos Note Added: 0003345
2020-01-20 08:54 roberto beltrami Note Added: 0003347
2020-01-20 08:54 roberto beltrami Status feedback => assigned
2020-02-13 07:40 roberto beltrami Note Added: 0003355
2020-02-13 20:39 christos Note Added: 0003359
2020-02-13 20:39 christos Status assigned => feedback
2020-02-14 09:19 roberto beltrami Note Added: 0003362
2020-02-14 09:19 roberto beltrami Status feedback => assigned
2020-02-14 09:22 roberto beltrami Note Added: 0003363
2020-02-14 09:23 roberto beltrami Note Added: 0003364
2020-02-15 01:02 christos Status assigned => resolved
2020-02-15 01:02 christos Resolution open => fixed
2020-02-15 01:02 christos Fixed in Version => HEAD
2020-02-15 01:02 christos Note Added: 0003365