windows 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082
  1. #------------------------------------------------------------------------------
  2. # $File: windows,v 1.37 2021/04/26 15:56:00 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. # Extension: .dbx
  16. # Created by: Christophe Monniez
  17. 0 string \xCF\xAD\x12\xFE MS Outlook Express DBX file
  18. >4 byte =0xC5 \b, message database
  19. >4 byte =0xC6 \b, folder database
  20. >4 byte =0xC7 \b, account information
  21. >4 byte =0x30 \b, offline database
  22. # Summary: Windows crash dump
  23. # Extension: .dmp
  24. # Created by: Andreas Schuster (https://computer.forensikblog.de/)
  25. # Reference (1): https://computer.forensikblog.de/en/2008/02/64bit_magic.html
  26. # Modified by (1): Abel Cheung (Avoid match with first 4 bytes only)
  27. 0 string PAGE
  28. >4 string DUMP MS Windows 32bit crash dump
  29. >>0x05c byte 0 \b, no PAE
  30. >>0x05c byte 1 \b, PAE
  31. >>0xf88 lelong 1 \b, full dump
  32. >>0xf88 lelong 2 \b, kernel dump
  33. >>0xf88 lelong 3 \b, small dump
  34. >>0x068 lelong x \b, %d pages
  35. >4 string DU64 MS Windows 64bit crash dump
  36. >>0xf98 lelong 1 \b, full dump
  37. >>0xf98 lelong 2 \b, kernel dump
  38. >>0xf98 lelong 3 \b, small dump
  39. >>0x090 lequad x \b, %lld pages
  40. # Summary: Vista Event Log
  41. # Extension: .evtx
  42. # Created by: Andreas Schuster (https://computer.forensikblog.de/)
  43. # Reference (1): https://computer.forensikblog.de/en/2007/05/some_magic.html
  44. 0 string ElfFile\0 MS Windows Vista Event Log
  45. >0x2a leshort x \b, %d chunks
  46. >>0x10 lelong x \b (no. %d in use)
  47. >0x18 lelong >1 \b, next record no. %d
  48. >0x18 lelong =1 \b, empty
  49. >0x78 lelong &1 \b, DIRTY
  50. >0x78 lelong &2 \b, FULL
  51. # Summary: Windows System Deployment Image
  52. # Created by: Joerg Jenderek
  53. # URL: http://en.wikipedia.org/wiki/System_Deployment_Image
  54. # Reference: http://skolk.livejournal.com/1320.html
  55. 0 string $SDI
  56. >4 string 0001 System Deployment Image
  57. !:mime application/x-ms-sdi
  58. #!:mime application/octet-stream
  59. # \Boot\boot.sdi
  60. !:ext sdi
  61. # MDBtype: 0~Unspecified 1~RAM 2~ROM
  62. >>8 ulequad !0 \b, MDBtype %#llx
  63. # BootCodeOffset
  64. >>16 ulequad !0 \b, BootCodeOffset %#llx
  65. # BootCodeSize
  66. >>24 ulequad !0 \b, BootCodeSize %#llx
  67. # VendorID
  68. >>32 ulequad !0 \b, VendorID %#llx
  69. # DeviceID
  70. >>40 ulequad !0 \b, DeviceID %#llx
  71. # DeviceModel
  72. >>48 ulequad !0 \b, DeviceModel %#llx
  73. >>>56 ulequad !0 \b%llx
  74. # DeviceRole
  75. >>64 ulequad !0 \b, DeviceRole %#llx
  76. # Reserved1; reserved fields and gaps between BLOBs are padded with \0
  77. #>>72 ulequad !0 \b, Reserved1 %#llx
  78. # RuntimeGUID
  79. >>80 ulequad !0 \b, RuntimeGUID %#llx
  80. >>>88 ulequad !0 \b%llx
  81. # RuntimeOEMrev
  82. >>96 ulequad !0 \b, RuntimeOEMrev %#llx
  83. # Reserved2
  84. #>>104 ulequad !0 \b, Reserved2 %#llx
  85. # BLOB alignment value in pages, as specified in sdimgr /pack: 1~4K 2~8k
  86. >>112 ulequad !0 \b, PageAlignment %llu
  87. # Reserved3[48]
  88. #>>120 ulequad !0 \b, Reserved3 %#llx
  89. # SDI checksum 39h
  90. >>0x1f8 ulequad x \b, checksum %#llx
  91. # BLOBtype[8] \0-padded: PART, WIM , BOOT, LOAD, DISK
  92. >>0x400 string >\0 \b, type %-3.8s
  93. # 0~non-filesystem 7~NTFS 6~BIGFAT
  94. >>>0x420 ulequad !0 (%#llx)
  95. # ATTRibutes
  96. >>>0x408 ulequad !0 %#llx attributes
  97. # Offset
  98. >>>0x410 ulequad x at %#llx
  99. # print 1 space after size and then handles NTFS boot sector by ./filesystems
  100. >>>0x418 ulequad >0 %llu bytes
  101. >>>>(0x410.l) indirect x
  102. # 2nd BLOB: WIM
  103. >>0x440 string >\0 \b, type %-3.8s
  104. >>>0x428 ulequad !0 (%#llx)
  105. # ATTRibutes
  106. >>>0x448 ulequad !0 %#llx attributes
  107. # Offset
  108. >>>0x450 ulequad x at %#llx
  109. >>>0x458 ulequad >0 %llu bytes
  110. >>>>(0x450.l) indirect x
  111. # 3rd BLOB
  112. >>0x480 string >\0 \b, type %-3.8s
  113. # Summary: Windows boot status log BOOTSTAT.DAT
  114. # From: Joerg Jenderek
  115. # Reference: https://www.geoffchappell.com/notes/windows/boot/bsd.htm
  116. # Note: mainly refers to older Windows Vista, sometimes
  117. # BOOTSTAT.DAT only contains nulls or invalid data
  118. # checking for valid version below 5
  119. 0 ulelong <5
  120. # skip many ISO images by checking for valid 64 KiB file size
  121. >8 ulelong =0x00010000
  122. >>0 use bootstat-dat
  123. # display information of BOOTSTAT.DAT
  124. 0 name bootstat-dat
  125. >0 ulelong x Windows boot log
  126. #!:mime application/octet-stream
  127. !:mime application/x-ms-dat
  128. # BOOTSTAT.DAT in BOOT subdirectory
  129. !:ext dat
  130. # apparently a version number: 2 for older like Vista, 3, 4 Windows 10
  131. >0 ulelong >2 \b, version %u
  132. # apparently the size of the header: often 10h in older Windows, 14h, 18h
  133. >4 ulelong !0x10 \b, header size %#x
  134. #>4 ulelong !0x10 \b, header size %u
  135. # apparently the size of the file: always 0x00010000~64KiB
  136. # the file is acceptable to BOOTMGR only if it is exactly 64 KiB
  137. >8 ulelong !0x00010000 \b, file size %#x
  138. # size of valid data, in bytes: C8h 50h 172h 5D5Ch
  139. >0xc ulelong x \b, %#x valid bytes
  140. # skip header and jump to first bootstat entry and display information
  141. >(0x4.l-1) ubyte x
  142. >>&0 use bootstat-entry
  143. # jump to first entry again because pointer are bad after "use"
  144. >(0x4.l-1) ubyte x
  145. # by 1st entry size jump to 2nd entry and display information
  146. >>&(&0x18.l-1) ubyte x
  147. >>>&0 use bootstat-entry
  148. # jump to possible 3rd boot entry and display information
  149. # >(0x4.l-1) ubyte x
  150. # >>&(&0x18.l-1) ubyte x
  151. # >>>&(&0x18.l-1) ubyte x
  152. # >>>>&0 use bootstat-entry
  153. # display BOOTSTAT.DAT entry
  154. 0 name bootstat-entry
  155. #>0x00 ubequad x \b, ENTRY %16.16llx
  156. # size of entry, in bytes: 40h(init) 78h(launced) 9Ch
  157. #>0x18 ulelong x \b; entry size %u
  158. >0x18 ulelong x \b; entry size %#x
  159. # time stamp, in seconds
  160. >0x00 ulelong x \b, %#x seconds
  161. # always zero, significance unknown
  162. >0x04 ulelong !0 \b, not null %u
  163. # GUID of event source; but empty if event source is BOOTMGR
  164. >0x08 ubequad !0 \b, GUID %#16.16llx
  165. >>0x10 ubequad x \b%16.16llx
  166. # severity code: 1~informational 3~errors
  167. >0x1C ulelong !1 \b, severity %#x
  168. # apparently a version number: 2
  169. >0x20 ulelong !2 \b, version %u
  170. # event identifier 1~log file initialised 11h~boot application launched
  171. #>0x24 ulelong x \b, event %#x
  172. >0x24 ulelong !1
  173. >>0x24 ulelong !0x11 \b, event %#x
  174. # entry data; size depends on event identifier
  175. #>0x28 ubequad x \b, data %#16.16llx
  176. >0x24 ulelong =0x1 \b, Init
  177. # always 0, significance unknown
  178. >>0x34 uleshort !0 \b, not null %u
  179. # always 7, significance unknown
  180. >>0x36 uleshort !7 \b, not seven %u
  181. # year
  182. >>0x28 uleshort x %u
  183. # month
  184. >>0x2A uleshort x \b-%u
  185. # day
  186. >>0x2C uleshort x \b-%u
  187. # hour
  188. >>0x2E uleshort x %u
  189. # minute
  190. >>0x30 uleshort x \b:%u
  191. # second
  192. >>0x32 uleshort x \b:%u
  193. # boot application launched
  194. >0x24 ulelong =0x11 \b, launched
  195. # type of start: 0 normally, 1 or 2 maybe in a recovery sequence
  196. >>0x38 uleshort !0 \b, type %u
  197. # pathname of boot application, as null-terminated Unicode string; typically
  198. # \Windows\system32\winload.exe \Windows\system32\winload.efi
  199. >>0x3C lestring16 x %s
  200. # Summary: Windows Error Report text files
  201. # URL: https://en.wikipedia.org/wiki/Windows_Error_Reporting
  202. # Reference: https://www.nirsoft.net/utils/app_crash_view.html
  203. # Created by: Joerg Jenderek
  204. # Note: in directories %ProgramData%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
  205. # %LOCALAPPDATA%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
  206. 0 lestring16 Version=
  207. >22 lestring16 EventType Windows Error Report
  208. !:mime text/plain
  209. # Report.wer
  210. !:ext wer
  211. # Summary: Windows 3.1 group files
  212. # Extension: .grp
  213. # Created by: unknown
  214. 0 string \120\115\103\103 MS Windows 3.1 group files
  215. # Summary: Old format help files
  216. # URL: https://en.wikipedia.org/wiki/WinHelp
  217. # Reference: https://www.oocities.org/mwinterhoff/helpfile.htm
  218. # Update: Joerg Jenderek
  219. # Created by: Dirk Jagdmann <doj@cubic.org>
  220. #
  221. # check and then display version and date inside MS Windows HeLP file fragment
  222. 0 name help-ver-date
  223. # look for Magic of SYSTEMHEADER
  224. >0 leshort 0x036C
  225. # version Major 1 for right file fragment
  226. >>4 leshort 1 Windows
  227. # print non empty string above to avoid error message
  228. # Warning: Current entry does not yet have a description for adding a MIME type
  229. !:mime application/winhelp
  230. !:ext hlp
  231. # version Minor of help file format is hint for windows version
  232. >>>2 leshort 0x0F 3.x
  233. >>>2 leshort 0x15 3.0
  234. >>>2 leshort 0x21 3.1
  235. >>>2 leshort 0x27 x.y
  236. >>>2 leshort 0x33 95
  237. >>>2 default x y.z
  238. >>>>2 leshort x %#x
  239. # to complete message string like "MS Windows 3.x help file"
  240. >>>2 leshort x help
  241. # GenDate often older than file creation date
  242. >>>6 ldate x \b, %s
  243. #
  244. # Magic for HeLP files
  245. 0 lelong 0x00035f3f
  246. # ./windows (version 5.25) labeled the entry as "MS Windows 3.x help file"
  247. # file header magic 0x293B at DirectoryStart+9
  248. >(4.l+9) uleshort 0x293B MS
  249. # look for @VERSION bmf.. like IBMAVW.ANN
  250. >>0xD4 string =\x62\x6D\x66\x01\x00 Windows help annotation
  251. !:mime application/x-winhelp
  252. !:ext ann
  253. >>0xD4 string !\x62\x6D\x66\x01\x00
  254. # "GID Help index" by TrID
  255. >>>(4.l+0x65) string =|Pete Windows help Global Index
  256. !:mime application/x-winhelp
  257. !:ext gid
  258. # HeLP Bookmark or
  259. # "Windows HELP File" by TrID
  260. >>>(4.l+0x65) string !|Pete
  261. # maybe there exist a cleaner way to detect HeLP fragments
  262. # brute search for Magic 0x036C with matching Major maximal 7 iterations
  263. # discapp.hlp
  264. >>>>16 search/0x49AF/s \x6c\x03
  265. >>>>>&0 use help-ver-date
  266. >>>>>&4 leshort !1
  267. # putty.hlp
  268. >>>>>>&0 search/0x69AF/s \x6c\x03
  269. >>>>>>>&0 use help-ver-date
  270. >>>>>>>&4 leshort !1
  271. >>>>>>>>&0 search/0x49AF/s \x6c\x03
  272. >>>>>>>>>&0 use help-ver-date
  273. >>>>>>>>>&4 leshort !1
  274. >>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  275. >>>>>>>>>>>&0 use help-ver-date
  276. >>>>>>>>>>>&4 leshort !1
  277. >>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  278. >>>>>>>>>>>>>&0 use help-ver-date
  279. >>>>>>>>>>>>>&4 leshort !1
  280. >>>>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  281. >>>>>>>>>>>>>>>&0 use help-ver-date
  282. >>>>>>>>>>>>>>>&4 leshort !1
  283. >>>>>>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  284. # GCC.HLP is detected after 7 iterations
  285. >>>>>>>>>>>>>>>>>&0 use help-ver-date
  286. # this only happens if bigger hlp file is detected after used search iterations
  287. >>>>>>>>>>>>>>>>>&4 leshort !1 Windows y.z help
  288. !:mime application/winhelp
  289. !:ext hlp
  290. # repeat search again or following default line does not work
  291. >>>>16 search/0x49AF/s \x6c\x03
  292. # remaining files should be HeLP Bookmark WinHlp32.BMK (XP 32-bit) or WinHlp32 (Windows 8.1 64-bit)
  293. >>>>16 default x Windows help Bookmark
  294. !:mime application/x-winhelp
  295. !:ext bmk
  296. ## FirstFreeBlock normally FFFFFFFFh 10h for *ANN
  297. ##>>8 lelong x \b, FirstFreeBlock %#8.8x
  298. # EntireFileSize
  299. >>12 lelong x \b, %d bytes
  300. ## ReservedSpace normally 042Fh AFh for *.ANN
  301. #>>(4.l) lelong x \b, ReservedSpace %#8.8x
  302. ## UsedSpace normally 0426h A6h for *.ANN
  303. #>>(4.l+4) lelong x \b, UsedSpace %#8.8x
  304. ## FileFlags normally 04...
  305. #>>(4.l+5) lelong x \b, FileFlags %#8.8x
  306. ## file header magic 0x293B
  307. #>>(4.l+9) uleshort x \b, file header magic %#4.4x
  308. ## file header Flags 0x0402
  309. #>>(4.l+11) uleshort x \b, file header Flags %#4.4x
  310. ## file header PageSize 0400h 80h for *.ANN
  311. #>>(4.l+13) uleshort x \b, PageSize %#4.4x
  312. ## Structure[16] z4
  313. #>>(4.l+15) string >\0 \b, Structure_"%-.16s"
  314. ## MustBeZero 0
  315. #>>(4.l+31) uleshort x \b, MustBeZero %#4.4x
  316. ## PageSplits
  317. #>>(4.l+33) uleshort x \b, PageSplits %#4.4x
  318. ## RootPage
  319. #>>(4.l+35) uleshort x \b, RootPage %#4.4x
  320. ## MustBeNegOne 0xffff
  321. #>>(4.l+37) uleshort x \b, MustBeNegOne %#4.4x
  322. ## TotalPages 1
  323. #>>(4.l+39) uleshort x \b, TotalPages %#4.4x
  324. ## NLevels 0x0001
  325. #>>(4.l+41) uleshort x \b, NLevels %#4.4x
  326. ## TotalBtreeEntries
  327. #>>(4.l+43) ulelong x \b, TotalBtreeEntries %#8.8x
  328. ## pages of the B+ tree
  329. #>>(4.l+47) ubequad x \b, PageStart %#16.16llx
  330. # start with colon or semicolon for comment line like Back2Life.cnt
  331. 0 regex \^(:|;)
  332. # look for first keyword Base
  333. >0 search/45 :Base
  334. >>&0 use cnt-name
  335. # only solution to search again from beginning , because relative offsets changes when use is called
  336. >0 search/45 :Base
  337. >0 default x
  338. # look for other keyword Title like in putty.cnt
  339. >>0 search/45 :Title
  340. >>>&0 use cnt-name
  341. #
  342. # display mime type and name of Windows help Content source
  343. 0 name cnt-name
  344. # skip space at beginning
  345. >0 string \040
  346. # name without extension and greater character or name with hlp extension
  347. >>1 regex/c \^([^\xd>]*|.*\.hlp) MS Windows help file Content, based "%s"
  348. !:mime text/plain
  349. !:apple ????TEXT
  350. !:ext cnt
  351. #
  352. # Windows creates a full text search from hlp file, if the user clicks the "Find" tab and enables keyword indexing
  353. 0 string tfMR MS Windows help Full Text Search index
  354. !:mime application/x-winhelp-fts
  355. !:ext fts
  356. >16 string >\0 for "%s"
  357. # Summary: Hyper terminal
  358. # Extension: .ht
  359. # Created by: unknown
  360. 0 string HyperTerminal\040
  361. >15 string 1.0\ --\ HyperTerminal\ data\ file MS Windows HyperTerminal profile
  362. # https://ithreats.files.wordpress.com/2009/05/\040
  363. # lnk_the_windows_shortcut_file_format.pdf
  364. # Summary: Windows shortcut
  365. # Extension: .lnk
  366. # Created by: unknown
  367. # 'L' + GUUID
  368. 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
  369. >20 lelong&1 1 \b, Item id list present
  370. >20 lelong&2 2 \b, Points to a file or directory
  371. >20 lelong&4 4 \b, Has Description string
  372. >20 lelong&8 8 \b, Has Relative path
  373. >20 lelong&16 16 \b, Has Working directory
  374. >20 lelong&32 32 \b, Has command line arguments
  375. >20 lelong&64 64 \b, Icon
  376. >>56 lelong x \b number=%d
  377. >24 lelong&1 1 \b, Read-Only
  378. >24 lelong&2 2 \b, Hidden
  379. >24 lelong&4 4 \b, System
  380. >24 lelong&8 8 \b, Volume Label
  381. >24 lelong&16 16 \b, Directory
  382. >24 lelong&32 32 \b, Archive
  383. >24 lelong&64 64 \b, Encrypted
  384. >24 lelong&128 128 \b, Normal
  385. >24 lelong&256 256 \b, Temporary
  386. >24 lelong&512 512 \b, Sparse
  387. >24 lelong&1024 1024 \b, Reparse point
  388. >24 lelong&2048 2048 \b, Compressed
  389. >24 lelong&4096 4096 \b, Offline
  390. >28 leqwdate x \b, ctime=%s
  391. >36 leqwdate x \b, mtime=%s
  392. >44 leqwdate x \b, atime=%s
  393. >52 lelong x \b, length=%u, window=
  394. >60 lelong&1 1 \bhide
  395. >60 lelong&2 2 \bnormal
  396. >60 lelong&4 4 \bshowminimized
  397. >60 lelong&8 8 \bshowmaximized
  398. >60 lelong&16 16 \bshownoactivate
  399. >60 lelong&32 32 \bminimize
  400. >60 lelong&64 64 \bshowminnoactive
  401. >60 lelong&128 128 \bshowna
  402. >60 lelong&256 256 \brestore
  403. >60 lelong&512 512 \bshowdefault
  404. #>20 lelong&1 0
  405. #>>20 lelong&2 2
  406. #>>>(72.l-64) pstring/h x \b [%s]
  407. #>20 lelong&1 1
  408. #>>20 lelong&2 2
  409. #>>>(72.s) leshort x
  410. #>>>&75 pstring/h x \b [%s]
  411. # Summary: Outlook Personal Folders
  412. # Created by: unknown
  413. 0 lelong 0x4E444221 Microsoft Outlook email folder
  414. >10 leshort 0x0e (<=2002)
  415. >10 leshort 0x17 (>=2003)
  416. # Summary: Windows help cache
  417. # Created by: unknown
  418. 0 string \164\146\115\122\012\000\000\000\001\000\000\000 MS Windows help cache
  419. # Summary: IE cache file
  420. # Created by: Christophe Monniez
  421. 0 string Client\ UrlCache\ MMF Internet Explorer cache file
  422. >20 string >\0 version %s
  423. # Summary: Registry files
  424. # Created by: unknown
  425. # Modified by (1): Joerg Jenderek
  426. 0 string regf MS Windows registry file, NT/2000 or above
  427. 0 string CREG MS Windows 95/98/ME registry file
  428. 0 string SHCC3 MS Windows 3.1 registry file
  429. # Summary: Windows Registry text
  430. # URL: https://en.wikipedia.org/wiki/Windows_Registry#.REG_files
  431. # Reference: http://fileformats.archiveteam.org/wiki/Windows_Registry
  432. # Submitted by: Abel Cheung <abelcheung@gmail.com>
  433. # Update: Joerg Jenderek
  434. # Windows 3-9X variant
  435. 0 string REGEDIT
  436. # skip ASCII text like "REGEDITor.txt" but match
  437. # L1WMAP.REG with only 1 CRNL or org.gnome.gnumeric.reg with 2 NL
  438. >7 search/3 \n Windows Registry text
  439. !:mime text/x-ms-regedit
  440. !:ext reg
  441. # Windows 9X variant
  442. >>0 string REGEDIT4 (Win95 or above)
  443. # Windows 2K ANSI variant
  444. 0 string Windows\ Registry\ Editor\
  445. >&0 string Version\ 5.00\r\n\r\n Windows Registry text (Win2K or above)
  446. !:mime text/x-ms-regedit
  447. !:ext reg
  448. # Windows 2K UTF-16 variant
  449. 2 lestring16 Windows\ Registry\ Editor\
  450. >0x32 lestring16 Version\ 5.00\r\n\r\n Windows Registry little-endian text (Win2K or above)
  451. # relative offset not working
  452. #>&0 lestring16 Version\ 5.00\r\n\r\n Windows Registry little-endian text (Win2K or above)
  453. !:mime text/x-ms-regedit
  454. !:ext reg
  455. # WINE variant
  456. # URL: https://en.wikipedia.org/wiki/Wine_(software)
  457. # Reference: https://www.winehq.org/pipermail/wine-cvs/2005-October/018763.html
  458. # Note: WINE use text based registry (system.reg,user.reg,userdef.reg)
  459. # instead binary hiv structure like Windows
  460. 0 string WINE\ REGISTRY\ Version\ WINE registry text
  461. # version 2
  462. >&0 string x \b, version %s
  463. !:mime text/x-wine-extension-reg
  464. !:ext reg
  465. # Windows *.INF *.INI files updated by Joerg Jenderek at Apr 2013, Feb 2018
  466. # empty ,comment , section
  467. # PR/383: remove unicode BOM because it is not portable across regex impls
  468. #0 regex/s \\`(\\r\\n|;|[[])
  469. # empty line CRLF
  470. 0 ubeshort 0x0D0A
  471. >0 use ini-file
  472. # comment line
  473. 0 string ;
  474. >0 use ini-file
  475. # section line
  476. 0 string [
  477. >0 use ini-file
  478. # check and then display Windows INItialization configuration
  479. 0 name ini-file
  480. # look for left bracket in section line
  481. >0 search/8192 [
  482. # https://en.wikipedia.org/wiki/Autorun.inf
  483. # https://msdn.microsoft.com/en-us/library/windows/desktop/cc144200.aspx
  484. # space after right bracket
  485. # or AutoRun.Amd64 for 64 bit systems
  486. # or only NL separator
  487. >>&0 regex/c \^(autorun)
  488. # but sometimes total commander directory tree file "treeinfo.wc" with lines like
  489. # [AUTORUN]
  490. # [boot]
  491. >>>&0 string =]\r\n[ Total commander directory treeinfo.wc
  492. !:mime text/plain
  493. !:ext wc
  494. # From: Pal Tamas <folti@balabit.hu>
  495. # Autorun File
  496. >>>&0 string !]\r\n[ Microsoft Windows Autorun file
  497. !:mime application/x-setupscript
  498. !:ext inf
  499. # https://msdn.microsoft.com/en-us/library/windows/hardware/ff549520(v=vs.85).aspx
  500. # version strings ASCII coded case-independent for Windows setup information script file
  501. >>&0 regex/c \^(version|strings)] Windows setup INFormation
  502. !:mime application/x-setupscript
  503. #!:mime application/x-wine-extension-inf
  504. !:ext inf
  505. # NETCRC.INF OEMCPL.INF
  506. >>&0 regex/c \^(WinsockCRCList|OEMCPL)] Windows setup INFormation
  507. !:mime application/x-setupscript
  508. !:ext inf
  509. # http://www.winfaq.de/faq_html/Content/tip2500/onlinefaq.php?h=tip2653.htm
  510. # https://msdn.microsoft.com/en-us/library/windows/desktop/cc144102.aspx
  511. # .ShellClassInfo DeleteOnCopy LocalizedFileNames ASCII coded case-independent
  512. >>&0 regex/c \^(\.ShellClassInfo|DeleteOnCopy|LocalizedFileNames)] Windows desktop.ini
  513. !:mime application/x-wine-extension-ini
  514. #!:mime text/plain
  515. # https://support.microsoft.com/kb/84709/
  516. >>&0 regex/c \^(don't\ load)] Windows CONTROL.INI
  517. !:mime application/x-wine-extension-ini
  518. !:ext ini
  519. >>&0 regex/c \^(ndishlp\\$|protman\\$|NETBEUI\\$)] Windows PROTOCOL.INI
  520. !:mime application/x-wine-extension-ini
  521. !:ext ini
  522. # https://technet.microsoft.com/en-us/library/cc722567.aspx
  523. # http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0137.htm
  524. >>&0 regex/c \^(windows|Compatibility|embedding)] Windows WIN.INI
  525. !:mime application/x-wine-extension-ini
  526. !:ext ini
  527. # https://en.wikipedia.org/wiki/SYSTEM.INI
  528. >>&0 regex/c \^(boot|386enh|drivers)] Windows SYSTEM.INI
  529. !:mime application/x-wine-extension-ini
  530. !:ext ini
  531. # http://www.mdgx.com/newtip6.htm
  532. >>&0 regex/c \^(SafeList)] Windows IOS.INI
  533. !:mime application/x-wine-extension-ini
  534. !:ext ini
  535. # https://en.wikipedia.org/wiki/NTLDR Windows Boot Loader information
  536. >>&0 regex/c \^(boot\x20loader)] Windows boot.ini
  537. !:mime application/x-wine-extension-ini
  538. !:ext ini
  539. # https://en.wikipedia.org/wiki/CONFIG.SYS
  540. >>&0 regex/c \^(menu)] MS-DOS CONFIG.SYS
  541. # @CONFIG.UI configuration file of previous DOS version saved by Caldera OPENDOS INSTALL.EXE
  542. # CONFIG.PSS saved version of file CONFIG.SYS created by %WINDIR%\SYSTEM\MSCONFIG.EXE
  543. # CONFIG.TSH renamed file CONFIG.SYS.BAT by %WINDIR%\SYSTEM\MSCONFIG.EXE
  544. # dos and w40 used in dual booting scene
  545. !:ext sys/dos/w40
  546. # https://support.microsoft.com/kb/118579/
  547. >>&0 regex/c \^(Paths)]\r\n MS-DOS MSDOS.SYS
  548. !:ext sys/dos
  549. # http://chmspec.nongnu.org/latest/INI.html#HHP
  550. >>&0 regex/c \^(options)]\r\n Microsoft HTML Help Project
  551. !:mime text/plain
  552. !:ext hhp
  553. # From: Joerg Jenderek
  554. # URL: https://documentation.basis.com/BASISHelp/WebHelp/b3odbc/obdcdriv_character_translation.htm
  555. # Reference: https://www.garykessler.net/library/file_sigs.html
  556. # Note: stored in directory %WINDIR%\SysWOW64 or %WINDIR%\system
  557. >>&0 regex/c \^(Windows\ Latin) Windows codepage translator
  558. !:mime text/plain
  559. !:ext cpx
  560. # unknown keyword after opening bracket
  561. >>&0 default x
  562. #>>>&0 string/c x UNKNOWN [%s
  563. # look for left bracket of second section
  564. >>>&0 search/8192 [
  565. # version Strings FileIdentification
  566. >>>>&0 string/c version Windows setup INFormation
  567. !:mime application/x-setupscript
  568. !:ext inf
  569. # https://en.wikipedia.org/wiki/Initialization_file Windows Initialization File or other
  570. >>>>&0 default x
  571. >>>>>&0 ubyte x
  572. # characters, digits, underscore and white space followed by right bracket
  573. # terminated by CR implies section line to skip BOOTLOG.TXT DETLOG.TXT
  574. >>>>>>&-1 regex/T \^([A-Za-z0-9_\(\)\ ]+)\]\r Generic INItialization configuration [%-.40s
  575. # NETDEF.INF multiarc.ini
  576. #!:mime application/x-setupscript
  577. !:mime application/x-wine-extension-ini
  578. #!:mime text/plain
  579. !:ext ini/inf
  580. # UTF-16 BOM followed by CR~0D00 , comment~semicolon~3B00 , section~bracket~5B00
  581. 0 ubelong&0xFFff89FF =0xFFFE0900
  582. # look for left bracket in section line
  583. >2 search/8192 [
  584. # keyword without 1st letter which is maybe up-/down-case
  585. >>&3 lestring16 ersion] Windows setup INFormation
  586. !:mime application/x-setupscript
  587. !:ext inf
  588. >>&3 lestring16 trings] Windows setup INFormation
  589. !:mime application/x-setupscript
  590. !:ext inf
  591. >>&3 lestring16 ourceDisksNames] Windows setup INFormation
  592. !:mime application/x-setupscript
  593. !:ext inf
  594. # netnwcli.inf start with ;---[ NetNWCli.INX ]
  595. >>&3 default x
  596. # look for NL followed by left bracket
  597. >>>&0 search/8192 \x0A\x00\x5b
  598. >>>>&3 lestring16 ersion] Windows setup INFormation
  599. !:mime application/x-setupscript
  600. !:ext inf
  601. # Windows Precompiled INF files *.PNF added by Joerg Jenderek at Mar 2013 of _PNF_HEADER inf.h
  602. # http://read.pudn.com/downloads3/sourcecode/windows/248345/win2k/private/windows/setup/setupapi/inf.h__.htm
  603. # URL: http://fileformats.archiveteam.org/wiki/INF_(Windows)
  604. # Reference: http://en.verysource.com/code/10350344_1/inf.h.html
  605. # Note: stored in %Windir%\Inf %Windir%\System32\DriverStore\FileRepository
  606. # check for valid major and minor versions: 101h - 303h
  607. 0 leshort&0xFcFc =0x0000
  608. # GRR: line above (strength 50) is too general as it catches also "PDP-11 UNIX/RT ldp" ./pdp
  609. >0 leshort&0x0303 !0x0000
  610. # test for valid InfStyles: 1 2
  611. >>2 uleshort >0
  612. >>>2 uleshort <3
  613. # look for colon in WinDirPath after PNF header
  614. #>>>>0x59 search/18 :
  615. >>>>0 use PreCompiledInf
  616. 0 name PreCompiledInf
  617. >0 uleshort x Windows Precompiled iNF
  618. !:mime application/x-pnf
  619. !:ext pnf
  620. # major version 1 for older Windows like XP and 3 since about Windows Vista
  621. # 101h~98-XP; 301h~Windows Vista-7 ; 302h~Windows 10 14393; 303h~Windows 10 18362
  622. >1 ubyte x \b, version %u
  623. >0 ubyte x \b.%u
  624. >0 uleshort =0x0101 (Windows
  625. >>4 ulelong&0x00000001 !0x00000001 98)
  626. >>4 ulelong&0x00000001 =0x00000001 XP)
  627. >0 uleshort =0x0301 (Windows Vista-8.1)
  628. >0 uleshort =0x0302 (Windows 10 older)
  629. >0 uleshort =0x0303 (Windows 10)
  630. # 1 ,2 (windows 98 SE)
  631. >2 uleshort !2 \b, InfStyle %u
  632. # PNF_FLAG_IS_UNICODE 0x00000001
  633. # PNF_FLAG_HAS_STRINGS 0x00000002
  634. # PNF_FLAG_SRCPATH_IS_URL 0x00000004
  635. # PNF_FLAG_HAS_VOLATILE_DIRIDS 0x00000008
  636. # PNF_FLAG_INF_VERIFIED 0x00000010
  637. # PNF_FLAG_INF_DIGITALLY_SIGNED 0x00000020
  638. # UNKNOWN8 0x00000080
  639. # UNKNOWN 0x00000100
  640. # UNKNOWN1 0x01000000
  641. # UNKNOWN2 0x02000000
  642. >4 ulelong&0x03000180 >0 \b, flags
  643. >>4 ulelong x %#x
  644. >4 ulelong&0x00000001 0x00000001 \b, unicoded
  645. >4 ulelong&0x00000002 0x00000002 \b, has strings
  646. >4 ulelong&0x00000004 0x00000004 \b, src URL
  647. >4 ulelong&0x00000008 0x00000008 \b, volatile dir ids
  648. >4 ulelong&0x00000010 0x00000010 \b, verified
  649. >4 ulelong&0x00000020 0x00000020 \b, digitally signed
  650. # >4 ulelong&0x00000080 0x00000080 \b, UNKNOWN8
  651. # >4 ulelong&0x00000100 0x00000100 \b, UNKNOWN
  652. # >4 ulelong&0x01000000 0x01000000 \b, UNKNOWN1
  653. # >4 ulelong&0x02000000 0x02000000 \b, UNKNOWN2
  654. #>8 ulelong x \b, InfSubstValueListOffset %#x
  655. # many 0, 1 lmouusb.PNF, 2 linkfx10.PNF , f webfdr16.PNF
  656. # , 6 bth.PNF, 9 usbport.PNF, d netnwifi.PNF, 10h nettcpip.PNF
  657. #>12 uleshort x \b, InfSubstValueCount %#x
  658. # only < 9 found: 8 hcw85b64.PNF
  659. #>14 uleshort x \b, InfVersionDatumCount %#x
  660. # only found values lower 0x0000ffff ??
  661. #>16 ulelong x \b, InfVersionDataSize %#x
  662. # only found positive values lower 0x00ffFFff for InfVersionDataOffset
  663. >20 ulelong x \b, at %#x
  664. >4 ulelong&0x00000001 =0x00000001
  665. # case independent: CatalogFile Class DriverVer layoutfile LayoutFile SetupClass signature Signature
  666. >>(20.l) lestring16 x "%s"
  667. >4 ulelong&0x00000001 !0x00000001
  668. >>(20.l) string x "%s"
  669. # FILETIME is number of 100-nanosecond intervals since 1 January 1601
  670. #>24 ulequad x \b, InfVersionLastWriteTime %16.16llx
  671. #>24 foodate-0xbar x \b, InfVersionLastWriteTime %s
  672. # for Windows 98, XP
  673. >0 uleshort <0x0102
  674. # only found values lower 0x00ffFFff
  675. # often 70 but also 78h for corelist.PNF
  676. # >>32 ulelong x \b, StringTableBlockOffset %#x
  677. # >>36 ulelong x \b, StringTableBlockSize %#x
  678. # >>40 ulelong x \b, InfSectionCount %#x
  679. # >>44 ulelong x \b, InfSectionBlockOffset %#x
  680. # >>48 ulelong x \b, InfSectionBlockSize %#x
  681. # >>52 ulelong x \b, InfLineBlockOffset %#x
  682. # >>56 ulelong x \b, InfLineBlockSize %#x
  683. # >>60 ulelong x \b, InfValueBlockOffset %#x
  684. # >>64 ulelong x \b, InfValueBlockSize %#x
  685. # WinDirPathOffset
  686. # like 58h, which means direct after PNF header
  687. #>>68 ulelong x \b, at %#x
  688. >>68 ulelong x
  689. >>>4 ulelong&0x00000001 =0x00000001
  690. #>>>>(68.l) ubequad =0x43003a005c005700
  691. # normally unicoded C:\Windows
  692. #>>>>>(68.l) lestring16 x \b, WinDirPath "%s"
  693. >>>>(68.l) ubequad !0x43003a005c005700
  694. >>>>>(68.l) lestring16 x \b, WinDirPath "%s"
  695. >>>4 ulelong&0x00000001 !0x00000001
  696. # normally ASCII C:\WINDOWS
  697. #>>>>(68.l) string =C:\\WINDOWS \b, WinDirPath "%s"
  698. >>>>(68.l) string !C:\\WINDOWS
  699. >>>>>(68.l) string x \b, WinDirPath "%s"
  700. # found OsLoaderPathOffset values often 0 , once 70h corelist.PNF, once 68h ASCII machine.PNF
  701. >>>72 ulelong >0 \b,
  702. >>>>4 ulelong&0x00000001 =0x00000001
  703. >>>>>(72.l) lestring16 x OsLoaderPath "%s"
  704. >>>>4 ulelong&0x00000001 !0x00000001
  705. # seldom C:\ instead empty
  706. >>>>>(72.l) string x OsLoaderPath "%s"
  707. # 1fdh
  708. #>>>76 uleshort x \b, StringTableHashBucketCount %#x
  709. # only 407h found
  710. >>>78 uleshort !0x409 \b, LanguageID %x
  711. #>>>78 uleshort =0x409 \b, LanguageID %x
  712. # InfSourcePathOffset often 0
  713. >>>80 ulelong >0 \b, at %#x
  714. >>>>4 ulelong&0x00000001 =0x00000001
  715. >>>>>(80.l) lestring16 x SourcePath "%s"
  716. >>>>4 ulelong&0x00000001 !0x00000001
  717. >>>>>(80.l) string >\0 SourcePath "%s"
  718. # OriginalInfNameOffset often 0
  719. >>>84 ulelong >0 \b, at %#x
  720. >>>>4 ulelong&0x00000001 =0x00000001
  721. >>>>>(84.l) lestring16 x InfName "%s"
  722. >>>>4 ulelong&0x00000001 !0x00000001
  723. >>>>>(84.l) string >\0 InfName "%s"
  724. # for newer Windows like Vista, 7 , 8.1 , 10
  725. >0 uleshort >0x0101
  726. >>80 ulelong x \b, at %#x WinDirPath
  727. >>>4 ulelong&0x00000001 0x00000001
  728. # normally unicoded C:\Windows
  729. #>>>>(80.l) ubequad =0x43003a005c005700
  730. #>>>>>(80.l) lestring16 x "%s"
  731. >>>>(80.l) ubequad !0x43003a005c005700
  732. >>>>>(80.l) lestring16 x "%s"
  733. # language id: 0 407h~german 409h~English_US
  734. >>90 uleshort !0x409 \b, LanguageID %x
  735. #>>90 uleshort =0x409 \b, LanguageID %x
  736. >>92 ulelong >0 \b, at %#x
  737. >>>4 ulelong&0x00000001 0x00000001
  738. # language string like: de-DE en-US
  739. >>>>(92.l) lestring16 x language %s
  740. # Summary: backup file created with utility like NTBACKUP.EXE shipped with Windows NT/2K/XP/2003
  741. # Extension: .bkf
  742. # Created by: Joerg Jenderek
  743. # URL: https://en.wikipedia.org/wiki/NTBackup
  744. # Reference: http://laytongraphics.com/mtf/MTF_100a.PDF
  745. # Descriptor BloCK name of Microsoft Tape Format
  746. 0 string TAPE
  747. # Format Logical Address is zero
  748. >20 ulequad 0
  749. # Reserved for MBC is zero
  750. >>28 uleshort 0
  751. # Control Block ID is zero
  752. >>>36 ulelong 0
  753. # BIT4-BIT15, BIT18-BIT31 of block attributes are unused
  754. >>>>4 ulelong&0xFFfcFFe0 0 Windows NTbackup archive
  755. #!:mime application/x-ntbackup
  756. !:ext bkf
  757. # OS ID
  758. >>>>>10 ubyte 1 \b NetWare
  759. >>>>>10 ubyte 13 \b NetWare SMS
  760. >>>>>10 ubyte 14 \b NT
  761. >>>>>10 ubyte 24 \b 3
  762. >>>>>10 ubyte 25 \b OS/2
  763. >>>>>10 ubyte 26 \b 95
  764. >>>>>10 ubyte 27 \b Macintosh
  765. >>>>>10 ubyte 28 \b UNIX
  766. # OS Version (2)
  767. #>>>>>11 ubyte x OS V=%x
  768. # MTF_CONTINUATION Media Sequence Number > 1
  769. #>>>>>4 ulelong&0x00000001 !0 \b, continued
  770. # MTF_COMPRESSION
  771. >>>>>4 ulelong&0x00000004 !0 \b, compressed
  772. # MTF_EOS_AT_EOM End Of Medium was hit during end of set processing
  773. >>>>>4 ulelong&0x00000008 !0 \b, End Of Medium hit
  774. >>>>>4 ulelong&0x00020000 0
  775. # MTF_SET_MAP_EXISTS A Media Based Catalog Set Map may exist on tape
  776. >>>>>>4 ulelong&0x00010000 !0 \b, with catalog
  777. # MTF_FDD_ALLOWED However File/Directory Detail can only exist if a Set Map is also present
  778. >>>>>4 ulelong&0x00020000 !0 \b, with file catalog
  779. # Offset To First Event 238h,240h,28Ch
  780. #>>>>>8 uleshort x \b, event offset %4.4x
  781. # Displayable Size (20e0230h 20e024ch 20e0224h)
  782. #>>>>>8 ulequad x dis. size %16.16llx
  783. # Media Family ID (455288C4h 4570BD1Ah 45708F2Fh 4570BBF5h)
  784. #>>>>>52 ulelong x family ID %8.8x
  785. # TAPE Attributes (3)
  786. #>>>>>56 ulelong x TAPE %8.8x
  787. # Media Sequence Number
  788. >>>>>60 uleshort >1 \b, sequence %u
  789. # Password Encryption Algorithm (3)
  790. >>>>>62 uleshort >0 \b, %#x encrypted
  791. # Soft Filemark Block Size * 512 (2)
  792. #>>>>>64 uleshort =2 \b, soft size %u*512
  793. >>>>>64 uleshort !2 \b, soft size %u*512
  794. # Media Based Catalog Type (1,2)
  795. #>>>>>66 uleshort x \b, catalog type %4.4x
  796. # size of Media Name (66,68,6Eh)
  797. >>>>>68 uleshort >0
  798. # offset of Media Name (5Eh)
  799. >>>>>>70 uleshort >0
  800. # 0~, 1~ANSI, 2~UNICODE
  801. >>>>>>>48 ubyte 1
  802. # size terminated ansi coded string normally followed by "MTF Media Label"
  803. >>>>>>>>(70.s) string >\0 \b, name: %s
  804. >>>>>>>48 ubyte 2
  805. # Not null, but size terminated unicoded string
  806. >>>>>>>>(70.s) lestring16 x \b, name: %s
  807. # size of Media Label (104h)
  808. >>>>>72 uleshort >0
  809. # offset of Media Label (C4h,C6h,CCh)
  810. >>>>>74 uleshort >0
  811. >>>>>>48 ubyte 1
  812. #Tag|Version|Vendor|Vendor ID|Creation Time Stamp|Cartridge Label|Side|Media ID|Media Domain ID|Vendor Specific fields
  813. >>>>>>>(74.s) string >\0 \b, label: %s
  814. >>>>>>48 ubyte 2
  815. >>>>>>>(74.s) lestring16 x \b, label: %s
  816. # size of password name (0,1Ch)
  817. #>>>>>76 uleshort >0 \b, password size %4.4x
  818. # Software Vendor ID (CBEh)
  819. >>>>>86 uleshort x \b, software (%#x)
  820. # size of Software Name (6Eh)
  821. >>>>>80 uleshort >0
  822. # offset of Software Name (1C8h,1CAh,1D0h)
  823. >>>>>>82 uleshort >0
  824. # 1~ANSI, 2~UNICODE
  825. >>>>>>>48 ubyte 1
  826. >>>>>>>>(82.s) string >\0 \b: %s
  827. >>>>>>>48 ubyte 2
  828. # size terminated unicoded coded string normally followed by "SPAD"
  829. >>>>>>>>(82.s) lestring16 x \b: %s
  830. # Format Logical Block Size (512,1024)
  831. #>>>>>84 uleshort =1024 \b, block size %u
  832. >>>>>84 uleshort !1024 \b, block size %u
  833. # Media Date of MTF_DATE_TIME type with 5 bytes
  834. #>>>>>>88 ubequad x DATE %16.16llx
  835. # MTF Major Version (1)
  836. #>>>>>>93 ubyte x \b, MFT version %x
  837. #
  838. # URL: https://en.wikipedia.org/wiki/PaintShop_Pro
  839. # Reference: https://www.cryer.co.uk/file-types/p/pal.htm
  840. # Created by: Joerg Jenderek
  841. # Note: there exist other color palette formats also with .pal extension
  842. 0 string JASC-PAL\r\n PaintShop Pro color palette
  843. #!:mime text/plain
  844. # PspPalette extension is used by newer (probably 8) PaintShopPro versions
  845. !:ext pal/PspPalette
  846. # 2nd line contains palette file version. For example "0100"
  847. >10 string !0100 \b, version %.4s
  848. # third line contains the number of colours: 16 256 ...
  849. >16 string x \b, %.3s colors
  850. # URL: https://en.wikipedia.org/wiki/Innosetup
  851. # Reference: https://github.com/jrsoftware/issrc/blob/master/Projects/Undo.pas
  852. # Created by: Joerg Jenderek
  853. # Note: created by like "InnoSetup self-extracting archive" inside ./msdos
  854. # TrID labeles the entry as "Inno Setup Uninstall Log"
  855. # TUninstallLogID
  856. 0 string Inno\ Setup\ Uninstall\ Log\ (b) InnoSetup Log
  857. !:mime application/x-innosetup
  858. # unins000.dat, unins001.dat, ...
  859. !:ext dat
  860. # " 64-bit" variant
  861. >0x1c string >\0 \b%.7s
  862. # AppName[0x80] like "Minimal SYStem", ClamWin Free Antivirus , ...
  863. >0xc0 string x %s
  864. # AppId[0x80] is similar to AppName or
  865. # GUID like {4BB0DCDC-BC24-49EC-8937-72956C33A470} start with left brace
  866. >0x40 ubyte 0x7b
  867. >>0x40 string x %-.38s
  868. # do not know how this log version correlates to program version
  869. >0x140 ulelong x \b, version %#x
  870. # NumRecs
  871. #>0x144 ulelong x \b, %#4.4x records
  872. # EndOffset means files size
  873. >0x148 ulelong x \b, %u bytes
  874. # Flags 5 25h 35h
  875. #>0x14c ulelong x \b, flags %8.8x
  876. # Reserved: array[0..26] of Longint
  877. # the non Unicode HighestSupportedVersion may never become greater than or equal to 1000
  878. >0x140 ulelong <1000
  879. # hostname
  880. >>0x1d6 pstring x \b, %s
  881. # user name
  882. >>>&0 pstring x \b\%s
  883. # directory like C:\Program Files (x86)\GnuWin32
  884. >>>>&0 pstring x \b, "%s"
  885. # version 1000 or higher implies unicode
  886. >0x140 ulelong >999
  887. # hostname
  888. >>0x1db lestring16 x \b, %-.9s
  889. # utf string variant with prepending fe??ffFFff
  890. >>0x1db search/43 \xFF\xFF\xFF
  891. # user name
  892. >>>&0 lestring16 x \b\%-.9s
  893. >>>&0 search/43 \xFF\xFF\xFF
  894. # directory like C:\Program Files\GIMP 2
  895. >>>>&0 lestring16 x \b, %-.42s
  896. # URL: https://jrsoftware.org/ishelp/index.php?topic=setup_signeduninstaller
  897. # Reference:https://github.com/jrsoftware/issrc/blob/main/Projects/Struct.pas
  898. # From: Joerg Jenderek
  899. 0 string Inno\ Setup\ Messages\ (
  900. # null padded til 0x40 boundary
  901. >0x38 quad 0 InnoSetup messages
  902. !:mime application/x-innosetup-msg
  903. # unins000.msg, unins001.msg, ...
  904. !:ext msg
  905. # version like 5.1.1 5.1.11 5.5.0 5.5.3 6.0.0
  906. >>0x15 string x \b, version %.5s
  907. # look for 6th char of version string or terminating right parentheses
  908. >>>0x1a ubyte !0x29 \b%c
  909. # NumMessages
  910. >>0x40 ulelong x \b, %u messages
  911. # TotalSize: Cardinal;
  912. #>>0x44 ulelong x \b, TotalSize %u
  913. # NotTotalSize: Cardinal;
  914. #>>0x48 ulelong x \b, NotTotalSize %u
  915. # CRCMessages: Longint;
  916. #>>0x4C ulelong x \b, CRC %#x
  917. >>0x40 ulelong x
  918. # (u) after version means unicoded messages
  919. >>>0x1c search/2 (u) (UTF-16),
  920. >>>>0x50 lestring16 x %s
  921. # ASCII coded message
  922. >>>0x1c default x (ASCII),
  923. >>>>0x50 string x %s
  924. # Windows Imaging (WIM) Image
  925. # Update: Joerg Jenderek at Mar 2019, 2021
  926. # URL: https://en.wikipedia.org/wiki/Windows_Imaging_Format
  927. # http://fileformats.archiveteam.org/wiki/Windows_Imaging_Format
  928. # Reference: https://download.microsoft.com/download/f/e/f/
  929. # fefdc36e-392d-4678-9e4e-771ffa2692ab/Windows%20Imaging%20File%20Format.rtf
  930. # Note: verified by like `7z t boot.wim` `wiminfo install.esd --header`
  931. 0 string MSWIM\000\000\000
  932. >0 use wim-archive
  933. # https://wimlib.net/man1/wimoptimize.html
  934. 0 string WLPWM\000\000\000
  935. >0 use wim-archive
  936. 0 name wim-archive
  937. # _WIMHEADER_V1_PACKED ImageTag[8]
  938. >0 string x Windows imaging
  939. !:mime application/x-ms-wim
  940. # TO avoid in file version 5.36 error like
  941. # Magdir/windows, 760: Warning: Current entry does not yet have a description
  942. # file: could not find any valid magic files! (No error)
  943. # split WIM
  944. >16 ulelong &0x00000008 (SWM
  945. !:ext swm
  946. # usPartNumber; 1, unless the file was split into multiple parts
  947. >>40 uleshort x \b %u
  948. # usTotalParts; The total number of WIM file parts in a spanned set
  949. >>42 uleshort x \b of %u) image
  950. # non split WIM
  951. >16 ulelong ^0x00000008
  952. # https://wimlib.net/man1/wimmount.html
  953. # solid WIMs; version 3584; usually contain LZMS-compressed and the .esd extension
  954. >>12 ulelong 3584 (ESD) image
  955. !:ext esd
  956. >>12 ulelong !3584 (
  957. # look for archive member RunTime.xml like in Microsoft.Windows.Cosa.Desktop.Client.ppkg
  958. >>>156 search/68233/s RunTime.xml \bWindows provisioning package)
  959. !:ext ppkg
  960. # if is is not a Windows provisioning package, then it is a WIM
  961. >>>156 default x \bWIM) image
  962. # second disk image part created by Microsoft's RecoveryDrive.exe has name Reconstruct.WIM2
  963. !:ext wim/wim2
  964. >0 string/b WLPWM\000\000\000 \b, wimlib pipable format
  965. # cbSize size of the WIM header in bytes like 208
  966. #>8 ulelong x \b, headersize %u
  967. # dwVersion version of the WIM file 00010d00h~1.13 00000e00h~0.14
  968. >14 uleshort x v%u
  969. >13 ubyte x \b.%u
  970. # dwImageCount; The number of images contained in the WIM file
  971. >44 ulelong >1 \b, %u images
  972. # dwBootIndex
  973. # 1-based index of the bootable image of the WIM, or 0 if no image is bootable
  974. >0x78 ulelong >0 \b, bootable no. %u
  975. # dwFlags
  976. #>16 ulelong x \b, flags %#8.8x
  977. #define FLAG_HEADER_COMPRESSION 0x00000002
  978. #define FLAG_HEADER_READONLY 0x00000004
  979. #define FLAG_HEADER_SPANNED 0x00000008
  980. #define FLAG_HEADER_RESOURCE_ONLY 0x00000010
  981. #define FLAG_HEADER_METADATA_ONLY 0x00000020
  982. #define FLAG_HEADER_WRITE_IN_PROGRESS 0x00000040
  983. #define FLAG_HEADER_RP_FIX 0x00000080 reparse point fixup
  984. #define FLAG_HEADER_COMPRESS_RESERVED 0x00010000
  985. #define FLAG_HEADER_COMPRESS_XPRESS 0x00020000
  986. #define FLAG_HEADER_COMPRESS_LZX 0x00040000
  987. #define FLAG_HEADER_COMPRESS_LZMS 0x00080000
  988. #define FLAG_HEADER_COMPRESS_XPRESS2 0x00100000 wimlib-1.13.0\include\wimlib\header.h
  989. # XPRESS, with small chunk size
  990. >16 ulelong &0x00100000 \b, XPRESS2
  991. >16 ulelong &0x00080000 \b, LZMS
  992. >16 ulelong &0x00040000 \b, LZX
  993. >16 ulelong &0x00020000 \b, XPRESS
  994. >16 ulelong &0x00000002 compressed
  995. >16 ulelong &0x00000004 \b, read only
  996. >16 ulelong &0x00000010 \b, resource only
  997. >16 ulelong &0x00000020 \b, metadata only
  998. >16 ulelong &0x00000080 \b, reparse point fixup
  999. #>16 ulelong &0x00010000 \b, RESERVED
  1000. # dwCompressionSize; Uncompressed chunk size for resources or 0 if uncompressed
  1001. #>20 ulelong >0 \b, chunk size %u bytes
  1002. # gWIMGuid
  1003. #>24 ubequad x \b, GUID %#16.16llx
  1004. #>>32 ubequad x \b%16.16llx
  1005. # rhOffsetTable; the location of the resource lookup table
  1006. # wim_reshdr_disk[24]= u8 size_in_wim[7] + u8 flags + le64 offset_in_wim + le64 uncompressed_size
  1007. #>48 ubequad x \b, rhOffsetTable %#16.16llx
  1008. # rhXmlData; the location of the XML data
  1009. #>0x50 ulelong x \b, at %#8.8x
  1010. # NOT WORKING \xff\xfe<\0W\0I\0M\0
  1011. #>(0x50.l) ubequad x \b, xml=%16.16llx
  1012. # rhBootMetadata; the location of the metadata resource
  1013. #>0x60 ubequad x \b, rhBootMetadata %#16.16llx
  1014. # rhIntegrity; the location of integrity table used to verify files
  1015. #>0x7c ubequad x \b, rhIntegrity %#16.16llx
  1016. # Unused[60]
  1017. #>148 ubequad !0 \b,unused %#16.16llx
  1018. #
  1019. # From: Joerg Jenderek
  1020. # URL: https://en.wikipedia.org/wiki/Windows_Easy_Transfer
  1021. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/mig.trid.xml
  1022. # Note: called "Windows Easy Transfer migration data" by TrID,
  1023. # "Migration Store" or "EasyTransfer file" by Microsoft
  1024. 0 string 1giM Windows Easy Transfer migration data
  1025. #!:mime application/octet-stream
  1026. !:mime application/x-ms-mig
  1027. !:ext mig
  1028. >0x18 string =MRTS without password
  1029. # data offset with 1 space at end
  1030. >>0x1c ulelong+0x38 x \b, at %#x
  1031. # look for zlib compressed data by ./compress
  1032. >>(0x1c.l+0x38) ubyte x
  1033. >>>&-1 indirect x
  1034. # in password protected examples MRTS comes some bytes further
  1035. >0x18 string !MRTS with password
  1036. # look for first MRTS tag
  1037. >0x18 search/29/b MRTS
  1038. # probably first file name length like 178, ...
  1039. #>>&0 ulelong x \b, 1st length %u
  1040. # URL like File\C:\Users\nutzer\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\desktop.ini
  1041. >>&20 lestring16 x \b, 1st %-s
  1042. # Microsoft SYLK
  1043. # https://en.wikipedia.org/wiki/SYmbolic_LinK_(SYLK)
  1044. # https://outflank.nl/upload/sylksum.txt
  1045. 0 string ID;P Microsoft SYLK program
  1046. >4 string >0 \b, created by %s
  1047. !:ext slk/sylk