Author Topic: TrID & file - considerations  (Read 27830 times)

sustrm

  • Guest
TrID & file - considerations
« on: October 13, 2007, 12:13:22 AM »
Quote
./trid some.exe
...
File /triddefs.trd not found!
No definitions available! You can download an up to date
defs library from TrID's page at links-not-allowed
$ unzip triddefs.zip
Archive:  triddefs.zip
replace TrIDDefs.TRD? [y]es, [n]o, [A]ll, [N]one, [r]ename: n
$ mv TrIDDefs.TRD triddefs.trd
$ ./trid some.exe
...
100.0% (.EXE) DOS Executable Generic (2000/1)

$ file some.exe
some.exe: MS-DOS executable, MZ for MS-DOS, WDos/X DOS extender
Quote
$ ./trid /bin/bash
...
 50.1% (.O) ELF Executable and Linkable format (Linux) (5034/15)
 49.8% (.O) ELF Executable and Linkable format (generic) (5000/1)
$ file /bin/bash
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), stripped

I don't mean to discourage you... TrID is a nice idea for a windows program but improving and/or porting the long-existing GPL programs may end up to be "for the greater good". Also, if you time it, trid is about 4 to 5 times slower.
« Last Edit: October 15, 2007, 04:16:16 PM by Mark0 »

Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2743
    • Mark0's Home Page
Re: TrID on Linux - considerations
« Reply #1 on: October 13, 2007, 12:30:13 AM »
Hi!

I don't mean to discourage you... TrID is a nice idea for a windows program but improving and/or porting the long-existing GPL programs may end up to be "for the greater good". Also, if you time it, trid is about 4 to 5 times slower.
Don't worry! :)

TrID's works a bit in a different way (and does it by design, since it started as a personal / toy project of mine to experiment a bit), so it's not a surprise that it may be slower, especially in certain conditions. Note also that executables aren't the main targets of TrID - much more specialized tools exist for that.
Finally, the Linux version is admittedly less polished / updated than the Win32 one, even if the basic fileid process is obviously the same, and should results in the exact same info returned by the tool.

On the other way, TrID's may identify some file formats that other tools don't know, and make very easy to create new defs for new filetype, or to update existing defs to perfect them.

Thanks for the feedback,
Bye!

P.S.
I splitted / moved the discussion because it seems it doesn't belong to the other thread.

sustrm

  • Guest
Re: TrID on Linux - considerations
« Reply #2 on: October 13, 2007, 08:48:03 PM »
Well, if you insist on having it your way, you may want to try to incorporate "magic" headers (which would give you far more "definitions" than you already have) - as long as you keep your program open source or freely available, see www(dot)magicdb(dot)org, or /etc/file/magic|/usr/share/misc/magic|`locate magic` on *nix systems.

sustrm

  • Guest
Re: TrID on Linux - considerations
« Reply #3 on: October 13, 2007, 09:11:29 PM »
. Note also that executables aren't the main targets of TrID - much more specialized tools exist for that.
I wasn't talking about executables only.. that was as example only.

Quote
$ ./trid x.bat
...
Warning: file seems to be plain text/ASCII
         TrID is best suited to analyze binary files!

       Unknown!

$ file x.bat
x.bat: MS-DOS batch file text

Some degree of abstraction also never hurts:
Quote
$ ./trid x.bat
...
Warning: file seems to be plain text/ASCII               <<<--- NOT true!
         TrID is best suited to analyze binary files!

       Unknown!

matej@aelia:~/trid$ file SMARTCHK.CPS
SMARTCHK.CPS: data

Quote
$ ./trid some.iso
...
Warning: file seems to be plain text/ASCII         <<<--- not true again
         TrID is best suited to analyze binary files!

 91.5% (.SPU) Spectrum 512 bitmap (160000/1)
  2.2% (.GRA) OpenGL object (4003/2)
  1.1% (.WK*) Lotus 123 Worksheet (generic) (2005/4)
  0.7% (.HSC) HSC music composer song (1267/141)
  0.6% (.GMC) Game Music Creator Music (1130/43)

$ file some.iso
some.iso: ISO 9660 CD-ROM filesystem data UDF filesystem data (unknown version, id 'NSR01') 'CDROM                          ' (bootable)

Keep up your work, you still have a long ways to go. And the topic you have chosen if quite wrong, I wasn't trying to point out any OS issue, I was only comparing your tool to a long-existing open-source one.

sustrm

  • Guest
Re: TrID on Linux - considerations
« Reply #4 on: October 13, 2007, 09:14:21 PM »
Sorry for the middle quote, I got them a little mixed up, it was supposed to be:

Quote
./trid SMARTCHK.CPS
...
Collecting data from file: SMARTCHK.CPS
       Unknown!
$ file SMARTCHK.CPS
SMARTCHK.CPS: data

Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2743
    • Mark0's Home Page
Re: TrID vs file - considerations
« Reply #5 on: October 13, 2007, 11:10:05 PM »
And the topic you have chosen if quite wrong, [...]

Fine. But you'll have to admit that posting your first message on a thread that started with "Success stories! - Found TrID useful? It helped you open a file, recover a photo, etc.?" wasn't the best thing to do, right? ;)
Anyway, I have corrected this thread's title, hope this may suite better.

I would just add that I have obviously nothing to say against the fact that you find the well known file better. As I said, I'm pretty sure that on the other way TrID's can identify some filetype that file can't (I'm sure you too encountered some of that files, if you have taken the time to play with it a bit). Aside from that, TrID is just another tool, as there are others file id tools (free and non free, more specialistic, or more generic, etc.), that does the jobs in different ways and so with differents results.
I think having alternatives is (most often) a good thing.

Bye!
« Last Edit: October 15, 2007, 04:15:53 PM by Mark0 »

sustrm

  • Guest
Re: TrID vs file - considerations
« Reply #6 on: November 22, 2007, 10:34:13 PM »
Fine. But you'll have to admit that posting your first message on a thread that started with "Success stories! - Found TrID useful? It helped you open a file, recover a photo, etc.?" wasn't the best thing to do, right? ;)
I think I did that because the web site directed me right to that topic... don't remember for sure though.

Quote
TrID is just another tool, as there are others file id tools
Actually, I find the renaming-to-the-guessed-filetype-extension feature very nice. I wasn't trying to discourage you from development at all. I was trying to encourage you into contributing to existing projects (file specifically), since I don't think having a million tools for the same thing is better than having only one, but perfect one.

Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2743
    • Mark0's Home Page
Re: TrID & file - considerations
« Reply #7 on: November 25, 2007, 03:47:12 PM »
Thanks for claryfing!

Bye!