168349Sobrien 268349Sobrien#------------------------------------------------------------------------------ 3328874Seadler# $File: xenix,v 1.11 2017/03/17 21:35:28 christos Exp $ 468349Sobrien# xenix: file(1) magic for Microsoft Xenix 568349Sobrien# 668349Sobrien# "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small 768349Sobrien# model" lifted from "magic.xenix", with comment "derived empirically; 868349Sobrien# treat as folklore until proven" 968349Sobrien# 1068349Sobrien# "small model", "large model", "huge model" stuff lifted from XXX 1168349Sobrien# 1268349Sobrien# XXX - "x.out" collides with PDP-11 archives 1368349Sobrien# 1468349Sobrien0 string core core file (Xenix) 15299736Sdelphij# URL: http://www.polarhome.com/service/man/?qf=86rel&tf=2&of=Xenix 16299736Sdelphij# Reference: http://www.azillionmonkeys.com/qed/Omfg.pdf 17299736Sdelphij# Update: Joerg Jenderek 18299736Sdelphij# recordtype~TranslatorHEADerRecord 19328874Seadler0 byte 0x80 20299736Sdelphij# GRR: line above is too general as it catches also Extensible storage engine DataBase 21299736Sdelphij# skip examples like GENA.SND Switch.Snd by looking for record length maximal 1024-3 22328874Seadler>1 uleshort <1022 23299736Sdelphij# skip examples like GAME.PICTURE Strange.Pic by looking for positiv record length 24328874Seadler>>1 uleshort >0 25299736Sdelphij# skip examples like Xtable.Data FRACTAL.GEN SHR.VIEW by looking for positiv string length 26328874Seadler>>>3 ubyte >0 27299736Sdelphij# skip examples like OMBRE.6 with "UUUUUU" by looking for filename like "hello.c" 28299736Sdelphij>>>>4 regex [a-zA-Z_/]{1,8}[.] 8086 relocatable (Microsoft) 29299736Sdelphij#!:mime application/octet-stream 30299736Sdelphij!:mime application/x-object 31299736Sdelphij!:ext o/a 32299736Sdelphij>>>>>3 pstring x \b, "%s" 33299736Sdelphij# checksum 34299736Sdelphij#>>>>>(3.b+4) ubyte x \b, checksum 0x%2.2x 3568349Sobrien0 leshort 0xff65 x.out 3668349Sobrien>2 string __.SYMDEF randomized 3768349Sobrien>0 byte x archive 3868349Sobrien0 leshort 0x206 Microsoft a.out 3968349Sobrien>8 leshort 1 Middle model 4068349Sobrien>0x1e leshort &0x10 overlay 4168349Sobrien>0x1e leshort &0x2 separate 4268349Sobrien>0x1e leshort &0x4 pure 4368349Sobrien>0x1e leshort &0x800 segmented 4468349Sobrien>0x1e leshort &0x400 standalone 4568349Sobrien>0x1e leshort &0x8 fixed-stack 4668349Sobrien>0x1c byte &0x80 byte-swapped 4768349Sobrien>0x1c byte &0x40 word-swapped 4868349Sobrien>0x10 lelong >0 not-stripped 4968349Sobrien>0x1e leshort ^0xc000 pre-SysV 5068349Sobrien>0x1e leshort &0x4000 V2.3 5168349Sobrien>0x1e leshort &0x8000 V3.0 5268349Sobrien>0x1c byte &0x4 86 5368349Sobrien>0x1c byte &0xb 186 5468349Sobrien>0x1c byte &0x9 286 5568349Sobrien>0x1c byte &0xa 386 5668349Sobrien>0x1f byte <0x040 small model 57328874Seadler>0x1f byte =0x048 large model 58328874Seadler>0x1f byte =0x049 huge model 5968349Sobrien>0x1e leshort &0x1 executable 6068349Sobrien>0x1e leshort ^0x1 object file 6168349Sobrien>0x1e leshort &0x40 Large Text 6268349Sobrien>0x1e leshort &0x20 Large Data 6368349Sobrien>0x1e leshort &0x120 Huge Objects Enabled 6468349Sobrien>0x10 lelong >0 not stripped 6568349Sobrien 6668349Sobrien0 leshort 0x140 old Microsoft 8086 x.out 6768349Sobrien>0x3 byte &0x4 separate 6868349Sobrien>0x3 byte &0x2 pure 6968349Sobrien>0 byte &0x1 executable 7068349Sobrien>0 byte ^0x1 relocatable 7168349Sobrien>0x14 lelong >0 not stripped 7268349Sobrien 7368349Sobrien0 lelong 0x206 b.out 7468349Sobrien>0x1e leshort &0x10 overlay 7568349Sobrien>0x1e leshort &0x2 separate 7668349Sobrien>0x1e leshort &0x4 pure 7768349Sobrien>0x1e leshort &0x800 segmented 7868349Sobrien>0x1e leshort &0x400 standalone 7968349Sobrien>0x1e leshort &0x1 executable 8068349Sobrien>0x1e leshort ^0x1 object file 8168349Sobrien>0x1e leshort &0x4000 V2.3 8268349Sobrien>0x1e leshort &0x8000 V3.0 8368349Sobrien>0x1c byte &0x4 86 8468349Sobrien>0x1c byte &0xb 186 8568349Sobrien>0x1c byte &0x9 286 8668349Sobrien>0x1c byte &0x29 286 8768349Sobrien>0x1c byte &0xa 386 8868349Sobrien>0x1e leshort &0x4 Large Text 8968349Sobrien>0x1e leshort &0x2 Large Data 9068349Sobrien>0x1e leshort &0x102 Huge Objects Enabled 9168349Sobrien 9268349Sobrien0 leshort 0x580 XENIX 8086 relocatable or 80286 small model 93