GT File format Analyzer

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Nigurrath
Senior Member
Senior Member
Posts: 225
Joined: 2003-02-05, 12:41 UTC

GT File format Analyzer

Post by *Nigurrath »

Sometime is useful to have a format analyzer that know how the files are done..

GT2 is an excellent program I suggest to anyone wants to analyze things deeper..
File format analyzer
Commandline program
Especially for archives (> 50) and executable modifier
Detection of many COM/DOS-EXE/PE-EXE/NE-EXE/LE-EXE modifier and compiler
External data DLL -> easy updates
< 5 milliseconds per file
Freeware
Copy it freely

GT2 is a file detection utility that detects all kind of file types according to their binary signature.

Example: GT will recognize your ZIP file even if it is named "testfile.avi" if the first 4 bytes in the file are PK\x03\x04 - whatever this mean ;-)
It is different from standard Windows filetype detection since it does not consider the file's extension by default.
So if you ever stumble across a file that you don't know what it is, run GT2 on it and you will hopefull know what it is.
it's at address http://philip.helger.com/gt/
The given informations are really useful IMHO..

For integrating it in TotalCommander here's a very simple way!

1.Create the gt2 folder under the totalcommander installation folder
2. copy the gt2 files there and add the bat below

Code: Select all

gt2 /outhtml "%1" >gt2.htm
CALL lister gt2.htm
del gt2.htm
3. download the TotalCommander standalone lister from http://www.ghisler.com/lister and pack it (with UPX if you want)
4. create a button on the TotalCommande tools bar as below

Code: Select all

Command: %COMMANDER_PATH%\Tools\gt2\gt2.bat
Parameter: %P%N
Start Path: %COMMANDER_PATH%\Tools\gt2\
Icon File: %COMMANDER_PATH%\Icons\Next 48x48 - Icon Library.icl or any you want!
check Run minimized
have phun!
always latest 32b TC on a WIN10 64b
User avatar
Valentino
Power Member
Power Member
Posts: 709
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

3. ... and pack it ...
Is it necessary step? :)
User avatar
Black Dog
Power Member
Power Member
Posts: 1024
Joined: 2003-02-05, 22:17 UTC
Location: Odessa
Contact:

Post by *Black Dog »

[face=courier]On 25-05-2004 13:42:36 +0000 Valentino wrote:

V> Is it necessary step?

I guess it should be rather "and pack it with UPX (if you want)" than "and pack it (with UPX if you want)", Val. Anyway, I did it log before :).[/face]
User avatar
Nigurrath
Senior Member
Senior Member
Posts: 225
Joined: 2003-02-05, 12:41 UTC

Post by *Nigurrath »

of course the parenthesis are better placed ad BD even if it should be as

"and pack it (e.g. with UPX), if you want"

..the concept is pack to save space, if you want :-D

the lister is just to be able to directly see the logs in TC, cm_List cannot be used here, because it should be called from inside the .bat..

anyway the value in in the gt2 tool, integrate in TC as you want. ;-)
always latest 32b TC on a WIN10 64b
User avatar
Valentino
Power Member
Power Member
Posts: 709
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

1) I had to remove quotes from the suggested line for batch file:

gt2 /outhtml "%1" >gt2.htm

because I received an error (file not found).

2) I usually need to see HTML files as raw HTML but in this case (with GT2) it would be cool if external Lister (and internal too, BTW :) ) could receive command line parameters forcing some particular display format (/text /binary /html, etc). Currently I worked around this inconvenience exploiting the fact that external Lister uses wincmd.ini from Windows dir, whereas internal Lister uses INI file from the location specified in the registry (or in TC cmd line), so I specified HTMLasText=0 in my main TC INI file and HTMLasText=1 in the INI file from Win dir.
User avatar
Valentino
Power Member
Power Member
Posts: 709
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

BTW. FileInfo plugin shows this info in more elegant way (as for me). Although I did not have time to play enough with GT2, maybe it displays more info?...
User avatar
Nigurrath
Senior Member
Senior Member
Posts: 225
Joined: 2003-02-05, 12:41 UTC

Post by *Nigurrath »

FileInfo doesn't show the type of informations that can be obtained from gt2. Fileinfo simply analize the PE Header and the Impart tables and some version res infos..moreover if does it only for executable files (dll,ocx,exe,com...) not for data file (zip,avi,...)

gt tells somethings more. For example is an invaluable tool for non executable files and for installer such as installshield or others, when you don't know which is the used packer...
always latest 32b TC on a WIN10 64b
User avatar
Nigurrath
Senior Member
Senior Member
Posts: 225
Joined: 2003-02-05, 12:41 UTC

Post by *Nigurrath »

hi,
there's a new version, gt 0.34, with a lot of interesting new features..follow the link ontop of this thread..
always latest 32b TC on a WIN10 64b
Post Reply