2 #------------------------------------------------------------------------------
3 # $File: wordprocessors,v 1.24 2020/05/22 19:28:47 christos Exp $
4 # wordprocessors: file(1) magic fo word processors.
6 ####### PWP file format used on Smith Corona Personal Word Processors:
7 2 string \040\040\040\040\040\040\040\040\040\040\040ML4D\040'92 Smith Corona PWP
8 >24 byte 2 \b, single spaced
9 >24 byte 3 \b, 1.5 spaced
10 >24 byte 4 \b, double spaced
11 >25 byte 0x42 \b, letter
12 >25 byte 0x54 \b, legal
15 # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Word_Processor
16 # reference: http://mark0.net/download/triddefs_xml.7z
17 # /defs/w/wps-works-dos.trid.xml
18 # From: Joerg Jenderek
19 # Note: older non OLE 2 Compound based versions
21 >112 ubeshort =0x0100 Microsoft Works 1-3 (DOS) or 2 (Windows) document
22 # title like THE GREAT KHAN GAME
24 !:mime application/vnd-ms-works
25 #!:mime application/x-msworks
26 # https://www.macdisk.com/macsigen.php
34 >>9 byte 1 WordPerfect macro
35 >>9 byte 2 WordPerfect help file
36 >>9 byte 3 WordPerfect keyboard file
37 >>9 byte 10 WordPerfect document
38 >>9 byte 11 WordPerfect dictionary
39 >>9 byte 12 WordPerfect thesaurus
40 >>9 byte 13 WordPerfect block
41 >>9 byte 14 WordPerfect rectangular block
42 >>9 byte 15 WordPerfect column block
43 >>9 byte 16 WordPerfect printer data
44 >>9 byte 19 WordPerfect printer data
45 >>9 byte 20 WordPerfect driver resource data
46 >>9 byte 22 WordPerfect graphic image
47 >>9 byte 23 WordPerfect hyphenation code
48 >>9 byte 24 WordPerfect hyphenation data
49 >>9 byte 25 WordPerfect macro resource data
50 >>9 byte 27 WordPerfect hyphenation lex
51 >>9 byte 29 WordPerfect wordlist
52 >>9 byte 30 WordPerfect equation resource data
53 >>9 byte 33 WordPerfect spell rules
54 >>9 byte 34 WordPerfect dictionary rules
55 >>9 byte 39 WordPerfect spell rules (Microlytics)
56 >>9 byte 43 WordPerfect settings file
57 >>9 byte 44 WordPerfect 3.5 document
58 >>9 byte 45 WordPerfect 4.2 document
59 >>9 byte 69 WordPerfect dialog file
60 >>9 byte 76 WordPerfect button bar
62 >>>9 byte x Corel WordPerfect: Unknown filetype %d
65 >>9 byte 1 Corel shell macro
66 >>9 byte 10 Corel shell definition
68 >>>9 byte x Corel Shell: Unknown filetype %d
71 >>9 byte 1 Corel Notebook macro
72 >>9 byte 2 Corel Notebook help file
73 >>9 byte 3 Corel Notebook keyboard file
74 >>9 byte 10 Corel Notebook definition
76 >>>9 byte x Corel Notebook: Unknown filetype %d
79 >>9 byte 2 Corel Calculator help file
81 >>>9 byte x Corel Calculator: Unknown filetype %d
85 >>>9 byte x Corel File Manager: Unknown filetype %d
88 >>9 byte 2 Corel Calendar help file
89 >>9 byte 10 Corel Calendar data file
91 >>>9 byte x Corel Calendar: Unknown filetype %d
92 # Corel Program Editor/Ed Editor
94 >>9 byte 1 Corel Editor macro
95 >>9 byte 2 Corel Editor help file
96 >>9 byte 3 Corel Editor keyboard file
97 >>9 byte 25 Corel Editor macro resource file
99 >>>9 byte x Corel Program Editor/Ed Editor: Unknown filetype %d
102 >>9 byte 1 Corel Macro editor macro
103 >>9 byte 2 Corel Macro editor help file
104 >>9 byte 3 Corel Macro editor keyboard file
106 >>>9 byte x Corel Macro Editor: Unknown filetype %d
110 >>>9 byte x Corel Plan Perfect: Unknown filetype %d
113 # CHECK: Don't these belong into product 9?
114 >>9 byte 1 Corel PlanPerfect macro
115 >>9 byte 2 Corel PlanPerfect help file
116 >>9 byte 3 Corel PlanPerfect keyboard file
117 >>9 byte 10 Corel PlanPerfect worksheet
118 >>9 byte 15 Corel PlanPerfect printer definition
119 >>9 byte 18 Corel PlanPerfect graphic definition
120 >>9 byte 19 Corel PlanPerfect data
121 >>9 byte 20 Corel PlanPerfect temporary printer
122 >>9 byte 25 Corel PlanPerfect macro resource data
124 >>>9 byte x Corel DataPerfect: Unknown filetype %d
127 >>9 byte 2 Corel Mail help file
128 >>9 byte 5 Corel Mail distribution list
129 >>9 byte 10 Corel Mail out box
130 >>9 byte 11 Corel Mail in box
131 >>9 byte 20 Corel Mail users archived mailbox
132 >>9 byte 21 Corel Mail archived message database
133 >>9 byte 22 Corel Mail archived attachments
135 >>>9 byte x Corel Mail: Unknown filetype %d
138 >>9 byte 11 Corel Printer temporary file
140 >>>9 byte x Corel Printer: Unknown filetype %d
143 >>9 byte 2 Corel Scheduler help file
144 >>9 byte 10 Corel Scheduler in file
145 >>9 byte 11 Corel Scheduler out file
147 >>>9 byte x Corel Scheduler: Unknown filetype %d
148 # Corel WordPerfect Office
150 >>9 byte 10 Corel GroupWise settings file
151 >>9 byte 17 Corel GroupWise directory services
152 >>9 byte 43 Corel GroupWise settings file
154 >>>9 byte x Corel WordPerfect Office: Unknown filetype %d
158 >>>9 byte x Corel DrawPerfect: Unknown filetype %d
159 # Corel LetterPerfect
162 >>>9 byte x Corel LetterPerfect: Unknown filetype %d
165 >>9 byte 10 Corel Terminal resource data
166 >>9 byte 11 Corel Terminal resource data
167 >>9 byte 43 Corel Terminal resource data
169 >>>9 byte x Corel Terminal: Unknown filetype %d
170 # Corel loadable file
172 >>9 byte 10 Corel loadable file
173 >>9 byte 11 Corel GUI loadable text
174 >>9 byte 12 Corel graphics resource data
175 >>9 byte 13 Corel printer settings file
176 >>9 byte 14 Corel port definition file
177 >>9 byte 15 Corel print queue parameters
178 >>9 byte 16 Corel compressed file
180 >>>9 byte x Corel loadable file: Unknown filetype %d
181 >>15 byte 0 \b, optimized for Intel
182 >>15 byte 1 \b, optimized for Non-Intel
185 >>9 byte 10 Corel Network service msg file
186 >>9 byte 11 Corel Network service msg file
187 >>9 byte 12 Corel Async gateway login msg
188 >>9 byte 14 Corel GroupWise message file
190 >>>9 byte x Corel Network service: Unknown filetype %d
193 >>9 byte 20 GroupWise admin domain database
194 >>9 byte 21 GroupWise admin host database
195 >>9 byte 23 GroupWise admin remote host database
196 >>9 byte 24 GroupWise admin ADS deferment data file
198 >>>9 byte x GroupWise: Unknown filetype %d
201 >>9 byte 10 IntelliTAG (SGML) compiled DTD
203 >>>9 byte x IntelliTAG: Unknown filetype %d
206 >>8 byte x Unknown Corel/Wordperfect product %d,
207 >>>9 byte x file type %d
212 # Hangul (Korean) Word Processor File
213 0 string HWP\ Document\ File Hangul (Korean) Word Processor File 3.0
215 # CosmicBook, from Benoit Rouits
216 0 string CSBK Ted Neslson's CosmicBook hypertext file
218 2 string EYWR AmigaWriter file
220 # chi: file(1) magic for ChiWriter files
221 0 string \\1cw\ ChiWriter file
222 >5 string >\0 version %s
223 0 string \\1cw ChiWriter file
225 # Quark Express from https://www.garykessler.net/library/file_sigs.html
226 2 string IIXPR3 Intel Quark Express Document (English)
227 2 string IIXPRa Intel Quark Express Document (Korean)
228 2 string MMXPR3 Motorola Quark Express Document (English)
229 !:mime application/x-quark-xpress-3
230 2 string MMXPRa Motorola Quark Express Document (Korean)
232 # adobe indesign (document, whatever...) from querkan
233 0 belong 0x0606edf5 Adobe InDesign
234 >16 string DOCUMENT Document
236 #------------------------------------------------------------------------------
237 # ichitaro456: file(1) magic for Just System Word Processor Ichitaro
239 # Contributor kenzo-:
240 # Reversed-engineered JS Ichitaro magic numbers
244 >43 byte 0x14 Just System Word Processor Ichitaro v4
245 !:mime application/x-ichitaro4
246 >144 string JDASH application/x-ichitaro4
249 >43 byte 0x15 Just System Word Processor Ichitaro v5
250 !:mime application/x-ichitaro5
253 >43 byte 0x16 Just System Word Processor Ichitaro v6
254 !:mime application/x-ichitaro6
256 # Type: Freemind mindmap documents
257 # From: Jamie Thompson <debian-bugs@jamie-thompson.co.uk>
258 0 string/w \<map\ version Freemind document
259 !:mime application/x-freemind
261 # Type: Freeplane mindmap documents
262 # From: Felix Natter <fnatter@gmx.net>
263 0 string/w \<map\ version="freeplane Freeplane document
264 !:mime application/x-freeplane
267 # From: Werner Fink <werner@suse.de>
268 0 string \<SCRIBUSUTF8\ Version Scribus Document
269 0 string \<SCRIBUSUTF8NEW\ Version Scribus Document
270 !:mime application/x-scribus
272 # help files .hlp compiled from html and used by gfxboot added by Joerg Jenderek
273 # markups page=0x04,label=0x12, followed by strings like "opt" or "main" and title=0x14
274 0 ulelong&0x8080FFFF 0x00001204 gfxboot compiled html help file
276 # From: Joerg Jenderek
277 # URL: https://en.wikipedia.org/wiki/StarOffice
278 # Note: used in Star-, Open- and Libre-Office
279 # named as soffice.StarConfigFile.6 or OpenOffice.org configuration by others
281 #>(2.s+8) ubequad x \b, gap 0x%16.16llx
282 # test for null value in gap after theme name maybe unreliable
283 #>(2.s+9) ubyte 0 \b, 0-byte
284 # look for keyword GALRESRV near the end
285 # "C:\Program Files (x86)\StarOffice6.0\share\gallery\sg27.thm" Navigation, 238 objects
286 #>0 search/8415 GALRESRV \b, GALRESRV found
287 # "neues thema6.thm" MorePictures, 315 objects
288 #>0 search/19299 GALRESRV \b, GALRESRV FOUND
289 #>2 uleshort x \b, name length %u
290 # skip file2147.chk by check for positive name length like for sg16.thm "3D"
291 >2 uleshort >0 StarOffice Gallery theme
292 !:mime application/x-stargallery-thm
297 >>(2.s+4) ulelong x \b, %u object
299 >>(2.s+4) ulelong !1 \bs
300 # if available then display first object name
302 # partial file name, URL or internal name like "dd2*" of 1st object or RESRV
303 >>>(2.s+11) pstring/h x \b, 1st %s
305 # From: Joerg Jenderek
306 # URL: http://fileformats.archiveteam.org/wiki/StarOffice_Gallery
307 # Note: used in Star-, Open- and Libre-Office and found in directories like
308 # %APPDATA%\Roaming\LibreOffice\4\user\gallery
309 # $HOME/.config/libreoffice/4/user/gallery
310 0 string SGA3 StarOffice Gallery thumbnails
311 # Unknown like 0x04000?0001000142
312 #>4 ubequad x \b, UNKNOWN 0x%16.16llx
313 #!:mime application/x-sdg
314 !:mime application/x-stargallery-sdg
316 # display image magic for debugging purpose like 'BM'
317 # looking like PC bitmap, Windows 3.x format with unknown compression
318 #>11 string x \b, image magic '%-.2s'
319 # inspect 1st GALLERY thumbnail magic by ./images with 1 space at end
320 #>11 indirect x \b; contains