windows 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436
  1. #------------------------------------------------------------------------------
  2. # $File: windows,v 1.50 2022/11/30 20:24:43 christos Exp $
  3. # windows: file(1) magic for Microsoft Windows
  4. #
  5. # This file is mainly reserved for files where programs
  6. # using them are run almost always on MS Windows 3.x or
  7. # above, or files only used exclusively in Windows OS,
  8. # where there is no better category to allocate for.
  9. # For example, even though WinZIP almost run on Windows
  10. # only, it is better to treat them as "archive" instead.
  11. # For format usable in DOS, such as generic executable
  12. # format, please specify under "msdos" file.
  13. #
  14. # Summary: Outlook Express DBX file
  15. # Created by: Christophe Monniez
  16. # Update: Joerg Jenderek
  17. # URL: http://fileformats.archiveteam.org/wiki/Outlook_Express_Database
  18. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/d/dbx.trid.xml
  19. # https://sourceforge.net/projects/ol2mbox/files/LibDBX/
  20. # v1.0.4/libdbx_1.0.4.tar.gz/FILE-FORMAT
  21. # Note: called "Outlook Express Database" by TrID and DROID via PUID fmt/838 fmt/839
  22. # and partly verified by `undbx --verbosity 4 Posteingang.dbx`
  23. 0 string \xCF\xAD\x12\xFE
  24. # skip DROID fmt-838-signature-id-1193.dbx fmt-839-signature-id-1194.dbx by check for valid file size
  25. >0x7C ulelong >0 MS Outlook Express DBX file
  26. #!:mime application/octet-stream
  27. #!:mime application/vnd.ms-outlook
  28. !:mime application/x-ms-dbx
  29. !:ext dbx
  30. >>4 byte =0xC5 \b, message database
  31. >>4 byte =0xC6 \b, folder database
  32. >>4 byte =0xC7 \b, account information
  33. >>4 byte =0x30 \b, offline database
  34. # version like: 5.2 5.5 (typical)
  35. >>20 ulequad !0x0000000500000005 \b, version
  36. # major version
  37. >>>24 ulelong x %u
  38. # minor version
  39. >>>20 ulelong x \b.%u
  40. # CLSID: 6F74FDC5-E366-11d1-9A4E-00C04FA309D4~Message 6F74FDC6-E366-11D1-9A4E-00C04FA309D4~Folder
  41. # 26FE9D30-1A8F-11D2-AABF-006097D474C4~offline
  42. #>>4 guid x \b, CLSID %s
  43. # file size; total size of file; sometimes real size a little bit higher
  44. >>0x7C ulelong x \b, ~ %u bytes
  45. # highest Email ID; the next email will have a number one higher than this
  46. >>0x5c ulelong x \b, highest ID %#x
  47. # item count; number of items stored in this DBX file
  48. >>0xC4 ulelong x \b, %u item
  49. # plural s
  50. >>0xC4 ulelong !1 \bs
  51. # index pointer; file offset pointing to a page of Data Indexes
  52. >>0xE4 ulelong >0 \b, index pointer %#x
  53. # From: Joerg Jenderek
  54. # URL: http://fileformats.archiveteam.org/wiki/Nickfile
  55. # https://www.nirsoft.net/utils/outlook_nk2_edit.html
  56. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/n/nk2.trid.xml
  57. # https://github.com/libyal/libnk2/blob/main/documentation
  58. # Nickfile%20(NK2)%20format.asciidoc
  59. # Note: called "Outlook Nickfile" by TrID & TestDisk and
  60. # "Outlook Nickname File" by Microsoft Outlook and
  61. # "Outlook AutoComplete File" by Nirsoft NK2Edit
  62. # partly verfied by NK2Edit Raw Text Edit Mode
  63. 0 ubelong 0x0DF0ADBA MS Outlook Nickfile
  64. #!:mime application/octet-stream
  65. #!:mime application/vnd.ms-outlook
  66. !:mime application/x-ms-nickfile
  67. !:ext nk2/dat/bak
  68. # nick is used by "older" Outlook; dat is used by "newer" Outlook (probably 2010 - 2016); bak is used for backup
  69. #!:ext nick/nk2/dat/bak
  70. # Unknown; probably a version indicator like: 0000000Ah 0000000Ch
  71. >4 ulelong x \b, probably version %u
  72. # Unknown2; probably a version indicator like: 1 0
  73. >8 ulelong x \b.%u
  74. # number of rows (nickname or alias items) in file
  75. >12 ulelong x \b, %u items
  76. # number of item entries/columns/properties value like: 17h
  77. >16 ulelong x \b, %u entries
  78. # value type/property tag: 001Fh~4 bytes for data size of UTF-16 LE string
  79. >20 uleshort x \b, value type %#4.4x
  80. # entry type/property identifier: 6001h~PR_DOTSTUFF_STATE/PR_NICK_NAME_W
  81. >22 uleshort x \b, entry type %#4.4x
  82. # Reserved like: 0013FD90h
  83. #>24 ulelong x \b, reserved %#8.8x
  84. # value data array/Irrelevant Union like: 0000000004E31A80h
  85. #>28 ulequad x \b, data %#16.16llx
  86. # UTF-16
  87. >20 uleshort =0x001F
  88. # unicode string bytes like: 2Ch
  89. >>36 ulelong x \b, %u bytes
  90. # unicode string value PT_UNICODE like: janesmith@contoso.org
  91. >>40 lestring16 x "%s"
  92. # Summary: Windows crash dump
  93. # Extension: .dmp
  94. # Created by: Andreas Schuster (https://computer.forensikblog.de/)
  95. # Reference (1): https://computer.forensikblog.de/en/2008/02/64bit_magic.html
  96. # Modified by (1): Abel Cheung (Avoid match with first 4 bytes only)
  97. 0 string PAGE
  98. >4 string DUMP MS Windows 32bit crash dump
  99. >>0x05c byte 0 \b, no PAE
  100. >>0x05c byte 1 \b, PAE
  101. >>0xf88 lelong 1 \b, full dump
  102. >>0xf88 lelong 2 \b, kernel dump
  103. >>0xf88 lelong 3 \b, small dump
  104. >>0x068 lelong x \b, %d pages
  105. >4 string DU64 MS Windows 64bit crash dump
  106. >>0xf98 lelong 1 \b, full dump
  107. >>0xf98 lelong 2 \b, kernel dump
  108. >>0xf98 lelong 3 \b, small dump
  109. >>0x090 lequad x \b, %lld pages
  110. # Summary: Vista Event Log
  111. # Created by: Andreas Schuster (https://computer.forensikblog.de/)
  112. # Update: Joerg Jenderek
  113. # URL: https://github.com/libyal/libevtx/blob/main/documentation/Windows%20XML%20Event%20Log%20(EVTX).asciidoc
  114. # Reference (1): https://web.archive.org/web/20110803085000/
  115. # https://computer.forensikblog.de/en/2007/05/some_magic.html
  116. # http://mark0.net/download/triddefs_xml.7z/defs/e/evtx.trid.xml
  117. # Note: called "Vista Event Log" by TrID and "Event Log" by Windows
  118. # verified partly by `wevtutil.exe gli /lf:true dumpfile.evtx`
  119. 0 string ElfFile\0 MS Windows
  120. #!:mime application/octet-stream
  121. !:mime application/x-ms-evtx
  122. !:ext evtx
  123. # Major+Minor format version: 3.1~Vista and later 3.2~Windows 10 (2004) and later
  124. >0x24 ulelong =0x00030001 Vista-8.1 Event Log
  125. >0x24 ulelong !0x00030001 10-11 Event Log, version
  126. >>0x26 uleshort x %u
  127. >>0x24 uleshort x \b.%u
  128. >0x2a leshort x \b, %d chunks
  129. >>0x10 lelong x \b (no. %d in use)
  130. >0x18 lelong >1 \b, next record no. %d
  131. >0x18 lelong =1 \b, empty
  132. >0x78 lelong &1 \b, DIRTY
  133. >0x78 lelong &2 \b, FULL
  134. # Summary: Windows Event Trace Log
  135. # From: Joerg Jenderek
  136. # URL: http://fileformats.archiveteam.org/wiki/ETL
  137. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/e/etl.trid.xml
  138. # https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/etw/tracelog/trace_logfile_header.htm
  139. # Note: called "Window tracing/diagnostic binary log" by TrID
  140. # verified by `tracerpt.EXE Wifi.etl -of EVTX`
  141. # and by etl-parser `etl2xml --input AMSITrace.etl --output AMSITrace.xml`
  142. # Every ETL file begins with a WMI_BUFFER_HEADER, a SYSTEM_TRACE_HEADER and a TRACE_LOGFILE_HEADER
  143. 0 ubyte 0
  144. # look for corresponding encoded as UTF-16 file name extension like in: boot_BASE+CSWITCH_1.etl
  145. >0 search/0x699087/b .\0e\0t\0l\0\0\0
  146. # GRR: line above only works if in ../../src/file.h FILE_BYTES_MAX is raised above 699086h (6,59 MiB)
  147. >>0 use trace-etl
  148. # display information of Windows Performance Analyzer Trace File (file name)
  149. 0 name trace-etl
  150. >0 ubyte x Windows Event Trace Log
  151. #!:mime application/x-ms-etl
  152. # http://extension.nirsoft.net/etl
  153. !:mime application/etl
  154. !:ext etl
  155. # look for DOS drive letter part of log file name like: PhotosAppTracing_startedInBGMode.etl
  156. >0 search/0x2b4/sb :\0\x5c\0
  157. # like: "c:\Windows\Logs\NetSetup\service.0.etl" "C:\Windows\System32\LogFiles\WMI\Wifi.etl"
  158. >>&-2 lestring16 x "%s"
  159. # Summary: Windows System Deployment Image
  160. # Created by: Joerg Jenderek
  161. # URL: http://en.wikipedia.org/wiki/System_Deployment_Image
  162. # Reference: http://skolk.livejournal.com/1320.html
  163. 0 string $SDI
  164. >4 string 0001 System Deployment Image
  165. !:mime application/x-ms-sdi
  166. #!:mime application/octet-stream
  167. # \Boot\boot.sdi
  168. !:ext sdi
  169. # MDBtype: 0~Unspecified 1~RAM 2~ROM
  170. >>8 ulequad !0 \b, MDBtype %#llx
  171. # BootCodeOffset
  172. >>16 ulequad !0 \b, BootCodeOffset %#llx
  173. # BootCodeSize
  174. >>24 ulequad !0 \b, BootCodeSize %#llx
  175. # VendorID
  176. >>32 ulequad !0 \b, VendorID %#llx
  177. # DeviceID
  178. >>40 ulequad !0 \b, DeviceID %#llx
  179. # DeviceModel
  180. >>48 ulequad !0 \b, DeviceModel %#llx
  181. >>>56 ulequad !0 \b%llx
  182. # DeviceRole
  183. >>64 ulequad !0 \b, DeviceRole %#llx
  184. # Reserved1; reserved fields and gaps between BLOBs are padded with \0
  185. #>>72 ulequad !0 \b, Reserved1 %#llx
  186. # RuntimeGUID
  187. >>80 ulequad !0 \b, RuntimeGUID %#llx
  188. >>>88 ulequad !0 \b%llx
  189. # RuntimeOEMrev
  190. >>96 ulequad !0 \b, RuntimeOEMrev %#llx
  191. # Reserved2
  192. #>>104 ulequad !0 \b, Reserved2 %#llx
  193. # BLOB alignment value in pages, as specified in sdimgr /pack: 1~4K 2~8k
  194. >>112 ulequad !0 \b, PageAlignment %llu
  195. # Reserved3[48]
  196. #>>120 ulequad !0 \b, Reserved3 %#llx
  197. # SDI checksum 39h
  198. >>0x1f8 ulequad x \b, checksum %#llx
  199. # BLOBtype[8] \0-padded: PART, WIM , BOOT, LOAD, DISK
  200. >>0x400 string >\0 \b, type %-3.8s
  201. # 0~non-filesystem 7~NTFS 6~BIGFAT
  202. >>>0x420 ulequad !0 (%#llx)
  203. # ATTRibutes
  204. >>>0x408 ulequad !0 %#llx attributes
  205. # Offset
  206. >>>0x410 ulequad x at %#llx
  207. # print 1 space after size and then handles NTFS boot sector by ./filesystems
  208. >>>0x418 ulequad >0 %llu bytes
  209. >>>>(0x410.l) indirect x
  210. # 2nd BLOB: WIM
  211. >>0x440 string >\0 \b, type %-3.8s
  212. >>>0x428 ulequad !0 (%#llx)
  213. # ATTRibutes
  214. >>>0x448 ulequad !0 %#llx attributes
  215. # Offset
  216. >>>0x450 ulequad x at %#llx
  217. >>>0x458 ulequad >0 %llu bytes
  218. >>>>(0x450.l) indirect x
  219. # 3rd BLOB
  220. >>0x480 string >\0 \b, type %-3.8s
  221. # Summary: Windows boot status log BOOTSTAT.DAT
  222. # From: Joerg Jenderek
  223. # Reference: https://www.geoffchappell.com/notes/windows/boot/bsd.htm
  224. # Note: mainly refers to older Windows Vista, sometimes
  225. # BOOTSTAT.DAT only contains nulls or invalid data
  226. # checking for valid version below 5
  227. 0 ulelong <5
  228. # skip many ISO images by checking for valid 64 KiB file size
  229. >8 ulelong =0x00010000
  230. >>0 use bootstat-dat
  231. # display information of BOOTSTAT.DAT
  232. 0 name bootstat-dat
  233. >0 ulelong x Windows boot log
  234. #!:mime application/octet-stream
  235. !:mime application/x-ms-dat
  236. # BOOTSTAT.DAT in BOOT subdirectory
  237. !:ext dat
  238. # apparently a version number: 2 for older like Vista, 3, 4 Windows 10
  239. >0 ulelong >2 \b, version %u
  240. # apparently the size of the header: often 10h in older Windows, 14h, 18h
  241. >4 ulelong !0x10 \b, header size %#x
  242. #>4 ulelong !0x10 \b, header size %u
  243. # apparently the size of the file: always 0x00010000~64KiB
  244. # the file is acceptable to BOOTMGR only if it is exactly 64 KiB
  245. >8 ulelong !0x00010000 \b, file size %#x
  246. # size of valid data, in bytes: C8h 50h 172h 5D5Ch
  247. >0xc ulelong x \b, %#x valid bytes
  248. # skip header and jump to first bootstat entry and display information
  249. >(0x4.l-1) ubyte x
  250. >>&0 use bootstat-entry
  251. # jump to first entry again because pointer are bad after "use"
  252. >(0x4.l-1) ubyte x
  253. # by 1st entry size jump to 2nd entry and display information
  254. >>&(&0x18.l-1) ubyte x
  255. >>>&0 use bootstat-entry
  256. # jump to possible 3rd boot entry and display information
  257. # >(0x4.l-1) ubyte x
  258. # >>&(&0x18.l-1) ubyte x
  259. # >>>&(&0x18.l-1) ubyte x
  260. # >>>>&0 use bootstat-entry
  261. # display BOOTSTAT.DAT entry
  262. 0 name bootstat-entry
  263. #>0x00 ubequad x \b, ENTRY %16.16llx
  264. # size of entry, in bytes: 40h(init) 78h(launced) 9Ch
  265. #>0x18 ulelong x \b; entry size %u
  266. >0x18 ulelong x \b; entry size %#x
  267. # time stamp, in seconds
  268. >0x00 ulelong x \b, %#x seconds
  269. # always zero, significance unknown
  270. >0x04 ulelong !0 \b, not null %u
  271. # GUID of event source; but empty if event source is BOOTMGR
  272. >0x08 ubequad !0 \b, GUID %#16.16llx
  273. >>0x10 ubequad x \b%16.16llx
  274. # severity code: 1~informational 3~errors
  275. >0x1C ulelong !1 \b, severity %#x
  276. # apparently a version number: 2
  277. >0x20 ulelong !2 \b, version %u
  278. # event identifier 1~log file initialised 11h~boot application launched
  279. #>0x24 ulelong x \b, event %#x
  280. >0x24 ulelong !1
  281. >>0x24 ulelong !0x11 \b, event %#x
  282. # entry data; size depends on event identifier
  283. #>0x28 ubequad x \b, data %#16.16llx
  284. >0x24 ulelong =0x1 \b, Init
  285. # always 0, significance unknown
  286. >>0x34 uleshort !0 \b, not null %u
  287. # always 7, significance unknown
  288. >>0x36 uleshort !7 \b, not seven %u
  289. # year
  290. >>0x28 uleshort x %u
  291. # month
  292. >>0x2A uleshort x \b-%u
  293. # day
  294. >>0x2C uleshort x \b-%u
  295. # hour
  296. >>0x2E uleshort x %u
  297. # minute
  298. >>0x30 uleshort x \b:%u
  299. # second
  300. >>0x32 uleshort x \b:%u
  301. # boot application launched
  302. >0x24 ulelong =0x11 \b, launched
  303. # type of start: 0 normally, 1 or 2 maybe in a recovery sequence
  304. >>0x38 uleshort !0 \b, type %u
  305. # pathname of boot application, as null-terminated Unicode string; typically
  306. # \Windows\system32\winload.exe \Windows\system32\winload.efi
  307. >>0x3C lestring16 x %s
  308. # Summary: Windows Error Report text files
  309. # URL: https://en.wikipedia.org/wiki/Windows_Error_Reporting
  310. # Reference: https://www.nirsoft.net/utils/app_crash_view.html
  311. # Created by: Joerg Jenderek
  312. # Note: in directories %ProgramData%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
  313. # %LOCALAPPDATA%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
  314. 0 lestring16 Version=
  315. >22 lestring16 EventType Windows Error Report
  316. !:mime text/plain
  317. # Report.wer
  318. !:ext wer
  319. # Summary: Windows 3.1 group files
  320. # Extension: .grp
  321. # Created by: unknown
  322. 0 string \120\115\103\103 MS Windows 3.1 group files
  323. # Summary: Old format help files
  324. # URL: https://en.wikipedia.org/wiki/WinHelp
  325. # Reference: https://www.oocities.org/mwinterhoff/helpfile.htm
  326. # Update: Joerg Jenderek
  327. # Created by: Dirk Jagdmann <doj@cubic.org>
  328. #
  329. # check and then display version and date inside MS Windows HeLP file fragment
  330. 0 name help-ver-date
  331. # look for Magic of SYSTEMHEADER
  332. >0 leshort 0x036C
  333. # version Major 1 for right file fragment
  334. >>4 leshort 1 Windows
  335. # print non empty string above to avoid error message
  336. # Warning: Current entry does not yet have a description for adding a MIME type
  337. !:mime application/winhelp
  338. !:ext hlp
  339. # version Minor of help file format is hint for windows version
  340. >>>2 leshort 0x0F 3.x
  341. >>>2 leshort 0x15 3.0
  342. >>>2 leshort 0x21 3.1
  343. >>>2 leshort 0x27 x.y
  344. >>>2 leshort 0x33 95
  345. >>>2 default x y.z
  346. >>>>2 leshort x %#x
  347. # to complete message string like "MS Windows 3.x help file"
  348. >>>2 leshort x help
  349. # GenDate often older than file creation date
  350. >>>6 ldate x \b, %s
  351. #
  352. # Magic for HeLP files
  353. 0 lelong 0x00035f3f
  354. # ./windows (version 5.25) labeled the entry as "MS Windows 3.x help file"
  355. # file header magic 0x293B at DirectoryStart+9
  356. >(4.l+9) uleshort 0x293B MS
  357. # look for @VERSION bmf.. like IBMAVW.ANN
  358. >>0xD4 string =\x62\x6D\x66\x01\x00 Windows help annotation
  359. !:mime application/x-winhelp
  360. !:ext ann
  361. >>0xD4 string !\x62\x6D\x66\x01\x00
  362. # "GID Help index" by TrID
  363. >>>(4.l+0x65) string =|Pete Windows help Global Index
  364. !:mime application/x-winhelp
  365. !:ext gid
  366. # HeLP Bookmark or
  367. # "Windows HELP File" by TrID
  368. >>>(4.l+0x65) string !|Pete
  369. # maybe there exist a cleaner way to detect HeLP fragments
  370. # brute search for Magic 0x036C with matching Major maximal 7 iterations
  371. # discapp.hlp
  372. >>>>16 search/0x49AF/s \x6c\x03
  373. >>>>>&0 use help-ver-date
  374. >>>>>&4 leshort !1
  375. # putty.hlp
  376. >>>>>>&0 search/0x69AF/s \x6c\x03
  377. >>>>>>>&0 use help-ver-date
  378. >>>>>>>&4 leshort !1
  379. >>>>>>>>&0 search/0x49AF/s \x6c\x03
  380. >>>>>>>>>&0 use help-ver-date
  381. >>>>>>>>>&4 leshort !1
  382. >>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  383. >>>>>>>>>>>&0 use help-ver-date
  384. >>>>>>>>>>>&4 leshort !1
  385. >>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  386. >>>>>>>>>>>>>&0 use help-ver-date
  387. >>>>>>>>>>>>>&4 leshort !1
  388. >>>>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  389. >>>>>>>>>>>>>>>&0 use help-ver-date
  390. >>>>>>>>>>>>>>>&4 leshort !1
  391. >>>>>>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  392. # GCC.HLP is detected after 7 iterations
  393. >>>>>>>>>>>>>>>>>&0 use help-ver-date
  394. # this only happens if bigger hlp file is detected after used search iterations
  395. >>>>>>>>>>>>>>>>>&4 leshort !1 Windows y.z help
  396. !:mime application/winhelp
  397. !:ext hlp
  398. # repeat search again or following default line does not work
  399. >>>>16 search/0x49AF/s \x6c\x03
  400. # remaining files should be HeLP Bookmark WinHlp32.BMK (XP 32-bit) or WinHlp32 (Windows 8.1 64-bit)
  401. >>>>16 default x Windows help Bookmark
  402. !:mime application/x-winhelp
  403. !:ext bmk
  404. ## FirstFreeBlock normally FFFFFFFFh 10h for *ANN
  405. ##>>8 lelong x \b, FirstFreeBlock %#8.8x
  406. # EntireFileSize
  407. >>12 lelong x \b, %d bytes
  408. ## ReservedSpace normally 042Fh AFh for *.ANN
  409. #>>(4.l) lelong x \b, ReservedSpace %#8.8x
  410. ## UsedSpace normally 0426h A6h for *.ANN
  411. #>>(4.l+4) lelong x \b, UsedSpace %#8.8x
  412. ## FileFlags normally 04...
  413. #>>(4.l+5) lelong x \b, FileFlags %#8.8x
  414. ## file header magic 0x293B
  415. #>>(4.l+9) uleshort x \b, file header magic %#4.4x
  416. ## file header Flags 0x0402
  417. #>>(4.l+11) uleshort x \b, file header Flags %#4.4x
  418. ## file header PageSize 0400h 80h for *.ANN
  419. #>>(4.l+13) uleshort x \b, PageSize %#4.4x
  420. ## Structure[16] z4
  421. #>>(4.l+15) string >\0 \b, Structure_"%-.16s"
  422. ## MustBeZero 0
  423. #>>(4.l+31) uleshort x \b, MustBeZero %#4.4x
  424. ## PageSplits
  425. #>>(4.l+33) uleshort x \b, PageSplits %#4.4x
  426. ## RootPage
  427. #>>(4.l+35) uleshort x \b, RootPage %#4.4x
  428. ## MustBeNegOne 0xffff
  429. #>>(4.l+37) uleshort x \b, MustBeNegOne %#4.4x
  430. ## TotalPages 1
  431. #>>(4.l+39) uleshort x \b, TotalPages %#4.4x
  432. ## NLevels 0x0001
  433. #>>(4.l+41) uleshort x \b, NLevels %#4.4x
  434. ## TotalBtreeEntries
  435. #>>(4.l+43) ulelong x \b, TotalBtreeEntries %#8.8x
  436. ## pages of the B+ tree
  437. #>>(4.l+47) ubequad x \b, PageStart %#16.16llx
  438. # start with colon or semicolon for comment line like Back2Life.cnt
  439. 0 regex \^(:|;)
  440. # look for first keyword Base
  441. >0 search/45 :Base
  442. >>&0 use cnt-name
  443. # only solution to search again from beginning , because relative offsets changes when use is called
  444. >0 search/45 :Base
  445. >0 default x
  446. # look for other keyword Title like in putty.cnt
  447. >>0 search/45 :Title
  448. >>>&0 use cnt-name
  449. #
  450. # display mime type and name of Windows help Content source
  451. 0 name cnt-name
  452. # skip space at beginning
  453. >0 string \040
  454. # name without extension and greater character or name with hlp extension
  455. >>1 regex/c \^([^\xd>]*|.*\\.hlp) MS Windows help file Content, based "%s"
  456. !:mime text/plain
  457. !:apple ????TEXT
  458. !:ext cnt
  459. #
  460. # Windows creates a full text search from hlp file, if the user clicks the "Find" tab and enables keyword indexing
  461. 0 string tfMR MS Windows help Full Text Search index
  462. !:mime application/x-winhelp-fts
  463. !:ext fts
  464. >16 string >\0 for "%s"
  465. # Summary: Hyper terminal
  466. # Extension: .ht
  467. # Created by: unknown
  468. 0 string HyperTerminal\040
  469. >15 string 1.0\ --\ HyperTerminal\ data\ file MS Windows HyperTerminal profile
  470. # https://ithreats.files.wordpress.com/2009/05/\040
  471. # lnk_the_windows_shortcut_file_format.pdf
  472. # Summary: Windows shortcut
  473. # Extension: .lnk
  474. # Created by: unknown
  475. # 'L' + GUUID
  476. 0 string \114\0\0\0\001\024\002\0\0\0\0\0\300\0\0\0\0\0\0\106 MS Windows shortcut
  477. !:mime application/x-ms-shortcut
  478. !:ext lnk
  479. >20 lelong&1 1 \b, Item id list present
  480. >20 lelong&2 2 \b, Points to a file or directory
  481. >20 lelong&4 4 \b, Has Description string
  482. >20 lelong&8 8 \b, Has Relative path
  483. >20 lelong&16 16 \b, Has Working directory
  484. >20 lelong&32 32 \b, Has command line arguments
  485. >20 lelong&64 64 \b, Icon
  486. >>56 lelong x \b number=%d
  487. >24 lelong&1 1 \b, Read-Only
  488. >24 lelong&2 2 \b, Hidden
  489. >24 lelong&4 4 \b, System
  490. >24 lelong&8 8 \b, Volume Label
  491. >24 lelong&16 16 \b, Directory
  492. >24 lelong&32 32 \b, Archive
  493. >24 lelong&64 64 \b, Encrypted
  494. >24 lelong&128 128 \b, Normal
  495. >24 lelong&256 256 \b, Temporary
  496. >24 lelong&512 512 \b, Sparse
  497. >24 lelong&1024 1024 \b, Reparse point
  498. >24 lelong&2048 2048 \b, Compressed
  499. >24 lelong&4096 4096 \b, Offline
  500. >28 leqwdate x \b, ctime=%s
  501. >36 leqwdate x \b, mtime=%s
  502. >44 leqwdate x \b, atime=%s
  503. >52 lelong x \b, length=%u, window=
  504. >60 lelong&1 1 \bhide
  505. >60 lelong&2 2 \bnormal
  506. >60 lelong&4 4 \bshowminimized
  507. >60 lelong&8 8 \bshowmaximized
  508. >60 lelong&16 16 \bshownoactivate
  509. >60 lelong&32 32 \bminimize
  510. >60 lelong&64 64 \bshowminnoactive
  511. >60 lelong&128 128 \bshowna
  512. >60 lelong&256 256 \brestore
  513. >60 lelong&512 512 \bshowdefault
  514. #>20 lelong&1 0
  515. #>>20 lelong&2 2
  516. #>>>(72.l-64) pstring/h x \b [%s]
  517. #>20 lelong&1 1
  518. #>>20 lelong&2 2
  519. #>>>(72.s) leshort x
  520. #>>>&75 pstring/h x \b [%s]
  521. # Summary: Outlook Personal Folders
  522. # Created by: unknown
  523. # Update: Joerg Jenderek
  524. # URL: http://fileformats.archiveteam.org/wiki/Personal_Folder_File
  525. # https://en.wikipedia.org/wiki/Personal_Storage_Table
  526. # Reference: https://interoperability.blob.core.windows.net/files/MS-PST/%5bMS-PST%5d.pdf
  527. # http://mark0.net/download/triddefs_xml.7z/defs/p/pab.trid.xml
  528. # dwMagic !BDN
  529. 0 lelong 0x4E444221
  530. # skip DROID x-fmt-75-signature-id-472.pab x-fmt-248-signature-id-260.pst x-fmt-249-signature-id-261.pst
  531. # by check for existance of bPlatformCreate value
  532. >14 ubyte x Microsoft Outlook
  533. #!:mime application/octet-stream
  534. # NOT official registered !
  535. !:mime application/vnd.ms-outlook
  536. # dwCRCPartial; 32-bit cyclic redundancy check (CRC) value of followin 471 bytes; zero for 64-bit
  537. #>>4 ulelong !0 \b, CRC %#x
  538. # wMagicClient; AB (4142h) is used for PAB files; SM (534Dh) is used for PST files; SO (534Fh) is used for OST files
  539. #>>8 leshort x \b, wMagicClient=%#x
  540. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pab.trid.xml
  541. # Note: called "Microsoft Personal Address Book" by TrID and
  542. # "Microsoft Outlook Personal Address Book" by DROID via x-fmt/75
  543. >>8 leshort 0x4142 Personal Address Book
  544. #!:mime application/x-ms-pab
  545. !:ext pab
  546. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pst.trid.xml
  547. # http://mark0.net/download/triddefs_xml.7z/defs/p/pst-unicode.trid.xml
  548. # Note: called "Microsoft OutLook Personal Folder" by TrID and
  549. # by DROID via x-fmt/248 for ANSI and via x-fmt/249 for Unicode
  550. #>>8 leshort 0x4D53 \b, PST~
  551. # called "Microsoft Outlook email folder" in ./windows version 1.37 and older
  552. >>8 leshort 0x4D53 Personal Storage
  553. #!:mime application/x-ms-pst
  554. !:ext pst
  555. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/o/ost.trid.xml
  556. # Note: called "Outlook Exchange Offline Storage" by TrID
  557. >>8 leshort 0x4F53 Offline Storage
  558. #!:mime application/x-ms-ost
  559. !:ext ost
  560. # wVer; file format version. 14 or 15 if the file is ANSI; > 21 or 23(=17h) if Unicode; 37 for written by Outlook with WIP
  561. >>10 uleshort x (
  562. # probably NO intermediate versions exist
  563. >>10 leshort <0x10 \b<=2002, ANSI,
  564. >>10 leshort >0x14 \b>=2003, Unicode,
  565. >>10 uleshort x version %u)
  566. # wVerClient; client file format version like: 19 22
  567. #>>12 uleshort x \b, wVerClient=%u
  568. # bPlatformCreate; This value MUST be set to 1 but also found 2
  569. >>14 ubyte >1 \b, bPlatformCreate=%u
  570. # bPlatformAccess; This value MUST be set to 1 but also found 2
  571. >>15 ubyte >1 \b, bPlatformAccess=%u
  572. # dwReserved1; SHOULD ignore and NOT modify this value; SHOULD initialize to zero
  573. >>16 ulelong !0 \b, dwReserved1=%#x
  574. # dwReserved2; SHOULD ignore and NOT modify this value; SHOULD initialize to zero
  575. >>20 ulelong !0 \b, dwReserved2=%#x
  576. # ANSI 32-bit variant Outlook 1997-2002
  577. >>10 uleshort <16
  578. # bidNextB; next BlockID (ANSI 4 bytes)
  579. #>>>24 ulelong !0 \b, bidNextB=%#x
  580. # bidNextP; Next available back BlockID pointer
  581. #>>>28 ulelong !0 \b, bidNextP=%#x
  582. # dwUnique; value monotonically increased when modifying PST; so CRC is changing
  583. >>>32 ulelong !0 \b, dwUnique=%#x
  584. # rgnid[128]; A fixed array of 32 NodeIDs, each corresponding to one of the 32 possible NID_TYPEs
  585. #>>>36 ubequad x \b, rgnid=%#llx...
  586. # dwReserved; Implementations SHOULD ignore this value and SHOULD NOT modify it; Initialized zero
  587. >>>164 ulelong !0 \b, dwReserved=%#x
  588. # ibFileEof; the size of the PST file, in bytes (ANSI 4 bytes)
  589. >>>168 ulelong x \b, %u bytes
  590. # ibAMapLast; offset to the last AMap page
  591. #>>>172 ulelong x \b, ibAMapLast=%#x
  592. # bSentinel; MUST be set to 0x80
  593. >>>460 ubyte !0x80 \b, bSentinel=%#x
  594. # bCryptMethod: 0~No encryption 1~encryption with permutation 2~encryption with cyclic 16~encryption with Windows Information Protection (WIP)
  595. >>>461 ubyte >0 \b, bCryptMethod=%u
  596. # UNICODE 64-bit variant Outlook 2003-2007
  597. >>10 uleshort >20
  598. # bidUnused; Unused 8 bytes padding (Unicode only); sometimes like: 0x0000000100000004
  599. >>>24 ulequad !0x0000000100000004 \b, bidUnused=%#16.16llx
  600. # dwUnique; value monotonically increased when modifying PST; so CRC is changing
  601. >>>40 ulelong !0 \b, dwUnique=%#x
  602. # rgnid[] (128 bytes): A fixed array of 32 NIDs, each corresponding to one of the 32 possible
  603. #>>>44 ubequad x \b, rgnid=%#llx...
  604. # ibFileEof; the size of the PST file, in bytes (Unicode 8 bytes)
  605. >>>184 ulequad x \b, %llu bytes
  606. # bSentinel; MUST be set to 0x80
  607. >>>512 ubyte !0x80 \b, bSentinel=%#x
  608. # bCryptMethod; Encryption type like: 0 1 2 16
  609. >>>513 ubyte >0 \b, bCryptMethod=%u
  610. # dwCRC; 32-bit CRC of the of the previous 516 bytes
  611. >>>524 ulelong x \b, CRC32 %#x
  612. # Summary: Windows help cache
  613. # Created by: unknown
  614. 0 string \164\146\115\122\012\000\000\000\001\000\000\000 MS Windows help cache
  615. # Summary: IE cache file
  616. # Created by: Christophe Monniez
  617. 0 string Client\ UrlCache\ MMF Internet Explorer cache file
  618. >20 string >\0 version %s
  619. # Summary: Registry files
  620. # Created by: unknown
  621. # Modified by (1): Joerg Jenderek
  622. 0 string regf MS Windows registry file, NT/2000 or above
  623. 0 string CREG MS Windows 95/98/ME registry file
  624. 0 string SHCC3 MS Windows 3.1 registry file
  625. # Summary: Windows Registry text
  626. # URL: https://en.wikipedia.org/wiki/Windows_Registry#.REG_files
  627. # Reference: http://fileformats.archiveteam.org/wiki/Windows_Registry
  628. # Submitted by: Abel Cheung <abelcheung@gmail.com>
  629. # Update: Joerg Jenderek
  630. # Windows 3-9X variant
  631. 0 string REGEDIT
  632. # skip ASCII text like "REGEDITor.txt" but match
  633. # L1WMAP.REG with only 1 CRNL or org.gnome.gnumeric.reg with 2 NL
  634. >7 search/3 \n Windows Registry text
  635. !:mime text/x-ms-regedit
  636. !:ext reg
  637. # Windows 9X variant
  638. >>0 string REGEDIT4 (Win95 or above)
  639. # Windows 2K ANSI variant
  640. 0 string Windows\ Registry\ Editor\
  641. >&0 string Version\ 5.00\r\n\r\n Windows Registry text (Win2K or above)
  642. !:mime text/x-ms-regedit
  643. !:ext reg
  644. # Windows 2K UTF-16 variant
  645. 2 lestring16 Windows\ Registry\ Editor\
  646. >0x32 lestring16 Version\ 5.00\r\n\r\n Windows Registry little-endian text (Win2K or above)
  647. # relative offset not working
  648. #>&0 lestring16 Version\ 5.00\r\n\r\n Windows Registry little-endian text (Win2K or above)
  649. !:mime text/x-ms-regedit
  650. !:ext reg
  651. # WINE variant
  652. # URL: https://en.wikipedia.org/wiki/Wine_(software)
  653. # Reference: https://www.winehq.org/pipermail/wine-cvs/2005-October/018763.html
  654. # Note: WINE use text based registry (system.reg,user.reg,userdef.reg)
  655. # instead binary hiv structure like Windows
  656. 0 string WINE\ REGISTRY\ Version\ WINE registry text
  657. # version 2
  658. >&0 string x \b, version %s
  659. !:mime text/x-wine-extension-reg
  660. !:ext reg
  661. # Windows *.INF *.INI files updated by Joerg Jenderek at Apr 2013, Feb 2018
  662. # empty ,comment , section
  663. # PR/383: remove unicode BOM because it is not portable across regex impls
  664. #0 regex/s \\`(\\r\\n|;|[[])
  665. # empty line CRLF
  666. 0 ubeshort 0x0D0A
  667. >0 use ini-file
  668. # comment line starting with semicolon
  669. 0 string ;
  670. # look for phrase of Windows policy ADMinistrative template (with starting remark)
  671. # like: WINDOW_95_CD/TOOLS/RESKIT/netadmin/poledit/conf.adm
  672. >1 search/3548 END\040CATEGORY
  673. # ADM with remark (by adm-rem.trid.xml) already done by generic ASCII variant
  674. # if no Windows policy ADMinistrative template then Windows INItialization
  675. >1 default x
  676. >>0 use ini-file
  677. # section line starting with left bracket
  678. 0 string [
  679. >0 use ini-file
  680. # check and then display Windows INItialization configuration
  681. 0 name ini-file
  682. # look for left bracket in section line
  683. >0 search/8192 [
  684. # https://en.wikipedia.org/wiki/Autorun.inf
  685. # https://msdn.microsoft.com/en-us/library/windows/desktop/cc144200.aspx
  686. # space after right bracket
  687. # or AutoRun.Amd64 for 64 bit systems
  688. # or only NL separator
  689. >>&0 regex/c \^autorun
  690. # but sometimes total commander directory tree file "treeinfo.wc" with lines like
  691. # [AUTORUN]
  692. # [boot]
  693. >>>&0 string =]\r\n[ Total commander directory treeinfo.wc
  694. !:mime text/plain
  695. !:ext wc
  696. # From: Pal Tamas <folti@balabit.hu>
  697. # Autorun File
  698. >>>&0 string !]\r\n[ Microsoft Windows Autorun file
  699. !:mime application/x-setupscript
  700. !:ext inf
  701. # https://msdn.microsoft.com/en-us/library/windows/hardware/ff549520(v=vs.85).aspx
  702. # version strings ASCII coded case-independent for Windows setup information script file
  703. >>&0 regex/c \^(version|strings)] Windows setup INFormation
  704. !:mime application/x-setupscript
  705. #!:mime application/x-wine-extension-inf
  706. !:ext inf
  707. # NETCRC.INF OEMCPL.INF
  708. >>&0 regex/c \^(WinsockCRCList|OEMCPL)] Windows setup INFormation
  709. !:mime application/x-setupscript
  710. !:ext inf
  711. # http://www.winfaq.de/faq_html/Content/tip2500/onlinefaq.php?h=tip2653.htm
  712. # https://msdn.microsoft.com/en-us/library/windows/desktop/cc144102.aspx
  713. # .ShellClassInfo DeleteOnCopy LocalizedFileNames ASCII coded case-independent
  714. >>&0 regex/1024c \^(\\.ShellClassInfo|DeleteOnCopy|LocalizedFileNames)] Windows desktop.ini
  715. !:mime application/x-wine-extension-ini
  716. #!:mime text/plain
  717. # https://support.microsoft.com/kb/84709/
  718. >>&0 regex/c \^don't\ load] Windows CONTROL.INI
  719. !:mime application/x-wine-extension-ini
  720. !:ext ini
  721. >>&0 regex/c \^(ndishlp\\$|protman\\$|NETBEUI\\$)] Windows PROTOCOL.INI
  722. !:mime application/x-wine-extension-ini
  723. !:ext ini
  724. # https://technet.microsoft.com/en-us/library/cc722567.aspx
  725. # http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0137.htm
  726. >>&0 regex/c \^(windows|Compatibility|embedding)] Windows WIN.INI
  727. !:mime application/x-wine-extension-ini
  728. !:ext ini
  729. # https://en.wikipedia.org/wiki/SYSTEM.INI
  730. >>&0 regex/c \^(boot|386enh|drivers)] Windows SYSTEM.INI
  731. !:mime application/x-wine-extension-ini
  732. !:ext ini
  733. # http://www.mdgx.com/newtip6.htm
  734. >>&0 regex/c \^SafeList] Windows IOS.INI
  735. !:mime application/x-wine-extension-ini
  736. !:ext ini
  737. # https://en.wikipedia.org/wiki/NTLDR Windows Boot Loader information
  738. >>&0 regex/c \^boot\x20loader] Windows boot.ini
  739. !:mime application/x-wine-extension-ini
  740. !:ext ini
  741. # https://en.wikipedia.org/wiki/CONFIG.SYS
  742. >>&0 regex/c \^menu] MS-DOS CONFIG.SYS
  743. # @CONFIG.UI configuration file of previous DOS version saved by Caldera OPENDOS INSTALL.EXE
  744. # CONFIG.PSS saved version of file CONFIG.SYS created by %WINDIR%\SYSTEM\MSCONFIG.EXE
  745. # CONFIG.TSH renamed file CONFIG.SYS.BAT by %WINDIR%\SYSTEM\MSCONFIG.EXE
  746. # dos and w40 used in dual booting scene
  747. !:ext sys/dos/w40
  748. # https://support.microsoft.com/kb/118579/
  749. >>&0 regex/c \^Paths]\r\n MS-DOS MSDOS.SYS
  750. !:ext sys/dos
  751. # http://chmspec.nongnu.org/latest/INI.html#HHP
  752. >>&0 regex/c \^options]\r\n Microsoft HTML Help Project
  753. !:mime text/plain
  754. !:ext hhp
  755. # From: Joerg Jenderek
  756. # URL: https://documentation.basis.com/BASISHelp/WebHelp/b3odbc/ODBC_Driver/obdcdriv_character_translation.htm
  757. # Reference: https://www.garykessler.net/library/file_sigs.html
  758. # http://mark0.net/download/triddefs_xml.7z/defs/c/cpx.trid.xml
  759. # Note: stored in directory %WINDIR%\SysWOW64 or %WINDIR%\system
  760. # second word often Latin but sometimes Cyrillic like in 12510866.CPX
  761. >>&0 regex/c \^Windows\ (Latin|Cyrillic) Windows codepage translator
  762. #!:mime text/plain
  763. !:mime text/x-ms-cpx
  764. # like: 12510866.CPX
  765. !:ext cpx
  766. # From: Joerg Jenderek
  767. # URL: https://en.wikipedia.org/wiki/File_Explorer
  768. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/scf-exp.trid.xml,scf-exp-old.trid.xml
  769. # Note: called "Windows Explorer Command Shell File" by TrID and "File Explorer Command" by Windows via SHCmdFile
  770. >>&0 regex/c \^Shell]\r\n Windows Explorer Shell Command File
  771. #!:mime text/plain
  772. !:mime text/x-ms-scf
  773. # like: channels.scf desktop.scf explorer.scf "Desktop anzeigen.scf"
  774. !:ext scf
  775. # look for icon file directive maybe pointing to malicious file
  776. >>>1 search/128 IconFile= \b, icon
  777. >>>>&0 string x "%s"
  778. # From: Joerg Jenderek
  779. # URL: http://en.wikipedia.org/wiki/VIA_Technologies
  780. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/s/scf-via.trid.xml
  781. # Note: called "VIA setup configuration file" by TrID
  782. >>&0 regex/c \^SCF]\r\n VIA setup configuration
  783. #!:mime text/plain
  784. !:mime text/x-via-scf
  785. # like: SETUP.SCF
  786. !:ext scf
  787. # From: Joerg Jenderek
  788. # URL: https://en.wikipedia.org/wiki/InstallShield
  789. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/l/lid-is.trid.xml
  790. # Note: contain also 3 keywords like: count Default key0
  791. >>&0 regex/c \^Languages] InstallShield Language Identifier
  792. #!:mime text/plain
  793. !:mime text/x-installshield-lid
  794. # like: SETUP.LID
  795. !:ext lid
  796. # From: Joerg Jenderek
  797. # URL: https://www.file-extensions.org/tag-file-extension
  798. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/t/taginfo.trid.xml
  799. # Note: contain also keywords like: Application Category Company Misc Version
  800. >>&0 regex/c \^TagInfo] TagInfo
  801. #!:mime text/plain
  802. #!:mime text/prs.lines.tag
  803. !:mime text/x-ms-tag
  804. # like: DATA.TAG
  805. !:ext tag
  806. # unknown keyword after opening bracket
  807. >>&0 default x
  808. #>>>&0 string/c x UNKNOWN [%s
  809. # look for left bracket of second section
  810. >>>&0 search/8192 [
  811. # version Strings FileIdentification
  812. >>>>&0 string/c version Windows setup INFormation
  813. !:mime application/x-setupscript
  814. !:ext inf
  815. # https://en.wikipedia.org/wiki/Initialization_file Windows Initialization File or other
  816. >>>>&0 default x
  817. >>>>>&0 ubyte x
  818. # characters, digits, underscore and white space followed by right bracket
  819. # terminated by CR implies section line to skip BOOTLOG.TXT DETLOG.TXT
  820. >>>>>>&-1 regex/T \^([A-Za-z0-9_\(\)\ ]+)\]\r Generic INItialization configuration [%-.40s
  821. # NETDEF.INF multiarc.ini
  822. #!:mime application/x-setupscript
  823. !:mime application/x-wine-extension-ini
  824. #!:mime text/plain
  825. !:ext ini/inf
  826. # UTF-16 BOM
  827. 0 ubeshort =0xFFFE
  828. # look for phrase of Windows policy ADMinistrative template (UTF-16 by adm-uni.trid.xml)
  829. # like: wuau.adm
  830. >2 search/0x384A E\0N\0D\0\040\0C\0A\0T\0E\0G\0O\0R\0Y\0
  831. >>0 use windows-adm
  832. # if no Windows policy ADMinistrative template then Windows INFormation
  833. >2 default x
  834. # UTF-16 BOM followed by CR~0D00 , comment~semicolon~3B00 , section~bracket~5B00
  835. >>0 ubelong&0xFFff89FF =0xFFFE0900
  836. # look for left bracket in section line
  837. >>>2 search/8192 [
  838. # keyword without 1st letter which is maybe up-/down-case
  839. >>>>&3 lestring16 ersion] Windows setup INFormation
  840. !:mime application/x-setupscript
  841. # like: hdaudio.inf iscsi.inf spaceport.inf tpm.inf usbhub3.inf UVncVirtualDisplay.inf
  842. !:ext inf
  843. >>>>&3 lestring16 trings] Windows setup INFormation
  844. !:mime application/x-setupscript
  845. # like: arduino_gemma.inf iis.inf MSM8960.inf
  846. !:ext inf
  847. >>>>&3 lestring16 ourceDisksNames] Windows setup INFormation
  848. !:mime application/x-setupscript
  849. # like: atiixpag.inf mdmnokia.inf netefe32.inf rdpbus.inf
  850. !:ext inf
  851. # netnwcli.inf start with ;---[ NetNWCli.INX ]
  852. >>>>&3 default x
  853. # look for NL followed by left bracket
  854. >>>>>&0 search/8192 \x0A\x00\x5b
  855. # like: defltwk.inf netvwifibus.inf WSDPrint.inf
  856. >>>>>>&3 lestring16 ersion] Windows setup INFormation
  857. !:mime application/x-setupscript
  858. !:ext inf
  859. # Summary: Windows Policy ADMinistrative template
  860. # From: Joerg Jenderek
  861. # URL: https://en.wikipedia.org/wiki/Administrative_Template
  862. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/a/adm.trid.xml
  863. # Note: typically stored in directory like: %WINDIR%\system32\GroupPolicy\ADM
  864. # worst case ASCII variant starting with remark line like: inetset.adm
  865. 0 search/0x4E CLASS\040
  866. >&0 string MACHINE
  867. >>0 use windows-adm
  868. >&0 string USER
  869. >>0 use windows-adm
  870. # display information about Windows policy ADMinistrative template
  871. 0 name windows-adm Windows Policy Administrative Template
  872. !:mime text/x-ms-adm
  873. !:ext adm
  874. # UTF-16 BOM implies UTF-16 encoded ADM (by adm-uni.trid.xml)
  875. >0 ubeshort =0xFFFE
  876. >>2 lestring16 x \b, 1st line "%s"
  877. # look for UTF-16 encoded CarriageReturn LineFeed
  878. >>>2 search/0x3A \r\0\n\0
  879. >>>>&0 lestring16 x \b, 2nd line "%s"
  880. # no UTF-16 BOM implies "ASCII" encoded ADM (by adm.trid.xml)
  881. >0 ubeshort !0xFFFE
  882. >>0 string x \b, 1st line "%s"
  883. #>>>&0 ubequad x \b, 2ND %16.16llx
  884. # 2nd line empty
  885. >>>&2 beshort =0x0D0A
  886. >>>>&0 beshort !0x0D0A \b, 3th line
  887. >>>>>&-2 string x "%s"
  888. # 2nd line with content
  889. >>>&2 beshort !0x0D0A \b, 2nd line
  890. >>>>&-2 string x "%s"
  891. # Windows Precompiled INF files *.PNF added by Joerg Jenderek at Mar 2013 of _PNF_HEADER inf.h
  892. # http://read.pudn.com/downloads3/sourcecode/windows/248345/win2k/private/windows/setup/setupapi/inf.h__.htm
  893. # URL: http://fileformats.archiveteam.org/wiki/INF_(Windows)
  894. # Reference: http://en.verysource.com/code/10350344_1/inf.h.html
  895. # Note: stored in %Windir%\Inf %Windir%\System32\DriverStore\FileRepository
  896. # check for valid major and minor versions: 101h - 303h
  897. 0 leshort&0xFcFc =0x0000
  898. # GRR: line above (strength 50) is too general as it catches also "PDP-11 UNIX/RT ldp" ./pdp
  899. >0 leshort&0x0303 !0x0000
  900. # test for valid InfStyles: 1 2
  901. >>2 uleshort >0
  902. >>>2 uleshort <3
  903. # look for colon in WinDirPath after PNF header
  904. #>>>>0x59 search/18 :
  905. # skip few Adobe Photoshop Color swatch ("Mac OS.aco" TRUMATCH-Farben.aco Windows.aco) and some
  906. # Targa image (money-256.tga XING_B_UCM8.tga x-fmt-367-signature-id-604.tga) with "invalid low section name" \0
  907. >>>>(20.l) ubelong >0x40004000
  908. >>>>>0 use PreCompiledInf
  909. 0 name PreCompiledInf
  910. >0 uleshort x Windows Precompiled iNF
  911. !:mime application/x-pnf
  912. !:ext pnf
  913. # major version 1 for older Windows like XP and 3 since about Windows Vista
  914. # 101h~95-XP; 301h~Windows Vista-7 ; 302h~Windows 10 14393; 303h~Windows 10 18362-Windows11
  915. >1 ubyte x \b, version %u
  916. >0 ubyte x \b.%u
  917. >0 uleshort =0x0101 (Windows
  918. >>4 ulelong&0x00000001 !0x00000001 95-98)
  919. >>4 ulelong&0x00000001 =0x00000001 XP)
  920. >0 uleshort =0x0301 (Windows Vista-8.1)
  921. >0 uleshort =0x0302 (Windows 10 older)
  922. >0 uleshort =0x0303 (Windows 10-11)
  923. # 1 ,2 (windows 98 SE)
  924. >2 uleshort !2 \b, InfStyle %u
  925. # PNF_FLAG_IS_UNICODE 0x00000001
  926. # PNF_FLAG_HAS_STRINGS 0x00000002
  927. # PNF_FLAG_SRCPATH_IS_URL 0x00000004
  928. # PNF_FLAG_HAS_VOLATILE_DIRIDS 0x00000008
  929. # PNF_FLAG_INF_VERIFIED 0x00000010
  930. # PNF_FLAG_INF_DIGITALLY_SIGNED 0x00000020
  931. # UNKNOWN8 0x00000080
  932. # UNKNOWN 0x00000100
  933. # UNKNOWN1 0x01000000
  934. # UNKNOWN2 0x02000000
  935. >4 ulelong&0x03000180 >0 \b, flags
  936. >>4 ulelong x %#x
  937. >4 ulelong&0x00000001 0x00000001 \b, unicoded
  938. >4 ulelong&0x00000002 0x00000002 \b, has strings
  939. >4 ulelong&0x00000004 0x00000004 \b, src URL
  940. >4 ulelong&0x00000008 0x00000008 \b, volatile dir ids
  941. >4 ulelong&0x00000010 0x00000010 \b, verified
  942. >4 ulelong&0x00000020 0x00000020 \b, digitally signed
  943. # >4 ulelong&0x00000080 0x00000080 \b, UNKNOWN8
  944. # >4 ulelong&0x00000100 0x00000100 \b, UNKNOWN
  945. # >4 ulelong&0x01000000 0x01000000 \b, UNKNOWN1
  946. # >4 ulelong&0x02000000 0x02000000 \b, UNKNOWN2
  947. #>8 ulelong x \b, InfSubstValueListOffset %#x
  948. # many 0, 1 lmouusb.PNF, 2 linkfx10.PNF , f webfdr16.PNF
  949. # , 6 bth.PNF, 9 usbport.PNF, d netnwifi.PNF, 10h nettcpip.PNF
  950. #>12 uleshort x \b, InfSubstValueCount %#x
  951. # only < 9 found: 8 hcw85b64.PNF
  952. #>14 uleshort x \b, InfVersionDatumCount %#x
  953. # only found values lower 0x0000ffff ??
  954. #>16 ulelong x \b, InfVersionDataSize %#x
  955. # only found positive values lower 0x00ffFFff for InfVersionDataOffset
  956. >20 ulelong x \b, at %#x
  957. >4 ulelong&0x00000001 =0x00000001
  958. # case independent: CatalogFile Class DriverVer layoutfile LayoutFile SetupClass signature Signature
  959. >>(20.l) lestring16 x "%s"
  960. >4 ulelong&0x00000001 !0x00000001
  961. >>(20.l) string x "%s"
  962. # FILETIME is number of 100-nanosecond intervals since 1 January 1601
  963. #>24 ulequad x \b, InfVersionLastWriteTime %16.16llx
  964. >24 qwdate x \b, InfVersionLastWriteTime %s
  965. # for Windows 98, XP
  966. >0 uleshort <0x0102
  967. # only found values lower 0x00ffFFff
  968. # often 70 but also 78h for corelist.PNF
  969. # >>32 ulelong x \b, StringTableBlockOffset %#x
  970. # >>36 ulelong x \b, StringTableBlockSize %#x
  971. # >>40 ulelong x \b, InfSectionCount %#x
  972. # >>44 ulelong x \b, InfSectionBlockOffset %#x
  973. # >>48 ulelong x \b, InfSectionBlockSize %#x
  974. # >>52 ulelong x \b, InfLineBlockOffset %#x
  975. # >>56 ulelong x \b, InfLineBlockSize %#x
  976. # >>60 ulelong x \b, InfValueBlockOffset %#x
  977. # >>64 ulelong x \b, InfValueBlockSize %#x
  978. # WinDirPathOffset
  979. # like 58h, which means direct after PNF header
  980. #>>68 ulelong x \b, at %#x
  981. >>68 ulelong x
  982. >>>4 ulelong&0x00000001 =0x00000001
  983. #>>>>(68.l) ubequad =0x43003a005c005700
  984. # normally unicoded C:\Windows
  985. #>>>>>(68.l) lestring16 x \b, WinDirPath "%s"
  986. >>>>(68.l) ubequad !0x43003a005c005700
  987. >>>>>(68.l) lestring16 x \b, WinDirPath "%s"
  988. >>>4 ulelong&0x00000001 !0x00000001
  989. # normally ASCII C:\WINDOWS
  990. #>>>>(68.l) string =C:\\WINDOWS \b, WinDirPath "%s"
  991. >>>>(68.l) string !C:\\WINDOWS
  992. >>>>>(68.l) string x \b, WinDirPath "%s"
  993. # found OsLoaderPathOffset values often 0 , once 70h corelist.PNF, once 68h ASCII machine.PNF
  994. >>>72 ulelong >0 \b,
  995. >>>>4 ulelong&0x00000001 =0x00000001
  996. >>>>>(72.l) lestring16 x OsLoaderPath "%s"
  997. >>>>4 ulelong&0x00000001 !0x00000001
  998. # seldom C:\ instead empty
  999. >>>>>(72.l) string x OsLoaderPath "%s"
  1000. # 1fdh
  1001. #>>>76 uleshort x \b, StringTableHashBucketCount %#x
  1002. # https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a
  1003. # only 407h found
  1004. >>>78 uleshort !0x409 \b, LanguageID %x
  1005. #>>>78 uleshort =0x409 \b, LanguageID %x
  1006. # InfSourcePathOffset often 0
  1007. >>>80 ulelong >0 \b, at %#x
  1008. >>>>4 ulelong&0x00000001 =0x00000001
  1009. >>>>>(80.l) lestring16 x SourcePath "%s"
  1010. >>>>4 ulelong&0x00000001 !0x00000001
  1011. >>>>>(80.l) string >\0 SourcePath "%s"
  1012. # OriginalInfNameOffset often 0
  1013. >>>84 ulelong >0 \b, at %#x
  1014. >>>>4 ulelong&0x00000001 =0x00000001
  1015. >>>>>(84.l) lestring16 x InfName "%s"
  1016. >>>>4 ulelong&0x00000001 !0x00000001
  1017. >>>>>(84.l) string >\0 InfName "%s"
  1018. # for newer Windows like Vista, 7 , 8.1 , 10
  1019. >0 uleshort >0x0101
  1020. >>80 ulelong x \b, at %#x WinDirPath
  1021. >>>4 ulelong&0x00000001 0x00000001
  1022. # normally unicoded C:\Windows
  1023. #>>>>(80.l) ubequad =0x43003a005c005700
  1024. #>>>>>(80.l) lestring16 x "%s"
  1025. >>>>(80.l) ubequad !0x43003a005c005700
  1026. >>>>>(80.l) lestring16 x "%s"
  1027. # language id: 0 407h~german 409h~English_US
  1028. >>90 uleshort !0x409 \b, LanguageID %x
  1029. #>>90 uleshort =0x409 \b, LanguageID %x
  1030. >>92 ulelong >0 \b, at %#x
  1031. >>>4 ulelong&0x00000001 0x00000001
  1032. # language string like: de-DE en-US
  1033. >>>>(92.l) lestring16 x language %s
  1034. # Summary: backup file created with utility like NTBACKUP.EXE shipped with Windows NT/2K/XP/2003
  1035. # Extension: .bkf
  1036. # Created by: Joerg Jenderek
  1037. # URL: https://en.wikipedia.org/wiki/NTBackup
  1038. # Reference: http://laytongraphics.com/mtf/MTF_100a.PDF
  1039. # Descriptor BloCK name of Microsoft Tape Format
  1040. 0 string TAPE
  1041. # Format Logical Address is zero
  1042. >20 ulequad 0
  1043. # Reserved for MBC is zero
  1044. >>28 uleshort 0
  1045. # Control Block ID is zero
  1046. >>>36 ulelong 0
  1047. # BIT4-BIT15, BIT18-BIT31 of block attributes are unused
  1048. >>>>4 ulelong&0xFFfcFFe0 0 Windows NTbackup archive
  1049. #!:mime application/x-ntbackup
  1050. !:ext bkf
  1051. # OS ID
  1052. >>>>>10 ubyte 1 \b NetWare
  1053. >>>>>10 ubyte 13 \b NetWare SMS
  1054. >>>>>10 ubyte 14 \b NT
  1055. >>>>>10 ubyte 24 \b 3
  1056. >>>>>10 ubyte 25 \b OS/2
  1057. >>>>>10 ubyte 26 \b 95
  1058. >>>>>10 ubyte 27 \b Macintosh
  1059. >>>>>10 ubyte 28 \b UNIX
  1060. # OS Version (2)
  1061. #>>>>>11 ubyte x OS V=%x
  1062. # MTF_CONTINUATION Media Sequence Number > 1
  1063. #>>>>>4 ulelong&0x00000001 !0 \b, continued
  1064. # MTF_COMPRESSION
  1065. >>>>>4 ulelong&0x00000004 !0 \b, compressed
  1066. # MTF_EOS_AT_EOM End Of Medium was hit during end of set processing
  1067. >>>>>4 ulelong&0x00000008 !0 \b, End Of Medium hit
  1068. >>>>>4 ulelong&0x00020000 0
  1069. # MTF_SET_MAP_EXISTS A Media Based Catalog Set Map may exist on tape
  1070. >>>>>>4 ulelong&0x00010000 !0 \b, with catalog
  1071. # MTF_FDD_ALLOWED However File/Directory Detail can only exist if a Set Map is also present
  1072. >>>>>4 ulelong&0x00020000 !0 \b, with file catalog
  1073. # Offset To First Event 238h,240h,28Ch
  1074. #>>>>>8 uleshort x \b, event offset %4.4x
  1075. # Displayable Size (20e0230h 20e024ch 20e0224h)
  1076. #>>>>>8 ulequad x dis. size %16.16llx
  1077. # Media Family ID (455288C4h 4570BD1Ah 45708F2Fh 4570BBF5h)
  1078. #>>>>>52 ulelong x family ID %8.8x
  1079. # TAPE Attributes (3)
  1080. #>>>>>56 ulelong x TAPE %8.8x
  1081. # Media Sequence Number
  1082. >>>>>60 uleshort >1 \b, sequence %u
  1083. # Password Encryption Algorithm (3)
  1084. >>>>>62 uleshort >0 \b, %#x encrypted
  1085. # Soft Filemark Block Size * 512 (2)
  1086. #>>>>>64 uleshort =2 \b, soft size %u*512
  1087. >>>>>64 uleshort !2 \b, soft size %u*512
  1088. # Media Based Catalog Type (1,2)
  1089. #>>>>>66 uleshort x \b, catalog type %4.4x
  1090. # size of Media Name (66,68,6Eh)
  1091. >>>>>68 uleshort >0
  1092. # offset of Media Name (5Eh)
  1093. >>>>>>70 uleshort >0
  1094. # 0~, 1~ANSI, 2~UNICODE
  1095. >>>>>>>48 ubyte 1
  1096. # size terminated ansi coded string normally followed by "MTF Media Label"
  1097. >>>>>>>>(70.s) string >\0 \b, name: %s
  1098. >>>>>>>48 ubyte 2
  1099. # Not null, but size terminated unicoded string
  1100. >>>>>>>>(70.s) lestring16 x \b, name: %s
  1101. # size of Media Label (104h)
  1102. >>>>>72 uleshort >0
  1103. # offset of Media Label (C4h,C6h,CCh)
  1104. >>>>>74 uleshort >0
  1105. >>>>>>48 ubyte 1
  1106. #Tag|Version|Vendor|Vendor ID|Creation Time Stamp|Cartridge Label|Side|Media ID|Media Domain ID|Vendor Specific fields
  1107. >>>>>>>(74.s) string >\0 \b, label: %s
  1108. >>>>>>48 ubyte 2
  1109. >>>>>>>(74.s) lestring16 x \b, label: %s
  1110. # size of password name (0,1Ch)
  1111. #>>>>>76 uleshort >0 \b, password size %4.4x
  1112. # Software Vendor ID (CBEh)
  1113. >>>>>86 uleshort x \b, software (%#x)
  1114. # size of Software Name (6Eh)
  1115. >>>>>80 uleshort >0
  1116. # offset of Software Name (1C8h,1CAh,1D0h)
  1117. >>>>>>82 uleshort >0
  1118. # 1~ANSI, 2~UNICODE
  1119. >>>>>>>48 ubyte 1
  1120. >>>>>>>>(82.s) string >\0 \b: %s
  1121. >>>>>>>48 ubyte 2
  1122. # size terminated unicoded coded string normally followed by "SPAD"
  1123. >>>>>>>>(82.s) lestring16 x \b: %s
  1124. # Format Logical Block Size (512,1024)
  1125. #>>>>>84 uleshort =1024 \b, block size %u
  1126. >>>>>84 uleshort !1024 \b, block size %u
  1127. # Media Date of MTF_DATE_TIME type with 5 bytes
  1128. #>>>>>>88 ubequad x DATE %16.16llx
  1129. # MTF Major Version (1)
  1130. #>>>>>>93 ubyte x \b, MFT version %x
  1131. #
  1132. # URL: https://en.wikipedia.org/wiki/PaintShop_Pro
  1133. # Reference: https://www.cryer.co.uk/file-types/p/pal.htm
  1134. # Created by: Joerg Jenderek
  1135. # Note: there exist other color palette formats also with .pal extension
  1136. 0 string JASC-PAL\r\n PaintShop Pro color palette
  1137. #!:mime text/plain
  1138. # PspPalette extension is used by newer (probably 8) PaintShopPro versions
  1139. !:ext pal/PspPalette
  1140. # 2nd line contains palette file version. For example "0100"
  1141. >10 string !0100 \b, version %.4s
  1142. # third line contains the number of colours: 16 256 ...
  1143. >16 string x \b, %.3s colors
  1144. # URL: https://en.wikipedia.org/wiki/Innosetup
  1145. # Reference: https://github.com/jrsoftware/issrc/blob/master/Projects/Undo.pas
  1146. # Created by: Joerg Jenderek
  1147. # Note: created by like "InnoSetup self-extracting archive" inside ./msdos
  1148. # TrID labeles the entry as "Inno Setup Uninstall Log"
  1149. # TUninstallLogID
  1150. 0 string Inno\ Setup\ Uninstall\ Log\ (b) InnoSetup Log
  1151. !:mime application/x-innosetup
  1152. # unins000.dat, unins001.dat, ...
  1153. !:ext dat
  1154. # " 64-bit" variant
  1155. >0x1c string >\0 \b%.7s
  1156. # AppName[0x80] like "Minimal SYStem", ClamWin Free Antivirus , ...
  1157. >0xc0 string x %s
  1158. # AppId[0x80] is similar to AppName or
  1159. # GUID like {4BB0DCDC-BC24-49EC-8937-72956C33A470} start with left brace
  1160. >0x40 ubyte 0x7b
  1161. >>0x40 string x %-.38s
  1162. # do not know how this log version correlates to program version
  1163. >0x140 ulelong x \b, version %#x
  1164. # NumRecs
  1165. #>0x144 ulelong x \b, %#4.4x records
  1166. # EndOffset means files size
  1167. >0x148 ulelong x \b, %u bytes
  1168. # Flags 5 25h 35h
  1169. #>0x14c ulelong x \b, flags %8.8x
  1170. # Reserved: array[0..26] of Longint
  1171. # the non Unicode HighestSupportedVersion may never become greater than or equal to 1000
  1172. >0x140 ulelong <1000
  1173. # hostname
  1174. >>0x1d6 pstring x \b, %s
  1175. # user name
  1176. >>>&0 pstring x \b\%s
  1177. # directory like C:\Program Files (x86)\GnuWin32
  1178. >>>>&0 pstring x \b, "%s"
  1179. # version 1000 or higher implies unicode
  1180. >0x140 ulelong >999
  1181. # hostname
  1182. >>0x1db lestring16 x \b, %-.9s
  1183. # utf string variant with prepending fe??ffFFff
  1184. >>0x1db search/43 \xFF\xFF\xFF
  1185. # user name
  1186. >>>&0 lestring16 x \b\%-.9s
  1187. >>>&0 search/43 \xFF\xFF\xFF
  1188. # directory like C:\Program Files\GIMP 2
  1189. >>>>&0 lestring16 x \b, %-.42s
  1190. # URL: https://jrsoftware.org/ishelp/index.php?topic=setup_signeduninstaller
  1191. # Reference:https://github.com/jrsoftware/issrc/blob/main/Projects/Struct.pas
  1192. # From: Joerg Jenderek
  1193. 0 string Inno\ Setup\ Messages\ (
  1194. # null padded til 0x40 boundary
  1195. >0x38 quad 0 InnoSetup messages
  1196. !:mime application/x-innosetup-msg
  1197. # unins000.msg, unins001.msg, ...
  1198. !:ext msg
  1199. # version like 5.1.1 5.1.11 5.5.0 5.5.3 6.0.0
  1200. >>0x15 string x \b, version %.5s
  1201. # look for 6th char of version string or terminating right parentheses
  1202. >>>0x1a ubyte !0x29 \b%c
  1203. # NumMessages
  1204. >>0x40 ulelong x \b, %u messages
  1205. # TotalSize: Cardinal;
  1206. #>>0x44 ulelong x \b, TotalSize %u
  1207. # NotTotalSize: Cardinal;
  1208. #>>0x48 ulelong x \b, NotTotalSize %u
  1209. # CRCMessages: Longint;
  1210. #>>0x4C ulelong x \b, CRC %#x
  1211. >>0x40 ulelong x
  1212. # (u) after version means unicoded messages
  1213. >>>0x1c search/2 (u) (UTF-16),
  1214. >>>>0x50 lestring16 x %s
  1215. # ASCII coded message
  1216. >>>0x1c default x (ASCII),
  1217. >>>>0x50 string x %s
  1218. # Windows Imaging (WIM) Image
  1219. # Update: Joerg Jenderek at Mar 2019, 2021
  1220. # URL: https://en.wikipedia.org/wiki/Windows_Imaging_Format
  1221. # http://fileformats.archiveteam.org/wiki/Windows_Imaging_Format
  1222. # Reference: https://download.microsoft.com/download/f/e/f/
  1223. # fefdc36e-392d-4678-9e4e-771ffa2692ab/Windows%20Imaging%20File%20Format.rtf
  1224. # Note: verified by like `7z t boot.wim` `wiminfo install.esd --header`
  1225. 0 string MSWIM\000\000\000
  1226. >0 use wim-archive
  1227. # https://wimlib.net/man1/wimoptimize.html
  1228. 0 string WLPWM\000\000\000
  1229. >0 use wim-archive
  1230. 0 name wim-archive
  1231. # _WIMHEADER_V1_PACKED ImageTag[8]
  1232. >0 string x Windows imaging
  1233. !:mime application/x-ms-wim
  1234. # TO avoid in file version 5.36 error like
  1235. # Magdir/windows, 760: Warning: Current entry does not yet have a description
  1236. # file: could not find any valid magic files! (No error)
  1237. # split WIM
  1238. >16 ulelong &0x00000008 (SWM
  1239. !:ext swm
  1240. # usPartNumber; 1, unless the file was split into multiple parts
  1241. >>40 uleshort x \b %u
  1242. # usTotalParts; The total number of WIM file parts in a spanned set
  1243. >>42 uleshort x \b of %u) image
  1244. # non split WIM
  1245. >16 ulelong ^0x00000008
  1246. # https://wimlib.net/man1/wimmount.html
  1247. # solid WIMs; version 3584; usually contain LZMS-compressed and the .esd extension
  1248. >>12 ulelong 3584 (ESD) image
  1249. !:ext esd
  1250. >>12 ulelong !3584 (
  1251. # look for archive member RunTime.xml like in Microsoft.Windows.Cosa.Desktop.Client.ppkg
  1252. >>>156 search/68233/s RunTime.xml \bWindows provisioning package)
  1253. !:ext ppkg
  1254. # if is is not a Windows provisioning package, then it is a WIM
  1255. >>>156 default x \bWIM) image
  1256. # second disk image part created by Microsoft's RecoveryDrive.exe has name Reconstruct.WIM2
  1257. !:ext wim/wim2
  1258. >0 string/b WLPWM\000\000\000 \b, wimlib pipable format
  1259. # cbSize size of the WIM header in bytes like 208
  1260. #>8 ulelong x \b, headersize %u
  1261. # dwVersion version of the WIM file 00010d00h~1.13 00000e00h~0.14
  1262. >14 uleshort x v%u
  1263. >13 ubyte x \b.%u
  1264. # dwImageCount; The number of images contained in the WIM file
  1265. >44 ulelong >1 \b, %u images
  1266. # dwBootIndex
  1267. # 1-based index of the bootable image of the WIM, or 0 if no image is bootable
  1268. >0x78 ulelong >0 \b, bootable no. %u
  1269. # dwFlags
  1270. #>16 ulelong x \b, flags %#8.8x
  1271. #define FLAG_HEADER_COMPRESSION 0x00000002
  1272. #define FLAG_HEADER_READONLY 0x00000004
  1273. #define FLAG_HEADER_SPANNED 0x00000008
  1274. #define FLAG_HEADER_RESOURCE_ONLY 0x00000010
  1275. #define FLAG_HEADER_METADATA_ONLY 0x00000020
  1276. #define FLAG_HEADER_WRITE_IN_PROGRESS 0x00000040
  1277. #define FLAG_HEADER_RP_FIX 0x00000080 reparse point fixup
  1278. #define FLAG_HEADER_COMPRESS_RESERVED 0x00010000
  1279. #define FLAG_HEADER_COMPRESS_XPRESS 0x00020000
  1280. #define FLAG_HEADER_COMPRESS_LZX 0x00040000
  1281. #define FLAG_HEADER_COMPRESS_LZMS 0x00080000
  1282. #define FLAG_HEADER_COMPRESS_XPRESS2 0x00100000 wimlib-1.13.0\include\wimlib\header.h
  1283. # XPRESS, with small chunk size
  1284. >16 ulelong &0x00100000 \b, XPRESS2
  1285. >16 ulelong &0x00080000 \b, LZMS
  1286. >16 ulelong &0x00040000 \b, LZX
  1287. >16 ulelong &0x00020000 \b, XPRESS
  1288. >16 ulelong &0x00000002 compressed
  1289. >16 ulelong &0x00000004 \b, read only
  1290. >16 ulelong &0x00000010 \b, resource only
  1291. >16 ulelong &0x00000020 \b, metadata only
  1292. >16 ulelong &0x00000080 \b, reparse point fixup
  1293. #>16 ulelong &0x00010000 \b, RESERVED
  1294. # dwCompressionSize; Uncompressed chunk size for resources or 0 if uncompressed
  1295. #>20 ulelong >0 \b, chunk size %u bytes
  1296. # gWIMGuid
  1297. #>24 ubequad x \b, GUID %#16.16llx
  1298. #>>32 ubequad x \b%16.16llx
  1299. # rhOffsetTable; the location of the resource lookup table
  1300. # wim_reshdr_disk[24]= u8 size_in_wim[7] + u8 flags + le64 offset_in_wim + le64 uncompressed_size
  1301. #>48 ubequad x \b, rhOffsetTable %#16.16llx
  1302. # rhXmlData; the location of the XML data
  1303. #>0x50 ulelong x \b, at %#8.8x
  1304. # NOT WORKING \xff\xfe<\0W\0I\0M\0
  1305. #>(0x50.l) ubequad x \b, xml=%16.16llx
  1306. # rhBootMetadata; the location of the metadata resource
  1307. #>0x60 ubequad x \b, rhBootMetadata %#16.16llx
  1308. # rhIntegrity; the location of integrity table used to verify files
  1309. #>0x7c ubequad x \b, rhIntegrity %#16.16llx
  1310. # Unused[60]
  1311. #>148 ubequad !0 \b,unused %#16.16llx
  1312. #
  1313. # From: Joerg Jenderek
  1314. # URL: https://en.wikipedia.org/wiki/Windows_Easy_Transfer
  1315. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/mig.trid.xml
  1316. # Note: called "Windows Easy Transfer migration data" by TrID,
  1317. # "Migration Store" or "EasyTransfer file" by Microsoft
  1318. 0 string 1giM Windows Easy Transfer migration data
  1319. #!:mime application/octet-stream
  1320. !:mime application/x-ms-mig
  1321. !:ext mig
  1322. >0x18 string =MRTS without password
  1323. # data offset with 1 space at end
  1324. >>0x1c ulelong+0x38 x \b, at %#x
  1325. # look for zlib compressed data by ./compress
  1326. >>(0x1c.l+0x38) ubyte x
  1327. >>>&-1 indirect x
  1328. # in password protected examples MRTS comes some bytes further
  1329. >0x18 string !MRTS with password
  1330. # look for first MRTS tag
  1331. >0x18 search/29/b MRTS
  1332. # probably first file name length like 178, ...
  1333. #>>&0 ulelong x \b, 1st length %u
  1334. # URL like File\C:\Users\nutzer\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\desktop.ini
  1335. >>&20 lestring16 x \b, 1st %-s
  1336. # Microsoft SYLK
  1337. # https://en.wikipedia.org/wiki/SYmbolic_LinK_(SYLK)
  1338. # https://outflank.nl/upload/sylksum.txt
  1339. 0 string ID;P Microsoft SYLK program
  1340. >4 string >0 \b, created by %s
  1341. !:ext slk/sylk
  1342. # Summary: Windows Performance Monitor Alert
  1343. # From: Joerg Jenderek
  1344. # URL: https://en.wikipedia.org/wiki/Performance_Monitor
  1345. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/p/pma.trid.xml
  1346. # Note: called "Windows Performance Monitor Alert" by TrID
  1347. 0 ubelong =0xDC058340
  1348. >4 ubyte =0 Windows Performance Monitor Alert
  1349. #!:mime application/octet-stream
  1350. # https://www.thoughtco.com/mime-types-by-content-type-3469108
  1351. # https://filext.com/file-extension/PAM
  1352. !:mime application/x-perfmon
  1353. #!:mime application/x-ms-pma
  1354. !:ext pma
  1355. # metric type like: "BrowserMetrics" "CrashpadMetrics" "SetupMetrics"
  1356. >>80 string x \b, "%s"
  1357. # From: Joerg Jenderek
  1358. # URL: https://en.wikipedia.org/wiki/InstallShield
  1359. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/i/ins.trid.xml
  1360. # Note: contain also keywords like: BATCH_INSTALL ISVERSION LOGHANDLE SRCDIR SRCDISK WINDIR WINSYSDISK
  1361. 0 ubelong 0xB8C90C00 InstallShield Script
  1362. #!:mime application/octet-stream
  1363. !:mime application/x-installshield-ins
  1364. # like test.ins Setup.ins
  1365. !:ext ins
  1366. # UNKNOWN like: 160034121de07e00 1600341260befe00 16003412e0783700
  1367. # 5000010021083f00 50000100b0335600 50000100cbfdf800 50000100dfbc4700
  1368. #>4 ubequad x \b, at 4 %#16.16llx
  1369. # copyright text like: "Stirling Technologies, Inc. (c) 1990-1994"
  1370. # "InstallSHIELD Software Corporation (c) 1990-1997"
  1371. >13 pstring/h x "%s"
  1372. # look for specific ASCII variable names
  1373. >1 search/0x121/s SRCDIR \b, variable names:
  1374. # 1st like: SRCDIR
  1375. >>&-4 leshort x #%u
  1376. >>&-2 pstring/h x %s
  1377. # 2nd like: SRCDISK
  1378. >>>&0 leshort x #%u
  1379. >>>&2 pstring/h x %s
  1380. # 3rd like: TARGETDISK
  1381. >>>>&0 leshort x #%u
  1382. >>>>&2 pstring/h x %s
  1383. # 4th like: TARGETDIR
  1384. #>>>>>&0 leshort x #%u
  1385. #>>>>>&2 pstring/h x %s
  1386. # 5th like: WINDIR
  1387. #>>>>>>&0 leshort x #%u
  1388. #>>>>>>&2 pstring/h x %s
  1389. # 6th like: WINDISK
  1390. #>>>>>>>&0 leshort x #%u
  1391. #>>>>>>>&2 pstring/h x %s
  1392. # 7th like: WINSYSDIR
  1393. #>>>>>>>>&0 leshort x #%u
  1394. #>>>>>>>>&2 pstring/h x %s
  1395. # ... LOGHANDLE
  1396. >0 ubelong x ...
  1397. #