Jump to content











Photo
- - - - -

TRid File Identifier


  • Please log in to reply
11 replies to this topic

#1 mint

mint

    Newbie

  • Members
  • 18 posts

Posted 01 October 2009 - 10:04 AM

Author link : TRid Website

Description from site:
" TrID is an utility designed to identify file types from their binary signatures. While there are similar utilities with hard coded rules, TriID has no such rules. Instead, it is extensible and can be trained to recognize new formats in a fast and automatic way.

TrID has many uses: identify what kind of file was sent to you via e-mail, aid in forensic analysis, support in file recovery, etc.

TrID uses a database of definitions which describe recurring patterns for supported file types. As this is subject to very frequent update, it's made available as a separate package. Just download both TrID and this archive and unpack in the same folder.

The database of definitions is constantly expanding; the more that are available, the more accurate an analysis of an unknown file can be. You can help! Use the program to both recognize unknown file types and develop new definitions that can be added to the library. See the TrIDScan page for information about how you can help. Just run the TrIDScan module against a number of files of a given type. The program will do the rest."


I find this small utility very helpful. Unfortunately, the official GUI for this utility need .Net and another GUI that I found need Java. I don't want to add bulky plugin like .Net or JVM to my PE that's why I try to find another GUI that work in PE.
I have my own GUI that I made using Autohotkey, it works but I wish to find replacement for it. Then Jaclaz told me to share my Ahk script here and maybe someone in this forum will refine it.
To be honest, I'm a bit embarassed to share it since programming is not my forte. Computer is a hobby and side job for me, my main job is magazine article writer. So, please don't laugh at it ;)

Gui, Add, GroupBox, x6 y10 w300 h90 , File IdentifierGui, Add, Edit, x16 y30 w200 h20 vEdit1, Gui, Add, Button, x226 y30 w70 h20 gSelectFile, Select FileGui, Add, Button, x46 y60 w220 h30 gAnalyze, AnalyzeGui, Add, GroupBox, x6 y110 w300 h90 , UnCHKGui, Add, Edit, x16 y130 w200 h20 vEdit2, Gui, Add, Button, x226 y120 w70 h20 gSelectFolder, Select FolderGui, Add, Button, x226 y140 w70 h20 gSelectFile2, Select FileGui, Add, Button, x46 y160 w220 h30 gUnCHK, UnCHKGui, Add, GroupBox, x6 y210 w300 h270 , LogGui, Add, Edit, x16 y230 w280 h240 Limit1 vEdit3, Gui, Add, Button, x256 y490 w40 h50 gSave, Save LogGui, Add, Progress, x66 y490 w180 h20 vPro , Gui, Add, Text, x66 y520 w180 h20 vProcess,Ready; Generated using SmartGUI Creator 4.0Gui, Show, x131 y91 h554 w319, TRid File IdentifierReturnGuiClose:ExitAppSelectFile:FileSelectFile, FileControlSetText, Edit1, %File%, TRid File IdentifierExitAnalyze:Runwait, cmd /c %A_ScriptDir%\trid %File%>%A_ScriptDir%\trid.logFileRead, Result, %A_ScriptDir%\trid.logControlSetText, Edit3, %Result%, TRid File IdentifierControlSetText, Edit1,, TRid File IdentifierExitSelectFolder:IfExist, X:\I386\System32\BARTPE.bmpInputBox, Folder, Location of folder,,,,100elseFileSelectFolder, Folder,,2ControlSetText, Edit2, %Folder%, TRid File IdentifierExitSelectFile2:FileSelectFile, File2ControlSetText, Edit2, %File2%, TRid File IdentifierExitUnCHK:If Folder={	Runwait, cmd /c %A_ScriptDir%\trid -ae %File2%>%A_ScriptDir%\trid.log	FileRead, Result2, %A_ScriptDir%\trid.log	ControlSetText, Edit3, %Result2%, TRid File Identifier	ControlSetText, Edit2,, TRid File Identifier	Exit}elseRun, cmd /c %A_ScriptDir%\trid -ae %Folder%\*.*>%A_ScriptDir%\trid.log,,,UnCHKPIDloop{		GuiControl,,Pro,5	GuiControl,,Process, Processing.	Sleep 75	GuiControl,,Pro,10	GuiControl,,Process, Processing.	Sleep 75	GuiControl,,Pro,15	GuiControl,,Process, Processing..	Sleep,75		GuiControl,,Pro,20	GuiControl,,Process, Processing..	Sleep,75	GuiControl,,Pro,25	GuiControl,,Process, Processing...	Sleep,75			GuiControl,,Pro,30	GuiControl,,Process, Processing...	Sleep,75		GuiControl,,Pro,35	GuiControl,,Process, Processing....	Sleep,75		GuiControl,,Pro,40	GuiControl,,Process, Processing....	Sleep,75	GuiControl,,Pro,45	GuiControl,,Process, Processing.....	Sleep,75		GuiControl,,Pro,50	GuiControl,,Process, Processing.....	Sleep,75	GuiControl,,Pro,55	GuiControl,,Process, Processing......	Sleep,75		GuiControl,,Pro,60	GuiControl,,Process, Processing......	Sleep,75	GuiControl,,Pro,65	GuiControl,,Process, Processing.......	Sleep,75		GuiControl,,Pro,70	GuiControl,,Process, Processing.......	Sleep,75	GuiControl,,Pro,75	GuiControl,,Process, Processing........	Sleep,75		GuiControl,,Pro,80	GuiControl,,Process, Processing........	Sleep,75	GuiControl,,Pro,85	GuiControl,,Process, Processing.........	Sleep,75		GuiControl,,Pro,90	GuiControl,,Process, Processing.........	Sleep,75	GuiControl,,Pro,95	GuiControl,,Process, Processing..........	Sleep,75		GuiControl,,Pro,100	GuiControl,,Process, Processing..........	Sleep,75	FileRead, Result2, %A_ScriptDir%\trid.log	ControlSetText, Edit3, %Result2%, TRid File Identifier	Sleep, 75	Process, Exist, %UnCHKPID%        If ErrorLevel=0       	break}GuiControl,,Pro,100GuiControl,,Process, Done!           FileRead, Result2, %A_ScriptDir%\trid.logControlSetText, Edit3, %Result2%, TRid File IdentifierControlSetText, Edit2,, TRid File IdentifierFolder=MsgBox,0,Done!, Click OK to continue..GuiControl,,Pro,0GuiControl,,Process, ReadyExit           Save:FileSelectFile, Save, S24,, Save Log As, Log file (*.log)FileCopy, %A_ScriptDir%\trid.log, %Save%.log, 1Exit

You must download and put trid.exe and definition file in the same folder with the GUI.
UnCHK mean automatically change file extension. I used word Unchk because I'm using trid to find out .chk file type.

TRid can't work if the file to be checked is inside a folder with name that has space e.g New Folder. But NewFolder will work, don't know why though.
What refinement that i want? Hmmm, i don't know. Maybe a better look for starter? :whistling: And maybe a more complex command? Ability to connect to internet and download the latest definitions?
Hopefully someone somewhere out there hear my wish, or at least point me a better GUI that somebody else has made. ;)

Attached Files



#2 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 01 October 2009 - 10:27 AM

can you please share the compiled gui ?

#3 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7100 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 01 October 2009 - 11:58 AM

can you please share the compiled gui ?

JFYI :whistling::
http://www.autohotke...pts.htm#ahk2exe

Converter included inside .zip:
http://www.autohotke.../AutoHotkey.zip

;)

jaclaz

#4 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 01 October 2009 - 12:20 PM

how do you place destination files to be used with this gui ? :whistling:

the interface does not tell anything about it that whether it has seen the required files or not ,,,,

#5 mint

mint

    Newbie

  • Members
  • 18 posts

Posted 01 October 2009 - 12:37 PM

how do you place destination files to be used with this gui ? :whistling:

the interface does not tell anything about it that whether it has seen the required files or not ,,,,


If you just want to check the extension of the file, click select File and then click analyze.
If you want TRid give the extension automatically, click Select File for single file or Select Folder for whole folder then clicl Unchk.

Note: Trid won't work if the file that you choose located in a folder that have a name with space e.g New Folder. But NewFolder or New_Folder works.

#6 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 01 October 2009 - 01:07 PM

Note: Trid won't work if the file that you choose located in a folder that have a name with space e.g New Folder. But NewFolder or New_Folder works.


which seems impossible on every system . im sorry but then there is no use of this software if it cant look for files inside such folder like
(maanu softwares).

is there any other alternative of this software ?

#7 mint

mint

    Newbie

  • Members
  • 18 posts

Posted 01 October 2009 - 01:23 PM

:D Not that I know of.
Usually I just copy all file that I want to check to one folder at C:\ and give it a a name such as Tes the run TRid. Or I can change the name of the folder, (maanu softwares) to ( maanu_software).
It's not practical but I think this software is too good to pass.
Well, maybe the author will fix it someday. Latest Trid that I download from the author's site still give me the same problem.

#8 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 01 October 2009 - 01:41 PM

ok .

may be im dumb enough ,but i could not understand how deffination files should be added in the folder where your gui is .
can you please explain it for me /?

#9 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 01 October 2009 - 01:41 PM

ok .

may be im dumb enough ,but i could not understand how deffination files should be added in the folder where your gui is .
can you please explain it for me /?

#10 mint

mint

    Newbie

  • Members
  • 18 posts

Posted 01 October 2009 - 01:53 PM

I mean my GUI, trid.exe and definiton files must be together. Because my GUI will find trid.exe in the folder where it is and trid.exe will find definition file also in the same folder where it reside.

So, if I keep all my trid file in a folder, say, C:\TRID then in that folder should be 3 files, that is tridgui.exe,trid.exe and TrIDDefs.TRD.
Ummm, this is what you're asking right?

#11 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 01 October 2009 - 06:51 PM

i have all these 3 files you mentioned in a directory . now every time i select a file and " analyze " , a cmd screen just flashes and the selected file disappears from the selection (from gui i mean ) .

is it normal ?

can you plz make a little notification area that the deffination files are loaded all right just to let user know that the setup is fine ?

#12 mint

mint

    Newbie

  • Members
  • 18 posts

Posted 01 October 2009 - 07:03 PM

Yes, it is normal, and there should be some information in the middle screen that tell you the percentage of extension for the file. If you choose Unchk, it will rename the file with extension with the biggest percentage. However, by biggest percentage doesn't mean it always right. But for standard format such as .jpg, .doc, .xls and so on, it usually gives correct extension.

And i'm sorry, :D but i won't developing this GUI anymore. The reason why I post this GUI and its source is because I hope someone will make refinement or better yet, make a new and better GUI.

And as long as you put this 3 file together in the same folder, it will run. :D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users