magic 1.2 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438
  1. # Magic data for file(1) command.
  2. # Format is described in magic(files), where:
  3. # files is 5 on V7 and BSD, 4 on SV, and ?? on SVID.
  4. # Don't edit this file, edit /etc/magic or send your magic improvements
  5. # to the maintainers, at file@astron.com
  6. #------------------------------------------------------------------------------
  7. # Localstuff: file(1) magic for locally observed files
  8. #
  9. # $File: Localstuff,v 1.5 2007/01/12 17:38:27 christos Exp $
  10. # Add any locally observed files here. Remember:
  11. # text if readable, executable if runnable binary, data if unreadable.
  12. #------------------------------------------------------------------------------
  13. # $File: acorn,v 1.7 2019/04/19 00:42:27 christos Exp $
  14. # acorn: file(1) magic for files found on Acorn systems
  15. #
  16. # RISC OS Chunk File Format
  17. # From RISC OS Programmer's Reference Manual, Appendix D
  18. # We guess the file type from the type of the first chunk.
  19. 0 lelong 0xc3cbc6c5 RISC OS Chunk data
  20. >12 string OBJ_ \b, AOF object
  21. >12 string LIB_ \b, ALF library
  22. # RISC OS AIF, contains "SWI OS_Exit" at offset 16.
  23. 16 lelong 0xef000011 RISC OS AIF executable
  24. # RISC OS Draw files
  25. # From RISC OS Programmer's Reference Manual, Appendix E
  26. 0 string Draw RISC OS Draw file data
  27. # RISC OS new format font files
  28. # From RISC OS Programmer's Reference Manual, Appendix E
  29. 0 string FONT\0 RISC OS outline font data,
  30. >5 byte x version %d
  31. 0 string FONT\1 RISC OS 1bpp font data,
  32. >5 byte x version %d
  33. 0 string FONT\4 RISC OS 4bpp font data
  34. >5 byte x version %d
  35. # RISC OS Music files
  36. # From RISC OS Programmer's Reference Manual, Appendix E
  37. 0 string Maestro\r RISC OS music file
  38. >8 byte x version %d
  39. >8 byte x type %d
  40. # Digital Symphony data files
  41. # From: Bernard Jungen (bern8817@euphonynet.be)
  42. 0 string \x02\x01\x13\x13\x13\x01\x0d\x10 Digital Symphony sound sample (RISC OS),
  43. >8 byte x version %d,
  44. >9 pstring x named "%s",
  45. >(9.b+19) byte =0 8-bit logarithmic
  46. >(9.b+19) byte =1 LZW-compressed linear
  47. >(9.b+19) byte =2 8-bit linear signed
  48. >(9.b+19) byte =3 16-bit linear signed
  49. >(9.b+19) byte =4 SigmaDelta-compressed linear
  50. >(9.b+19) byte =5 SigmaDelta-compressed logarithmic
  51. >(9.b+19) byte >5 unknown format
  52. 0 string \x02\x01\x13\x13\x14\x12\x01\x0b Digital Symphony song (RISC OS),
  53. >8 byte x version %d,
  54. >9 byte =1 1 voice,
  55. >9 byte !1 %d voices,
  56. >10 leshort =1 1 track,
  57. >10 leshort !1 %d tracks,
  58. >12 leshort =1 1 pattern
  59. >12 leshort !1 %d patterns
  60. 0 string \x02\x01\x13\x13\x10\x14\x12\x0e
  61. >9 byte =0 Digital Symphony sequence (RISC OS),
  62. >>8 byte x version %d,
  63. >>10 byte =1 1 line,
  64. >>10 byte !1 %d lines,
  65. >>11 leshort =1 1 position
  66. >>11 leshort !1 %d positions
  67. >9 byte =1 Digital Symphony pattern data (RISC OS),
  68. >>8 byte x version %d,
  69. >>10 leshort =1 1 pattern
  70. >>10 leshort !1 %d patterns
  71. # From: Joerg Jenderek
  72. # URL: https://www.kyzer.me.uk/pack/xad/#PackDir
  73. # reference: https://www.kyzer.me.uk/pack/xad/xad_PackDir.lha/PackDir.c
  74. # GRR: line below is too general as it matches also "Git pack" in ./revision
  75. 0 string PACK\0
  76. # check for valid compression method 0-4
  77. >5 ulelong <5
  78. # https://www.riscosopen.org/wiki/documentation/show/Introduction%20To%20Filing%20Systems
  79. # To skip "Git pack" version 0 test for root directory object like
  80. # ADFS::RPC.$.websitezip.FONTFIX
  81. >>9 string >ADFS\ PackDir archive (RISC OS)
  82. # TrID labels above as "Acorn PackDir compressed Archive"
  83. # compression mode y (0 - 4) for GIF LZW with a maximum n bits
  84. # (y~n,0~12,1~13,2~14,3~15,4~16)
  85. >>>5 ulelong+12 x \b, LZW %u-bits compression
  86. # https://www.filebase.org.uk/filetypes
  87. # !Packdir compressed archive has three hexadecimal digits code 68E
  88. !:mime application/x-acorn-68E
  89. !:ext pkd/bin
  90. # null terminated root directory object like IDEFS::IDE-4.$.Apps.GRAPHICS.!XFMPdemo
  91. >>>9 string x \b, root "%s"
  92. # load address 0xFFFtttdd, ttt is the object filetype and dddddddddd is time
  93. >>>>&1 ulelong x \b, load address 0x%x
  94. # execution address 0xdddddddd dddddddddd is 40 bit unsigned centiseconds since 1.1.1900 UTC
  95. >>>>&5 ulelong x \b, exec address 0x%x
  96. # attributes (bits: 0~owner read,1~owner write,3~no delete,4~public read,5~public write)
  97. >>>>&9 ulelong x \b, attributes 0x%x
  98. # number of entries in this directory. for root dir 0
  99. #>>>&13 ulelong x \b, entries 0x%x
  100. # the entries start here with object name
  101. >>>>&17 string x \b, 1st object "%s"
  102. #------------------------------------------------------------------------------
  103. # $File: adi,v 1.4 2009/09/19 16:28:07 christos Exp $
  104. # adi: file(1) magic for ADi's objects
  105. # From Gregory McGarry <g.mcgarry@ieee.org>
  106. #
  107. 0 leshort 0x521c COFF DSP21k
  108. >18 lelong &02 executable,
  109. >18 lelong ^02
  110. >>18 lelong &01 static object,
  111. >>18 lelong ^01 relocatable object,
  112. >18 lelong &010 stripped
  113. >18 lelong ^010 not stripped
  114. #------------------------------------------------------------------------------
  115. # $File: adventure,v 1.18 2019/04/19 00:42:27 christos Exp $
  116. # adventure: file(1) magic for Adventure game files
  117. #
  118. # from Allen Garvin <earendil@faeryland.tamu-commerce.edu>
  119. # Edited by Dave Chapeskie <dchapes@ddm.on.ca> Jun 28, 1998
  120. # Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
  121. #
  122. # ALAN
  123. # I assume there are other, lower versions, but these are the only ones I
  124. # saw in the archive.
  125. 0 beshort 0x0206 ALAN game data
  126. >2 byte <10 version 2.6%d
  127. # Infocom (see z-machine)
  128. #------------------------------------------------------------------------------
  129. # Z-machine: file(1) magic for Z-machine binaries.
  130. # Sanity checks by David Griffith <dave@661.org>
  131. # Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
  132. #
  133. #http://www.gnelson.demon.co.uk/zspec/sect11.html
  134. #https://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt
  135. #https://en.wikipedia.org/wiki/Z-machine
  136. # The first byte is the Z-machine revision; it is always between 1 and 8. We
  137. # had false matches (for instance, inbig5.ocp from the Omega TeX extension as
  138. # well as an occasional MP3 file), so we sanity-check the version number.
  139. #
  140. # It might be possible to sanity-check the release number as well, as it seems
  141. # (at least in classic Infocom games) to always be a relatively small number,
  142. # always under 150 or so, but as this isn't rigorous, we'll wait on that until
  143. # it becomes clear that it's needed.
  144. #
  145. 0 ubyte >0
  146. >0 ubyte <9
  147. >>16 belong&0xfe00f0f0 0x3030
  148. >>>0 ubyte < 10
  149. >>>>2 ubeshort x
  150. >>>>>18 regex [0-9][0-9][0-9][0-9][0-9][0-9]
  151. >>>>>>0 ubyte < 10 Infocom (Z-machine %d
  152. >>>>>>>2 ubeshort x \b, Release %d
  153. >>>>>>>>18 string >\0 \b, Serial %.6s
  154. >>>>>>>>18 string x \b)
  155. !:strength + 40
  156. !:mime application/x-zmachine
  157. #------------------------------------------------------------------------------
  158. # Glulx: file(1) magic for Glulx binaries.
  159. #
  160. # David Griffith <dave@661.org>
  161. # I haven't checked for false matches yet.
  162. #
  163. 0 string Glul Glulx game data
  164. >4 beshort x (Version %d
  165. >>6 byte x \b.%d
  166. >>8 byte x \b.%d)
  167. >36 string Info Compiled by Inform
  168. !:mime application/x-glulx
  169. # For Quetzal and blorb magic see iff
  170. # TADS (Text Adventure Development System) version 2
  171. # All files are machine-independent (games compile to byte-code) and are tagged
  172. # with a version string of the form "V2.<digit>.<digit>\0".
  173. # Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
  174. 0 string TADS2\ bin TADS
  175. >9 belong !0x0A0D1A00 game data, CORRUPTED
  176. >9 belong 0x0A0D1A00
  177. >>13 string >\0 %s game data
  178. !:mime application/x-tads
  179. # Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
  180. 0 string TADS2\ rsc TADS
  181. >9 belong !0x0A0D1A00 resource data, CORRUPTED
  182. >9 belong 0x0A0D1A00
  183. >>13 string >\0 %s resource data
  184. !:mime application/x-tads
  185. # Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
  186. # 2-byte length N, the N-char name of the game file *without* a NUL (darn!),
  187. # "TADS2 save\n\r\032\0" and the interpreter version.
  188. 0 string TADS2\ save/g TADS
  189. >12 belong !0x0A0D1A00 saved game data, CORRUPTED
  190. >12 belong 0x0A0D1A00
  191. >>(16.s+32) string >\0 %s saved game data
  192. !:mime application/x-tads
  193. # Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
  194. # version.
  195. 0 string TADS2\ save TADS
  196. >10 belong !0x0A0D1A00 saved game data, CORRUPTED
  197. >10 belong 0x0A0D1A00
  198. >>14 string >\0 %s saved game data
  199. !:mime application/x-tads
  200. # TADS (Text Adventure Development System) version 3
  201. # Game files start with "T3-image\015\012\032"
  202. 0 string T3-image\015\012\032
  203. >11 leshort x TADS 3 game data (format version %d)
  204. # Saved game files start with "T3-state-v####\015\012\032"
  205. # where #### is a format version number
  206. 0 string T3-state-v
  207. >14 string \015\012\032 TADS 3 saved game data (format version
  208. >>10 byte x %c
  209. >>11 byte x \b%c
  210. >>12 byte x \b%c
  211. >>13 byte x \b%c)
  212. !:mime application/x-t3vm-image
  213. # edited by David Griffith <dave@661.org>
  214. # Danny Milosavljevic <danny.milo@gmx.net>
  215. # These are ADRIFT (adventure game standard) game files, extension .taf
  216. # Checked from source at (http://www.adrift.co/) and various taf files
  217. # found at the Interactive Fiction Archive (https://ifarchive.org/)
  218. 0 belong 0x3C423FC9
  219. >4 belong 0x6A87C2CF Adrift game file version
  220. >>8 belong 0x94453661 3.80
  221. >>8 belong 0x94453761 3.90
  222. >>8 belong 0x93453E61 4.0
  223. >>8 belong 0x92453E61 5.0
  224. >>8 default x unknown
  225. !:mime application/x-adrift
  226. #------------------------------------------------------------------------------
  227. # $File: aes,v 1.1 2020/08/18 21:20:22 christos Exp $
  228. #
  229. # aes: magic file for AES encrypted files
  230. # Summary: AES Crypt Encrypted Data File
  231. # From: Joerg Jenderek
  232. # URL: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
  233. # Reference: https://www.aescrypt.com/aes_file_format.html
  234. 0 string AES
  235. >3 ubyte <3 AES encrypted data, version %u
  236. #!:mime application/aes
  237. !:mime application/x-aes-encrypted
  238. !:ext aes
  239. # For Version 2 the encrypted file can have text tags
  240. >>3 ubyte =2
  241. # length of an extension identifier and contents like: 0 24 33 38
  242. #>>5 ubeshort x \b, tag length %u
  243. #>>5 pstring/H x '%s'
  244. # standard extension tags like CREATED_BY
  245. >>>7 string CREATED_BY \b, created by
  246. # software product, manufacturer like "SharpAESCrypt v1.3.3.0" "aescrypt (Windows GUI) 3.10" ...
  247. >>>>&1 string x "%s"
  248. # TODO: more other tags
  249. # tag CREATED_DATE like YYYY-MM-DD
  250. # tag CREATED_TIME like HH:MM:SS
  251. #
  252. #------------------------------------------------------------------------------
  253. # $File: algol68,v 1.3 2018/10/19 01:04:21 christos Exp $
  254. # algol68: file(1) magic for Algol 68 source
  255. #
  256. 0 search/8192 (input, Algol 68 source text
  257. !:mime text/x-Algol68
  258. 0 regex/1024 \^PROC Algol 68 source text
  259. !:mime text/x-Algol68
  260. 0 regex/1024 \bMODE[\t\ ] Algol 68 source text
  261. !:mime text/x-Algol68
  262. 0 regex/1024 \bREF[\t\ ] Algol 68 source text
  263. !:mime text/x-Algol68
  264. 0 regex/1024 \bFLEX[\t\ ]\*\\[ Algol 68 source text
  265. !:mime text/x-Algol68
  266. #0 regex [\t\ ]OD Algol 68 source text
  267. #!:mime text/x-Algol68
  268. #0 regex [\t\ ]FI Algol 68 source text
  269. #!:mime text/x-Algol68
  270. #------------------------------------------------------------------------------
  271. # $File: allegro,v 1.4 2009/09/19 16:28:07 christos Exp $
  272. # allegro: file(1) magic for Allegro datafiles
  273. # Toby Deshane <hac@shoelace.digivill.net>
  274. #
  275. 0 belong 0x736C6821 Allegro datafile (packed)
  276. 0 belong 0x736C682E Allegro datafile (not packed/autodetect)
  277. 0 belong 0x736C682B Allegro datafile (appended exe data)
  278. #------------------------------------------------------------------------------
  279. # $File: alliant,v 1.7 2009/09/19 16:28:07 christos Exp $
  280. # alliant: file(1) magic for Alliant FX series a.out files
  281. #
  282. # If the FX series is the one that had a processor with a 68K-derived
  283. # instruction set, the "short" should probably become "beshort" and the
  284. # "long" should probably become "belong".
  285. # If it's the i860-based one, they should probably become either the
  286. # big-endian or little-endian versions, depending on the mode they ran
  287. # the 860 in....
  288. #
  289. 0 short 0420 0420 Alliant virtual executable
  290. >2 short &0x0020 common library
  291. >16 long >0 not stripped
  292. 0 short 0421 0421 Alliant compact executable
  293. >2 short &0x0020 common library
  294. >16 long >0 not stripped
  295. #------------------------------------------------------------------------------
  296. # $File: amanda,v 1.6 2017/03/17 21:35:28 christos Exp $
  297. # amanda: file(1) magic for amanda file format
  298. #
  299. 0 string AMANDA:\ AMANDA
  300. >8 string TAPESTART\ DATE tape header file,
  301. >>23 string X
  302. >>>25 string >\ Unused %s
  303. >>23 string >\ DATE %s
  304. >8 string FILE\ dump file,
  305. >>13 string >\ DATE %s
  306. #------------------------------------------------------------------------------
  307. # $File: amigaos,v 1.18 2020/08/02 16:42:00 christos Exp $
  308. # amigaos: file(1) magic for AmigaOS binary formats:
  309. #
  310. # From ignatios@cs.uni-bonn.de (Ignatios Souvatzis)
  311. #
  312. 0 belong 0x000003fa AmigaOS shared library
  313. 0 belong 0x000003f3 AmigaOS loadseg()ble executable/binary
  314. 0 belong 0x000003e7 AmigaOS object/library data
  315. #
  316. 0 beshort 0xe310 Amiga Workbench
  317. >2 beshort 1
  318. >>48 byte 1 disk icon
  319. >>48 byte 2 drawer icon
  320. >>48 byte 3 tool icon
  321. >>48 byte 4 project icon
  322. >>48 byte 5 garbage icon
  323. >>48 byte 6 device icon
  324. >>48 byte 7 kickstart icon
  325. >>48 byte 8 workbench application icon
  326. >2 beshort >1 icon, vers. %d
  327. #
  328. # various sound formats from the Amiga
  329. # G=F6tz Waschk <waschk@informatik.uni-rostock.de>
  330. #
  331. 0 string FC14 Future Composer 1.4 Module sound file
  332. 0 string SMOD Future Composer 1.3 Module sound file
  333. 0 string AON4artofnoise Art Of Noise Module sound file
  334. 1 string MUGICIAN/SOFTEYES Mugician Module sound file
  335. 58 string SIDMON\ II\ -\ THE Sidmon 2.0 Module sound file
  336. 0 string Synth4.0 Synthesis Module sound file
  337. 0 string ARP. The Holy Noise Module sound file
  338. 0 string BeEp\0 JamCracker Module sound file
  339. 0 string COSO\0 Hippel-COSO Module sound file
  340. # Too simple (short, pure ASCII, deep), MPi
  341. #26 string V.3 Brian Postma's Soundmon Module sound file v3
  342. #26 string BPSM Brian Postma's Soundmon Module sound file v3
  343. #26 string V.2 Brian Postma's Soundmon Module sound file v2
  344. # The following are from: "Stefan A. Haubenthal" <polluks@web.de>
  345. 0 beshort 0x0f00 AmigaOS bitmap font
  346. 0 beshort 0x0f03 AmigaOS outline font
  347. 0 belong 0x80001001 AmigaOS outline tag
  348. 0 string ##\ version catalog translation
  349. 0 string EMOD\0 Amiga E module
  350. 8 string ECXM\0 ECX module
  351. 0 string/c @database AmigaGuide file
  352. # Amiga disk types
  353. # display information like volume name of root block on Amiga (floppy) disk
  354. 0 name adf-rootblock
  355. # block primary type = T_HEADER (value 2)
  356. >0x000 ubelong !2 \b, type %u
  357. # header_key; unused in rootblock (value 0)
  358. >0x004 ubelong !0 \b, header_key %u
  359. # high_seq; unused (value 0)
  360. >0x008 ubelong !0 \b, high_seq %u
  361. # ht_size; hash table size; 0x48 for flopies
  362. >0x00c ubelong !0x48 \b, hash table size 0x%x
  363. # bm_flag; bitmap flag, -1 means VALID
  364. >0x138 belong !-1 \b, bitmap flag 0x%x
  365. # bm_ext; first bitmap extension block (Hard disks only)
  366. >0x1A0 ubelong !0 \b, bitmap extension block 0x%x
  367. # name_len; volume name length; diskname[30]; volume name
  368. >0x1B0 pstring >\0 \b, "%s"
  369. # first directory cache block for FFS; otherwise 0
  370. >0x1F8 ubelong !0 \b, directory cache block 0x%x
  371. # block secondary type = ST_ROOT (value 1)
  372. >0x1FC ubelong !1 \b, sec_type 0x%x
  373. #
  374. 0 string RDSK Rigid Disk Block
  375. >160 string x on %.24s
  376. # URL: http://fileformats.archiveteam.org/wiki/ADF_(Amiga)
  377. # https://en.wikipedia.org/wiki/Amiga_Fast_File_System
  378. # Reference: http://lclevy.free.fr/adflib/adf_info.html
  379. # Update: Joerg Jenderek
  380. # Note: created by ADFOpus.exe
  381. # and verified by `unadf -l TURBO_SILVER_SV.ADF`
  382. 0 string DOS
  383. # skip DOS Client Message Files like IPXODI.MSG DOSRQSTR.MSG
  384. >3 ubyte <8 Amiga
  385. # https://reposcope.com/mimetype/application/x-amiga-disk-format
  386. !:mime application/x-amiga-disk-format
  387. !:ext adf
  388. >>3 ubyte 0 DOS disk
  389. >>3 ubyte 1 FFS disk
  390. >>3 ubyte 2 Inter DOS disk
  391. >>3 ubyte 3 Inter FFS disk
  392. # For Fastdir mode the international mode is also enabled,
  393. >>3 ubyte 4 Fastdir DOS disk
  394. >>3 ubyte 5 Fastdir FFS dis
  395. # called by TrID "Amiga Disk image File (OFS+INTL+DIRC)"
  396. >>3 ubyte 6 Inter Fastdir DOS disk
  397. # called by TrID "Amiga Disk image File (FFS+INTL+DIRC)"
  398. >>3 ubyte 7 Inter Fastdir FFS disk
  399. # but according to Wikipedia variants with long name support
  400. #>>3 ubyte 6 long name DOS disk
  401. #>>3 ubyte 7 long name FFS disk
  402. # DOES NOT only work! Partly for file size ~< FILE_BYTES_MAX=1 MiB defined in ../../src/file.h
  403. #>>-0 offset x \b, %lld bytes
  404. # Correct file size, but next lines are NOT executed
  405. #>>-0 offset 901120 (DD 880 KiB floppy)
  406. # 880 KiB Double Density floppy disk by characteristic hash table size 0x48 and T_HEADER=2
  407. >>0x6E00C ubelong 0x48
  408. >>>0x6E000 ubelong 2 (DD 880 KiB)
  409. # 1760 KiB High Density floppy disk (1802240 bytes) by characteristic hash table size 0x48
  410. >>0xDC00C ubelong 0x48
  411. >>>0xDC000 ubelong 2 (HD 1760 KiB)
  412. # Chksum; special block checksum like: 0 0x44ccf4c0 0x51f32cac 0xe33d0e7d ...
  413. #>>4 ubelong x \b, CRC 0x%x
  414. # Rootblock: 0 880 (often for DD and HD) 1146049280 (IMAGINE_1_0_DISK_01.ADF TURBO_SILVER_SV.ADF)
  415. >>8 ubelong >0 \b, probably root block %d
  416. # bootblock code
  417. >>12 quad !0 \b, bootable
  418. # assembler instructions: lea exp(pc),a1; moveq 25h,d0; jsr -552(a6)
  419. >>>12 ubequad =0x43fa003e70254eae AmigaDOS 3.0
  420. >>>12 default x
  421. >>>>12 ubequad !0x43fa003e70254eae 0x%llx..
  422. # 880 KiB Double Density floppy disk (901120 bytes)
  423. >>0x6E00C ubelong 0x48
  424. >>>0x6E000 ubelong 2
  425. >>>>0x6E000 use adf-rootblock
  426. # 1760 KiB High Density floppy disk (1802240 bytes)
  427. >>0xDC00C ubelong 0x48
  428. >>>0xDC000 ubelong 2
  429. >>>>0xDC000 use adf-rootblock
  430. # 1 MiB hard disc by test for T_HEADER=2 and header_key=0=high_seq
  431. >>0x80000 ubelong 2
  432. >>>0x80004 quad 0
  433. >>>>0x80000 use adf-rootblock
  434. # 2 MiB hard disc; only works if in ../../src/file.h FILE_BYTES_MAX is raised to 2 MiB
  435. #>>0x100000 ubelong x 2 MiB TEST
  436. #>>0x100000 ubelong 2 \b, 2 MiB hard disc rootblock
  437. #>>>0x100000 use adf-rootblock
  438. 0 string KICK Kickstart disk
  439. # From: Alex Beregszaszi <alex@fsn.hu>
  440. 0 string LZX LZX compressed archive (Amiga)
  441. # From: Przemek Kramarczyk <pkramarczyk@gmail.com>
  442. 0 string .KEY AmigaDOS script
  443. 0 string .key AmigaDOS script
  444. # AMOS Basic file formats
  445. # https://www.exotica.org.uk/wiki/AMOS_file_formats
  446. 0 string AMOS\040Basic\040 AMOS Basic source code
  447. >11 byte =0x56 \b, tested
  448. >11 byte =0x76 \b, untested
  449. 0 string AMOS\040Pro AMOS Basic source code
  450. >11 byte =0x56 \b, tested
  451. >11 byte =0x76 \b, untested
  452. 0 string AmSp AMOS Basic sprite bank
  453. >4 beshort x \b, %d sprites
  454. 0 string AmIc AMOS Basic icon bank
  455. >4 beshort x \b, %d icons
  456. 0 string AmBk AMOS Basic memory bank
  457. >4 beshort x \b, bank number %d
  458. >8 belong&0xFFFFFFF x \b, length %d
  459. >12 regex .{8} \b, type %s
  460. 0 string AmBs AMOS Basic memory banks
  461. >4 beshort x \b, %d banks
  462. #------------------------------------------------------------
  463. # $File: android,v 1.18 2021/02/23 00:51:10 christos Exp $
  464. # Various android related magic entries
  465. #------------------------------------------------------------
  466. # Dalvik .dex format. http://retrodev.com/android/dexformat.html
  467. # From <mkf@google.com> "Mike Fleming"
  468. # Fixed to avoid regexec 17 errors on some dex files
  469. # From <diff@lookout.com> "Tim Strazzere"
  470. 0 string dex\n
  471. >0 regex dex\n[0-9]{2}\0 Dalvik dex file
  472. >4 string >000 version %s
  473. 0 string dey\n
  474. >0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host)
  475. >4 string >000 version %s
  476. # Android bootimg format
  477. # From https://android.googlesource.com/\
  478. # platform/system/core/+/master/mkbootimg/bootimg.h
  479. # https://github.com/djrbliss/loki/blob/master/loki.h#L43
  480. 0 string ANDROID! Android bootimg
  481. >1024 string LOKI \b, LOKI'd
  482. >>1028 lelong 0 \b (boot)
  483. >>1028 lelong 1 \b (recovery)
  484. >8 lelong >0 \b, kernel
  485. >>12 lelong >0 \b (0x%x)
  486. >16 lelong >0 \b, ramdisk
  487. >>20 lelong >0 \b (0x%x)
  488. >24 lelong >0 \b, second stage
  489. >>28 lelong >0 \b (0x%x)
  490. >36 lelong >0 \b, page size: %d
  491. >38 string >0 \b, name: %s
  492. >64 string >0 \b, cmdline (%s)
  493. # Android Backup archive
  494. # From: Ariel Shkedi
  495. # Update: Joerg Jenderek
  496. # URL: https://github.com/android/platform_frameworks_base/blob/\
  497. # 0bacfd2ba68d21a68a3df345b830bc2a1e515b5a/services/java/com/\
  498. # android/server/BackupManagerService.java#L2367
  499. # Reference: https://sourceforge.net/projects/adbextractor/
  500. # android-backup-extractor/perl/backupencrypt.pl
  501. # Note: only unix line feeds "\n" found
  502. # After the header comes a tar file
  503. # If compressed, the entire tar file is compressed with JAVA deflate
  504. #
  505. # Include the version number hardcoded with the magic string to avoid
  506. # false positives
  507. 0 string/b ANDROID\ BACKUP\n Android Backup
  508. # maybe look for some more characteristics like linefeed '\n' or version
  509. #>16 string \n
  510. # No mime-type defined officially
  511. !:mime application/x-google-ab
  512. !:ext ab
  513. # on 2nd line version (often 1, 2 on kitkat 4.4.3+, 4 on 7.1.2)
  514. >15 string >\0 \b, version %s
  515. # "1" on 3rd line means compressed
  516. >17 string 0\n \b, Not-Compressed
  517. >17 string 1\n \b, Compressed
  518. # The 4th line is encryption "none" or "AES-256"
  519. # any string as long as it's not the word none (which is matched below)
  520. >19 string none\n \b, Not-Encrypted
  521. # look for backup content after line with encryption info
  522. #>>19 search/7 \n
  523. # data part after header for not encrypted Android Backup
  524. #>>>&0 ubequad x \b, content 0x%16.16llx...
  525. # look for zlib compressed by ./compress after message with 1 space at end
  526. #>>>&0 indirect x \b; contains
  527. # look for tar archive block by ./archive for package name manifest
  528. >>288 string ustar \b; contains
  529. >>>31 use tar-file
  530. # look for zip/jar archive by ./archive ./zip after message with 1 space at end
  531. #>>2079 search/1025/s PK\003\004 \b; contains
  532. #>>>&0 indirect x
  533. >19 string !none
  534. >>19 regex/1l \^([^n\n]|n[^o]|no[^n]|non[^e]|none.+).* \b, Encrypted (%s)
  535. # Commented out because they don't seem useful to print
  536. # (but they are part of the header - the tar file comes after them):
  537. # The 5th line is User Password Salt (128 Hex)
  538. # string length too high with standard src configuration
  539. #>>>&1 string >\0 \b, PASSWORD salt: "%-128.128s"
  540. #>>>&1 regex/1l .* \b, Password salt: %s
  541. # The 6th line is Master Key Checksum Salt (128 Hex)
  542. #>>>>&1 regex/1l .* \b, Master salt: %s
  543. # The 7th line is Number of PBDKF2 Rounds (10000)
  544. #>>>>>&1 regex/1l .* \b, PBKDF2 rounds: %s
  545. # The 8th line is User key Initialization Vector (IV) (32 Hex)
  546. #>>>>>>&1 regex/1l .* \b, IV: %s
  547. #>>>>>>&1 regex/1l .* \b, IV: %s
  548. # The 9th line is Master IV+Key+Checksum (192 Hex)
  549. #>>>>>>>&1 regex/1l .* \b, Key: %s
  550. # look for new line separator char after line number 9
  551. #>>>0x204 ubyte 0x0a NL found
  552. #>>>>&1 ubequad x \b, Content magic %16.16llx
  553. # *.pit files by Joerg Jenderek
  554. # https://forum.xda-developers.com/showthread.php?p=9122369
  555. # https://forum.xda-developers.com/showthread.php?t=816449
  556. # Partition Information Table for Samsung's smartphone with Android
  557. # used by flash software Odin
  558. 0 ulelong 0x12349876
  559. # 1st pit entry marker
  560. >0x01C ulequad&0xFFFFFFFCFFFFFFFC =0x0000000000000000
  561. # minimal 13 and maximal 18 PIT entries found
  562. >>4 ulelong <128 Partition Information Table for Samsung smartphone
  563. >>>4 ulelong x \b, %d entries
  564. # 1. pit entry
  565. >>>4 ulelong >0 \b; #1
  566. >>>0x01C use PIT-entry
  567. >>>4 ulelong >1 \b; #2
  568. >>>0x0A0 use PIT-entry
  569. >>>4 ulelong >2 \b; #3
  570. >>>0x124 use PIT-entry
  571. >>>4 ulelong >3 \b; #4
  572. >>>0x1A8 use PIT-entry
  573. >>>4 ulelong >4 \b; #5
  574. >>>0x22C use PIT-entry
  575. >>>4 ulelong >5 \b; #6
  576. >>>0x2B0 use PIT-entry
  577. >>>4 ulelong >6 \b; #7
  578. >>>0x334 use PIT-entry
  579. >>>4 ulelong >7 \b; #8
  580. >>>0x3B8 use PIT-entry
  581. >>>4 ulelong >8 \b; #9
  582. >>>0x43C use PIT-entry
  583. >>>4 ulelong >9 \b; #10
  584. >>>0x4C0 use PIT-entry
  585. >>>4 ulelong >10 \b; #11
  586. >>>0x544 use PIT-entry
  587. >>>4 ulelong >11 \b; #12
  588. >>>0x5C8 use PIT-entry
  589. >>>4 ulelong >12 \b; #13
  590. >>>>0x64C use PIT-entry
  591. # 14. pit entry
  592. >>>4 ulelong >13 \b; #14
  593. >>>>0x6D0 use PIT-entry
  594. >>>4 ulelong >14 \b; #15
  595. >>>0x754 use PIT-entry
  596. >>>4 ulelong >15 \b; #16
  597. >>>0x7D8 use PIT-entry
  598. >>>4 ulelong >16 \b; #17
  599. >>>0x85C use PIT-entry
  600. # 18. pit entry
  601. >>>4 ulelong >17 \b; #18
  602. >>>0x8E0 use PIT-entry
  603. 0 name PIT-entry
  604. # garbage value implies end of pit entries
  605. >0x00 ulequad&0xFFFFFFFCFFFFFFFC =0x0000000000000000
  606. # skip empty partition name
  607. >>0x24 ubyte !0
  608. # partition name
  609. >>>0x24 string >\0 %-.32s
  610. # flags
  611. >>>0x0C ulelong&0x00000002 2 \b+RW
  612. # partition ID:
  613. # 0~IPL,MOVINAND,GANG;1~PIT,GPT;2~HIDDEN;3~SBL,HIDDEN;4~SBL2,HIDDEN;5~BOOT;6~kernel,RECOVER,misc;7~RECOVER
  614. # ;11~MODEM;20~efs;21~PARAM;22~FACTORY,SYSTEM;23~DBDATAFS,USERDATA;24~CACHE;80~BOOTLOADER;81~TZSW
  615. >>>0x08 ulelong x (0x%x)
  616. # filename
  617. >>>0x44 string >\0 "%-.64s"
  618. #>>>0x18 ulelong >0
  619. # blocksize in 512 byte units ?
  620. #>>>>0x18 ulelong x \b, %db
  621. # partition size in blocks ?
  622. #>>>>0x22 ulelong x \b*%d
  623. # Android sparse img format
  624. # From https://android.googlesource.com/\
  625. # platform/system/core/+/master/libsparse/sparse_format.h
  626. 0 lelong 0xed26ff3a Android sparse image
  627. >4 leshort x \b, version: %d
  628. >6 leshort x \b.%d
  629. >16 lelong x \b, Total of %d
  630. >12 lelong x \b %d-byte output blocks in
  631. >20 lelong x \b %d input chunks.
  632. # Android binary XML magic
  633. # In include/androidfw/ResourceTypes.h:
  634. # RES_XML_TYPE = 0x0003 followed by the size of the header (ResXMLTree_header),
  635. # which is 8 bytes (2 bytes type + 2 bytes header size + 4 bytes size).
  636. 0 lelong 0x00080003 Android binary XML
  637. # Android cryptfs footer
  638. # From https://android.googlesource.com/\
  639. # platform/system/vold/+/refs/heads/master/cryptfs.h
  640. 0 lelong 0xd0b5b1c4 Android cryptfs footer
  641. >4 leshort x \b, version: %d
  642. >6 leshort x \b.%d
  643. # Android Vdex format
  644. # From https://android.googlesource.com/\
  645. # platform/art/+/master/runtime/vdex_file.h
  646. 0 string vdex Android vdex file,
  647. >4 string >000 verifier deps version: %s,
  648. >8 string >000 dex section version: %s,
  649. >12 lelong >0 number of dex files: %d,
  650. >16 lelong >0 verifier deps size: %d
  651. # Android Vdex format, dexfile is currently being updated
  652. # by android system
  653. # From https://android.googlesource.com/\
  654. # platform/art/+/master/dex2oat/dex2oat.cc
  655. 0 string wdex Android vdex file, being processed by dex2oat,
  656. >4 string >000 verifier deps version: %s,
  657. >8 string >000 dex section version: %s,
  658. >12 lelong >0 number of dex files: %d,
  659. >16 lelong >0 verifier deps size: %d
  660. #------------------------------------------------------------------------------
  661. # $File: animation,v 1.85 2021/03/14 16:36:53 christos Exp $
  662. # animation: file(1) magic for animation/movie formats
  663. #
  664. # animation formats
  665. # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  666. # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
  667. # SGI and Apple formats
  668. 0 string MOVI Silicon Graphics movie file
  669. !:mime video/x-sgi-movie
  670. 4 string moov Apple QuickTime
  671. !:mime video/quicktime
  672. >12 string mvhd \b movie (fast start)
  673. >12 string mdra \b URL
  674. >12 string cmov \b movie (fast start, compressed header)
  675. >12 string rmra \b multiple URLs
  676. 4 string mdat Apple QuickTime movie (unoptimized)
  677. !:mime video/quicktime
  678. #4 string wide Apple QuickTime movie (unoptimized)
  679. #!:mime video/quicktime
  680. #4 string skip Apple QuickTime movie (modified)
  681. #!:mime video/quicktime
  682. #4 string free Apple QuickTime movie (modified)
  683. #!:mime video/quicktime
  684. 4 string idsc Apple QuickTime image (fast start)
  685. !:mime image/x-quicktime
  686. #4 string idat Apple QuickTime image (unoptimized)
  687. #!:mime image/x-quicktime
  688. 4 string pckg Apple QuickTime compressed archive
  689. !:mime application/x-quicktime-player
  690. 4 string/W jP JPEG 2000 image
  691. !:mime image/jp2
  692. #### MP4 ####
  693. # https://www.ftyps.com/ with local additions
  694. # https://cconcolato.github.io/mp4ra/filetype.html
  695. 4 string ftyp ISO Media
  696. # https://aeroquartet.com/wordpress/2016/03/05/3-xavc-s/
  697. >8 string XAVC \b, MPEG v4 system, Sony XAVC Codec
  698. >>96 string x \b, Audio "%.4s"
  699. >>118 beshort x at %dHz
  700. >>140 string x \b, Video "%.4s"
  701. >>168 beshort x %d
  702. >>170 beshort x \bx%d
  703. >8 string 3g2 \b, MPEG v4 system, 3GPP2
  704. !:mime video/3gpp2
  705. >>11 byte 4 \b v4 (H.263/AMR GSM 6.10)
  706. >>11 byte 5 \b v5 (H.263/AMR GSM 6.10)
  707. >>11 byte 6 \b v6 (ITU H.264/AMR GSM 6.10)
  708. # https://www.3gpp2.org/Public_html/Specs/C.S0050-B_v1.0_070521.pdf
  709. # Section 8.1.1, corresponds to a, b, c
  710. >>11 byte 0x61 \b C.S0050-0 V1.0
  711. >>11 byte 0x62 \b C.S0050-0-A V1.0.0
  712. >>11 byte 0x63 \b C.S0050-0-B V1.0
  713. >8 string 3ge \b, MPEG v4 system, 3GPP
  714. !:mime video/3gpp
  715. >>11 byte 6 \b, Release %d MBMS Extended Presentations
  716. >>11 byte 7 \b, Release %d MBMS Extended Presentations
  717. >>11 byte 9 \b, Release %d MBMS Extended Presentations
  718. >8 string 3gf \b, MPEG v4 system, 3GPP
  719. >>11 byte 9 \b, Release %d File-delivery profile
  720. >8 string 3gg \b, MPEG v4 system, 3GPP
  721. !:mime video/3gpp
  722. >>11 byte 6 \b, Release %d General Profile
  723. >>11 byte 9 \b, Release %d General Profile
  724. >8 string 3gh \b, MPEG v4 system, 3GPP
  725. !:mime video/3gpp
  726. >>11 byte 9 \b, Release %d Adaptive Streaming Profile
  727. >8 string 3gm \b, MPEG v4 system, 3GPP
  728. !:mime video/3gpp
  729. >>11 byte 9 \b, Release %d Media Segment Profile
  730. >8 string 3gp \b, MPEG v4 system, 3GPP
  731. !:mime video/3gpp
  732. >>11 byte 1 \b, Release %d (non existent)
  733. >>11 byte 2 \b, Release %d (non existent)
  734. >>11 byte 3 \b, Release %d (non existent)
  735. >>11 byte 4 \b, Release %d
  736. >>11 byte 5 \b, Release %d
  737. >>11 byte 6 \b, Release %d
  738. >>11 byte 7 \b, Release %d Streaming Servers
  739. >8 string 3gr \b, MPEG v4 system, 3GPP
  740. !:mime video/3gpp
  741. >>11 byte 6 \b, Release %d Progressive Download Profile
  742. >>11 byte 9 \b, Release %d Progressive Download Profile
  743. >8 string 3gs \b, MPEG v4 system, 3GPP
  744. !:mime video/3gpp
  745. >>11 byte 6 \b, Release %d Streaming Servers
  746. >>11 byte 7 \b, Release %d Streaming Servers
  747. >>11 byte 9 \b, Release %d Streaming Servers
  748. >8 string 3gt \b, MPEG v4 system, 3GPP
  749. !:mime video/3gpp
  750. >>11 byte 8 \b, Release %d Media Stream Recording Profile
  751. >>11 byte 9 \b, Release %d Media Stream Recording Profile
  752. >8 string ARRI \b, MPEG v4 system, ARRI Digital Camera
  753. !:mime video/mp4
  754. >8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC [ISO 14496-12:2005]
  755. !:mime video/mp4
  756. >8 string bbxm \b, Blinkbox Master File: H.264 video/16-bit LE LPCM audio
  757. !:mime video/mp4
  758. >8 string/W qt \b, Apple QuickTime movie
  759. !:mime video/quicktime
  760. >8 string CAEP \b, Canon Digital Camera
  761. >8 string caqv \b, Casio Digital Camera
  762. >8 string CDes \b, Convergent Design
  763. >8 string caaa \b, CMAF Media Profile - AAC Adaptive Audio
  764. >8 string caac \b, CMAF Media Profile - AAC Core
  765. >8 string caqv \b, Casio Digital Camera Casio
  766. >8 string ccea \b, CMAF Supplemental Data - CEA-608/708
  767. >8 string ccff \b, Common container file format
  768. >8 string cfhd \b, CMAF Media Profile - AVC HD
  769. >8 string cfsd \b, CMAF Media Profile - AVC SD
  770. >8 string chd1 \b, CMAF Media Profile - HEVC HDR10
  771. >8 string chdf \b, CMAF Media Profile - AVC HDHF
  772. >8 string chhd \b, CMAF Media Profile - HEVC HHD8
  773. >8 string chh1 \b, CMAF Media Profile - HEVC HHD10
  774. >8 string clg1 \b, CMAF Media Profile - HEVC HLG10
  775. >8 string cmfc \b, CMAF Track Format
  776. >8 string cmff \b, CMAF Fragment Format
  777. >8 string cmfl \b, CMAF Chunk Format
  778. >8 string cmfs \b, CMAF Segment Format
  779. >8 string cud1 \b, CMAF Media Profile - HEVC UHD10
  780. >8 string cud8 \b, CMAF Media Profile - HEVC UHD8
  781. >8 string cwvt \b, CMAF Media Profile - WebVTT
  782. >8 string da0a \b, DMB MAF w/ MPEG Layer II aud, MOT slides, DLS, JPG/PNG/MNG
  783. >8 string da0b \b, DMB MAF, ext DA0A, with 3GPP timed text, DID, TVA, REL, IPMP
  784. >8 string da1a \b, DMB MAF audio with ER-BSAC audio, JPG/PNG/MNG images
  785. >8 string da1b \b, DMB MAF, ext da1a, with 3GPP timed text, DID, TVA, REL, IPMP
  786. >8 string da2a \b, DMB MAF aud w/ HE-AAC v2 aud, MOT slides, DLS, JPG/PNG/MNG
  787. >8 string da2b \b, DMB MAF, ext da2a, with 3GPP timed text, DID, TVA, REL, IPMP
  788. >8 string da3a \b, DMB MAF aud with HE-AAC aud, JPG/PNG/MNG images
  789. >8 string da3b \b, DMB MAF, ext da3a w/ BIFS, 3GPP, DID, TVA, REL, IPMP
  790. >8 string dash \b, MPEG v4 system, Dynamic Adaptive Streaming over HTTP
  791. !:mime video/mp4
  792. >8 string dby1 \b, MP4 files with Dolby content
  793. >8 string dsms \b, Media Segment DASH conformant
  794. >8 string dts1 \b, MP4 track file with audio codecs dtsc dtsh or dtse
  795. >8 string dts2 \b, MP4 track file with audio codec dtsx
  796. >8 string dts3 \b, MP4 track file with audio codec dtsy
  797. >8 string dxo$20 \b, DxO ONE camera
  798. >8 string dmb1 \b, DMB MAF supporting all the components defined in the spec
  799. >8 string dmpf \b, Digital Media Project
  800. >8 string drc1 \b, Dirac (wavelet compression), encap in ISO base media (MP4)
  801. >8 string dv1a \b, DMB MAF vid w/ AVC vid, ER-BSAC aud, BIFS, JPG/PNG/MNG, TS
  802. >8 string dv1b \b, DMB MAF, ext dv1a, with 3GPP timed text, DID, TVA, REL, IPMP
  803. >8 string dv2a \b, DMB MAF vid w/ AVC vid, HE-AAC v2 aud, BIFS, JPG/PNG/MNG, TS
  804. >8 string dv2b \b, DMB MAF, ext dv2a, with 3GPP timed text, DID, TVA, REL, IPMP
  805. >8 string dv3a \b, DMB MAF vid w/ AVC vid, HE-AAC aud, BIFS, JPG/PNG/MNG, TS
  806. >8 string dv3b \b, DMB MAF, ext dv3a, with 3GPP timed text, DID, TVA, REL, IPMP
  807. >8 string dvr1 \b, DVB (.DVB) over RTP
  808. !:mime video/vnd.dvb.file
  809. >8 string dvt1 \b, DVB (.DVB) over MPEG-2 Transport Stream
  810. >8 string emsg \b, Event message box present
  811. !:mime video/vnd.dvb.file
  812. >8 string F4V \b, Video for Adobe Flash Player 9+ (.F4V)
  813. !:mime video/mp4
  814. >8 string F4P \b, Protected Video for Adobe Flash Player 9+ (.F4P)
  815. !:mime video/mp4
  816. >8 string F4A \b, Audio for Adobe Flash Player 9+ (.F4A)
  817. !:mime audio/mp4
  818. >8 string F4B \b, Audio Book for Adobe Flash Player 9+ (.F4B)
  819. !:mime audio/mp4
  820. >8 string ifrm \b, Apple iFrame Specification, Version 8.1 Jan 2013
  821. >8 string im1i \b, CMAF Media Profile - IMSC1 Image
  822. >8 string im1t \b, CMAF Media Profile - IMSC1 Text
  823. >8 string isc2 \b, ISMACryp 2.0 Encrypted File
  824. # ?/enc-isoff-generic
  825. >8 string iso \b, MP4 Base Media
  826. !:mime video/mp4
  827. >>11 string m v1 [ISO 14496-12:2003]
  828. >>11 string 2 v2 [ISO 14496-12:2005]
  829. >>11 string 4 v4
  830. >>11 string 5 v5
  831. >>11 string 6 v6
  832. >8 string isml \b, MP4 Base Media v2 [ISO 14496-12:2005]
  833. !:mime video/mp4
  834. >8 string J2P0 \b, JPEG2000 Profile 0
  835. >8 string J2P1 \b, JPEG2000 Profile 1
  836. >8 string/W jp2 \b, JPEG 2000
  837. !:mime image/jp2
  838. >8 string JP2 \b, JPEG 2000 Image (.JP2) [ISO 15444-1 ?]
  839. !:mime image/jp2
  840. >8 string JP20 \b, Unknown, from GPAC samples (prob non-existent)
  841. >8 string jpm \b, JPEG 2000 Compound Image (.JPM) [ISO 15444-6]
  842. !:mime image/jpm
  843. >8 string jpsi \b, The JPSearch data interchange format
  844. >8 string jpx \b, JPEG 2000 w/ extensions (.JPX) [ISO 15444-2]
  845. !:mime image/jpx
  846. >8 string KDDI \b, 3GPP2 EZmovie for KDDI 3G cellphones
  847. !:mime video/3gpp2
  848. >8 string LCAG \b, Leica digital camera
  849. >8 string lmsg \b, Last Media Segment indicator for ISO base media file format.
  850. >8 string M4A \b, Apple iTunes ALAC/AAC-LC (.M4A) Audio
  851. !:mime audio/x-m4a
  852. >8 string M4B \b, Apple iTunes ALAC/AAC-LC (.M4B) Audio Book
  853. !:mime audio/mp4
  854. >8 string M4P \b, Apple iTunes ALAC/AAC-LC (.M4P) AES Protected Audio
  855. !:mime video/mp4
  856. >8 string M4V \b, Apple iTunes Video (.M4V) Video
  857. !:mime video/x-m4v
  858. >8 string M4VH \b, Apple TV (.M4V)
  859. !:mime video/x-m4v
  860. >8 string M4VP \b, Apple iPhone (.M4V)
  861. !:mime video/x-m4v
  862. >8 string mj2s \b, Motion JPEG 2000 [ISO 15444-3] Simple Profile
  863. !:mime video/mj2
  864. >8 string mjp2 \b, Motion JPEG 2000 [ISO 15444-3] General Profile
  865. >8 string MFSM \b, Media File for Samsung video Metadata
  866. >8 string MGSV \b, Sony Home and Mobile Multimedia Platform (HMMP)
  867. !:mime video/mj2
  868. >8 string mmp4 \b, MPEG-4/3GPP Mobile Profile (.MP4 / .3GP) (for NTT)
  869. !:mime video/mp4
  870. >8 string mobi \b, MPEG-4, MOBI format
  871. !:mime video/mp4
  872. >8 string mp21 \b, MPEG-21 [ISO/IEC 21000-9]
  873. >8 string mp41 \b, MP4 v1 [ISO 14496-1:ch13]
  874. !:mime video/mp4
  875. >8 string mp42 \b, MP4 v2 [ISO 14496-14]
  876. !:mime video/mp4
  877. >8 string mp71 \b, MP4 w/ MPEG-7 Metadata [per ISO 14496-12]
  878. >8 string mp7t \b, MPEG v4 system, MPEG v7 XML
  879. >8 string mp7b \b, MPEG v4 system, MPEG v7 binary XML
  880. >8 string mpuf \b, Compliance with the MMT Processing Unit format
  881. >8 string msdh \b, Media Segment conforming to ISO base media file format.
  882. >8 string msix \b, Media Segment conforming to ISO base media file format.
  883. >8 string mmp4 \b, MPEG v4 system, 3GPP Mobile
  884. !:mime video/mp4
  885. >8 string MPPI \b, Photo Player, MAF [ISO/IEC 23000-3]
  886. >8 string mqt \b, Sony / Mobile QuickTime (.MQV) US Pat 7,477,830
  887. !:mime video/quicktime
  888. >8 string MSNV \b, MPEG-4 (.MP4) for SonyPSP
  889. !:mime audio/mp4
  890. >8 string NDAS \b, MP4 v2 [ISO 14496-14] Nero Digital AAC Audio
  891. !:mime audio/mp4
  892. >8 string NDSC \b, MPEG-4 (.MP4) Nero Cinema Profile
  893. !:mime video/mp4
  894. >8 string NDSH \b, MPEG-4 (.MP4) Nero HDTV Profile
  895. !:mime video/mp4
  896. >8 string NDSM \b, MPEG-4 (.MP4) Nero Mobile Profile
  897. !:mime video/mp4
  898. >8 string NDSP \b, MPEG-4 (.MP4) Nero Portable Profile
  899. !:mime video/mp4
  900. >8 string NDSS \b, MPEG-4 (.MP4) Nero Standard Profile
  901. !:mime video/mp4
  902. >8 string NDXC \b, H.264/MPEG-4 AVC (.MP4) Nero Cinema Profile
  903. !:mime video/mp4
  904. >8 string NDXH \b, H.264/MPEG-4 AVC (.MP4) Nero HDTV Profile
  905. !:mime video/mp4
  906. >8 string NDXM \b, H.264/MPEG-4 AVC (.MP4) Nero Mobile Profile
  907. !:mime video/mp4
  908. >8 string NDXP \b, H.264/MPEG-4 AVC (.MP4) Nero Portable Profile
  909. !:mime video/mp4
  910. >8 string NDXS \b, H.264/MPEG-4 AVC (.MP4) Nero Standard Profile
  911. >8 string niko \b, Nikon Digital Camera
  912. !:mime video/mp4
  913. >8 string odcf \b, OMA DCF DRM Format 2.0 (OMA-TS-DRM-DCF-V2_0-20060303-A)
  914. >8 string opf2 \b, OMA PDCF DRM Format 2.1 (OMA-TS-DRM-DCF-V2_1-20070724-C)
  915. >8 string opx2 \b, OMA PDCF DRM + XBS ext (OMA-TS-DRM_XBS-V1_0-20070529-C)
  916. >8 string pana \b, Panasonic Digital Camera
  917. >8 string piff \b, Protected Interoperable File Format
  918. >8 string pnvi ]b, Panasonic Video Intercom
  919. >8 string qt \b, Apple QuickTime (.MOV/QT)
  920. !:mime video/quicktime
  921. # HEIF image format
  922. # see https://nokiatech.github.io/heif/technical.html
  923. >8 string mif1 \b, HEIF Image
  924. !:mime image/heif
  925. >8 string msf1 \b, HEIF Image Sequence
  926. !:mime image/heif-sequence
  927. >8 string heic \b, HEIF Image HEVC Main or Main Still Picture Profile
  928. !:mime image/heic
  929. >8 string heix \b, HEIF Image HEVC Main 10 Profile
  930. !:mime image/heic
  931. >8 string hevc \b, HEIF Image Sequenz HEVC Main or Main Still Picture Profile
  932. !:mime image/heic-sequence
  933. >8 string hevx \b, HEIF Image Sequence HEVC Main 10 Profile
  934. !:mime image/heic-sequence
  935. # following HEIF brands are not mentioned in the heif technical info currently (Oct 2017)
  936. # but used in the reference implementation:
  937. # https://github.com/nokiatech/heif/blob/d5e9a21c8ba8df712bdf643021dd9f6518134776/Srcs/reader/hevcimagefilereader.cpp
  938. >8 string heim \b, HEIF Image L-HEVC
  939. !:mime image/heif
  940. >8 string heis \b, HEIF Image L-HEVC
  941. !:mime image/heif
  942. >8 string avic \b, HEIF Image AVC
  943. !:mime image/heif
  944. >8 string hevm \b, HEIF Image Sequence L-HEVC
  945. !:mime image/heif-sequence
  946. >8 string hevs \b, HEIF Image Sequence L-HEVC
  947. !:mime image/heif-sequence
  948. >8 string avcs \b, HEIF Image Sequence AVC
  949. !:mime image/heif-sequence
  950. # AVIF image format
  951. # see https://aomediacodec.github.io/av1-avif/
  952. >8 string avif \b, AVIF Image
  953. !:mime image/avif
  954. >8 string avis \b, AVIF Image Sequence
  955. !:mime image/avif
  956. >8 string risx \b, Representation Index Segment for MPEG-2 TS Segments
  957. >8 string ROSS \b, Ross Video
  958. >8 string sdv \b, SD Memory Card Video
  959. >8 string ssc1 \b, Samsung stereo, single stream (patent pending)
  960. >8 string ssc2 \b, Samsung stereo, dual stream (patent pending)
  961. >8 string SEAU \b, Sony Home and Mobile Multimedia Platform (HMMP)
  962. >8 string SEBK \b, Sony Home and Mobile Multimedia Platform (HMMP)
  963. >8 string senv \b, Video contents Sony Entertainment Network
  964. >8 string sims \b, Media Segment for Sub-Indexed Media Segment format
  965. >8 string sisx \b, Single Index Segment forindex MPEG-2 TS
  966. >8 string ssss \b, Subsegment Index Segment used to index MPEG-2 Segments
  967. >8 string uvvu \b, UltraViolet file brand for DECE Common Format
  968. # MPEG sequences
  969. # Scans for all common MPEG header start codes
  970. 0 belong 0x00000001
  971. >4 byte&0x1F 0x07 JVT NAL sequence, H.264 video
  972. >>5 byte 66 \b, baseline
  973. >>5 byte 77 \b, main
  974. >>5 byte 88 \b, extended
  975. >>7 byte x \b @ L %u
  976. 0 belong&0xFFFFFF00 0x00000100
  977. >3 byte 0xBA MPEG sequence
  978. !:mime video/mpeg
  979. # http://fileformats.archiveteam.org/wiki/Enhanced_VOB
  980. # https://reposcope.com/mimetype/video/mpeg
  981. !:ext vob/evo/mpg/mpeg
  982. >>4 byte &0x40 \b, v2, program multiplex
  983. >>4 byte ^0x40 \b, v1, system multiplex
  984. >3 byte 0xBB MPEG sequence, v1/2, multiplex (missing pack header)
  985. >3 byte&0x1F 0x07 MPEG sequence, H.264 video
  986. >>4 byte 66 \b, baseline
  987. >>4 byte 77 \b, main
  988. >>4 byte 88 \b, extended
  989. >>6 byte x \b @ L %u
  990. # GRR too general as it catches also FoxPro Memo example NG.FPT
  991. >3 byte 0xB0 MPEG sequence, v4
  992. # TODO: maybe this extra line exclude FoxPro Memo example NG.FPT starting with 000001b0 00000100 00000000
  993. #>>4 byte !0 MPEG sequence, v4
  994. !:mime video/mpeg4-generic
  995. >>5 belong 0x000001B5
  996. >>>9 byte &0x80
  997. >>>>10 byte&0xF0 16 \b, video
  998. >>>>10 byte&0xF0 32 \b, still texture
  999. >>>>10 byte&0xF0 48 \b, mesh
  1000. >>>>10 byte&0xF0 64 \b, face
  1001. >>>9 byte&0xF8 8 \b, video
  1002. >>>9 byte&0xF8 16 \b, still texture
  1003. >>>9 byte&0xF8 24 \b, mesh
  1004. >>>9 byte&0xF8 32 \b, face
  1005. >>4 byte 1 \b, simple @ L1
  1006. >>4 byte 2 \b, simple @ L2
  1007. >>4 byte 3 \b, simple @ L3
  1008. >>4 byte 4 \b, simple @ L0
  1009. >>4 byte 17 \b, simple scalable @ L1
  1010. >>4 byte 18 \b, simple scalable @ L2
  1011. >>4 byte 33 \b, core @ L1
  1012. >>4 byte 34 \b, core @ L2
  1013. >>4 byte 50 \b, main @ L2
  1014. >>4 byte 51 \b, main @ L3
  1015. >>4 byte 53 \b, main @ L4
  1016. >>4 byte 66 \b, n-bit @ L2
  1017. >>4 byte 81 \b, scalable texture @ L1
  1018. >>4 byte 97 \b, simple face animation @ L1
  1019. >>4 byte 98 \b, simple face animation @ L2
  1020. >>4 byte 99 \b, simple face basic animation @ L1
  1021. >>4 byte 100 \b, simple face basic animation @ L2
  1022. >>4 byte 113 \b, basic animation text @ L1
  1023. >>4 byte 114 \b, basic animation text @ L2
  1024. >>4 byte 129 \b, hybrid @ L1
  1025. >>4 byte 130 \b, hybrid @ L2
  1026. >>4 byte 145 \b, advanced RT simple @ L!
  1027. >>4 byte 146 \b, advanced RT simple @ L2
  1028. >>4 byte 147 \b, advanced RT simple @ L3
  1029. >>4 byte 148 \b, advanced RT simple @ L4
  1030. >>4 byte 161 \b, core scalable @ L1
  1031. >>4 byte 162 \b, core scalable @ L2
  1032. >>4 byte 163 \b, core scalable @ L3
  1033. >>4 byte 177 \b, advanced coding efficiency @ L1
  1034. >>4 byte 178 \b, advanced coding efficiency @ L2
  1035. >>4 byte 179 \b, advanced coding efficiency @ L3
  1036. >>4 byte 180 \b, advanced coding efficiency @ L4
  1037. >>4 byte 193 \b, advanced core @ L1
  1038. >>4 byte 194 \b, advanced core @ L2
  1039. >>4 byte 209 \b, advanced scalable texture @ L1
  1040. >>4 byte 210 \b, advanced scalable texture @ L2
  1041. >>4 byte 211 \b, advanced scalable texture @ L3
  1042. >>4 byte 225 \b, simple studio @ L1
  1043. >>4 byte 226 \b, simple studio @ L2
  1044. >>4 byte 227 \b, simple studio @ L3
  1045. >>4 byte 228 \b, simple studio @ L4
  1046. >>4 byte 229 \b, core studio @ L1
  1047. >>4 byte 230 \b, core studio @ L2
  1048. >>4 byte 231 \b, core studio @ L3
  1049. >>4 byte 232 \b, core studio @ L4
  1050. >>4 byte 240 \b, advanced simple @ L0
  1051. >>4 byte 241 \b, advanced simple @ L1
  1052. >>4 byte 242 \b, advanced simple @ L2
  1053. >>4 byte 243 \b, advanced simple @ L3
  1054. >>4 byte 244 \b, advanced simple @ L4
  1055. >>4 byte 245 \b, advanced simple @ L5
  1056. >>4 byte 247 \b, advanced simple @ L3b
  1057. >>4 byte 248 \b, FGS @ L0
  1058. >>4 byte 249 \b, FGS @ L1
  1059. >>4 byte 250 \b, FGS @ L2
  1060. >>4 byte 251 \b, FGS @ L3
  1061. >>4 byte 252 \b, FGS @ L4
  1062. >>4 byte 253 \b, FGS @ L5
  1063. >3 byte 0xB5 MPEG sequence, v4
  1064. !:mime video/mpeg4-generic
  1065. >>4 byte &0x80
  1066. >>>5 byte&0xF0 16 \b, video (missing profile header)
  1067. >>>5 byte&0xF0 32 \b, still texture (missing profile header)
  1068. >>>5 byte&0xF0 48 \b, mesh (missing profile header)
  1069. >>>5 byte&0xF0 64 \b, face (missing profile header)
  1070. >>4 byte&0xF8 8 \b, video (missing profile header)
  1071. >>4 byte&0xF8 16 \b, still texture (missing profile header)
  1072. >>4 byte&0xF8 24 \b, mesh (missing profile header)
  1073. >>4 byte&0xF8 32 \b, face (missing profile header)
  1074. >3 byte 0xB3 MPEG sequence
  1075. !:mime video/mpeg
  1076. >>12 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
  1077. >>12 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
  1078. >>12 belong 0x000001B5 \b, v2,
  1079. >>>16 byte&0x0F 1 \b HP
  1080. >>>16 byte&0x0F 2 \b Spt
  1081. >>>16 byte&0x0F 3 \b SNR
  1082. >>>16 byte&0x0F 4 \b MP
  1083. >>>16 byte&0x0F 5 \b SP
  1084. >>>17 byte&0xF0 64 \b@HL
  1085. >>>17 byte&0xF0 96 \b@H-14
  1086. >>>17 byte&0xF0 128 \b@ML
  1087. >>>17 byte&0xF0 160 \b@LL
  1088. >>>17 byte &0x08 \b progressive
  1089. >>>17 byte ^0x08 \b interlaced
  1090. >>>17 byte&0x06 2 \b Y'CbCr 4:2:0 video
  1091. >>>17 byte&0x06 4 \b Y'CbCr 4:2:2 video
  1092. >>>17 byte&0x06 6 \b Y'CbCr 4:4:4 video
  1093. >>11 byte &0x02
  1094. >>>75 byte &0x01
  1095. >>>>140 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
  1096. >>>>140 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
  1097. >>>>140 belong 0x000001B5 \b, v2,
  1098. >>>>>144 byte&0x0F 1 \b HP
  1099. >>>>>144 byte&0x0F 2 \b Spt
  1100. >>>>>144 byte&0x0F 3 \b SNR
  1101. >>>>>144 byte&0x0F 4 \b MP
  1102. >>>>>144 byte&0x0F 5 \b SP
  1103. >>>>>145 byte&0xF0 64 \b@HL
  1104. >>>>>145 byte&0xF0 96 \b@H-14
  1105. >>>>>145 byte&0xF0 128 \b@ML
  1106. >>>>>145 byte&0xF0 160 \b@LL
  1107. >>>>>145 byte &0x08 \b progressive
  1108. >>>>>145 byte ^0x08 \b interlaced
  1109. >>>>>145 byte&0x06 2 \b Y'CbCr 4:2:0 video
  1110. >>>>>145 byte&0x06 4 \b Y'CbCr 4:2:2 video
  1111. >>>>>145 byte&0x06 6 \b Y'CbCr 4:4:4 video
  1112. >>76 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
  1113. >>76 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
  1114. >>76 belong 0x000001B5 \b, v2,
  1115. >>>80 byte&0x0F 1 \b HP
  1116. >>>80 byte&0x0F 2 \b Spt
  1117. >>>80 byte&0x0F 3 \b SNR
  1118. >>>80 byte&0x0F 4 \b MP
  1119. >>>80 byte&0x0F 5 \b SP
  1120. >>>81 byte&0xF0 64 \b@HL
  1121. >>>81 byte&0xF0 96 \b@H-14
  1122. >>>81 byte&0xF0 128 \b@ML
  1123. >>>81 byte&0xF0 160 \b@LL
  1124. >>>81 byte &0x08 \b progressive
  1125. >>>81 byte ^0x08 \b interlaced
  1126. >>>81 byte&0x06 2 \b Y'CbCr 4:2:0 video
  1127. >>>81 byte&0x06 4 \b Y'CbCr 4:2:2 video
  1128. >>>81 byte&0x06 6 \b Y'CbCr 4:4:4 video
  1129. >>4 belong&0xFFFFFF00 0x78043800 \b, HD-TV 1920P
  1130. >>>7 byte&0xF0 0x10 \b, 16:9
  1131. >>4 belong&0xFFFFFF00 0x50002D00 \b, SD-TV 1280I
  1132. >>>7 byte&0xF0 0x10 \b, 16:9
  1133. >>4 belong&0xFFFFFF00 0x30024000 \b, PAL Capture
  1134. >>>7 byte&0xF0 0x10 \b, 4:3
  1135. >>4 beshort&0xFFF0 0x2C00 \b, 4CIF
  1136. >>>5 beshort&0x0FFF 0x01E0 \b NTSC
  1137. >>>5 beshort&0x0FFF 0x0240 \b PAL
  1138. >>>7 byte&0xF0 0x20 \b, 4:3
  1139. >>>7 byte&0xF0 0x30 \b, 16:9
  1140. >>>7 byte&0xF0 0x40 \b, 11:5
  1141. >>>7 byte&0xF0 0x80 \b, PAL 4:3
  1142. >>>7 byte&0xF0 0xC0 \b, NTSC 4:3
  1143. >>4 belong&0xFFFFFF00 0x2801E000 \b, LD-TV 640P
  1144. >>>7 byte&0xF0 0x10 \b, 4:3
  1145. >>4 belong&0xFFFFFF00 0x1400F000 \b, 320x240
  1146. >>>7 byte&0xF0 0x10 \b, 4:3
  1147. >>4 belong&0xFFFFFF00 0x0F00A000 \b, 240x160
  1148. >>>7 byte&0xF0 0x10 \b, 4:3
  1149. >>4 belong&0xFFFFFF00 0x0A007800 \b, 160x120
  1150. >>>7 byte&0xF0 0x10 \b, 4:3
  1151. >>4 beshort&0xFFF0 0x1600 \b, CIF
  1152. >>>5 beshort&0x0FFF 0x00F0 \b NTSC
  1153. >>>5 beshort&0x0FFF 0x0120 \b PAL
  1154. >>>7 byte&0xF0 0x20 \b, 4:3
  1155. >>>7 byte&0xF0 0x30 \b, 16:9
  1156. >>>7 byte&0xF0 0x40 \b, 11:5
  1157. >>>7 byte&0xF0 0x80 \b, PAL 4:3
  1158. >>>7 byte&0xF0 0xC0 \b, NTSC 4:3
  1159. >>>5 beshort&0x0FFF 0x0240 \b PAL 625
  1160. >>>>7 byte&0xF0 0x20 \b, 4:3
  1161. >>>>7 byte&0xF0 0x30 \b, 16:9
  1162. >>>>7 byte&0xF0 0x40 \b, 11:5
  1163. >>4 beshort&0xFFF0 0x2D00 \b, CCIR/ITU
  1164. >>>5 beshort&0x0FFF 0x01E0 \b NTSC 525
  1165. >>>5 beshort&0x0FFF 0x0240 \b PAL 625
  1166. >>>7 byte&0xF0 0x20 \b, 4:3
  1167. >>>7 byte&0xF0 0x30 \b, 16:9
  1168. >>>7 byte&0xF0 0x40 \b, 11:5
  1169. >>4 beshort&0xFFF0 0x1E00 \b, SVCD
  1170. >>>5 beshort&0x0FFF 0x01E0 \b NTSC 525
  1171. >>>5 beshort&0x0FFF 0x0240 \b PAL 625
  1172. >>>7 byte&0xF0 0x20 \b, 4:3
  1173. >>>7 byte&0xF0 0x30 \b, 16:9
  1174. >>>7 byte&0xF0 0x40 \b, 11:5
  1175. >>7 byte&0x0F 1 \b, 23.976 fps
  1176. >>7 byte&0x0F 2 \b, 24 fps
  1177. >>7 byte&0x0F 3 \b, 25 fps
  1178. >>7 byte&0x0F 4 \b, 29.97 fps
  1179. >>7 byte&0x0F 5 \b, 30 fps
  1180. >>7 byte&0x0F 6 \b, 50 fps
  1181. >>7 byte&0x0F 7 \b, 59.94 fps
  1182. >>7 byte&0x0F 8 \b, 60 fps
  1183. >>11 byte &0x04 \b, Constrained
  1184. # MPEG ADTS Audio (*.mpx/mxa/aac)
  1185. # from dreesen@math.fu-berlin.de
  1186. # modified to fully support MPEG ADTS
  1187. # MP3, M1A
  1188. # modified by Joerg Jenderek
  1189. # GRR the original test are too common for many DOS files
  1190. # so don't accept as MP3 until we've tested the rate
  1191. # But also beat GEMDOS fonts
  1192. 0 beshort&0xFFFE 0xFFFA
  1193. # rates
  1194. >2 byte&0xF0 !0
  1195. >>2 byte&0xF0 !0xF0 MPEG ADTS, layer III, v1
  1196. !:strength +20
  1197. !:mime audio/mpeg
  1198. >2 byte&0xF0 0x10 \b, 32 kbps
  1199. >2 byte&0xF0 0x20 \b, 40 kbps
  1200. >2 byte&0xF0 0x30 \b, 48 kbps
  1201. >2 byte&0xF0 0x40 \b, 56 kbps
  1202. >2 byte&0xF0 0x50 \b, 64 kbps
  1203. >2 byte&0xF0 0x60 \b, 80 kbps
  1204. >2 byte&0xF0 0x70 \b, 96 kbps
  1205. >2 byte&0xF0 0x80 \b, 112 kbps
  1206. >2 byte&0xF0 0x90 \b, 128 kbps
  1207. >2 byte&0xF0 0xA0 \b, 160 kbps
  1208. >2 byte&0xF0 0xB0 \b, 192 kbps
  1209. >2 byte&0xF0 0xC0 \b, 224 kbps
  1210. >2 byte&0xF0 0xD0 \b, 256 kbps
  1211. >2 byte&0xF0 0xE0 \b, 320 kbps
  1212. # timing
  1213. >2 byte&0x0C 0x00 \b, 44.1 kHz
  1214. >2 byte&0x0C 0x04 \b, 48 kHz
  1215. >2 byte&0x0C 0x08 \b, 32 kHz
  1216. # channels/options
  1217. >3 byte&0xC0 0x00 \b, Stereo
  1218. >3 byte&0xC0 0x40 \b, JntStereo
  1219. >3 byte&0xC0 0x80 \b, 2x Monaural
  1220. >3 byte&0xC0 0xC0 \b, Monaural
  1221. #>1 byte ^0x01 \b, Data Verify
  1222. #>2 byte &0x02 \b, Packet Pad
  1223. #>2 byte &0x01 \b, Custom Flag
  1224. #>3 byte &0x08 \b, Copyrighted
  1225. #>3 byte &0x04 \b, Original Source
  1226. #>3 byte&0x03 1 \b, NR: 50/15 ms
  1227. #>3 byte&0x03 3 \b, NR: CCIT J.17
  1228. # MP2, M1A
  1229. 0 beshort&0xFFFE 0xFFFC MPEG ADTS, layer II, v1
  1230. !:mime audio/mpeg
  1231. # rates
  1232. >2 byte&0xF0 0x10 \b, 32 kbps
  1233. >2 byte&0xF0 0x20 \b, 48 kbps
  1234. >2 byte&0xF0 0x30 \b, 56 kbps
  1235. >2 byte&0xF0 0x40 \b, 64 kbps
  1236. >2 byte&0xF0 0x50 \b, 80 kbps
  1237. >2 byte&0xF0 0x60 \b, 96 kbps
  1238. >2 byte&0xF0 0x70 \b, 112 kbps
  1239. >2 byte&0xF0 0x80 \b, 128 kbps
  1240. >2 byte&0xF0 0x90 \b, 160 kbps
  1241. >2 byte&0xF0 0xA0 \b, 192 kbps
  1242. >2 byte&0xF0 0xB0 \b, 224 kbps
  1243. >2 byte&0xF0 0xC0 \b, 256 kbps
  1244. >2 byte&0xF0 0xD0 \b, 320 kbps
  1245. >2 byte&0xF0 0xE0 \b, 384 kbps
  1246. # timing
  1247. >2 byte&0x0C 0x00 \b, 44.1 kHz
  1248. >2 byte&0x0C 0x04 \b, 48 kHz
  1249. >2 byte&0x0C 0x08 \b, 32 kHz
  1250. # channels/options
  1251. >3 byte&0xC0 0x00 \b, Stereo
  1252. >3 byte&0xC0 0x40 \b, JntStereo
  1253. >3 byte&0xC0 0x80 \b, 2x Monaural
  1254. >3 byte&0xC0 0xC0 \b, Monaural
  1255. #>1 byte ^0x01 \b, Data Verify
  1256. #>2 byte &0x02 \b, Packet Pad
  1257. #>2 byte &0x01 \b, Custom Flag
  1258. #>3 byte &0x08 \b, Copyrighted
  1259. #>3 byte &0x04 \b, Original Source
  1260. #>3 byte&0x03 1 \b, NR: 50/15 ms
  1261. #>3 byte&0x03 3 \b, NR: CCIT J.17
  1262. # MPA, M1A
  1263. # updated by Joerg Jenderek
  1264. # GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
  1265. # GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
  1266. # FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries
  1267. #0 beshort&0xFFFE 0xFFFE
  1268. #>2 ubyte&0xF0 >0x0F
  1269. #>>2 ubyte&0xF0 <0xE1 MPEG ADTS, layer I, v1
  1270. ## rate
  1271. #>>>2 byte&0xF0 0x10 \b, 32 kbps
  1272. #>>>2 byte&0xF0 0x20 \b, 64 kbps
  1273. #>>>2 byte&0xF0 0x30 \b, 96 kbps
  1274. #>>>2 byte&0xF0 0x40 \b, 128 kbps
  1275. #>>>2 byte&0xF0 0x50 \b, 160 kbps
  1276. #>>>2 byte&0xF0 0x60 \b, 192 kbps
  1277. #>>>2 byte&0xF0 0x70 \b, 224 kbps
  1278. #>>>2 byte&0xF0 0x80 \b, 256 kbps
  1279. #>>>2 byte&0xF0 0x90 \b, 288 kbps
  1280. #>>>2 byte&0xF0 0xA0 \b, 320 kbps
  1281. #>>>2 byte&0xF0 0xB0 \b, 352 kbps
  1282. #>>>2 byte&0xF0 0xC0 \b, 384 kbps
  1283. #>>>2 byte&0xF0 0xD0 \b, 416 kbps
  1284. #>>>2 byte&0xF0 0xE0 \b, 448 kbps
  1285. ## timing
  1286. #>>>2 byte&0x0C 0x00 \b, 44.1 kHz
  1287. #>>>2 byte&0x0C 0x04 \b, 48 kHz
  1288. #>>>2 byte&0x0C 0x08 \b, 32 kHz
  1289. ## channels/options
  1290. #>>>3 byte&0xC0 0x00 \b, Stereo
  1291. #>>>3 byte&0xC0 0x40 \b, JntStereo
  1292. #>>>3 byte&0xC0 0x80 \b, 2x Monaural
  1293. #>>>3 byte&0xC0 0xC0 \b, Monaural
  1294. ##>1 byte ^0x01 \b, Data Verify
  1295. ##>2 byte &0x02 \b, Packet Pad
  1296. ##>2 byte &0x01 \b, Custom Flag
  1297. ##>3 byte &0x08 \b, Copyrighted
  1298. ##>3 byte &0x04 \b, Original Source
  1299. ##>3 byte&0x03 1 \b, NR: 50/15 ms
  1300. ##>3 byte&0x03 3 \b, NR: CCIT J.17
  1301. # MP3, M2A
  1302. 0 beshort&0xFFFE 0xFFF2 MPEG ADTS, layer III, v2
  1303. !:mime audio/mpeg
  1304. # rate
  1305. >2 byte&0xF0 0x10 \b, 8 kbps
  1306. >2 byte&0xF0 0x20 \b, 16 kbps
  1307. >2 byte&0xF0 0x30 \b, 24 kbps
  1308. >2 byte&0xF0 0x40 \b, 32 kbps
  1309. >2 byte&0xF0 0x50 \b, 40 kbps
  1310. >2 byte&0xF0 0x60 \b, 48 kbps
  1311. >2 byte&0xF0 0x70 \b, 56 kbps
  1312. >2 byte&0xF0 0x80 \b, 64 kbps
  1313. >2 byte&0xF0 0x90 \b, 80 kbps
  1314. >2 byte&0xF0 0xA0 \b, 96 kbps
  1315. >2 byte&0xF0 0xB0 \b, 112 kbps
  1316. >2 byte&0xF0 0xC0 \b, 128 kbps
  1317. >2 byte&0xF0 0xD0 \b, 144 kbps
  1318. >2 byte&0xF0 0xE0 \b, 160 kbps
  1319. # timing
  1320. >2 byte&0x0C 0x00 \b, 22.05 kHz
  1321. >2 byte&0x0C 0x04 \b, 24 kHz
  1322. >2 byte&0x0C 0x08 \b, 16 kHz
  1323. # channels/options
  1324. >3 byte&0xC0 0x00 \b, Stereo
  1325. >3 byte&0xC0 0x40 \b, JntStereo
  1326. >3 byte&0xC0 0x80 \b, 2x Monaural
  1327. >3 byte&0xC0 0xC0 \b, Monaural
  1328. #>1 byte ^0x01 \b, Data Verify
  1329. #>2 byte &0x02 \b, Packet Pad
  1330. #>2 byte &0x01 \b, Custom Flag
  1331. #>3 byte &0x08 \b, Copyrighted
  1332. #>3 byte &0x04 \b, Original Source
  1333. #>3 byte&0x03 1 \b, NR: 50/15 ms
  1334. #>3 byte&0x03 3 \b, NR: CCIT J.17
  1335. # MP2, M2A
  1336. 0 beshort&0xFFFE 0xFFF4 MPEG ADTS, layer II, v2
  1337. !:mime audio/mpeg
  1338. # rate
  1339. >2 byte&0xF0 0x10 \b, 8 kbps
  1340. >2 byte&0xF0 0x20 \b, 16 kbps
  1341. >2 byte&0xF0 0x30 \b, 24 kbps
  1342. >2 byte&0xF0 0x40 \b, 32 kbps
  1343. >2 byte&0xF0 0x50 \b, 40 kbps
  1344. >2 byte&0xF0 0x60 \b, 48 kbps
  1345. >2 byte&0xF0 0x70 \b, 56 kbps
  1346. >2 byte&0xF0 0x80 \b, 64 kbps
  1347. >2 byte&0xF0 0x90 \b, 80 kbps
  1348. >2 byte&0xF0 0xA0 \b, 96 kbps
  1349. >2 byte&0xF0 0xB0 \b, 112 kbps
  1350. >2 byte&0xF0 0xC0 \b, 128 kbps
  1351. >2 byte&0xF0 0xD0 \b, 144 kbps
  1352. >2 byte&0xF0 0xE0 \b, 160 kbps
  1353. # timing
  1354. >2 byte&0x0C 0x00 \b, 22.05 kHz
  1355. >2 byte&0x0C 0x04 \b, 24 kHz
  1356. >2 byte&0x0C 0x08 \b, 16 kHz
  1357. # channels/options
  1358. >3 byte&0xC0 0x00 \b, Stereo
  1359. >3 byte&0xC0 0x40 \b, JntStereo
  1360. >3 byte&0xC0 0x80 \b, 2x Monaural
  1361. >3 byte&0xC0 0xC0 \b, Monaural
  1362. #>1 byte ^0x01 \b, Data Verify
  1363. #>2 byte &0x02 \b, Packet Pad
  1364. #>2 byte &0x01 \b, Custom Flag
  1365. #>3 byte &0x08 \b, Copyrighted
  1366. #>3 byte &0x04 \b, Original Source
  1367. #>3 byte&0x03 1 \b, NR: 50/15 ms
  1368. #>3 byte&0x03 3 \b, NR: CCIT J.17
  1369. # MPA, M2A
  1370. 0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2
  1371. !:mime audio/mpeg
  1372. # rate
  1373. >2 byte&0xF0 0x10 \b, 32 kbps
  1374. >2 byte&0xF0 0x20 \b, 48 kbps
  1375. >2 byte&0xF0 0x30 \b, 56 kbps
  1376. >2 byte&0xF0 0x40 \b, 64 kbps
  1377. >2 byte&0xF0 0x50 \b, 80 kbps
  1378. >2 byte&0xF0 0x60 \b, 96 kbps
  1379. >2 byte&0xF0 0x70 \b, 112 kbps
  1380. >2 byte&0xF0 0x80 \b, 128 kbps
  1381. >2 byte&0xF0 0x90 \b, 144 kbps
  1382. >2 byte&0xF0 0xA0 \b, 160 kbps
  1383. >2 byte&0xF0 0xB0 \b, 176 kbps
  1384. >2 byte&0xF0 0xC0 \b, 192 kbps
  1385. >2 byte&0xF0 0xD0 \b, 224 kbps
  1386. >2 byte&0xF0 0xE0 \b, 256 kbps
  1387. # timing
  1388. >2 byte&0x0C 0x00 \b, 22.05 kHz
  1389. >2 byte&0x0C 0x04 \b, 24 kHz
  1390. >2 byte&0x0C 0x08 \b, 16 kHz
  1391. # channels/options
  1392. >3 byte&0xC0 0x00 \b, Stereo
  1393. >3 byte&0xC0 0x40 \b, JntStereo
  1394. >3 byte&0xC0 0x80 \b, 2x Monaural
  1395. >3 byte&0xC0 0xC0 \b, Monaural
  1396. #>1 byte ^0x01 \b, Data Verify
  1397. #>2 byte &0x02 \b, Packet Pad
  1398. #>2 byte &0x01 \b, Custom Flag
  1399. #>3 byte &0x08 \b, Copyrighted
  1400. #>3 byte &0x04 \b, Original Source
  1401. #>3 byte&0x03 1 \b, NR: 50/15 ms
  1402. #>3 byte&0x03 3 \b, NR: CCIT J.17
  1403. # MP3, M25A
  1404. 0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5
  1405. !:mime audio/mpeg
  1406. # rate
  1407. >2 byte&0xF0 0x10 \b, 8 kbps
  1408. >2 byte&0xF0 0x20 \b, 16 kbps
  1409. >2 byte&0xF0 0x30 \b, 24 kbps
  1410. >2 byte&0xF0 0x40 \b, 32 kbps
  1411. >2 byte&0xF0 0x50 \b, 40 kbps
  1412. >2 byte&0xF0 0x60 \b, 48 kbps
  1413. >2 byte&0xF0 0x70 \b, 56 kbps
  1414. >2 byte&0xF0 0x80 \b, 64 kbps
  1415. >2 byte&0xF0 0x90 \b, 80 kbps
  1416. >2 byte&0xF0 0xA0 \b, 96 kbps
  1417. >2 byte&0xF0 0xB0 \b, 112 kbps
  1418. >2 byte&0xF0 0xC0 \b, 128 kbps
  1419. >2 byte&0xF0 0xD0 \b, 144 kbps
  1420. >2 byte&0xF0 0xE0 \b, 160 kbps
  1421. # timing
  1422. >2 byte&0x0C 0x00 \b, 11.025 kHz
  1423. >2 byte&0x0C 0x04 \b, 12 kHz
  1424. >2 byte&0x0C 0x08 \b, 8 kHz
  1425. # channels/options
  1426. >3 byte&0xC0 0x00 \b, Stereo
  1427. >3 byte&0xC0 0x40 \b, JntStereo
  1428. >3 byte&0xC0 0x80 \b, 2x Monaural
  1429. >3 byte&0xC0 0xC0 \b, Monaural
  1430. #>1 byte ^0x01 \b, Data Verify
  1431. #>2 byte &0x02 \b, Packet Pad
  1432. #>2 byte &0x01 \b, Custom Flag
  1433. #>3 byte &0x08 \b, Copyrighted
  1434. #>3 byte &0x04 \b, Original Source
  1435. #>3 byte&0x03 1 \b, NR: 50/15 ms
  1436. #>3 byte&0x03 3 \b, NR: CCIT J.17
  1437. # AAC (aka MPEG-2 NBC audio) and MPEG-4 audio
  1438. # Stored AAC streams (instead of the MP4 format)
  1439. 0 string ADIF MPEG ADIF, AAC
  1440. !:mime audio/x-hx-aac-adif
  1441. >4 byte &0x80
  1442. >>13 byte &0x10 \b, VBR
  1443. >>13 byte ^0x10 \b, CBR
  1444. >>16 byte&0x1E 0x02 \b, single stream
  1445. >>16 byte&0x1E 0x04 \b, 2 streams
  1446. >>16 byte&0x1E 0x06 \b, 3 streams
  1447. >>16 byte &0x08 \b, 4 or more streams
  1448. >>16 byte &0x10 \b, 8 or more streams
  1449. >>4 byte &0x80 \b, Copyrighted
  1450. >>13 byte &0x40 \b, Original Source
  1451. >>13 byte &0x20 \b, Home Flag
  1452. >4 byte ^0x80
  1453. >>4 byte &0x10 \b, VBR
  1454. >>4 byte ^0x10 \b, CBR
  1455. >>7 byte&0x1E 0x02 \b, single stream
  1456. >>7 byte&0x1E 0x04 \b, 2 streams
  1457. >>7 byte&0x1E 0x06 \b, 3 streams
  1458. >>7 byte &0x08 \b, 4 or more streams
  1459. >>7 byte &0x10 \b, 8 or more streams
  1460. >>4 byte &0x40 \b, Original Stream(s)
  1461. >>4 byte &0x20 \b, Home Source
  1462. # Live or stored single AAC stream (used with MPEG-2 systems)
  1463. 0 beshort&0xFFF6 0xFFF0 MPEG ADTS, AAC
  1464. !:mime audio/x-hx-aac-adts
  1465. >1 byte &0x08 \b, v2
  1466. >1 byte ^0x08 \b, v4
  1467. # profile
  1468. >>2 byte &0xC0 \b LTP
  1469. >2 byte&0xc0 0x00 \b Main
  1470. >2 byte&0xc0 0x40 \b LC
  1471. >2 byte&0xc0 0x80 \b SSR
  1472. # timing
  1473. >2 byte&0x3c 0x00 \b, 96 kHz
  1474. >2 byte&0x3c 0x04 \b, 88.2 kHz
  1475. >2 byte&0x3c 0x08 \b, 64 kHz
  1476. >2 byte&0x3c 0x0c \b, 48 kHz
  1477. >2 byte&0x3c 0x10 \b, 44.1 kHz
  1478. >2 byte&0x3c 0x14 \b, 32 kHz
  1479. >2 byte&0x3c 0x18 \b, 24 kHz
  1480. >2 byte&0x3c 0x1c \b, 22.05 kHz
  1481. >2 byte&0x3c 0x20 \b, 16 kHz
  1482. >2 byte&0x3c 0x24 \b, 12 kHz
  1483. >2 byte&0x3c 0x28 \b, 11.025 kHz
  1484. >2 byte&0x3c 0x2c \b, 8 kHz
  1485. # channels
  1486. >2 beshort&0x01c0 0x0040 \b, monaural
  1487. >2 beshort&0x01c0 0x0080 \b, stereo
  1488. >2 beshort&0x01c0 0x00c0 \b, stereo + center
  1489. >2 beshort&0x01c0 0x0100 \b, stereo+center+LFE
  1490. >2 beshort&0x01c0 0x0140 \b, surround
  1491. >2 beshort&0x01c0 0x0180 \b, surround + LFE
  1492. >2 beshort &0x01C0 \b, surround + side
  1493. #>1 byte ^0x01 \b, Data Verify
  1494. #>2 byte &0x02 \b, Custom Flag
  1495. #>3 byte &0x20 \b, Original Stream
  1496. #>3 byte &0x10 \b, Home Source
  1497. #>3 byte &0x08 \b, Copyrighted
  1498. # Live MPEG-4 audio streams (instead of RTP FlexMux)
  1499. 0 beshort&0xFFE0 0x56E0 MPEG-4 LOAS
  1500. !:mime audio/x-mp4a-latm
  1501. #>1 beshort&0x1FFF x \b, %hu byte packet
  1502. >3 byte&0xE0 0x40
  1503. >>4 byte&0x3C 0x04 \b, single stream
  1504. >>4 byte&0x3C 0x08 \b, 2 streams
  1505. >>4 byte&0x3C 0x0C \b, 3 streams
  1506. >>4 byte &0x08 \b, 4 or more streams
  1507. >>4 byte &0x20 \b, 8 or more streams
  1508. >3 byte&0xC0 0
  1509. >>4 byte&0x78 0x08 \b, single stream
  1510. >>4 byte&0x78 0x10 \b, 2 streams
  1511. >>4 byte&0x78 0x18 \b, 3 streams
  1512. >>4 byte &0x20 \b, 4 or more streams
  1513. >>4 byte &0x40 \b, 8 or more streams
  1514. # This magic isn't strong enough (matches plausible ISO-8859-1 text)
  1515. #0 beshort 0x4DE1 MPEG-4 LO-EP audio stream
  1516. #!:mime audio/x-mp4a-latm
  1517. # Summary: FLI animation format
  1518. # Created by: Daniel Quinlan <quinlan@yggdrasil.com>
  1519. # Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
  1520. 4 leshort 0xAF11
  1521. # standard FLI always has 320x200 resolution and 8 bit color
  1522. >8 leshort 320
  1523. >>10 leshort 200
  1524. >>>12 leshort 8 FLI animation, 320x200x8
  1525. !:mime video/x-fli
  1526. >>>>6 leshort x \b, %d frames
  1527. # frame speed is multiple of 1/70s
  1528. >>>>16 leshort x \b, %d/70s per frame
  1529. # Summary: FLC animation format
  1530. # Created by: Daniel Quinlan <quinlan@yggdrasil.com>
  1531. # Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
  1532. 4 leshort 0xAF12
  1533. # standard FLC always use 8 bit color
  1534. >12 leshort 8 FLC animation
  1535. !:mime video/x-flc
  1536. >>8 leshort x \b, %d
  1537. >>10 leshort x \bx%dx8
  1538. >>6 uleshort x \b, %d frames
  1539. >>16 uleshort x \b, %dms per frame
  1540. # DL animation format
  1541. # XXX - collision with most `mips' magic
  1542. #
  1543. # I couldn't find a real magic number for these, however, this
  1544. # -appears- to work. Note that it might catch other files, too, so be
  1545. # careful!
  1546. #
  1547. # Note that title and author appear in the two 20-byte chunks
  1548. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  1549. # 255 (hex FF)! The DL format is really bad.
  1550. #
  1551. #0 byte 1 DL version 1, medium format (160x100, 4 images/screen)
  1552. #!:mime video/x-unknown
  1553. #>42 byte x - %d screens,
  1554. #>43 byte x %d commands
  1555. #0 byte 2 DL version 2
  1556. #!:mime video/x-unknown
  1557. #>1 byte 1 - large format (320x200,1 image/screen),
  1558. #>1 byte 2 - medium format (160x100,4 images/screen),
  1559. #>1 byte >2 - unknown format,
  1560. #>42 byte x %d screens,
  1561. #>43 byte x %d commands
  1562. # Based on empirical evidence, DL version 3 have several nulls following the
  1563. # \003. Most of them start with non-null values at hex offset 0x34 or so.
  1564. #0 string \3\0\0\0\0\0\0\0\0\0\0\0 DL version 3
  1565. # iso 13818 transport stream
  1566. #
  1567. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1)
  1568. # syncbyte 8 bit 0x47
  1569. # error_ind 1 bit -
  1570. # payload_start 1 bit 1
  1571. # priority 1 bit -
  1572. # PID 13 bit 0x0000
  1573. # scrambling 2 bit -
  1574. # adaptfld_ctrl 2 bit 1 or 3
  1575. # conti_count 4 bit -
  1576. 0 belong&0xFF5FFF10 0x47400010
  1577. >188 byte 0x47 MPEG transport stream data
  1578. !:mime video/MP2T
  1579. # DIF digital video file format <mpruett@sgi.com>
  1580. 0 belong&0xffffff00 0x1f070000 DIF
  1581. >4 byte &0x01 (DVCPRO) movie file
  1582. >4 byte ^0x01 (DV) movie file
  1583. >3 byte &0x80 (PAL)
  1584. >3 byte ^0x80 (NTSC)
  1585. # MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  1586. 0 string \x8aMNG MNG video data,
  1587. !:mime video/x-mng
  1588. >4 belong !0x0d0a1a0a CORRUPTED,
  1589. >4 belong 0x0d0a1a0a
  1590. >>16 belong x %d x
  1591. >>20 belong x %d
  1592. # JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  1593. 0 string \x8bJNG JNG video data,
  1594. !:mime video/x-jng
  1595. >4 belong !0x0d0a1a0a CORRUPTED,
  1596. >4 belong 0x0d0a1a0a
  1597. >>16 belong x %d x
  1598. >>20 belong x %d
  1599. # Vivo video (Wolfram Kleff)
  1600. 3 string \x0D\x0AVersion:Vivo Vivo video data
  1601. # ABC (alembic.io 3d models)
  1602. 0 string 0gawa ABC 3d model
  1603. # VRML (Virtual Reality Modelling Language)
  1604. 0 string/w #VRML\ V1.0\ ascii VRML 1 file
  1605. !:mime model/vrml
  1606. 0 string/w #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file
  1607. !:mime model/vrml
  1608. # X3D (Extensible 3D) [https://www.web3d.org/specifications/x3d-3.0.dtd]
  1609. # From Michel Briand <michelbriand@free.fr>
  1610. # mimetype from https://www.iana.org/assignments/media-types/model/x3d+xml
  1611. # Example https://www.web3d.org/x3d/content/examples/Basic/course/CreateX3DFromStringRandomSpheres.x3d
  1612. 0 string/w \<?xml\ version=
  1613. !:strength + 5
  1614. >20 search/1000/w \<!DOCTYPE\ X3D X3D (Extensible 3D) model xml text
  1615. !:mime model/x3d+xml
  1616. #---------------------------------------------------------------------------
  1617. # HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
  1618. # From Mark Sheppard <msheppard@climax.co.uk>, 2002-10-03
  1619. #
  1620. 0 string HVQM4 %s
  1621. >6 string >\0 v%s
  1622. >0 byte x GameCube movie,
  1623. >0x34 ubeshort x %d x
  1624. >0x36 ubeshort x %d,
  1625. >0x26 ubeshort x %dus,
  1626. >0x42 ubeshort 0 no audio
  1627. >0x42 ubeshort >0 %dHz audio
  1628. # From: Stefan A. Haubenthal <polluks@sdf.lonestar.org>
  1629. # Update: Joerg Jenderek
  1630. # URL: https://en.wikipedia.org/wiki/VOB
  1631. 0 string DVDVIDEO-VTS Video title set,
  1632. !:mime video/x-ifo
  1633. !:ext ifo/bup
  1634. >0x21 byte x v%x
  1635. 0 string DVDVIDEO-VMG Video manager,
  1636. !:mime video/x-ifo
  1637. !:ext ifo/bup
  1638. >0x21 byte x v%x
  1639. # From: Stefan A. Haubenthal <polluks@sdf.lonestar.org>
  1640. 0 string xMovieSetter MovieSetter movie
  1641. 0 string xSceneEditor MovieSetter movie
  1642. # From: Behan Webster <behanw@websterwood.com>
  1643. # NuppelVideo used by Mythtv (*.nuv)
  1644. # Note: there are two identical stanzas here differing only in the
  1645. # initial string matched. It used to be done with a regex, but we're
  1646. # trying to get rid of those.
  1647. 0 string NuppelVideo MythTV NuppelVideo
  1648. >12 string x v%s
  1649. >20 lelong x (%d
  1650. >24 lelong x \bx%d),
  1651. >36 string P \bprogressive,
  1652. >36 string I \binterlaced,
  1653. >40 ledouble x \baspect:%.2f,
  1654. >48 ledouble x \bfps:%.2f
  1655. 0 string MythTV MythTV NuppelVideo
  1656. >12 string x v%s
  1657. >20 lelong x (%d
  1658. >24 lelong x \bx%d),
  1659. >36 string P \bprogressive,
  1660. >36 string I \binterlaced,
  1661. >40 ledouble x \baspect:%.2f,
  1662. >48 ledouble x \bfps:%.2f
  1663. # MPEG file
  1664. # MPEG sequences
  1665. # FIXME: This section is from the old magic.mime file and needs
  1666. # integrating with the rest
  1667. #0 belong 0x000001BA
  1668. #>4 byte &0x40
  1669. #!:mime video/mp2p
  1670. #>4 byte ^0x40
  1671. #!:mime video/mpeg
  1672. #0 belong 0x000001BB
  1673. #!:mime video/mpeg
  1674. #0 belong 0x000001B0
  1675. #!:mime video/mp4v-es
  1676. #0 belong 0x000001B5
  1677. #!:mime video/mp4v-es
  1678. #0 belong 0x000001B3
  1679. #!:mime video/mpv
  1680. #0 belong&0xFF5FFF10 0x47400010
  1681. #!:mime video/mp2t
  1682. #0 belong 0x00000001
  1683. #>4 byte&0x1F 0x07
  1684. #!:mime video/h264
  1685. # Type: Bink Video
  1686. # Extension: .bik
  1687. # URL: https://wiki.multimedia.cx/index.php?title=Bink_Container
  1688. # From: <hoehle@users.sourceforge.net> 2008-07-18
  1689. 0 name bik
  1690. #>4 ulelong x size %d
  1691. >20 ulelong x \b, %d
  1692. >24 ulelong x \bx%d
  1693. >8 ulelong x \b, %d frames
  1694. >32 ulelong x at rate %d/
  1695. >28 ulelong >1 \b%d
  1696. >40 ulelong =0 \b, no audio
  1697. >40 ulelong !0 \b, %d audio track
  1698. >>40 ulelong !1 \bs
  1699. # follow properties of the first audio track only
  1700. >>48 uleshort x %dHz
  1701. >>51 byte&0x20 0 mono
  1702. >>51 byte&0x20 !0 stereo
  1703. #>>51 byte&0x10 0 FFT
  1704. #>>51 byte&0x10 !0 DCT
  1705. 0 string BIK
  1706. >3 regex =[bdfghi] Bink Video rev.%s
  1707. >>0 use bik
  1708. 0 string KB2
  1709. >3 regex =[adfghi] Bink Video 2 rev.%s
  1710. >>0 use bik
  1711. # Type: NUT Container
  1712. # URL: https://wiki.multimedia.cx/index.php?title=NUT
  1713. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1714. 0 string nut/multimedia\ container\0 NUT multimedia container
  1715. # Type: Nullsoft Video (NSV)
  1716. # URL: https://wiki.multimedia.cx/index.php?title=Nullsoft_Video
  1717. # From: Mike Melanson <mike@multimedia.cx>
  1718. 0 string NSVf Nullsoft Video
  1719. # Type: REDCode Video
  1720. # URL: https://www.red.com/ ; https://wiki.multimedia.cx/index.php?title=REDCode
  1721. # From: Mike Melanson <mike@multimedia.cx>
  1722. 4 string RED1 REDCode Video
  1723. # Type: MTV Multimedia File
  1724. # URL: https://wiki.multimedia.cx/index.php?title=MTV
  1725. # From: Mike Melanson <mike@multimedia.cx>
  1726. 0 string AMVS MTV Multimedia File
  1727. # Type: ARMovie
  1728. # URL: https://wiki.multimedia.cx/index.php?title=ARMovie
  1729. # From: Mike Melanson <mike@multimedia.cx>
  1730. 0 string ARMovie\012 ARMovie
  1731. # Type: Interplay MVE Movie
  1732. # URL: https://wiki.multimedia.cx/index.php?title=Interplay_MVE
  1733. # From: Mike Melanson <mike@multimedia.cx>
  1734. 0 string Interplay\040MVE\040File\032 Interplay MVE Movie
  1735. # Type: Windows Television DVR File
  1736. # URL: https://wiki.multimedia.cx/index.php?title=WTV
  1737. # From: Mike Melanson <mike@mutlimedia.cx>
  1738. # This takes the form of a Windows-style GUID
  1739. 0 bequad 0xB7D800203749DA11
  1740. >8 bequad 0xA64E0007E95EAD8D Windows Television DVR Media
  1741. # Type: Sega FILM/CPK Multimedia
  1742. # URL: https://wiki.multimedia.cx/index.php?title=Sega_FILM
  1743. # From: Mike Melanson <mike@multimedia.cx>
  1744. 0 string FILM Sega FILM/CPK Multimedia,
  1745. >32 belong x %d x
  1746. >28 belong x %d
  1747. # Type: Nintendo THP Multimedia
  1748. # URL: https://wiki.multimedia.cx/index.php?title=THP
  1749. # From: Mike Melanson <mike@multimedia.cx>
  1750. 0 string THP\0 Nintendo THP Multimedia
  1751. # Type: BBC Dirac Video
  1752. # URL: https://wiki.multimedia.cx/index.php?title=Dirac
  1753. # From: Mike Melanson <mike@multimedia.cx>
  1754. 0 string BBCD BBC Dirac Video
  1755. # Type: RAD Game Tools Smacker Multimedia
  1756. # URL: https://wiki.multimedia.cx/index.php?title=Smacker
  1757. # From: Mike Melanson <mike@multimedia.cx>
  1758. 0 string SMK RAD Game Tools Smacker Multimedia
  1759. >3 byte x version %c,
  1760. >4 lelong x %d x
  1761. >8 lelong x %d,
  1762. >12 lelong x %d frames
  1763. # Material Exchange Format
  1764. # More information:
  1765. # https://en.wikipedia.org/wiki/Material_Exchange_Format
  1766. # http://www.freemxf.org/
  1767. 0 string \x06\x0e\x2b\x34\x02\x05\x01\x01\x0d\x01\x02\x01\x01\x02 Material exchange container format
  1768. !:ext mxf
  1769. !:mime application/mxf
  1770. # Recognize LucasArts Smush video files (cf.
  1771. # https://wiki.multimedia.cx/index.php/Smush)
  1772. 0 string ANIM
  1773. >8 string AHDR LucasArts Smush Animation Format (SAN) video
  1774. 0 string SANM
  1775. >8 string SHDR LucasArts Smush v2 (SANM) video
  1776. # Type: Scaleform video
  1777. # Extension: .usm
  1778. # URL: https://wiki.multimedia.cx/index.php/USM
  1779. # From: David Korth <gerbilsoft@gerbilsoft.com>
  1780. 0 string CRID
  1781. >32 string @UTF Scaleform video
  1782. # http://www.jerrysguide.com/tips/demystify-tvs-file-format.html
  1783. 0 string TVS\015\012
  1784. >&0 string Version\040 TeamViewer Session File
  1785. >>&0 string x \b, version %s
  1786. #------------------------------------------------------------------------------
  1787. # $File: aout,v 1.1 2013/01/09 22:37:23 christos Exp $
  1788. # aout: file(1) magic for a.out executable/object/etc entries that
  1789. # handle executables on multiple platforms.
  1790. #
  1791. #
  1792. # Little-endian 32-bit-int a.out, merged from bsdi (for BSD/OS, from
  1793. # BSDI), netbsd, and vax (for UNIX/32V and BSD)
  1794. #
  1795. # XXX - is there anything we can look at to distinguish BSD/OS 386 from
  1796. # NetBSD 386 from various VAX binaries? The BSD/OS shared library flag
  1797. # works only for binaries using shared libraries. Grabbing the entry
  1798. # point from the a.out header, using it to find the first code executed
  1799. # in the program, and looking at that might help.
  1800. #
  1801. 0 lelong 0407 a.out little-endian 32-bit executable
  1802. >16 lelong >0 not stripped
  1803. >32 byte 0x6a (uses BSD/OS shared libs)
  1804. 0 lelong 0410 a.out little-endian 32-bit pure executable
  1805. >16 lelong >0 not stripped
  1806. >32 byte 0x6a (uses BSD/OS shared libs)
  1807. 0 lelong 0413 a.out little-endian 32-bit demand paged pure executable
  1808. >16 lelong >0 not stripped
  1809. >32 byte 0x6a (uses BSD/OS shared libs)
  1810. #
  1811. # Big-endian 32-bit-int a.out, merged from sun (for old 68010 SunOS a.out),
  1812. # mips (for old 68020(!) SGI a.out), and netbsd (for old big-endian a.out).
  1813. #
  1814. # XXX - is there anything we can look at to distinguish old SunOS 68010
  1815. # from old 68020 IRIX from old NetBSD? Again, I guess we could look at
  1816. # the first instruction or instructions in the program.
  1817. #
  1818. 0 belong 0407 a.out big-endian 32-bit executable
  1819. >16 belong >0 not stripped
  1820. 0 belong 0410 a.out big-endian 32-bit pure executable
  1821. >16 belong >0 not stripped
  1822. 0 belong 0413 a.out big-endian 32-bit demand paged executable
  1823. >16 belong >0 not stripped
  1824. #------------------------------------------------------------------------------
  1825. # $File: apache,v 1.1 2017/04/11 14:52:15 christos Exp $
  1826. # apache: file(1) magic for Apache Big Data formats
  1827. # Avro files
  1828. 0 string Obj Apache Avro
  1829. >3 byte x version %d
  1830. # ORC files
  1831. # Important information is in file footer, which we can't index to :(
  1832. 0 string ORC Apache ORC
  1833. # Parquet files
  1834. 0 string PAR1 Apache Parquet
  1835. # Hive RC files
  1836. 0 string RCF Apache Hive RC file
  1837. >3 byte x version %d
  1838. # Sequence files (and the careless first version of RC file)
  1839. 0 string SEQ
  1840. >3 byte <6 Apache Hadoop Sequence file version %d
  1841. >3 byte >6 Apache Hadoop Sequence file version %d
  1842. >3 byte =6
  1843. >>5 string org.apache.hadoop.hive.ql.io.RCFile$KeyBuffer Apache Hive RC file version 0
  1844. >>3 default x Apache Hadoop Sequence file version 6
  1845. #------------------------------------------------------------------------------
  1846. # $File: apl,v 1.6 2009/09/19 16:28:07 christos Exp $
  1847. # apl: file(1) magic for APL (see also "pdp" and "vax" for other APL
  1848. # workspaces)
  1849. #
  1850. 0 long 0100554 APL workspace (Ken's original?)
  1851. #------------------------------------------------------------------------------
  1852. # $File: apple,v 1.44 2019/10/18 15:21:02 christos Exp $
  1853. # apple: file(1) magic for Apple file formats
  1854. #
  1855. 0 search/1/t FiLeStArTfIlEsTaRt binscii (apple ][) text
  1856. 0 string \x0aGL Binary II (apple ][) data
  1857. 0 string \x76\xff Squeezed (apple ][) data
  1858. 0 string NuFile NuFile archive (apple ][) data
  1859. 0 string N\xf5F\xe9l\xe5 NuFile archive (apple ][) data
  1860. 0 belong 0x00051600 AppleSingle encoded Macintosh file
  1861. 0 belong 0x00051607 AppleDouble encoded Macintosh file
  1862. # Type: Apple Emulator WOZ format
  1863. # From: Greg Wildman <greg@apple2.org.za>
  1864. # Ref: https://applesaucefdc.com/woz/reference/
  1865. # Ref: https://applesaucefdc.com/woz/reference2/
  1866. #
  1867. # Note: The following test are mostly identical. I would rather not
  1868. # use a regex to identify the WOZ format number.
  1869. 0 string WOZ1
  1870. >4 string \xFF\x0A\x0D\x0A Apple ][ WOZ 1.0 Disk Image
  1871. >12 string INFO
  1872. >>21 byte 01 \b, 5.25 inch
  1873. >>21 byte 02 \b, 3.5 inch
  1874. >>22 byte 01 \b, write protected
  1875. >>23 byte 01 \b, cross track synchronized
  1876. >>25 string/T x \b, %.32s
  1877. 0 string WOZ2
  1878. >4 string \xFF\x0A\x0D\x0A Apple ][ WOZ 2.0 Disk Image
  1879. >12 string INFO
  1880. >>21 byte 01 \b, 5.25 inch
  1881. >>21 byte 02 \b, 3.5 inch
  1882. >>22 byte 01 \b, write protected
  1883. >>23 byte 01 \b, cross track synchronized
  1884. >>25 string/T x \b, %.32s
  1885. # Type: Apple Emulator disk images
  1886. # From: Greg Wildman <greg@apple2.org.za>
  1887. # ProDOS boot loader?
  1888. 0 string \x01\x38\xB0\x03\x4C Apple ProDOS Image
  1889. # Detect Volume Directory block ($02)
  1890. >0x400 string \x00\x00\x03\x00
  1891. >>0x404 byte &0xF0
  1892. >>>0x405 string x \b, Volume /%s
  1893. >>>0x429 leshort x \b, %u Blocks
  1894. # ProDOS ordered ?
  1895. >0xb00 string \x00\x00\x03\x00
  1896. >>0xb04 byte &0xF0
  1897. >>>0xb05 string x \b, Volume /%s
  1898. >>>0xb29 leshort x \b, %u Blocks
  1899. #
  1900. # DOS3.3 boot loader?
  1901. 0 string \x01\xA5\x27\xC9\x09\xD0\x18\xA5\x2B
  1902. >0x11001 string \x11\x0F\x03 Apple DOS 3.3 Image
  1903. >>0x11006 byte x \b, Volume %u
  1904. >>0x11034 byte x \b, %u Tracks
  1905. >>0x11035 byte x \b, %u Sectors
  1906. >>0x11036 leshort x \b, %u bytes per sector
  1907. # DOS3.2 ?
  1908. >0x11001 string \x11\x0C\x02 Apple DOS 3.2 Image
  1909. >>0x11006 byte x \b, Volume %u
  1910. >>0x11034 byte x \b, %u Tracks
  1911. >>0x11035 byte x \b, %u Sectors
  1912. >>0x11036 leshort x \b, %u bytes per sector
  1913. # DOS3.1 ?
  1914. >0x11001 string \x11\x0C\x01
  1915. >>0x11c00 string \x00\x11\x0B Apple DOS 3.1 Image
  1916. #
  1917. # Pascal boot loader?
  1918. 0 string \x01\xE0\x60\xF0\x03\x4C\xE3\x08\xAD
  1919. >0xd6 pstring SYSTEM.APPLE
  1920. >>0xb00 leshort 0x0000
  1921. >>>0xb04 leshort 0x0000 Apple Pascal Image
  1922. >>>>0xb06 pstring x \b, Volume %s:
  1923. >>>>0xb0e leshort x \b, %u Blocks
  1924. >>>>0xb10 leshort x \b, %u Files
  1925. #
  1926. # Diversi Dos boot loader?
  1927. 0 string \x01\xA8\xAD\x81\xC0\xEE\x09\x08\xAD
  1928. >0x11001 string \x11\x0F\x03 Apple Diversi Dos Image
  1929. >>0x11006 byte x \b, Volume %u
  1930. >>0x11034 byte x \b, %u Tracks
  1931. >>0x11035 byte x \b, %u Sectors
  1932. >>0x11036 leshort x \b, %u bytes per sector
  1933. # Type: Apple Emulator 2IMG format
  1934. # From: Radek Vokal <rvokal@redhat.com>
  1935. # Update: Greg Wildman <greg@apple2.org.za>
  1936. 0 string 2IMG Apple ][ 2IMG Disk Image
  1937. >4 clear x
  1938. >4 string XGS! \b, XGS
  1939. >4 string CTKG \b, Catakig
  1940. >4 string ShIm \b, Sheppy's ImageMaker
  1941. >4 string SHEP \b, Sheppy's ImageMaker
  1942. >4 string WOOF \b, Sweet 16
  1943. >4 string B2TR \b, Bernie ][ the Rescue
  1944. >4 string \!nfc \b, ASIMOV2
  1945. >4 string \>BD\< \b, Brutal Deluxe's Cadius
  1946. >4 string CdrP \b, CiderPress
  1947. >4 string Vi][ \b, Virtual ][
  1948. >4 string PRFS \b, ProFUSE
  1949. >4 string FISH \b, FishWings
  1950. >4 string RVLW \b, Revival for Windows
  1951. >4 default x
  1952. >>4 string x \b, Creator tag "%-4.4s"
  1953. >0xc byte 00 \b, DOS 3.3 sector order
  1954. >>0x10 byte 00 \b, Volume 254
  1955. >>0x10 byte&0x7f x \b, Volume %u
  1956. >0xc byte 01 \b, ProDOS sector order
  1957. # Detect Volume Directory block ($02) + 2mg header offset
  1958. >>0x440 string \x00\x00\x03\x00
  1959. >>>0x444 byte &0xF0
  1960. >>>>0x445 string x \b, Volume /%s
  1961. >>>>0x469 leshort x \b, %u Blocks
  1962. >0xc byte 02 \b, NIB data
  1963. # magic for Newton PDA package formats
  1964. # from Ruda Moura <ruda@helllabs.org>
  1965. 0 string package0 Newton package, NOS 1.x,
  1966. >12 belong &0x80000000 AutoRemove,
  1967. >12 belong &0x40000000 CopyProtect,
  1968. >12 belong &0x10000000 NoCompression,
  1969. >12 belong &0x04000000 Relocation,
  1970. >12 belong &0x02000000 UseFasterCompression,
  1971. >16 belong x version %d
  1972. 0 string package1 Newton package, NOS 2.x,
  1973. >12 belong &0x80000000 AutoRemove,
  1974. >12 belong &0x40000000 CopyProtect,
  1975. >12 belong &0x10000000 NoCompression,
  1976. >12 belong &0x04000000 Relocation,
  1977. >12 belong &0x02000000 UseFasterCompression,
  1978. >16 belong x version %d
  1979. 0 string package4 Newton package,
  1980. >8 byte 8 NOS 1.x,
  1981. >8 byte 9 NOS 2.x,
  1982. >12 belong &0x80000000 AutoRemove,
  1983. >12 belong &0x40000000 CopyProtect,
  1984. >12 belong &0x10000000 NoCompression,
  1985. # The following entries for the Apple II are for files that have
  1986. # been transferred as raw binary data from an Apple, without having
  1987. # been encapsulated by any of the above archivers.
  1988. #
  1989. # In general, Apple II formats are hard to identify because Apple DOS
  1990. # and especially Apple ProDOS have strong typing in the file system and
  1991. # therefore programmers never felt much need to include type information
  1992. # in the files themselves.
  1993. #
  1994. # Eric Fischer <enf@pobox.com>
  1995. # AppleWorks word processor:
  1996. # URL: https://en.wikipedia.org/wiki/AppleWorks
  1997. # Reference: http://www.gno.org/pub/apple2/doc/apple/filetypes/ftn.1a.xxxx
  1998. # Update: Joerg Jenderek
  1999. # NOTE:
  2000. # The "O" is really the magic number, but that's so common that it's
  2001. # necessary to check the tab stops that follow it to avoid false positives.
  2002. # and/or look for unused bits of booleans bytes like zoom, paginated, mail merge
  2003. # the newer AppleWorks is from claris with extension CWK
  2004. 4 string O
  2005. # test for unused bits of zoom- , paginated-boolean bytes
  2006. >84 ubequad ^0x00Fe00000000Fe00
  2007. # look for tabstop definitions "=" no tab, "|" no tab
  2008. # "<" left tab,"^" center tab,">" right tab, "." decimal tab,
  2009. # unofficial "!" other , "\x8a" other
  2010. # official only if SFMinVers is nonzero
  2011. >>5 regex/s [=.<>|!^\x8a]{79} AppleWorks Word Processor
  2012. # AppleWorks Word Processor File (Apple II)
  2013. # ./apple (version 5.25) labeled the entry as "AppleWorks word processor data"
  2014. # application/x-appleworks is mime type for claris version with cwk extension
  2015. !:mime application/x-appleworks3
  2016. # http://home.earthlink.net/~hughhood/appleiiworksenvoy/
  2017. # ('p' + 1-byte ProDOS File Type + 2-byte ProDOS Aux Type')
  2018. # $70 $1A $F8 $FF is this the apple type ?
  2019. #:apple pdosp^Z\xf8\xff
  2020. !:ext awp
  2021. # minimum version needed to read this files. SFMinVers (0 , 30~3.0 )
  2022. >>>183 ubyte 30 3.0
  2023. >>>183 ubyte !30
  2024. >>>>183 ubyte !0 0x%x
  2025. # usual tabstop start sequence "=====<"
  2026. >>>5 string x \b, tabstop ruler "%6.6s"
  2027. # tabstop ruler
  2028. #>>>5 string >\0 \b, tabstops "%-79s"
  2029. # zoom switch
  2030. >>>85 byte&0x01 >0 \b, zoomed
  2031. # whether paginated
  2032. >>>90 byte&0x01 >0 \b, paginated
  2033. # contains any mail-merge commands
  2034. >>>92 byte&0x01 >0 \b, with mail merge
  2035. # left margin in 1/10 inches ( normally 0 or 10 )
  2036. >>>91 ubyte >0
  2037. >>>>91 ubyte x \b, %d/10 inch left margin
  2038. # AppleWorks database:
  2039. #
  2040. # This isn't really a magic number, but it's the closest thing to one
  2041. # that I could find. The 1 and 2 really mean "order in which you defined
  2042. # categories" and "left to right, top to bottom," respectively; the D and R
  2043. # mean that the cursor should move either down or right when you press Return.
  2044. #30 string \x01D AppleWorks database data
  2045. #30 string \x02D AppleWorks database data
  2046. #30 string \x01R AppleWorks database data
  2047. #30 string \x02R AppleWorks database data
  2048. # AppleWorks spreadsheet:
  2049. #
  2050. # Likewise, this isn't really meant as a magic number. The R or C means
  2051. # row- or column-order recalculation; the A or M means automatic or manual
  2052. # recalculation.
  2053. #131 string RA AppleWorks spreadsheet data
  2054. #131 string RM AppleWorks spreadsheet data
  2055. #131 string CA AppleWorks spreadsheet data
  2056. #131 string CM AppleWorks spreadsheet data
  2057. # Applesoft BASIC:
  2058. #
  2059. # This is incredibly sloppy, but will be true if the program was
  2060. # written at its usual memory location of 2048 and its first line
  2061. # number is less than 256. Yuck.
  2062. # update by Joerg Jenderek at Feb 2013
  2063. # GRR: this test is still too general as it catches also Gujin BOOT144.SYS (0xfa080000)
  2064. #0 belong&0xff00ff 0x80000 Applesoft BASIC program data
  2065. 0 belong&0x00ff00ff 0x00080000
  2066. # assuming that line number must be positive
  2067. >2 leshort >0 Applesoft BASIC program data, first line number %d
  2068. #>2 leshort x \b, first line number %d
  2069. # ORCA/EZ assembler:
  2070. #
  2071. # This will not identify ORCA/M source files, since those have
  2072. # some sort of date code instead of the two zero bytes at 6 and 7
  2073. # XXX Conflicts with ELF
  2074. #4 belong&0xff00ffff 0x01000000 ORCA/EZ assembler source data
  2075. #>5 byte x \b, build number %d
  2076. # Broderbund Fantavision
  2077. #
  2078. # I don't know what these values really mean, but they seem to recur.
  2079. # Will they cause too many conflicts?
  2080. # Probably :-)
  2081. #2 belong&0xFF00FF 0x040008 Fantavision movie data
  2082. # Some attempts at images.
  2083. #
  2084. # These are actually just bit-for-bit dumps of the frame buffer, so
  2085. # there's really no reasonably way to distinguish them except for their
  2086. # address (if preserved) -- 8192 or 16384 -- and their length -- 8192
  2087. # or, occasionally, 8184.
  2088. #
  2089. # Nevertheless this will manage to catch a lot of images that happen
  2090. # to have a solid-colored line at the bottom of the screen.
  2091. # GRR: Magic too weak
  2092. #8144 string \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F Apple II image with white background
  2093. #8144 string \x55\x2A\x55\x2A\x55\x2A\x55\x2A Apple II image with purple background
  2094. #8144 string \x2A\x55\x2A\x55\x2A\x55\x2A\x55 Apple II image with green background
  2095. #8144 string \xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA Apple II image with blue background
  2096. #8144 string \xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5 Apple II image with orange background
  2097. # Beagle Bros. Apple Mechanic fonts
  2098. 0 belong&0xFF00FFFF 0x6400D000 Apple Mechanic font
  2099. # Apple Universal Disk Image Format (UDIF) - dmg files.
  2100. # From Johan Gade.
  2101. # These entries are disabled for now until we fix the following issues.
  2102. #
  2103. # Note there might be some problems with the "VAX COFF executable"
  2104. # entry. Note this entry should be placed before the mac filesystem section,
  2105. # particularly the "Apple Partition data" entry.
  2106. #
  2107. # The intended meaning of these tests is, that the file is only of the
  2108. # specified type if both of the lines are correct - i.e. if the first
  2109. # line matches and the second doesn't then it is not of that type.
  2110. #
  2111. #0 long 0x7801730d
  2112. #>4 long 0x62626060 UDIF read-only zlib-compressed image (UDZO)
  2113. #
  2114. # Note that this entry is recognized correctly by the "Apple Partition
  2115. # data" entry - however since this entry is more specific - this
  2116. # information seems to be more useful.
  2117. #0 long 0x45520200
  2118. #>0x410 string disk\ image UDIF read/write image (UDRW)
  2119. # From: Toby Peterson <toby@apple.com>
  2120. 0 string bplist00 Apple binary property list
  2121. # Apple binary property list (bplist)
  2122. # Assumes version bytes are hex.
  2123. # Provides content hints for version 0 files. Assumes that the root
  2124. # object is the first object (true for CoreFoundation implementation).
  2125. # From: David Remahl <dremahl@apple.com>
  2126. 0 string bplist
  2127. >6 byte x \bCoreFoundation binary property list data, version 0x%c
  2128. >>7 byte x \b%c
  2129. >6 string 00 \b
  2130. >>8 byte&0xF0 0x00 \b
  2131. >>>8 byte&0x0F 0x00 \b, root type: null
  2132. >>>8 byte&0x0F 0x08 \b, root type: false boolean
  2133. >>>8 byte&0x0F 0x09 \b, root type: true boolean
  2134. >>8 byte&0xF0 0x10 \b, root type: integer
  2135. >>8 byte&0xF0 0x20 \b, root type: real
  2136. >>8 byte&0xF0 0x30 \b, root type: date
  2137. >>8 byte&0xF0 0x40 \b, root type: data
  2138. >>8 byte&0xF0 0x50 \b, root type: ascii string
  2139. >>8 byte&0xF0 0x60 \b, root type: unicode string
  2140. >>8 byte&0xF0 0x80 \b, root type: uid (CORRUPT)
  2141. >>8 byte&0xF0 0xa0 \b, root type: array
  2142. >>8 byte&0xF0 0xd0 \b, root type: dictionary
  2143. # Apple/NeXT typedstream data
  2144. # Serialization format used by NeXT and Apple for various
  2145. # purposes in YellowStep/Cocoa, including some nib files.
  2146. # From: David Remahl <dremahl@apple.com>
  2147. 2 string typedstream NeXT/Apple typedstream data, big endian
  2148. >0 byte x \b, version %d
  2149. >0 byte <5 \b
  2150. >>13 byte 0x81 \b
  2151. >>>14 ubeshort x \b, system %d
  2152. 2 string streamtyped NeXT/Apple typedstream data, little endian
  2153. >0 byte x \b, version %d
  2154. >0 byte <5 \b
  2155. >>13 byte 0x81 \b
  2156. >>>14 uleshort x \b, system %d
  2157. #------------------------------------------------------------------------------
  2158. # CAF: Apple CoreAudio File Format
  2159. #
  2160. # Container format for high-end audio purposes.
  2161. # From: David Remahl <dremahl@apple.com>
  2162. #
  2163. 0 string caff CoreAudio Format audio file
  2164. >4 beshort <10 version %d
  2165. >6 beshort x
  2166. #------------------------------------------------------------------------------
  2167. # Keychain database files
  2168. 0 string kych Mac OS X Keychain File
  2169. #------------------------------------------------------------------------------
  2170. # Code Signing related file types
  2171. 0 belong 0xfade0c00 Mac OS X Code Requirement
  2172. >8 belong 1 (opExpr)
  2173. >4 belong x - %d bytes
  2174. 0 belong 0xfade0c01 Mac OS X Code Requirement Set
  2175. >8 belong >1 containing %d items
  2176. >4 belong x - %d bytes
  2177. 0 belong 0xfade0c02 Mac OS X Code Directory
  2178. >8 belong x version %x
  2179. >12 belong >0 flags 0x%x
  2180. >4 belong x - %d bytes
  2181. 0 belong 0xfade0cc0 Mac OS X Detached Code Signature (non-executable)
  2182. >4 belong x - %d bytes
  2183. 0 belong 0xfade0cc1 Mac OS X Detached Code Signature
  2184. >8 belong >1 (%d elements)
  2185. >4 belong x - %d bytes
  2186. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  2187. # .vdi
  2188. 4 string innotek\ VirtualBox\ Disk\ Image %s
  2189. # Apple disk partition stuff
  2190. # URL: https://en.wikipedia.org/wiki/Apple_Partition_Map
  2191. # Reference: https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/bootblock.h
  2192. # Update: Joerg Jenderek
  2193. # "ER" is APPLE_DRVR_MAP_MAGIC signature
  2194. 0 beshort 0x4552
  2195. # display Apple Driver Map (strength=50) after Syslinux bootloader (71)
  2196. #!:strength +0
  2197. # strengthen the magic by looking for used blocksizes 512 2048
  2198. >2 ubeshort&0xf1FF 0 Apple Driver Map
  2199. # last 6 bytes for padding found are 0 or end with 55AAh marker for MBR hybrid
  2200. #>>504 ubequad&0x0000FFffFFff0000 0
  2201. !:mime application/x-apple-diskimage
  2202. !:apple ????devr
  2203. # https://en.wikipedia.org/wiki/Apple_Disk_Image
  2204. !:ext dmg/iso
  2205. # sbBlkSize for driver descriptor map 512 2048
  2206. >>2 beshort x \b, blocksize %d
  2207. # sbBlkCount sometimes garbish like
  2208. # 0xb0200000 for unzlibed install_flash_player_19.0.0.245_osx.dmg
  2209. # 0xf2720100 for bunziped Firefox 48.0-2.dmg
  2210. # 0xeb02ffff for super_grub2_disk_hybrid_2.02s3.iso
  2211. # 0x00009090 by syslinux-6.03/utils/isohybrid.c
  2212. >>4 ubelong x \b, blockcount %u
  2213. # following device/driver information not very useful
  2214. # device type 0 1 (37008 garbage for super_grub2_disk_hybrid_2.02s3.iso)
  2215. >>8 ubeshort x \b, devtype %u
  2216. # device id 0 1 (37008 garbage for super_grub2_disk_hybrid_2.02s3.iso)
  2217. >>10 ubeshort x \b, devid %u
  2218. # driver data 0 (2425393296 garbage for super_grub2_disk_hybrid_2.02s3.iso)
  2219. >>12 ubelong >0
  2220. >>>12 ubelong x \b, driver data %u
  2221. # number of driver descriptors sbDrvrCount <= 61
  2222. # (37008 garbage for super_grub2_disk_hybrid_2.02s3.iso)
  2223. >>16 ubeshort x \b, driver count %u
  2224. # 61 * apple_drvr_descriptor[8]. information not very useful or same as in partition map
  2225. # >>18 use apple-driver-map
  2226. # >>26 use apple-driver-map
  2227. # # ...
  2228. # >>500 use apple-driver-map
  2229. # number of partitions is always same in every partition (map block count)
  2230. #>>0x0204 ubelong x \b, %u partitions
  2231. >>0x0204 ubelong >0 \b, contains[@0x200]:
  2232. >>>0x0200 use apple-apm
  2233. >>0x0204 ubelong >1 \b, contains[@0x400]:
  2234. >>>0x0400 use apple-apm
  2235. >>0x0204 ubelong >2 \b, contains[@0x600]:
  2236. >>>0x0600 use apple-apm
  2237. >>0x0204 ubelong >3 \b, contains[@0x800]:
  2238. >>>0x0800 use apple-apm
  2239. >>0x0204 ubelong >4 \b, contains[@0xA00]:
  2240. >>>0x0A00 use apple-apm
  2241. >>0x0204 ubelong >5 \b, contains[@0xC00]:
  2242. >>>0x0C00 use apple-apm
  2243. >>0x0204 ubelong >6 \b, contains[@0xE00]:
  2244. >>>0x0E00 use apple-apm
  2245. >>0x0204 ubelong >7 \b, contains[@0x1000]:
  2246. >>>0x1000 use apple-apm
  2247. # display apple driver descriptor map (start-block, # blocks in sbBlkSize sizes, type)
  2248. 0 name apple-driver-map
  2249. >0 ubequad !0
  2250. # descBlock first block of driver
  2251. >>0 ubelong x \b, driver start block %u
  2252. # descSize driver size in blocks
  2253. >>4 ubeshort x \b, size %u
  2254. # descType driver system type 1 701h F8FFh FFFFh
  2255. >>6 ubeshort x \b, type 0x%x
  2256. # URL: https://en.wikipedia.org/wiki/Apple_Partition_Map
  2257. # Reference: https://opensource.apple.com/source/IOStorageFamily/IOStorageFamily-116/IOApplePartitionScheme.h
  2258. # Update: Joerg Jenderek
  2259. # Yes, the 3rd and 4th bytes pmSigPad are reserved, but we use them to make the
  2260. # magic stronger.
  2261. # for apple partition map stored as a single file
  2262. 0 belong 0x504d0000
  2263. # to display Apple Partition Map (strength=70) after Syslinux bootloader (71)
  2264. #!:strength +0
  2265. >0 use apple-apm
  2266. # magic/Magdir/apple14.test, 365: Warning: Current entry does not yet have a description for adding a EXTENSION type
  2267. # file: could not find any valid magic files!
  2268. #!:ext bin
  2269. # display apple partition map. Normally called after Apple driver map
  2270. 0 name apple-apm
  2271. >0 belong 0x504d0000 Apple Partition Map
  2272. # number of partitions
  2273. >>4 ubelong x \b, map block count %u
  2274. # logical block (512 bytes) start of partition
  2275. >>8 ubelong x \b, start block %u
  2276. >>12 ubelong x \b, block count %u
  2277. >>16 string >0 \b, name %s
  2278. >>48 string >0 \b, type %s
  2279. # processor type dpme_process_id[16] e.g. "68000" "68020"
  2280. >>120 string >0 \b, processor %s
  2281. # A/UX boot arguments BootArgs[128]
  2282. >>136 string >0 \b, boot arguments %s
  2283. # status of partition dpme_flags
  2284. >>88 belong & 1 \b, valid
  2285. >>88 belong & 2 \b, allocated
  2286. >>88 belong & 4 \b, in use
  2287. >>88 belong & 8 \b, has boot info
  2288. >>88 belong & 16 \b, readable
  2289. >>88 belong & 32 \b, writable
  2290. >>88 belong & 64 \b, pic boot code
  2291. >>88 belong & 128 \b, chain compatible driver
  2292. >>88 belong & 256 \b, real driver
  2293. >>88 belong & 512 \b, chain driver
  2294. # mount automatically at startup APPLE_PS_AUTO_MOUNT
  2295. >>88 ubelong &0x40000000 \b, mount at startup
  2296. # is the startup partition APPLE_PS_STARTUP
  2297. >>88 ubelong &0x80000000 \b, is the startup partition
  2298. #https://wiki.mozilla.org/DS_Store_File_Format
  2299. #https://en.wikipedia.org/wiki/.DS_Store
  2300. 0 string \0\0\0\1Bud1\0 Apple Desktop Services Store
  2301. # HFS/HFS+ Resource fork files (andrew.roazen@nau.edu Apr 13 2015)
  2302. # Usually not in separate files, but have either filename rsrc with
  2303. # no extension, or a filename corresponding to another file, with
  2304. # extensions rsr/rsrc
  2305. 0 string \000\000\001\000
  2306. >4 leshort 0
  2307. >>16 lelong 0 Apple HFS/HFS+ resource fork
  2308. #https://en.wikipedia.org/wiki/AppleScript
  2309. 0 string FasdUAS AppleScript compiled
  2310. # AppleWorks/ClarisWorks
  2311. # https://github.com/joshenders/appleworks_format
  2312. # http://fileformats.archiveteam.org/wiki/AppleWorks
  2313. 0 name appleworks
  2314. >0 belong&0x00ffffff 0x07e100 AppleWorks CWK Document
  2315. >0 belong&0x00ffffff 0x008803 ClarisWorks CWK Document
  2316. >0 default x
  2317. >>0 belong x AppleWorks/ClarisWorks CWK Document
  2318. >0 byte x \b, version %d
  2319. >30 beshort x \b, %d
  2320. >32 beshort x \bx%d
  2321. !:ext cwk
  2322. 4 string BOBO
  2323. >0 byte >4
  2324. >>12 belong 0
  2325. >>>26 belong 0
  2326. >>>>0 use appleworks
  2327. >0 belong 0x0481ad00
  2328. >>0 use appleworks
  2329. # magic for Apple File System (APFS)
  2330. # from Alex Myczko <alex@aiei.ch>
  2331. 32 string NXSB Apple File System (APFS)
  2332. >36 ulelong x \b, blocksize %u
  2333. # iTunes cover art (versions 1 and 2)
  2334. 4 string itch
  2335. >24 string artw
  2336. >>0x1e8 string data iTunes cover art
  2337. >>>0x1ed string PNG (PNG)
  2338. >>>0x1ec beshort 0xffd8 (JPEG)
  2339. # MacPaint image
  2340. 65 string PNTGMPNT MacPaint image data
  2341. #0 belong 2 MacPaint image data
  2342. #------------------------------------------------------------------------------
  2343. # $File: application,v 1.1 2016/10/17 12:13:01 christos Exp $
  2344. # application: file(1) magic for applications on small devices
  2345. #
  2346. # Pebble Application
  2347. 0 string PBLAPP\000\000 Pebble application
  2348. #------------------------------------------------------------------------------
  2349. # $File: applix,v 1.5 2009/09/19 16:28:08 christos Exp $
  2350. # applix: file(1) magic for Applixware
  2351. # From: Peter Soos <sp@osb.hu>
  2352. #
  2353. 0 string *BEGIN Applixware
  2354. >7 string WORDS Words Document
  2355. >7 string GRAPHICS Graphic
  2356. >7 string RASTER Bitmap
  2357. >7 string SPREADSHEETS Spreadsheet
  2358. >7 string MACRO Macro
  2359. >7 string BUILDER Builder Object
  2360. #------------------------------------------------------------------------------
  2361. # $File: apt,v 1.1 2016/10/17 19:51:57 christos Exp $
  2362. # apt: file(1) magic for APT Cache files
  2363. # <http://www.fifi.org/doc/libapt-pkg-doc/cache.html/ch2.html>
  2364. # <https://anonscm.debian.org/cgit/apt/apt.git/tree/apt-pkg/pkgcache.h#n292>
  2365. # before version 10 ("old format"), data was in arch-specific long/short
  2366. # old format 64 bit
  2367. 0 name apt-cache-64bit-be
  2368. >12 beshort 1 \b, dirty
  2369. >40 bequad x \b, %llu packages
  2370. >48 bequad x \b, %llu versions
  2371. # old format 32 bit
  2372. 0 name apt-cache-32bit-be
  2373. >8 beshort 1 \b, dirty
  2374. >40 belong x \b, %u packages
  2375. >44 belong x \b, %u versions
  2376. # new format
  2377. 0 name apt-cache-be
  2378. >6 byte 1 \b, dirty
  2379. >24 belong x \b, %u packages
  2380. >28 belong x \b, %u versions
  2381. 0 bequad 0x98FE76DC
  2382. >8 ubeshort <10 APT cache data, version %u
  2383. >>10 beshort x \b.%u, 64 bit big-endian
  2384. >>0 use apt-cache-64bit-be
  2385. 0 lequad 0x98FE76DC
  2386. >8 uleshort <10 APT cache data, version %u
  2387. >>10 leshort x \b.%u, 64 bit little-endian
  2388. >>0 use \^apt-cache-64bit-be
  2389. 0 belong 0x98FE76DC
  2390. >4 ubeshort <10 APT cache data, version %u
  2391. >>6 ubeshort x \b.%u, 32 bit big-endian
  2392. >>0 use apt-cache-32bit-be
  2393. >4 ubyte >9 APT cache data, version %u
  2394. >>5 ubyte x \b.%u, big-endian
  2395. >>0 use apt-cache-be
  2396. 0 lelong 0x98FE76DC
  2397. >4 uleshort <10 APT cache data, version %u
  2398. >>6 uleshort x \b.%u, 32 bit little-endian
  2399. >>0 use \^apt-cache-32bit-be
  2400. >4 ubyte >9 APT cache data, version %u
  2401. >>5 ubyte x \b.%u, little-endian
  2402. >>0 use \^apt-cache-be
  2403. #------------------------------------------------------------------------------
  2404. # $File: archive,v 1.145 2021/01/03 20:58:47 christos Exp $
  2405. # archive: file(1) magic for archive formats (see also "msdos" for self-
  2406. # extracting compressed archives)
  2407. #
  2408. # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
  2409. # pre-POSIX "tar" archives are also handled in the C code ../../src/is_tar.c.
  2410. # POSIX tar archives
  2411. # URL: https://en.wikipedia.org/wiki/Tar_(computing)
  2412. # Reference: https://www.freebsd.org/cgi/man.cgi?query=tar&sektion=5&manpath=FreeBSD+8-current
  2413. # header mainly padded with nul bytes
  2414. 500 quad 0
  2415. !:strength /2
  2416. # filename or extended attribute printable strings in range space null til umlaut ue
  2417. >0 ubeshort >0x1F00
  2418. >>0 ubeshort <0xFCFD
  2419. # last 4 header bytes often null but tar\0 in gtarfail2.tar gtarfail.tar-bad
  2420. # at https://sourceforge.net/projects/s-tar/files/testscripts/
  2421. >>>508 ubelong&0x8B9E8DFF 0
  2422. # nul, space or ascii digit 0-7 at start of mode
  2423. >>>>100 ubyte&0xC8 =0
  2424. >>>>>101 ubyte&0xC8 =0
  2425. # nul, space at end of check sum
  2426. >>>>>>155 ubyte&0xDF =0
  2427. # space or ascii digit 0 at start of check sum
  2428. >>>>>>>148 ubyte&0xEF =0x20
  2429. >>>>>>>>0 use tar-file
  2430. # minimal check and then display tar archive information which can also be
  2431. # embedded inside others like Android Backup, Clam AntiVirus database
  2432. 0 name tar-file
  2433. >257 string !ustar
  2434. # header padded with nuls
  2435. >>257 ulong =0
  2436. # GNU tar version 1.29 with non pax format option without refusing
  2437. # creates misleading V7 header for Long path, Multi-volume, Volume type
  2438. >>>156 ubyte 0x4c GNU tar archive
  2439. !:mime application/x-gtar
  2440. !:ext tar/gtar
  2441. >>>156 ubyte 0x4d GNU tar archive
  2442. !:mime application/x-gtar
  2443. !:ext tar/gtar
  2444. >>>156 ubyte 0x56 GNU tar archive
  2445. !:mime application/x-gtar
  2446. !:ext tar/gtar
  2447. >>>156 default x tar archive (V7)
  2448. !:mime application/x-tar
  2449. !:ext tar
  2450. # other stuff in padding
  2451. # some implementations add new fields to the blank area at the end of the header record
  2452. # created for example by DOS TAR 3.20g 1994 Tim V.Shapore with -j option
  2453. >>257 ulong !0 tar archive (old)
  2454. !:mime application/x-tar
  2455. !:ext tar
  2456. # magic in newer, GNU, posix variants
  2457. >257 string =ustar
  2458. # 2 last char of magic and UStar version because string expression does not work
  2459. # 2 space characters followed by a null for GNU variant
  2460. >>261 ubelong =0x72202000 POSIX tar archive (GNU)
  2461. !:mime application/x-gtar
  2462. !:ext tar/gtar
  2463. # UStar version with ASCII "00"
  2464. >>261 ubelong 0x72003030 POSIX
  2465. # gLOBAL and ExTENSION type only found in POSIX.1-2001 format
  2466. >>>156 ubyte 0x67 \b.1-2001
  2467. >>>156 ubyte 0x78 \b.1-2001
  2468. >>>156 ubyte x tar archive
  2469. !:mime application/x-ustar
  2470. !:ext tar/ustar
  2471. # version with 2 binary nuls embedded in Android Backup like com.android.settings.ab
  2472. >>261 ubelong 0x72000000 tar archive (ustar)
  2473. !:mime application/x-ustar
  2474. !:ext tar/ustar
  2475. # not seen ustar variant with garbish version
  2476. >>261 default x tar archive (unknown ustar)
  2477. !:mime application/x-ustar
  2478. !:ext tar/ustar
  2479. # type flag of 1st tar archive member
  2480. #>156 ubyte x \b, %c-type
  2481. >156 ubyte x
  2482. >>156 ubyte 0 \b, file
  2483. >>156 ubyte 0x30 \b, file
  2484. >>156 ubyte 0x31 \b, hard link
  2485. >>156 ubyte 0x32 \b, symlink
  2486. >>156 ubyte 0x33 \b, char device
  2487. >>156 ubyte 0x34 \b, block device
  2488. >>156 ubyte 0x35 \b, directory
  2489. >>156 ubyte 0x36 \b, fifo
  2490. >>156 ubyte 0x37 \b, reserved
  2491. >>156 ubyte 0x4c \b, long path
  2492. >>156 ubyte 0x4d \b, multi volume
  2493. >>156 ubyte 0x56 \b, volume
  2494. >>156 ubyte 0x67 \b, global
  2495. >>156 ubyte 0x78 \b, extension
  2496. >>156 default x \b, type
  2497. >>>156 ubyte x '%c'
  2498. # name[100]
  2499. >0 string >\0 %-.60s
  2500. # mode mainly stored as an octal number in ASCII null or space terminated
  2501. >100 string >\0 \b, mode %-.7s
  2502. # user id mainly as octal numbers in ASCII null or space terminated
  2503. >108 string >\0 \b, uid %-.7s
  2504. # group id mainly as octal numbers in ASCII null or space terminated
  2505. >116 string >\0 \b, gid %-.7s
  2506. # size mainly as octal number in ASCII
  2507. >124 ubyte <0x38
  2508. >>124 string >\0 \b, size %-.12s
  2509. # coding indicated by setting the high-order bit of the leftmost byte
  2510. >124 ubyte >0xEF \b, size 0x
  2511. >>124 ubyte !0xff \b%2.2x
  2512. >>125 ubyte !0xff \b%2.2x
  2513. >>126 ubyte !0xff \b%2.2x
  2514. >>127 ubyte !0xff \b%2.2x
  2515. >>128 ubyte !0xff \b%2.2x
  2516. >>129 ubyte !0xff \b%2.2x
  2517. >>130 ubyte !0xff \b%2.2x
  2518. >>131 ubyte !0xff \b%2.2x
  2519. >>132 ubyte !0xff \b%2.2x
  2520. >>133 ubyte !0xff \b%2.2x
  2521. >>134 ubyte !0xff \b%2.2x
  2522. >>135 ubyte !0xff \b%2.2x
  2523. # seconds since 0:0:0 1 jan 1970 UTC as octal number mainly in ASCII null or space terminated
  2524. >136 string >\0 \b, seconds %-.11s
  2525. # header checksum stored as an octal number in ASCII null or space terminated
  2526. #>148 string x \b, cksum %.7s
  2527. # linkname[100]
  2528. >157 string >\0 \b, linkname %-.40s
  2529. # additional fields for ustar
  2530. >257 string =ustar
  2531. # owner user name null terminated
  2532. >>265 string >\0 \b, user %-.32s
  2533. # group name null terminated
  2534. >>297 string >\0 \b, group %-.32s
  2535. # device major minor if not zero
  2536. >>329 ubequad&0xCFCFCFCFcFcFcFdf !0
  2537. >>>329 string x \b, devmaj %-.7s
  2538. >>337 ubequad&0xCFCFCFCFcFcFcFdf !0
  2539. >>>337 string x \b, devmin %-.7s
  2540. # prefix[155]
  2541. >>345 string >\0 \b, prefix %-.155s
  2542. # old non ustar/POSIX tar
  2543. >257 string !ustar
  2544. >>508 string =tar\0
  2545. # padding[255] in old star
  2546. >>>257 string >\0 \b, padding: %-.40s
  2547. >>508 default x
  2548. # padding[255] in old tar sometimes comment field
  2549. >>>257 string >\0 \b, comment: %-.40s
  2550. # Incremental snapshot gnu-tar format from:
  2551. # https://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html
  2552. 0 string GNU\ tar- GNU tar incremental snapshot data
  2553. >&0 regex [0-9]\.[0-9]+-[0-9]+ version %s
  2554. # cpio archives
  2555. #
  2556. # Yes, the top two "cpio archive" formats *are* supposed to just be "short".
  2557. # The idea is to indicate archives produced on machines with the same
  2558. # byte order as the machine running "file" with "cpio archive", and
  2559. # to indicate archives produced on machines with the opposite byte order
  2560. # from the machine running "file" with "byte-swapped cpio archive".
  2561. #
  2562. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  2563. # are defined as "short"s; I think all the new formats are
  2564. # character-header formats and thus are strings, not numbers.
  2565. 0 short 070707 cpio archive
  2566. !:mime application/x-cpio
  2567. 0 short 0143561 byte-swapped cpio archive
  2568. !:mime application/x-cpio # encoding: swapped
  2569. 0 string 070707 ASCII cpio archive (pre-SVR4 or odc)
  2570. 0 string 070701 ASCII cpio archive (SVR4 with no CRC)
  2571. 0 string 070702 ASCII cpio archive (SVR4 with CRC)
  2572. #
  2573. # Various archive formats used by various versions of the "ar"
  2574. # command.
  2575. #
  2576. #
  2577. # Original UNIX archive formats.
  2578. # They were written with binary values in host byte order, and
  2579. # the magic number was a host "int", which might have been 16 bits
  2580. # or 32 bits. We don't say "PDP-11" or "VAX", as there might have
  2581. # been ports to little-endian 16-bit-int or 32-bit-int platforms
  2582. # (x86?) using some of those formats; if none existed, feel free
  2583. # to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian
  2584. # 32-bit. There might have been big-endian ports of that sort as
  2585. # well.
  2586. #
  2587. 0 leshort 0177555 very old 16-bit-int little-endian archive
  2588. 0 beshort 0177555 very old 16-bit-int big-endian archive
  2589. 0 lelong 0177555 very old 32-bit-int little-endian archive
  2590. 0 belong 0177555 very old 32-bit-int big-endian archive
  2591. 0 leshort 0177545 old 16-bit-int little-endian archive
  2592. >2 string __.SYMDEF random library
  2593. 0 beshort 0177545 old 16-bit-int big-endian archive
  2594. >2 string __.SYMDEF random library
  2595. 0 lelong 0177545 old 32-bit-int little-endian archive
  2596. >4 string __.SYMDEF random library
  2597. 0 belong 0177545 old 32-bit-int big-endian archive
  2598. >4 string __.SYMDEF random library
  2599. #
  2600. # From "pdp" (but why a 4-byte quantity?)
  2601. #
  2602. 0 lelong 0x39bed PDP-11 old archive
  2603. 0 lelong 0x39bee PDP-11 4.0 archive
  2604. #
  2605. # XXX - what flavor of APL used this, and was it a variant of
  2606. # some ar archive format? It's similar to, but not the same
  2607. # as, the APL workspace magic numbers in pdp.
  2608. #
  2609. 0 long 0100554 apl workspace
  2610. #
  2611. # System V Release 1 portable(?) archive format.
  2612. #
  2613. 0 string =<ar> System V Release 1 ar archive
  2614. !:mime application/x-archive
  2615. #
  2616. # Debian package; it's in the portable archive format, and needs to go
  2617. # before the entry for regular portable archives, as it's recognized as
  2618. # a portable archive whose first member has a name beginning with
  2619. # "debian".
  2620. #
  2621. # Update: Joerg Jenderek
  2622. # URL: https://en.wikipedia.org/wiki/Deb_(file_format)
  2623. 0 string =!<arch>\ndebian
  2624. # https://manpages.debian.org/testing/dpkg/dpkg-split.1.en.html
  2625. >14 string -split part of multipart Debian package
  2626. !:mime application/vnd.debian.binary-package
  2627. # udeb is used for stripped down deb file
  2628. !:ext deb/udeb
  2629. >14 string -binary Debian binary package
  2630. !:mime application/vnd.debian.binary-package
  2631. # For ipk packager see also https://en.wikipedia.org/wiki/Opkg
  2632. !:ext deb/udeb/ipk
  2633. # This should not happen
  2634. >14 default x Unknown Debian package
  2635. # NL terminated version; for most Debian cases this is 2.0 or 2.1 for split
  2636. >68 string >\0 (format %s)
  2637. #>68 string !2.0\n
  2638. #>>68 string x (format %.3s)
  2639. >68 string =2.0\n
  2640. # 2nd archive name=control archive name like control.tar.gz or control.tar.xz
  2641. >>72 string >\0 \b, with %.14s
  2642. # look for 3rd archive name=data archive name like data.tar.{gz,xz,bz2,lzma}
  2643. >>0 search/0x93e4f data.tar. \b, data compression
  2644. # the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised
  2645. # for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb
  2646. >>>&0 string x %.2s
  2647. # skip space (0x20 BSD) and slash (0x2f System V) character marking end of name
  2648. >>>&2 ubyte !0x20
  2649. >>>>&-1 ubyte !0x2f
  2650. # display 3rd character of file name extension like 2 of bz2 or m of lzma
  2651. >>>>>&-1 ubyte x \b%c
  2652. >>>>>>&0 ubyte !0x20
  2653. >>>>>>>&-1 ubyte !0x2f
  2654. # display 4th character of file name extension like a of lzma
  2655. >>>>>>>>&-1 ubyte x \b%c
  2656. # split debian package case
  2657. >68 string =2.1\n
  2658. # dpkg-1.18.25/dpkg-split/info.c
  2659. # NL terminated ASCII package name like ckermit
  2660. >>&0 string x \b, %s
  2661. # NL terminated package version like 302-5.3
  2662. >>>&1 string x %s
  2663. # NL terminated MD5 checksum
  2664. >>>>&1 string x \b, MD5 %s
  2665. # NL terminated original package length
  2666. >>>>>&1 string x \b, unsplitted size %s
  2667. # NL terminated part length
  2668. >>>>>>&1 string x \b, part length %s
  2669. # NL terminated package part like n/m
  2670. >>>>>>>&1 string x \b, part %s
  2671. # NL terminated package architecture like armhf since dpkg 1.16.1 or later
  2672. >>>>>>>>&1 string x \b, %s
  2673. #
  2674. # MIPS archive; they're in the portable archive format, and need to go
  2675. # before the entry for regular portable archives, as it's recognized as
  2676. # a portable archive whose first member has a name beginning with
  2677. # "__________E".
  2678. #
  2679. 0 string =!<arch>\n__________E MIPS archive
  2680. !:mime application/x-archive
  2681. >20 string U with MIPS Ucode members
  2682. >21 string L with MIPSEL members
  2683. >21 string B with MIPSEB members
  2684. >19 string L and an EL hash table
  2685. >19 string B and an EB hash table
  2686. >22 string X -- out of date
  2687. #
  2688. # BSD/SVR2-and-later portable archive formats.
  2689. #
  2690. # Update: Joerg Jenderek
  2691. # URL: http://fileformats.archiveteam.org/wiki/AR
  2692. # Reference: https://www.unix.com/man-page/opensolaris/3HEAD/ar.h/
  2693. # Note: Mach-O universal binary in ./cafebabe is dependent
  2694. # TODO: unify current ar archive, MIPS archive, Debian package
  2695. # distinguish BSD, SVR; 32, 64 bit; HP from other 32-bit SVR;
  2696. # *.ar packages from *.a libraries. handle empty archive
  2697. 0 string =!<arch>\n current ar archive
  2698. # print first and possibly second ar_name[16] for debugging purpose
  2699. #>8 string x \b, 1st "%.16s"
  2700. #>68 string x \b, 2nd "%.16s"
  2701. !:mime application/x-archive
  2702. # a in most case for libraries; lib for Microsoft libraries; ar else cases
  2703. !:ext a/lib/ar
  2704. >8 string __.SYMDEF random library
  2705. # first member with long marked name __.SYMDEF SORTED implies BSD library
  2706. >68 string __.SYMDEF\ SORTED random library
  2707. # Reference: https://parisc.wiki.kernel.org/images-parisc/b/b2/Rad_11_0_32.pdf
  2708. # "archive file" entry moved from ./hp
  2709. # LST header system_id 0210h~PA-RISC 1.1,... identifies the target architecture
  2710. # LST header a_magic 0619h~relocatable library
  2711. >68 belong 0x020b0619 - PA-RISC1.0 relocatable library
  2712. >68 belong 0x02100619 - PA-RISC1.1 relocatable library
  2713. >68 belong 0x02110619 - PA-RISC1.2 relocatable library
  2714. >68 belong 0x02140619 - PA-RISC2.0 relocatable library
  2715. #EOF for common ar archives
  2716. #
  2717. # "Thin" archive, as can be produced by GNU ar.
  2718. #
  2719. 0 string =!<thin>\n thin archive with
  2720. >68 belong 0 no symbol entries
  2721. >68 belong 1 %d symbol entry
  2722. >68 belong >1 %d symbol entries
  2723. 0 search/1 -h- Software Tools format archive text
  2724. # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
  2725. #
  2726. # The first byte is the magic (0x1a), byte 2 is the compression type for
  2727. # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
  2728. # filename of the first file (null terminated). Since some types collide
  2729. # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
  2730. # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo.
  2731. 0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW
  2732. !:mime application/x-arc
  2733. 0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed
  2734. !:mime application/x-arc
  2735. 0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed
  2736. !:mime application/x-arc
  2737. 0 lelong&0x8080ffff 0x0000031a ARC archive data, packed
  2738. !:mime application/x-arc
  2739. 0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed
  2740. !:mime application/x-arc
  2741. 0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched
  2742. !:mime application/x-arc
  2743. # [JW] stuff taken from idarc, obviously ARC successors:
  2744. 0 lelong&0x8080ffff 0x00000a1a PAK archive data
  2745. !:mime application/x-arc
  2746. 0 lelong&0x8080ffff 0x0000141a ARC+ archive data
  2747. !:mime application/x-arc
  2748. 0 lelong&0x8080ffff 0x0000481a HYP archive data
  2749. !:mime application/x-arc
  2750. # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
  2751. # I can't create either SPARK or ArcFS archives so I have not tested this stuff
  2752. # [GRR: the original entries collide with ARC, above; replaced with combined
  2753. # version (not tested)]
  2754. #0 byte 0x1a RISC OS archive (spark format)
  2755. 0 string \032archive RISC OS archive (ArcFS format)
  2756. 0 string Archive\000 RISC OS archive (ArcFS format)
  2757. # All these were taken from idarc, many could not be verified. Unfortunately,
  2758. # there were many low-quality sigs, i.e. easy to trigger false positives.
  2759. # Please notify me of any real-world fishy/ambiguous signatures and I'll try
  2760. # to get my hands on the actual archiver and see if I find something better. [JW]
  2761. # probably many can be enhanced by finding some 0-byte or control char near the start
  2762. # idarc calls this Crush/Uncompressed... *shrug*
  2763. 0 string CRUSH Crush archive data
  2764. # Squeeze It (.sqz)
  2765. 0 string HLSQZ Squeeze It archive data
  2766. # SQWEZ
  2767. 0 string SQWEZ SQWEZ archive data
  2768. # HPack (.hpk)
  2769. 0 string HPAK HPack archive data
  2770. # HAP
  2771. 0 string \x91\x33HF HAP archive data
  2772. # MD/MDCD
  2773. 0 string MDmd MDCD archive data
  2774. # LIM
  2775. 0 string LIM\x1a LIM archive data
  2776. # SAR
  2777. 3 string LH5 SAR archive data
  2778. # BSArc/BS2
  2779. 0 string \212\3SB\020\0 BSArc/BS2 archive data
  2780. # Bethesda Softworks Archive (Oblivion)
  2781. 0 string BSA\0 BSArc archive data
  2782. >4 lelong x version %d
  2783. # MAR
  2784. 2 string =-ah MAR archive data
  2785. # ACB
  2786. #0 belong&0x00f800ff 0x00800000 ACB archive data
  2787. # CPZ
  2788. # TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data
  2789. # JRC
  2790. 0 string JRchive JRC archive data
  2791. # Quantum
  2792. 0 string DS\0 Quantum archive data
  2793. # ReSOF
  2794. 0 string PK\3\6 ReSOF archive data
  2795. # QuArk
  2796. 0 string 7\4 QuArk archive data
  2797. # YAC
  2798. 14 string YC YAC archive data
  2799. # X1
  2800. 0 string X1 X1 archive data
  2801. 0 string XhDr X1 archive data
  2802. # CDC Codec (.dqt)
  2803. 0 belong&0xffffe000 0x76ff2000 CDC Codec archive data
  2804. # AMGC
  2805. 0 string \xad6" AMGC archive data
  2806. # NuLIB
  2807. 0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data
  2808. # PakLeo
  2809. 0 string LEOLZW PAKLeo archive data
  2810. # ChArc
  2811. 0 string SChF ChArc archive data
  2812. # PSA
  2813. 0 string PSA PSA archive data
  2814. # CrossePAC
  2815. 0 string DSIGDCC CrossePAC archive data
  2816. # Freeze
  2817. 0 string \x1f\x9f\x4a\x10\x0a Freeze archive data
  2818. # KBoom
  2819. 0 string \xc2\xa8MP\xc2\xa8 KBoom archive data
  2820. # NSQ, must go after CDC Codec
  2821. 0 string \x76\xff NSQ archive data
  2822. # DPA
  2823. 0 string Dirk\ Paehl DPA archive data
  2824. # BA
  2825. # TODO: idarc says "bytes 0-2 == bytes 3-5"
  2826. # TTComp
  2827. # URL: http://fileformats.archiveteam.org/wiki/TTComp_archive
  2828. # Update: Joerg Jenderek
  2829. # GRR: line below is too general as it matches also Panorama database "TCDB 2003-10 demo.pan", others
  2830. 0 string \0\6
  2831. # look for first keyword of Panorama database *.pan
  2832. >12 search/261 DESIGN
  2833. # skip keyword with low entropy
  2834. >12 default x TTComp archive, binary, 4K dictionary
  2835. # (version 5.25) labeled the above entry as "TTComp archive data"
  2836. # From: Joerg Jenderek
  2837. # URL: https://wiki.68kmla.org/DiskCopy_4.2_format_specification
  2838. # reference: http://nulib.com/library/FTN.e00005.htm
  2839. 0x52 ubeshort 0x0100
  2840. # test for disk image size equal or above 400k
  2841. >0x40 ubelong >409599
  2842. # test also for disk image size equal or below 1440k to skip
  2843. # windows7en.mbr UNICODE.DAT
  2844. >>0x40 ubelong <1474561
  2845. # To skip Flags$StringJoiner.class with size 00106A61h test also for only 4 disk image sizes
  2846. # 00064000 for 400k GCR disks
  2847. # 000c8000 for 800k GCR disks
  2848. # 000b4000 for 720k MFM disks
  2849. # 00168000 for 1440k MFM disks
  2850. >>>0x40 ubelong&0xffE03fFF 0
  2851. >>>>0 use dc42-floppy
  2852. # display information of Apple DiskCopy 4.2 floppy image
  2853. 0 name dc42-floppy
  2854. # image pascal name padded with NULs like Microsoft Mail
  2855. >00 pstring/B x Apple DiskCopy 4.2 image %s
  2856. #!:mime application/octet-stream
  2857. !:mime application/x-dc42-floppy-image
  2858. !:apple dCpydImg
  2859. !:ext image/dc42
  2860. # data size in bytes like 409600
  2861. >0x40 ubelong x \b, %u bytes
  2862. # for debugging purpose size in hexadecimal
  2863. #>0x40 ubelong x (0x%8.8x)
  2864. # tag size in bytes
  2865. >0x44 ubelong >0 \b, 0x%x tag size
  2866. # data checksum
  2867. #>0x48 ubelong x \b, 0x%x checksum
  2868. # tag checksum
  2869. #>0x4c ubelong x \b, 0x%x tag checksum
  2870. # disk encoding
  2871. >0x50 ubyte 0 \b, GCR CLV ssdd (400k)
  2872. >0x50 ubyte 1 \b, GCR CLV dsdd (800k)
  2873. >0x50 ubyte 2 \b, MFM CAV dsdd (720k)
  2874. >0x50 ubyte 3 \b, MFM CAV dshd (1440k)
  2875. >0x50 ubyte >3 \b, 0x%x encoding
  2876. # format byte
  2877. >0x51 ubyte x \b, 0x%x format
  2878. #>0x54 ubequad x \b, data 0x%16.16llx
  2879. # ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation?
  2880. 0 string ESP ESP archive data
  2881. # ZPack
  2882. 0 string \1ZPK\1 ZPack archive data
  2883. # Sky
  2884. 0 string \xbc\x40 Sky archive data
  2885. # UFA
  2886. 0 string UFA UFA archive data
  2887. # Dry
  2888. 0 string =-H2O DRY archive data
  2889. # FoxSQZ
  2890. 0 string FOXSQZ FoxSQZ archive data
  2891. # AR7
  2892. 0 string ,AR7 AR7 archive data
  2893. # PPMZ
  2894. 0 string PPMZ PPMZ archive data
  2895. # MS Compress
  2896. # Update: Joerg Jenderek
  2897. # URL: http://fileformats.archiveteam.org/wiki/MS-DOS_installation_compression
  2898. # Reference: https://hwiegman.home.xs4all.nl/fileformats/compress/szdd_kwaj_format.html
  2899. # Note: use correct version of extracting tool like EXPAND, UNPACK, DECOMP or 7Z
  2900. 4 string \x88\xf0\x27
  2901. # KWAJ variant
  2902. >0 string KWAJ MS Compress archive data, KWAJ variant
  2903. !:mime application/x-ms-compress-kwaj
  2904. # extension not working in version 5.32
  2905. # magic/Magdir/archive, 284: Warning: EXTENSION type ` ??_' has bad char '?'
  2906. # file: line 284: Bad magic entry ' ??_'
  2907. !:ext ??_
  2908. # compression method (0-4)
  2909. >>8 uleshort x \b, %u method
  2910. # offset of compressed data
  2911. >>10 uleshort x \b, 0x%x offset
  2912. #>>(10.s) uleshort x
  2913. #>>>&-6 string x \b, TEST extension %-.3s
  2914. # header flags to mark header extensions
  2915. >>12 uleshort >0 \b, 0x%x flags
  2916. # 4 bytes: decompressed length of file
  2917. >>12 uleshort &0x01
  2918. >>>14 ulelong x \b, original size: %u bytes
  2919. # 2 bytes: unknown purpose
  2920. # 2 bytes: length of unknown data + mentioned bytes
  2921. # 1-9 bytes: null-terminated file name
  2922. # 1-4 bytes: null-terminated file extension
  2923. >>12 uleshort &0x08
  2924. >>>12 uleshort ^0x01
  2925. >>>>12 uleshort ^0x02
  2926. >>>>>12 uleshort ^0x04
  2927. >>>>>>12 uleshort ^0x10
  2928. >>>>>>>14 string x \b, %-.8s
  2929. >>>>>>12 uleshort &0x10
  2930. >>>>>>>14 string x \b, %-.8s
  2931. >>>>>>>>&1 string x \b.%-.3s
  2932. >>>>>12 uleshort &0x04
  2933. >>>>>>12 uleshort ^0x10
  2934. >>>>>>>(14.s) uleshort x
  2935. >>>>>>>>&14 string x \b, %-.8s
  2936. >>>>>>12 uleshort &0x10
  2937. >>>>>>>(14.s) uleshort x
  2938. >>>>>>>>&14 string x \b, %-.8s
  2939. >>>>>>>>>&1 string x \b.%-.3s
  2940. >>>>12 uleshort &0x02
  2941. >>>>>12 uleshort ^0x04
  2942. >>>>>>12 uleshort ^0x10
  2943. >>>>>>>16 string x \b, %-.8s
  2944. >>>>>>12 uleshort &0x10
  2945. >>>>>>>16 string x \b, %-.8s
  2946. >>>>>>>>&1 string x \b.%-.3s
  2947. >>>>>12 uleshort &0x04
  2948. >>>>>>12 uleshort ^0x10
  2949. >>>>>>>(16.s) uleshort x
  2950. >>>>>>>>&16 string x \b, %-.8s
  2951. >>>>>>12 uleshort &0x10
  2952. >>>>>>>(16.s) uleshort x
  2953. >>>>>>>&16 string x %-.8s
  2954. >>>>>>>>&1 string x \b.%-.3s
  2955. >>>12 uleshort &0x01
  2956. >>>>12 uleshort ^0x02
  2957. >>>>>12 uleshort ^0x04
  2958. >>>>>>12 uleshort ^0x10
  2959. >>>>>>>18 string x \b, %-.8s
  2960. >>>>>>12 uleshort &0x10
  2961. >>>>>>>18 string x \b, %-.8s
  2962. >>>>>>>>&1 string x \b.%-.3s
  2963. >>>>>12 uleshort &0x04
  2964. >>>>>>12 uleshort ^0x10
  2965. >>>>>>>(18.s) uleshort x
  2966. >>>>>>>>&18 string x \b, %-.8s
  2967. >>>>>>12 uleshort &0x10
  2968. >>>>>>>(18.s) uleshort x
  2969. >>>>>>>>&18 string x \b, %-.8s
  2970. >>>>>>>>>&1 string x \b.%-.3s
  2971. >>>>12 uleshort &0x02
  2972. >>>>>12 uleshort ^0x04
  2973. >>>>>>12 uleshort ^0x10
  2974. >>>>>>>20 string x \b, %-.8s
  2975. >>>>>>12 uleshort &0x10
  2976. >>>>>>>20 string x \b, %-.8s
  2977. >>>>>>>>&1 string x \b.%-.3s
  2978. >>>>>12 uleshort &0x04
  2979. >>>>>>12 uleshort ^0x10
  2980. >>>>>>>(20.s) uleshort x
  2981. >>>>>>>>&20 string x \b, %-.8s
  2982. >>>>>>12 uleshort &0x10
  2983. >>>>>>>(20.s) uleshort x
  2984. >>>>>>>>&20 string x \b, %-.8s
  2985. >>>>>>>>>&1 string x \b.%-.3s
  2986. # 2 bytes: length of data + mentioned bytes
  2987. #
  2988. # SZDD variant Haruhiko Okumura's LZSS or 7z type MsLZ
  2989. >0 string SZDD MS Compress archive data, SZDD variant
  2990. !:mime application/x-ms-compress-szdd
  2991. !:ext ??_
  2992. # The character missing from the end of the filename (0=unknown)
  2993. >>9 string >\0 \b, %-.1s is last character of original name
  2994. # https://www.betaarchive.com/forum/viewtopic.php?t=26161
  2995. # Compression mode: "A" (0x41) found but sometimes "B" in Windows 3.1 builds 026 and 034e
  2996. >>8 string !A \b, %-.1s method
  2997. >>10 ulelong >0 \b, original size: %u bytes
  2998. # QBasic SZDD variant
  2999. 3 string \x88\xf0\x27
  3000. >0 string SZ\x20 MS Compress archive data, QBasic variant
  3001. !:mime application/x-ms-compress-sz
  3002. !:ext ??$
  3003. >>8 ulelong >0 \b, original size: %u bytes
  3004. # MP3 (archiver, not lossy audio compression)
  3005. 0 string MP3\x1a MP3-Archiver archive data
  3006. # ZET
  3007. 0 string OZ\xc3\x9d ZET archive data
  3008. # TSComp
  3009. 0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data
  3010. # ARQ
  3011. 0 string gW\4\1 ARQ archive data
  3012. # Squash
  3013. 3 string OctSqu Squash archive data
  3014. # Terse
  3015. 0 string \5\1\1\0 Terse archive data
  3016. # PUCrunch
  3017. 0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data
  3018. # UHarc
  3019. 0 string UHA UHarc archive data
  3020. # ABComp
  3021. 0 string \2AB ABComp archive data
  3022. 0 string \3AB2 ABComp archive data
  3023. # CMP
  3024. 0 string CO\0 CMP archive data
  3025. # Splint
  3026. 0 string \x93\xb9\x06 Splint archive data
  3027. # InstallShield
  3028. 0 string \x13\x5d\x65\x8c InstallShield Z archive Data
  3029. # Gather
  3030. 1 string GTH Gather archive data
  3031. # BOA
  3032. 0 string BOA BOA archive data
  3033. # RAX
  3034. 0 string ULEB\xa RAX archive data
  3035. # Xtreme
  3036. 0 string ULEB\0 Xtreme archive data
  3037. # Pack Magic
  3038. 0 string @\xc3\xa2\1\0 Pack Magic archive data
  3039. # BTS
  3040. 0 belong&0xfeffffff 0x1a034465 BTS archive data
  3041. # ELI 5750
  3042. 0 string Ora\ ELI 5750 archive data
  3043. # QFC
  3044. 0 string \x1aFC\x1a QFC archive data
  3045. 0 string \x1aQF\x1a QFC archive data
  3046. # PRO-PACK
  3047. 0 string RNC PRO-PACK archive data
  3048. # 777
  3049. 0 string 777 777 archive data
  3050. # LZS221
  3051. 0 string sTaC LZS221 archive data
  3052. # HPA
  3053. 0 string HPA HPA archive data
  3054. # Arhangel
  3055. 0 string LG Arhangel archive data
  3056. # EXP1, uses bzip2
  3057. 0 string 0123456789012345BZh EXP1 archive data
  3058. # IMP
  3059. 0 string IMP\xa IMP archive data
  3060. # NRV
  3061. 0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data
  3062. # Squish
  3063. 0 string \x73\xb2\x90\xf4 Squish archive data
  3064. # Par
  3065. 0 string PHILIPP Par archive data
  3066. 0 string PAR Par archive data
  3067. # HIT
  3068. 0 string UB HIT archive data
  3069. # SBX
  3070. 0 belong&0xfffff000 0x53423000 SBX archive data
  3071. # NaShrink
  3072. 0 string NSK NaShrink archive data
  3073. # SAPCAR
  3074. 0 string #\ CAR\ archive\ header SAPCAR archive data
  3075. 0 string CAR\ 2.00RG SAPCAR archive data
  3076. # Disintegrator
  3077. 0 string DST Disintegrator archive data
  3078. # ASD
  3079. 0 string ASD ASD archive data
  3080. # InstallShield CAB
  3081. 0 string ISc( InstallShield CAB
  3082. # TOP4
  3083. 0 string T4\x1a TOP4 archive data
  3084. # BatComp left out: sig looks like COM executable
  3085. # so TODO: get real 4dos batcomp file and find sig
  3086. # BlakHole
  3087. 0 string BH\5\7 BlakHole archive data
  3088. # BIX
  3089. 0 string BIX0 BIX archive data
  3090. # ChiefLZA
  3091. 0 string ChfLZ ChiefLZA archive data
  3092. # Blink
  3093. 0 string Blink Blink archive data
  3094. # Logitech Compress
  3095. 0 string \xda\xfa Logitech Compress archive data
  3096. # ARS-Sfx (FIXME: really a SFX? then goto COM/EXE)
  3097. 1 string (C)\ STEPANYUK ARS-Sfx archive data
  3098. # AKT/AKT32
  3099. 0 string AKT32 AKT32 archive data
  3100. 0 string AKT AKT archive data
  3101. # NPack
  3102. 0 string MSTSM NPack archive data
  3103. # PFT
  3104. 0 string \0\x50\0\x14 PFT archive data
  3105. # SemOne
  3106. 0 string SEM SemOne archive data
  3107. # PPMD
  3108. 0 string \x8f\xaf\xac\x84 PPMD archive data
  3109. # FIZ
  3110. 0 string FIZ FIZ archive data
  3111. # MSXiE
  3112. 0 belong&0xfffff0f0 0x4d530000 MSXiE archive data
  3113. # DeepFreezer
  3114. 0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data
  3115. # DC
  3116. 0 string =<DC- DC archive data
  3117. # TPac
  3118. 0 string \4TPAC\3 TPac archive data
  3119. # Ai
  3120. 0 string Ai\1\1\0 Ai archive data
  3121. 0 string Ai\1\0\0 Ai archive data
  3122. # Ai32
  3123. 0 string Ai\2\0 Ai32 archive data
  3124. 0 string Ai\2\1 Ai32 archive data
  3125. # SBC
  3126. 0 string SBC SBC archive data
  3127. # Ybs
  3128. 0 string YBS Ybs archive data
  3129. # DitPack
  3130. 0 string \x9e\0\0 DitPack archive data
  3131. # DMS
  3132. 0 string DMS! DMS archive data
  3133. # EPC
  3134. 0 string \x8f\xaf\xac\x8c EPC archive data
  3135. # VSARC
  3136. 0 string VS\x1a VSARC archive data
  3137. # PDZ
  3138. 0 string PDZ PDZ archive data
  3139. # ReDuq
  3140. 0 string rdqx ReDuq archive data
  3141. # GCA
  3142. 0 string GCAX GCA archive data
  3143. # PPMN
  3144. 0 string pN PPMN archive data
  3145. # WinImage
  3146. 3 string WINIMAGE WinImage archive data
  3147. # Compressia
  3148. 0 string CMP0CMP Compressia archive data
  3149. # UHBC
  3150. 0 string UHB UHBC archive data
  3151. # WinHKI
  3152. 0 string \x61\x5C\x04\x05 WinHKI archive data
  3153. # WWPack data file
  3154. 0 string WWP WWPack archive data
  3155. # BSN (BSA, PTS-DOS)
  3156. 0 string \xffBSG BSN archive data
  3157. 1 string \xffBSG BSN archive data
  3158. 3 string \xffBSG BSN archive data
  3159. 1 string \0\xae\2 BSN archive data
  3160. 1 string \0\xae\3 BSN archive data
  3161. 1 string \0\xae\7 BSN archive data
  3162. # AIN
  3163. 0 string \x33\x18 AIN archive data
  3164. 0 string \x33\x17 AIN archive data
  3165. # XPA32 test moved and merged with XPA by Joerg Jenderek at Sep 2015
  3166. # SZip (TODO: doesn't catch all versions)
  3167. 0 string SZ\x0a\4 SZip archive data
  3168. # XPack DiskImage
  3169. # *.XDI updated by Joerg Jenderek Sep 2015
  3170. # ftp://ftp.sac.sk/pub/sac/pack/0index.txt
  3171. # GRR: this test is still too general as it catches also text files starting with jm
  3172. 0 string jm
  3173. # only found examples with this additional characteristic 2 bytes
  3174. >2 string \x2\x4 Xpack DiskImage archive data
  3175. #!:ext xdi
  3176. # XPack Data
  3177. # *.xpa updated by Joerg Jenderek Sep 2015
  3178. # ftp://ftp.elf.stuba.sk/pub/pc/pack/
  3179. 0 string xpa XPA
  3180. !:ext xpa
  3181. # XPA32
  3182. # ftp://ftp.elf.stuba.sk/pub/pc/pack/xpa32.zip
  3183. # created by XPA32.EXE version 1.0.2 for Windows
  3184. >0 string xpa\0\1 \b32 archive data
  3185. # created by XPACK.COM version 1.67m or 1.67r with short 0x1800
  3186. >3 ubeshort !0x0001 \bck archive data
  3187. # XPack Single Data
  3188. # changed by Joerg Jenderek Sep 2015 back to like in version 5.12
  3189. # letter 'I'+ acute accent is equivalent to \xcd
  3190. 0 string \xcd\ jm Xpack single archive data
  3191. #!:mime application/x-xpa-compressed
  3192. !:ext xpa
  3193. # TODO: missing due to unknown magic/magic at end of file:
  3194. #DWC
  3195. #ARG
  3196. #ZAR
  3197. #PC/3270
  3198. #InstallIt
  3199. #RKive
  3200. #RK
  3201. #XPack Diskimage
  3202. # These were inspired by idarc, but actually verified
  3203. # Dzip archiver (.dz)
  3204. # Update: Joerg Jenderek
  3205. # URL: http://speeddemosarchive.com/dzip/
  3206. # reference: http://speeddemosarchive.com/dzip/dz29src.zip/main.c
  3207. # GRR: line below is too general as it matches also ASCII texts like Doszip commander help dz.txt
  3208. 0 string DZ
  3209. # latest version is 2.9 dated 7 may 2003
  3210. >2 byte <4 Dzip archive data
  3211. !:mime application/x-dzip
  3212. !:ext dz
  3213. >>2 byte x \b, version %i
  3214. >>3 byte x \b.%i
  3215. >>4 ulelong x \b, offset 0x%x
  3216. >>8 ulelong x \b, %u files
  3217. # ZZip archiver (.zz)
  3218. 0 string ZZ\ \0\0 ZZip archive data
  3219. 0 string ZZ0 ZZip archive data
  3220. # PAQ archiver (.paq)
  3221. 0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data
  3222. 0 string PAQ PAQ archive data
  3223. >3 byte&0xf0 0x30
  3224. >>3 byte x (v%c)
  3225. # JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
  3226. 0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data
  3227. 0 string JARCS JAR (ARJ Software, Inc.) archive data
  3228. # ARJ archiver (jason@jarthur.Claremont.EDU)
  3229. 0 leshort 0xea60 ARJ archive data
  3230. !:mime application/x-arj
  3231. >5 byte x \b, v%d,
  3232. >8 byte &0x04 multi-volume,
  3233. >8 byte &0x10 slash-switched,
  3234. >8 byte &0x20 backup,
  3235. >34 string x original name: %s,
  3236. >7 byte 0 os: MS-DOS
  3237. >7 byte 1 os: PRIMOS
  3238. >7 byte 2 os: Unix
  3239. >7 byte 3 os: Amiga
  3240. >7 byte 4 os: Macintosh
  3241. >7 byte 5 os: OS/2
  3242. >7 byte 6 os: Apple ][ GS
  3243. >7 byte 7 os: Atari ST
  3244. >7 byte 8 os: NeXT
  3245. >7 byte 9 os: VAX/VMS
  3246. >3 byte >0 %d]
  3247. # [JW] idarc says this is also possible
  3248. 2 leshort 0xea60 ARJ archive data
  3249. # HA archiver (Greg Roelofs, newt@uchicago.edu)
  3250. # This is a really bad format. A file containing HAWAII will match this...
  3251. #0 string HA HA archive data,
  3252. #>2 leshort =1 1 file,
  3253. #>2 leshort >1 %hu files,
  3254. #>4 byte&0x0f =0 first is type CPY
  3255. #>4 byte&0x0f =1 first is type ASC
  3256. #>4 byte&0x0f =2 first is type HSC
  3257. #>4 byte&0x0f =0x0e first is type DIR
  3258. #>4 byte&0x0f =0x0f first is type SPECIAL
  3259. # suggestion: at least identify small archives (<1024 files)
  3260. 0 belong&0xffff00fc 0x48410000 HA archive data
  3261. >2 leshort =1 1 file,
  3262. >2 leshort >1 %u files,
  3263. >4 byte&0x0f =0 first is type CPY
  3264. >4 byte&0x0f =1 first is type ASC
  3265. >4 byte&0x0f =2 first is type HSC
  3266. >4 byte&0x0f =0x0e first is type DIR
  3267. >4 byte&0x0f =0x0f first is type SPECIAL
  3268. # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
  3269. 0 string HPAK HPACK archive data
  3270. # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
  3271. 0 string \351,\001JAM\ JAM archive,
  3272. >7 string >\0 version %.4s
  3273. >0x26 byte =0x27 -
  3274. >>0x2b string >\0 label %.11s,
  3275. >>0x27 lelong x serial %08x,
  3276. >>0x36 string >\0 fstype %.8s
  3277. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  3278. # Update: Joerg Jenderek
  3279. # URL: https://en.wikipedia.org/wiki/LHA_(file_format)
  3280. # Reference: https://web.archive.org/web/20021005080911/http://www.osirusoft.com/joejared/lzhformat.html
  3281. #
  3282. # check and display information of lharc (LHa,PMarc) file
  3283. 0 name lharc-file
  3284. # check 1st character of method id like -lz4- -lh5- or -pm2-
  3285. >2 string -
  3286. # check 5th character of method id
  3287. >>6 string -
  3288. # check header level 0 1 2 3
  3289. >>>20 ubyte <4
  3290. # check 2nd, 3th and 4th character of method id
  3291. >>>>3 regex \^(lh[0-9a-ex]|lz[s2-8]|pm[012]|pc1) \b
  3292. !:mime application/x-lzh-compressed
  3293. # creator type "LHA "
  3294. !:apple ????LHA
  3295. # display archive type name like "LHa/LZS archive data" or "LArc archive"
  3296. >>>>>2 string -lz \b
  3297. !:ext lzs
  3298. # already known -lzs- -lz4- -lz5- with old names
  3299. >>>>>>2 string -lzs LHa/LZS archive data
  3300. >>>>>>3 regex \^lz[45] LHarc 1.x archive data
  3301. # missing -lz?- with wikipedia names
  3302. >>>>>>3 regex \^lz[2378] LArc archive
  3303. # display archive type name like "LHa (2.x) archive data"
  3304. >>>>>2 string -lh \b
  3305. # already known -lh0- -lh1- -lh2- -lh3- -lh4- -lh5- -lh6- -lh7- -lhd- variants with old names
  3306. >>>>>>3 regex \^lh[01] LHarc 1.x/ARX archive data
  3307. # LHice archiver use ".ICE" as name extension instead usual one ".lzh"
  3308. # FOOBAR archiver use ".foo" as name extension instead usual one
  3309. # "Florain Orjanov's and Olga Bachetska's ARchiver" not found at the moment
  3310. >>>>>>>2 string -lh1 \b
  3311. !:ext lha/lzh/ice
  3312. >>>>>>3 regex \^lh[23d] LHa 2.x? archive data
  3313. >>>>>>3 regex \^lh[7] LHa (2.x)/LHark archive data
  3314. >>>>>>3 regex \^lh[456] LHa (2.x) archive data
  3315. >>>>>>>2 string -lh5 \b
  3316. # https://en.wikipedia.org/wiki/BIOS
  3317. # Some mainboard BIOS like Award use LHa compression. So archives with unusual extension are found like
  3318. # bios.rom , kd7_v14.bin, 1010.004, ...
  3319. !:ext lha/lzh/rom/bin
  3320. # missing -lh?- variants (Joe Jared)
  3321. >>>>>>3 regex \^lh[89a-ce] LHa (Joe Jared) archive
  3322. # UNLHA32 2.67a
  3323. >>>>>>2 string -lhx LHa (UNLHA32) archive
  3324. # lha archives with standard file name extensions ".lha" ".lzh"
  3325. >>>>>>3 regex !\^(lh1|lh5) \b
  3326. !:ext lha/lzh
  3327. # this should not happen if all -lh variants are described
  3328. >>>>>>2 default x LHa (unknown) archive
  3329. #!:ext lha
  3330. # PMarc
  3331. >>>>>3 regex \^pm[012] PMarc archive data
  3332. !:ext pma
  3333. # append method id without leading and trailing minus character
  3334. >>>>>3 string x [%3.3s]
  3335. >>>>>>0 use lharc-header
  3336. #
  3337. # check and display information of lharc header
  3338. 0 name lharc-header
  3339. # header size 0x4 , 0x1b-0x61
  3340. >0 ubyte x
  3341. # compressed data size != compressed file size
  3342. #>7 ulelong x \b, data size %d
  3343. # attribute: 0x2~?? 0x10~symlink|target 0x20~normal
  3344. #>19 ubyte x \b, 19_0x%x
  3345. # level identifier 0 1 2 3
  3346. #>20 ubyte x \b, level %d
  3347. # time stamp
  3348. #>15 ubelong x DATE 0x%8.8x
  3349. # OS ID for level 1
  3350. >20 ubyte 1
  3351. # 0x20 types find for *.rom files
  3352. >>(21.b+24) ubyte <0x21 \b, 0x%x OS
  3353. # ascii type like M for MSDOS
  3354. >>(21.b+24) ubyte >0x20 \b, '%c' OS
  3355. # OS ID for level 2
  3356. >20 ubyte 2
  3357. #>>23 ubyte x \b, OS ID 0x%x
  3358. >>23 ubyte <0x21 \b, 0x%x OS
  3359. >>23 ubyte >0x20 \b, '%c' OS
  3360. # filename only for level 0 and 1
  3361. >20 ubyte <2
  3362. # length of filename
  3363. >>21 ubyte >0 \b, with
  3364. # filename
  3365. >>>21 pstring x "%s"
  3366. #
  3367. #2 string -lh0- LHarc 1.x/ARX archive data [lh0]
  3368. #!:mime application/x-lharc
  3369. 2 string -lh0-
  3370. >0 use lharc-file
  3371. #2 string -lh1- LHarc 1.x/ARX archive data [lh1]
  3372. #!:mime application/x-lharc
  3373. 2 string -lh1-
  3374. >0 use lharc-file
  3375. # NEW -lz2- ... -lz8-
  3376. 2 string -lz2-
  3377. >0 use lharc-file
  3378. 2 string -lz3-
  3379. >0 use lharc-file
  3380. 2 string -lz4-
  3381. >0 use lharc-file
  3382. 2 string -lz5-
  3383. >0 use lharc-file
  3384. 2 string -lz7-
  3385. >0 use lharc-file
  3386. 2 string -lz8-
  3387. >0 use lharc-file
  3388. # [never seen any but the last; -lh4- reported in comp.compression:]
  3389. #2 string -lzs- LHa/LZS archive data [lzs]
  3390. 2 string -lzs-
  3391. >0 use lharc-file
  3392. # According to wikipedia and others such a version does not exist
  3393. #2 string -lh\40- LHa 2.x? archive data [lh ]
  3394. #2 string -lhd- LHa 2.x? archive data [lhd]
  3395. 2 string -lhd-
  3396. >0 use lharc-file
  3397. #2 string -lh2- LHa 2.x? archive data [lh2]
  3398. 2 string -lh2-
  3399. >0 use lharc-file
  3400. #2 string -lh3- LHa 2.x? archive data [lh3]
  3401. 2 string -lh3-
  3402. >0 use lharc-file
  3403. #2 string -lh4- LHa (2.x) archive data [lh4]
  3404. 2 string -lh4-
  3405. >0 use lharc-file
  3406. #2 string -lh5- LHa (2.x) archive data [lh5]
  3407. 2 string -lh5-
  3408. >0 use lharc-file
  3409. #2 string -lh6- LHa (2.x) archive data [lh6]
  3410. 2 string -lh6-
  3411. >0 use lharc-file
  3412. #2 string -lh7- LHa (2.x)/LHark archive data [lh7]
  3413. 2 string -lh7-
  3414. # !:mime application/x-lha
  3415. # >20 byte x - header level %d
  3416. >0 use lharc-file
  3417. # NEW -lh8- ... -lhe- , -lhx-
  3418. 2 string -lh8-
  3419. >0 use lharc-file
  3420. 2 string -lh9-
  3421. >0 use lharc-file
  3422. 2 string -lha-
  3423. >0 use lharc-file
  3424. 2 string -lhb-
  3425. >0 use lharc-file
  3426. 2 string -lhc-
  3427. >0 use lharc-file
  3428. 2 string -lhe-
  3429. >0 use lharc-file
  3430. 2 string -lhx-
  3431. >0 use lharc-file
  3432. # taken from idarc [JW]
  3433. 2 string -lZ PUT archive data
  3434. # already done by LHarc magics
  3435. # this should never happen if all sub types of LZS archive are identified
  3436. #2 string -lz LZS archive data
  3437. 2 string -sw1- Swag archive data
  3438. 0 name rar-file-header
  3439. >24 byte 15 \b, v1.5
  3440. >24 byte 20 \b, v2.0
  3441. >24 byte 29 \b, v4
  3442. >15 byte 0 \b, os: MS-DOS
  3443. >15 byte 1 \b, os: OS/2
  3444. >15 byte 2 \b, os: Win32
  3445. >15 byte 3 \b, os: Unix
  3446. >15 byte 4 \b, os: Mac OS
  3447. >15 byte 5 \b, os: BeOS
  3448. 0 name rar-archive-header
  3449. >3 leshort&0x1ff >0 \b, flags:
  3450. >>3 leshort &0x01 ArchiveVolume
  3451. >>3 leshort &0x02 Commented
  3452. >>3 leshort &0x04 Locked
  3453. >>3 leshort &0x10 NewVolumeNaming
  3454. >>3 leshort &0x08 Solid
  3455. >>3 leshort &0x20 Authenticated
  3456. >>3 leshort &0x40 RecoveryRecordPresent
  3457. >>3 leshort &0x80 EncryptedBlockHeader
  3458. >>3 leshort &0x100 FirstVolume
  3459. # RAR (Roshal Archive) archive
  3460. 0 string Rar!\x1a\7\0 RAR archive data
  3461. !:mime application/x-rar
  3462. !:ext rar/cbr
  3463. # file header
  3464. >(0xc.l+9) byte 0x74
  3465. >>(0xc.l+7) use rar-file-header
  3466. # subblock seems to share information with file header
  3467. >(0xc.l+9) byte 0x7a
  3468. >>(0xc.l+7) use rar-file-header
  3469. >9 byte 0x73
  3470. >>7 use rar-archive-header
  3471. 0 string Rar!\x1a\7\1\0 RAR archive data, v5
  3472. !:mime application/x-rar
  3473. !:ext rar
  3474. # Very old RAR archive
  3475. # https://jasonblanks.com/wp-includes/images/papers/KnowyourarchiveRAR.pdf
  3476. 0 string RE\x7e\x5e RAR archive data (<v1.5)
  3477. !:mime application/x-rar
  3478. !:ext rar/cbr
  3479. # SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
  3480. 0 string SQSH squished archive data (Acorn RISCOS)
  3481. # UC2 archiver (Greg Roelofs, newt@uchicago.edu)
  3482. # [JW] see exe section for self-extracting version
  3483. 0 string UC2\x1a UC2 archive data
  3484. # PKZIP multi-volume archive
  3485. 0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract
  3486. !:mime application/zip
  3487. !:ext zip/cbz
  3488. # Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  3489. 0 string PK\005\006 Zip archive data (empty)
  3490. !:mime application/zip
  3491. !:ext zip/cbz
  3492. !:strength +1
  3493. 0 string PK\003\004
  3494. !:strength +1
  3495. # Specialised zip formats which start with a member named 'mimetype'
  3496. # (stored uncompressed, with no 'extra field') containing the file's MIME type.
  3497. # Check for have 8-byte name, 0-byte extra field, name "mimetype", and
  3498. # contents starting with "application/":
  3499. >26 string \x8\0\0\0mimetypeapplication/
  3500. # KOffice / OpenOffice & StarOffice / OpenDocument formats
  3501. # From: Abel Cheung <abel@oaka.org>
  3502. # KOffice (1.2 or above) formats
  3503. # (mimetype contains "application/vnd.kde.<SUBTYPE>")
  3504. >>50 string vnd.kde. KOffice (>=1.2)
  3505. >>>58 string karbon Karbon document
  3506. >>>58 string kchart KChart document
  3507. >>>58 string kformula KFormula document
  3508. >>>58 string kivio Kivio document
  3509. >>>58 string kontour Kontour document
  3510. >>>58 string kpresenter KPresenter document
  3511. >>>58 string kspread KSpread document
  3512. >>>58 string kword KWord document
  3513. # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7)
  3514. # (mimetype contains "application/vnd.sun.xml.<SUBTYPE>")
  3515. # URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML
  3516. # reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML
  3517. >>50 string vnd.sun.xml. OpenOffice.org 1.x
  3518. >>>62 string writer Writer
  3519. >>>>68 byte !0x2e document
  3520. !:mime application/vnd.sun.xml.writer
  3521. !:ext sxw
  3522. >>>>68 string .template template
  3523. !:mime application/vnd.sun.xml.writer.template
  3524. !:ext stw
  3525. >>>>68 string .web Web template
  3526. !:mime application/vnd.sun.xml.writer.web
  3527. !:ext stw
  3528. >>>>68 string .global global document
  3529. !:mime application/vnd.sun.xml.writer.global
  3530. !:ext sxg
  3531. >>>62 string calc Calc
  3532. >>>>66 byte !0x2e spreadsheet
  3533. !:mime application/vnd.sun.xml.calc
  3534. !:ext sxc
  3535. >>>>66 string .template template
  3536. !:mime application/vnd.sun.xml.calc.template
  3537. !:ext stc
  3538. >>>62 string draw Draw
  3539. >>>>66 byte !0x2e document
  3540. !:mime application/vnd.sun.xml.draw
  3541. !:ext sxd
  3542. >>>>66 string .template template
  3543. !:mime application/vnd.sun.xml.draw.template
  3544. !:ext std
  3545. >>>62 string impress Impress
  3546. >>>>69 byte !0x2e presentation
  3547. !:mime application/vnd.sun.xml.impress
  3548. !:ext sxi
  3549. >>>>69 string .template template
  3550. !:mime application/vnd.sun.xml.impress.template
  3551. !:ext sti
  3552. >>>62 string math Math document
  3553. !:mime application/vnd.sun.xml.math
  3554. !:ext sxm
  3555. >>>62 string base Database file
  3556. !:mime application/vnd.sun.xml.base
  3557. !:ext sdb
  3558. # OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8)
  3559. # URL: http://fileformats.archiveteam.org/wiki/OpenDocument
  3560. # https://lists.oasis-open.org/archives/office/200505/msg00006.html
  3561. # (mimetype contains "application/vnd.oasis.opendocument.<SUBTYPE>")
  3562. >>50 string vnd.oasis.opendocument. OpenDocument
  3563. >>>73 string text
  3564. >>>>77 byte !0x2d Text
  3565. !:mime application/vnd.oasis.opendocument.text
  3566. !:ext odt
  3567. >>>>77 string -template Text Template
  3568. !:mime application/vnd.oasis.opendocument.text-template
  3569. !:ext ott
  3570. >>>>77 string -web HTML Document Template
  3571. !:mime application/vnd.oasis.opendocument.text-web
  3572. !:ext oth
  3573. >>>>77 string -master Master Document
  3574. !:mime application/vnd.oasis.opendocument.text-master
  3575. !:ext odm
  3576. >>>73 string graphics
  3577. >>>>81 byte !0x2d Drawing
  3578. !:mime application/vnd.oasis.opendocument.graphics
  3579. !:ext odg
  3580. >>>>81 string -template Drawing Template
  3581. !:mime application/vnd.oasis.opendocument.graphics-template
  3582. !:ext otg
  3583. >>>73 string presentation
  3584. >>>>85 byte !0x2d Presentation
  3585. !:mime application/vnd.oasis.opendocument.presentation
  3586. !:ext odp
  3587. >>>>85 string -template Presentation Template
  3588. !:mime application/vnd.oasis.opendocument.presentation-template
  3589. !:ext otp
  3590. >>>73 string spreadsheet
  3591. >>>>84 byte !0x2d Spreadsheet
  3592. !:mime application/vnd.oasis.opendocument.spreadsheet
  3593. !:ext ods
  3594. >>>>84 string -template Spreadsheet Template
  3595. !:mime application/vnd.oasis.opendocument.spreadsheet-template
  3596. !:ext ots
  3597. >>>73 string chart
  3598. >>>>78 byte !0x2d Chart
  3599. !:mime application/vnd.oasis.opendocument.chart
  3600. !:ext odc
  3601. >>>>78 string -template Chart Template
  3602. !:mime application/vnd.oasis.opendocument.chart-template
  3603. !:ext otc
  3604. >>>73 string formula
  3605. >>>>80 byte !0x2d Formula
  3606. !:mime application/vnd.oasis.opendocument.formula
  3607. !:ext odf
  3608. >>>>80 string -template Formula Template
  3609. !:mime application/vnd.oasis.opendocument.formula-template
  3610. !:ext otf
  3611. # https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml
  3612. >>>73 string database Database
  3613. !:mime application/vnd.oasis.opendocument.database
  3614. !:ext odb
  3615. # Valid for LibreOffice Base 6.0.1.1 at least
  3616. >>>73 string base Database
  3617. # https://bugs.documentfoundation.org/show_bug.cgi?id=45854
  3618. !:mime application/vnd.oasis.opendocument.database
  3619. #!:mime application/vnd.oasis.opendocument.base
  3620. !:ext odb
  3621. >>>73 string image
  3622. >>>>78 byte !0x2d Image
  3623. !:mime application/vnd.oasis.opendocument.image
  3624. !:ext odi
  3625. >>>>78 string -template Image Template
  3626. !:mime application/vnd.oasis.opendocument.image-template
  3627. !:ext oti
  3628. # EPUB (OEBPS) books using OCF (OEBPS Container Format)
  3629. # https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4.
  3630. # From: Ralf Brown <ralf.brown@gmail.com>
  3631. >>50 string epub+zip EPUB document
  3632. !:mime application/epub+zip
  3633. # From: Joerg Jenderek
  3634. # URL: http://en.wikipedia.org/wiki/CorelDRAW
  3635. # NOTE: version; til 2 WL-based; from 3 til 13 by ./riff; from 14 zip based
  3636. >>50 string x-vnd.corel. Corel
  3637. >>>62 string draw.document+zip Draw drawing, version 14-16
  3638. !:mime application/x-vnd.corel.draw.document+zip
  3639. !:ext cdr
  3640. >>>62 string draw.template+zip Draw template, version 14-16
  3641. !:mime application/x-vnd.corel.draw.template+zip
  3642. !:ext cdrt
  3643. >>>62 string zcf.draw.document+zip Draw drawing, version 17-22
  3644. !:mime application/x-vnd.corel.zcf.draw.document+zip
  3645. !:ext cdr
  3646. >>>62 string zcf.draw.template+zip Draw template, version 17-22
  3647. !:mime application/x-vnd.corel.zcf.draw.template+zip
  3648. !:ext cdt/cdrt
  3649. # URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html
  3650. >>>62 string zcf.pattern+zip Draw pattern, version 22
  3651. !:mime application/x-vnd.corel.zcf.pattern+zip
  3652. !:ext pat
  3653. # URL: https://en.wikipedia.org/wiki/Corel_Designer
  3654. # Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer
  3655. # Note: called by TrID "Corel DESIGN graphics"
  3656. >>>62 string designer.document+zip DESIGNER graphics, version 14-16
  3657. !:mime application/x-vnd.corel.designer.document+zip
  3658. !:ext des
  3659. >>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21
  3660. !:mime application/x-vnd.corel.zcf.designer.document+zip
  3661. !:ext des
  3662. # URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/
  3663. # CorelDRAW-Corel-Symbol-Library-CSL.html
  3664. >>>62 string symbol.library+zip Symbol Library, version 6-16.3
  3665. !:mime application/x-vnd.corel.symbol.library+zip
  3666. !:ext csl
  3667. >>>62 string zcf.symbol.library+zip Symbol Library, version 17-22
  3668. !:mime application/x-vnd.corel.zcf.symbol.library+zip
  3669. !:ext csl
  3670. # Catch other ZIP-with-mimetype formats
  3671. # In a ZIP file, the bytes immediately after a member's contents are
  3672. # always "PK". The 2 regex rules here print the "mimetype" member's
  3673. # contents up to the first 'P'. Luckily, most MIME types don't contain
  3674. # any capital 'P's. This is a kludge.
  3675. # (mimetype contains "application/<OTHER>")
  3676. >>50 default x Zip data
  3677. >>>38 regex [!-OQ-~]+ (MIME type "%s"?)
  3678. !:mime application/zip
  3679. # (mimetype contents other than "application/*")
  3680. >26 string \x8\0\0\0mimetype
  3681. >>38 string !application/
  3682. >>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?)
  3683. !:mime application/zip
  3684. # Java Jar files
  3685. >(26.s+30) leshort 0xcafe Java archive data (JAR)
  3686. !:mime application/java-archive
  3687. # iOS App
  3688. >(26.s+30) leshort !0xcafe
  3689. >>26 string !\x8\0\0\0mimetype
  3690. >>>30 string Payload/
  3691. >>>>38 search/64 .app/ iOS App
  3692. !:mime application/x-ios-app
  3693. >30 search/100/b application/epub+zip EPUB document
  3694. !:mime application/epub+zip
  3695. # Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  3696. # Next line excludes specialized formats:
  3697. >(26.s+30) leshort !0xcafe
  3698. >>30 search/100/b !application/epub+zip
  3699. >>>26 string !\x8\0\0\0mimetype Zip archive data
  3700. !:mime application/zip
  3701. >>>>4 beshort x \b, at least
  3702. >>>>4 use zipversion
  3703. >>>>4 beshort x to extract
  3704. >>>>8 beshort x \b, compression method=
  3705. >>>>8 use zipcompression
  3706. >>>>0x161 string WINZIP \b, WinZIP self-extracting
  3707. # StarView Metafile
  3708. # From Pierre Ducroquet <pinaraf@pinaraf.info>
  3709. 0 string VCLMTF StarView MetaFile
  3710. >6 beshort x \b, version %d
  3711. >8 belong x \b, size %d
  3712. # Zoo archiver
  3713. 20 lelong 0xfdc4a7dc Zoo archive data
  3714. !:mime application/x-zoo
  3715. >4 byte >48 \b, v%c.
  3716. >>6 byte >47 \b%c
  3717. >>>7 byte >47 \b%c
  3718. >32 byte >0 \b, modify: v%d
  3719. >>33 byte x \b.%d+
  3720. >42 lelong 0xfdc4a7dc \b,
  3721. >>70 byte >0 extract: v%d
  3722. >>>71 byte x \b.%d+
  3723. # Shell archives
  3724. 10 string #\ This\ is\ a\ shell\ archive shell archive text
  3725. !:mime application/octet-stream
  3726. #
  3727. # LBR. NB: May conflict with the questionable
  3728. # "binary Computer Graphics Metafile" format.
  3729. #
  3730. 0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data
  3731. #
  3732. # PMA (CP/M derivative of LHA)
  3733. # Update: Joerg Jenderek
  3734. # URL: https://en.wikipedia.org/wiki/LHA_(file_format)
  3735. #
  3736. #2 string -pm0- PMarc archive data [pm0]
  3737. 2 string -pm0-
  3738. >0 use lharc-file
  3739. #2 string -pm1- PMarc archive data [pm1]
  3740. 2 string -pm1-
  3741. >0 use lharc-file
  3742. #2 string -pm2- PMarc archive data [pm2]
  3743. 2 string -pm2-
  3744. >0 use lharc-file
  3745. 2 string -pms- PMarc SFX archive (CP/M, DOS)
  3746. #!:mime application/x-foobar-exec
  3747. !:ext com
  3748. 5 string -pc1- PopCom compressed executable (CP/M)
  3749. #!:mime application/x-
  3750. #!:ext com
  3751. # From Rafael Laboissiere <rafael@laboissiere.net>
  3752. # The Project Revision Control System (see
  3753. # http://prcs.sourceforge.net) generates a packaged project
  3754. # file which is recognized by the following entry:
  3755. 0 leshort 0xeb81 PRCS packaged project
  3756. # Microsoft cabinets
  3757. # by David Necas (Yeti) <yeti@physics.muni.cz>
  3758. #0 string MSCF\0\0\0\0 Microsoft cabinet file data,
  3759. #>25 byte x v%d
  3760. #>24 byte x \b.%d
  3761. # MPi: All CABs have version 1.3, so this is pointless.
  3762. # Better magic in debian-additions.
  3763. # GTKtalog catalogs
  3764. # by David Necas (Yeti) <yeti@physics.muni.cz>
  3765. 4 string gtktalog\ GTKtalog catalog data,
  3766. >13 string 3 version 3
  3767. >>14 beshort 0x677a (gzipped)
  3768. >>14 beshort !0x677a (not gzipped)
  3769. >13 string >3 version %s
  3770. ############################################################################
  3771. # Parity archive reconstruction file, the 'par' file format now used on Usenet.
  3772. 0 string PAR\0 PARity archive data
  3773. >48 leshort =0 - Index file
  3774. >48 leshort >0 - file number %d
  3775. # Felix von Leitner <felix-file@fefe.de>
  3776. 0 string d8:announce BitTorrent file
  3777. !:mime application/x-bittorrent
  3778. # Durval Menezes, <jmgthbfile at durval dot com>
  3779. 0 string d13:announce-list BitTorrent file
  3780. !:mime application/x-bittorrent
  3781. 0 string d7:comment BitTorrent file
  3782. !:mime application/x-bittorrent
  3783. 0 string d4:info BitTorrent file
  3784. !:mime application/x-bittorrent
  3785. # Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi>
  3786. 0 beshort 0x0e0f Atari MSA archive data
  3787. >2 beshort x \b, %d sectors per track
  3788. >4 beshort 0 \b, 1 sided
  3789. >4 beshort 1 \b, 2 sided
  3790. >6 beshort x \b, starting track: %d
  3791. >8 beshort x \b, ending track: %d
  3792. # Alternate ZIP string (amc@arwen.cs.berkeley.edu)
  3793. 0 string PK00PK\003\004 Zip archive data
  3794. !:mime application/zip
  3795. !:ext zip/cbz
  3796. # ACE archive (from http://www.wotsit.org/download.asp?f=ace)
  3797. # by Stefan `Sec` Zehl <sec@42.org>
  3798. 7 string **ACE** ACE archive data
  3799. >15 byte >0 version %d
  3800. >16 byte =0x00 \b, from MS-DOS
  3801. >16 byte =0x01 \b, from OS/2
  3802. >16 byte =0x02 \b, from Win/32
  3803. >16 byte =0x03 \b, from Unix
  3804. >16 byte =0x04 \b, from MacOS
  3805. >16 byte =0x05 \b, from WinNT
  3806. >16 byte =0x06 \b, from Primos
  3807. >16 byte =0x07 \b, from AppleGS
  3808. >16 byte =0x08 \b, from Atari
  3809. >16 byte =0x09 \b, from Vax/VMS
  3810. >16 byte =0x0A \b, from Amiga
  3811. >16 byte =0x0B \b, from Next
  3812. >14 byte x \b, version %d to extract
  3813. >5 leshort &0x0080 \b, multiple volumes,
  3814. >>17 byte x \b (part %d),
  3815. >5 leshort &0x0002 \b, contains comment
  3816. >5 leshort &0x0200 \b, sfx
  3817. >5 leshort &0x0400 \b, small dictionary
  3818. >5 leshort &0x0800 \b, multi-volume
  3819. >5 leshort &0x1000 \b, contains AV-String
  3820. >>30 string \x16*UNREGISTERED\x20VERSION* (unregistered)
  3821. >5 leshort &0x2000 \b, with recovery record
  3822. >5 leshort &0x4000 \b, locked
  3823. >5 leshort &0x8000 \b, solid
  3824. # Date in MS-DOS format (whatever that is)
  3825. #>18 lelong x Created on
  3826. # sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann
  3827. # <doj@cubic.org>
  3828. 0x1A string sfArk sfArk compressed Soundfont
  3829. >0x15 string 2
  3830. >>0x1 string >\0 Version %s
  3831. >>0x2A string >\0 : %s
  3832. # DR-DOS 7.03 Packed File *.??_
  3833. # Reference: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm
  3834. # Note: unpacked by PNUNPACK.EXE
  3835. 0 string Packed\ File\
  3836. # by looking for Control-Z skip ASCII text starting with Packed File
  3837. >0x18 ubyte 0x1a Personal NetWare Packed File
  3838. !:mime application/x-novell-compress
  3839. !:ext ??_
  3840. >>12 string x \b, was "%.12s"
  3841. # 1 or 2
  3842. #>>0x19 ubyte x \b, at 0x19 %u
  3843. >>0x1b ulelong x with %u bytes
  3844. # EET archive
  3845. # From: Tilman Sauerbeck <tilman@code-monkey.de>
  3846. 0 belong 0x1ee7ff00 EET archive
  3847. !:mime application/x-eet
  3848. # rzip archives
  3849. 0 string RZIP rzip compressed data
  3850. >4 byte x - version %d
  3851. >5 byte x \b.%d
  3852. >6 belong x (%d bytes)
  3853. # From: Joerg Jenderek
  3854. # URL: https://help.foxitsoftware.com/kb/install-fzip-file.php
  3855. # reference: http://mark0.net/download/triddefs_xml.7z/
  3856. # defs/f/fzip.trid.xml
  3857. # Note: unknown compression; No "PK" zip magic; normally in directory like
  3858. # "%APPDATA%\Foxit Software\Addon\Foxit Reader\Install"
  3859. 0 ubequad 0x2506781901010000 Foxit add-on/update
  3860. !:mime application/x-fzip
  3861. !:ext fzip
  3862. # From: "Robert Dale" <robdale@gmail.com>
  3863. 0 belong 123 dar archive,
  3864. >4 belong x label "%.8x
  3865. >>8 belong x %.8x
  3866. >>>12 beshort x %.4x"
  3867. >14 byte 0x54 end slice
  3868. >14 beshort 0x4e4e multi-part
  3869. >14 beshort 0x4e53 multi-part, with -S
  3870. # Symbian installation files
  3871. # https://www.thouky.co.uk/software/psifs/sis.html
  3872. # http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf
  3873. 8 lelong 0x10000419 Symbian installation file
  3874. !:mime application/vnd.symbian.install
  3875. >4 lelong 0x1000006D (EPOC release 3/4/5)
  3876. >4 lelong 0x10003A12 (EPOC release 6)
  3877. 0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x)
  3878. !:mime x-epoc/x-sisx-app
  3879. # From "Nelson A. de Oliveira" <naoliv@gmail.com>
  3880. 0 string MPQ\032 MoPaQ (MPQ) archive
  3881. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  3882. # .kgb
  3883. 0 string KGB_arch KGB Archiver file
  3884. >10 string x with compression level %.1s
  3885. # xar (eXtensible ARchiver) archive
  3886. # URL: https://en.wikipedia.org/wiki/Xar_(archiver)
  3887. # xar archive format: https://code.google.com/p/xar/
  3888. # From: "David Remahl" <dremahl@apple.com>
  3889. # Update: Joerg Jenderek
  3890. # TODO: lzma compression; X509Data for pkg and xip
  3891. # Note: verified by `xar --dump-header -f FullBundleUpdate.xar` or
  3892. # 7z t -txar Xcode_10.2_beta_4.xip`
  3893. 0 string xar! xar archive
  3894. !:mime application/x-xar
  3895. # pkg for Mac OSX installer package like FullBundleUpdate.pkg
  3896. # xip for signed Apple software like Xcode_10.2_beta_4.xip
  3897. !:ext xar/pkg/xip
  3898. # always 28 in older archives
  3899. >4 ubeshort >28 \b, header size %u
  3900. # currently there exit only version 1 since about 2014
  3901. >6 ubeshort >1 version %u,
  3902. >8 ubequad x compressed TOC: %llu,
  3903. #>16 ubequad x uncompressed TOC: %llu,
  3904. # cksum_alg 0-2 in older and also 3-4 in newer
  3905. >24 belong 0 no checksum
  3906. >24 belong 1 SHA-1 checksum
  3907. >24 belong 2 MD5 checksum
  3908. >24 belong 3 SHA-256 checksum
  3909. >24 belong 4 SHA-512 checksum
  3910. >24 belong >4 unknown 0x%x checksum
  3911. #>24 belong >4 checksum
  3912. # For no compression jump 0 bytes
  3913. >24 belong 0
  3914. >>0 ubyte x
  3915. # jump more bytes forward by header size
  3916. >>>&(4.S) ubyte x
  3917. # jump more bytes forward by compressed table of contents size
  3918. #>>>>&(8.Q) ubequad x \b, heap data 0x%llx
  3919. >>>>&(8.Q) ubyte x
  3920. # look for data by ./compress after message with 1 space at end
  3921. >>>>>&-3 indirect x \b, contains
  3922. # For SHA-1 jump 20 minus 2 bytes
  3923. >24 belong 1
  3924. >>18 ubyte x
  3925. # jump more bytes forward by header size
  3926. >>>&(4.S) ubyte x
  3927. # jump more bytes forward by compressed table of contents size
  3928. >>>>&(8.Q) ubyte x
  3929. # data compressed by gzip, bzip, lzma or none
  3930. >>>>>&-1 indirect x \b, contains
  3931. # For SHA-256 jump 32 minus 2 bytes
  3932. >24 belong 3
  3933. >>30 ubyte x
  3934. # jump more bytes forward by header size
  3935. >>>&(4.S) ubyte x
  3936. # jump more bytes forward by compressed table of contents size
  3937. >>>>&(8.Q) ubyte x
  3938. >>>>>&-1 indirect x \b, contains
  3939. # For SHA-512 jump 64 minus 2 bytes
  3940. >24 belong 4
  3941. >>62 ubyte x
  3942. # jump more bytes forward by header size
  3943. >>>&(4.S) ubyte x
  3944. # jump more bytes forward by compressed table of contents size
  3945. >>>>&(8.Q) ubyte x
  3946. >>>>>&-1 indirect x \b, contains
  3947. # Type: Parity Archive
  3948. # From: Daniel van Eeden <daniel_e@dds.nl>
  3949. 0 string PAR2 Parity Archive Volume Set
  3950. # Bacula volume format. (Volumes always start with a block header.)
  3951. # URL: https://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html
  3952. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  3953. 12 string BB02 Bacula volume
  3954. >20 bedate x \b, started %s
  3955. # ePub is XHTML + XML inside a ZIP archive. The first member of the
  3956. # archive must be an uncompressed file called 'mimetype' with contents
  3957. # 'application/epub+zip'
  3958. # From: "Michael Gorny" <mgorny@gentoo.org>
  3959. # ZPAQ: http://mattmahoney.net/dc/zpaq.html
  3960. 0 string zPQ ZPAQ stream
  3961. >3 byte x \b, level %d
  3962. # From: Barry Carter <carter.barry@gmail.com>
  3963. # https://encode.ru/threads/456-zpaq-updates/page32
  3964. 0 string 7kSt ZPAQ file
  3965. # BBeB ebook, unencrypted (LRF format)
  3966. # URL: https://www.sven.de/librie/Librie/LrfFormat
  3967. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  3968. 0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted
  3969. >8 beshort x \b, version %d
  3970. >36 byte 1 \b, front-to-back
  3971. >36 byte 16 \b, back-to-front
  3972. >42 beshort x \b, (%dx,
  3973. >44 beshort x %d)
  3974. # Symantec GHOST image by Joerg Jenderek at May 2014
  3975. # https://us.norton.com/ghost/
  3976. # https://www.garykessler.net/library/file_sigs.html
  3977. 0 ubelong&0xFFFFf7f0 0xFEEF0100 Norton GHost image
  3978. # *.GHO
  3979. >2 ubyte&0x08 0x00 \b, first file
  3980. # *.GHS or *.[0-9] with cns program option
  3981. >2 ubyte&0x08 0x08 \b, split file
  3982. # part of split index interesting for *.ghs
  3983. >>4 ubyte x id=0x%x
  3984. # compression tag minus one equals numeric compression command line switch z[1-9]
  3985. >3 ubyte 0 \b, no compression
  3986. >3 ubyte 2 \b, fast compression (Z1)
  3987. >3 ubyte 3 \b, medium compression (Z2)
  3988. >3 ubyte >3
  3989. >>3 ubyte <11 \b, compression (Z%d-1)
  3990. >2 ubyte&0x08 0x00
  3991. # ~ 30 byte password field only for *.gho
  3992. >>12 ubequad !0 \b, password protected
  3993. >>44 ubyte !1
  3994. # 1~Image All, sector-by-sector only for *.gho
  3995. >>>10 ubyte 1 \b, sector copy
  3996. # 1~Image Boot track only for *.gho
  3997. >>>43 ubyte 1 \b, boot track
  3998. # 1~Image Disc only for *.gho implies Image Boot track and sector copy
  3999. >>44 ubyte 1 \b, disc sector copy
  4000. # optional image description only *.gho
  4001. >>0xff string >\0 "%-.254s"
  4002. # look for DOS sector end sequence
  4003. >0xE08 search/7776 \x55\xAA
  4004. >>&-512 indirect x \b; contains
  4005. # Google Chrome extensions
  4006. # https://developer.chrome.com/extensions/crx
  4007. # https://developer.chrome.com/extensions/hosting
  4008. 0 string Cr24 Google Chrome extension
  4009. !:mime application/x-chrome-extension
  4010. >4 ulong x \b, version %u
  4011. # SeqBox - Sequenced container
  4012. # ext: sbx, seqbox
  4013. # Marco Pontello marcopon@gmail.com
  4014. # reference: https://github.com/MarcoPon/SeqBox
  4015. 0 string SBx SeqBox,
  4016. >3 byte x version %d
  4017. # LyNX archive
  4018. 56 string USE\040LYNX\040TO\040DISSOLVE\040THIS\040FILE LyNX archive
  4019. # From: Joerg Jenderek
  4020. # URL: https://www.acronis.com/
  4021. # Reference: https://en.wikipedia.org/wiki/TIB_(file_format)
  4022. # Note: only tested with True Image 2013 Build 5962 and 2019 Build 14110
  4023. 0 ubequad 0xce24b9a220000000 Acronis True Image backup
  4024. !:mime application/x-acronis-tib
  4025. !:ext tib
  4026. # 01000000
  4027. #>20 ubelong x \b, at 20 0x%x
  4028. # 20000000
  4029. #>28 ubelong x \b, at 28 0x%x
  4030. # strings like "Generic- SD/MMC 1.00" "Unknown Disk" "Msft Virtual Disk 1.0"
  4031. # ???
  4032. # strings like "\Device\0000011e" "\Device\0000015a"
  4033. #>0 search/0x6852300/cs \\Device\\
  4034. #>>&-1 pstring x \b, %s
  4035. # "\Device\HarddiskVolume30" "\Device\HarddiskVolume39"
  4036. #>>>&1 search/180/cs \\Device\\
  4037. #>>>>&-1 pstring x \b, %s
  4038. #>>>>>&0 search/29/cs \0\0\xc8\0
  4039. # disk label
  4040. #>>>>>>&10 lestring16 x \b, disk label %11.11s
  4041. #>>>>>>&9 plestring16 x \b, disk label "%11.11s"
  4042. #>>>>>>&10 ubequad x %16.16llx
  4043. # Gentoo XPAK binary package
  4044. # by Michal Gorny <mgorny@gentoo.org>
  4045. # https://gitweb.gentoo.org/proj/portage.git/tree/man/xpak.5
  4046. -4 string STOP
  4047. >-16 string XPAKSTOP Gentoo binary package (XPAK)
  4048. # From: Joerg Jenderek
  4049. # URL: https://kodi.wiki/view/TexturePacker
  4050. # Reference: https://mirrors.kodi.tv/releases/source/17.3-Krypton.tar.gz
  4051. # /xbmc-Krypton/xbmc/guilib/XBTF.h
  4052. # /xbmc-Krypton/xbmc/guilib/XBTF.cpp
  4053. 0 string XBTF
  4054. # skip ASCII text by looking for terminating \0 of path
  4055. >264 ubyte 0 XBMC texture package
  4056. !:mime application/x-xbmc-xbt
  4057. !:ext xbt
  4058. # XBTF_VERSION 2
  4059. >>4 string !2 \b, version %-.1s
  4060. # nofFiles /xbmc-Krypton/xbmc/guilib/XBTFReader.cpp
  4061. >>5 ulelong x \b, %u file
  4062. # plural s
  4063. >>5 ulelong >1 \bs
  4064. # path[CXBTFFile[MaximumPathLength=256]
  4065. >>9 string x \b, 1st %s
  4066. # ALZIP archive
  4067. # by Hyungjun Park <hyungjun.park@worksmobile.com>, Hajin Jang <hajin_jang@worksmobile.com>
  4068. # http://kippler.com/win/unalz/
  4069. # https://salsa.debian.org/l10n-korean-team/unalz
  4070. 0 string ALZ\001 ALZ archive data
  4071. !:ext alz
  4072. # https://cf-aldn.altools.co.kr/setup/EGG_Specification.zip
  4073. 0 string EGGA EGG archive data,
  4074. !:ext egg
  4075. >5 byte x version %u
  4076. >4 byte x \b.%u
  4077. >>0x0E ulelong =0x08E28222
  4078. >>0x0E ulelong =0x24F5A262 \b, split
  4079. >>0x0E ulelong =0x24E5A060 \b, solid
  4080. >>0x0E default x \b, unknown
  4081. # PAQ9A archive
  4082. # URL: http://mattmahoney.net/dc/#paq9a
  4083. # Note: Line 1186 of paq9a.cpp gives the magic bytes
  4084. 0 string pQ9\001 PAQ9A archive
  4085. #------------------------------------------------------------------------------
  4086. # $File: asf,v 1.1 2019/12/26 02:07:53 christos Exp $
  4087. # asf: file(1) magic for Microsoft Advanced Systems Format (ASF) files
  4088. # http://www.staroceans.org/e-book/ASF_Specification.pdf
  4089. 0 name asf-name
  4090. # ASF_Data_Object
  4091. #>0 guid 75B22636-668E-11CF-A6D9-00AA0062CE6C
  4092. #>16 lequad >0
  4093. #>>(16.q) use asf-object
  4094. # ASF_Simple_Index_Object
  4095. >0 guid 33000890-E5B1-11CF-89F4-00A0C90349CB
  4096. >0 guid D6E229D3-35DA-11D1-9034-00A0C90349BE ASF_Index_Object
  4097. >0 guid FEB103F8-12AD-4C64-840F-2A1D2F7AD48C ASF_Media_Object_Index_Object
  4098. >0 guid 3CB73FD0-0C4A-4803-953D-EDF7B6228F0C ASF_Timecode_Index_Object
  4099. # ASF_File_Properties_Object
  4100. >0 guid 8CABDCA1-A947-11CF-8EE4-00C00C205365
  4101. # ASF_Stream_Properties_Object
  4102. >0 guid B7DC0791-A9B7-11CF-8EE6-00C00C205365
  4103. #>>56 lequad x Time Offset %lld
  4104. #>>64 lelong x Type-Specicic Data Length %d
  4105. #>>68 lelong x Error Correction Data Length %d
  4106. #>>72 leshort x Flags 0x%x
  4107. #>>74 lelong x Reserved %x
  4108. # ASF_Audio_Media
  4109. >>24 guid F8699E40-5B4D-11CF-A8FD-00805F5C442B \b, Audio Media (
  4110. >>>78 leshort x \bCodec Id %d
  4111. >>>80 leshort x \b, Number of channels %d
  4112. >>>82 lelong x \b, Samples Per Second %d
  4113. >>>86 lelong x \b, Average Number of Bytes Per Second %d
  4114. >>>90 lelong x \b, Block Alignment %d
  4115. >>>94 leshort x \b, Bits Per Sample %d
  4116. # ASF_Video_Media
  4117. >>24 guid BC19EFC0-5B4D-11CF-A8FD-00805F5C442B \b, Video Media (
  4118. >>>78 lelong x \bEncoded Image Width %d
  4119. >>>82 lelong x \b, Encoded Image Height %d
  4120. #>>>85 leshort x \b, Format Data Size %x
  4121. >>>93 lelong x \b, Image Width %d
  4122. >>>97 lelong x \b, Image Height %d
  4123. #>>>101 leshort x \b, Reserved 0x%x
  4124. >>>103 leshort x \b, Bits Per Pixel Count %d
  4125. #>>>105 lelong x \b, Compression ID %d
  4126. #>>>109 lelong x \b, Image Size %d
  4127. #>>>113 lelong x \b, Horizontal Pixels Per Meter %d
  4128. #>>>117 lelong x \b, Vertical Pixels Per Meter %d
  4129. #>>>121 lelong x \b, Colors Used Count %d
  4130. #>>>125 lelong x \b, Important Colors Count %d
  4131. >>0 lelong x \b, Error correction type
  4132. >>40 use asf-name
  4133. >>0 lelong x \b)
  4134. #ASF_Header_Extension_Object
  4135. >0 guid 5FBF03B5-A92E-11CF-8EE3-00C00C205365
  4136. # ASF_Codec_List_Object
  4137. >0 guid 86D15240-311D-11D0-A3A4-00A0C90348F6
  4138. >0 guid 1EFB1A30-0B62-11D0-A39B-00A0C90348F6 ASF_Script_Command_Object
  4139. >0 guid F487CD01-A951-11CF-8EE6-00C00C205365 ASF_Marker_Object
  4140. >0 guid D6E229DC-35DA-11D1-9034-00A0C90349BE ASF_Bitrate_Mutual_Exclusion_Object
  4141. >0 guid 75B22635-668E-11CF-A6D9-00AA0062CE6C ASF_Error_Correction_Object
  4142. # ASF_Content_Description_Object
  4143. >0 guid 75B22633-668E-11CF-A6D9-00AA0062CE6C
  4144. #>>24 leshort title length %d
  4145. #>>26 leshort author length %d
  4146. #>>28 leshort copyright length %d
  4147. #>>30 leshort descriptor length %d
  4148. #>>32 leshort rating length %d
  4149. >0 guid D2D0A440-E307-11D2-97F0-00A0C95EA850 ASF_Extended_Content_Description_Object
  4150. >0 guid 2211B3FA-BD23-11D2-B4B7-00A0C955FC6E ASF_Content_Branding_Object
  4151. >0 guid 7BF875CE-468D-11D1-8D82-006097C9A2B2 ASF_Stream_Bitrate_Properties_Object
  4152. >0 guid 2211B3FB-BD23-11D2-B4B7-00A0C955FC6E ASF_Content_Encryption_Object
  4153. >0 guid 298AE614-2622-4C17-B935-DAE07EE9289C ASF_Extended_Content_Encryption_Object
  4154. >0 guid 2211B3FC-BD23-11D2-B4B7-00A0C955FC6E ASF_Digital_Signature_Object
  4155. # ASF_Padding_Object
  4156. >0 guid 1806D474-CADF-4509-A4BA-9AABCB96AAE8
  4157. >0 guid 14E6A5CB-C672-4332-8399-A96952065B5A ASF_Extended_Stream_Properties_Object
  4158. >0 guid A08649CF-4775-4670-8A16-6E35357566CD ASF_Advanced_Mutual_Exclusion_Object
  4159. >0 guid D1465A40-5A79-4338-B71B-E36B8FD6C249 ASF_Group_Mutual_Exclusion_Object
  4160. >0 guid D4FED15B-88D3-454F-81F0-ED5C45999E24 ASF_Stream_Prioritization_Object
  4161. >0 guid A69609E6-517B-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Object
  4162. >0 guid 7C4346A9-EFE0-4BFC-B229-393EDE415C85 ASF_Language_List_Object
  4163. >0 guid C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA ASF_Metadata_Object
  4164. >0 guid 44231C94-9498-49D1-A141-1D134E457054 ASF_Metadata_Library_Object
  4165. >0 guid D6E229DF-35DA-11D1-9034-00A0C90349BE ASF_Index_Parameters_Object
  4166. >0 guid 6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7 ASF_Media_Object_Index_Parameters_Object
  4167. >0 guid F55E496D-9797-4B5D-8C8B-604DFE9BFB24 ASF_Timecode_Index_Parameters_Object
  4168. >0 guid 26F18B5D-4584-47EC-9F5F-0E651F0452C9 ASF_Compatibility_Object
  4169. >0 guid 43058533-6981-49E6-9B74-AD12CB86D58C ASF_Advanced_Content_Encryption_Object
  4170. >0 guid 59DACFC0-59E6-11D0-A3AC-00A0C90348F6 ASF_Command_Media
  4171. >0 guid B61BE100-5B4E-11CF-A8FD-00805F5C44 ASF_JFIF_Media
  4172. >0 guid 35907DE0-E415-11CF-A917-00805F5C442B ASF_Degradable_JPEG_Media
  4173. >0 guid 91BD222C-F21C-497A-8B6D-5AA86BFC0185 ASF_File_Transfer_Media
  4174. >0 guid 3AFB65E2-47EF-40F2-AC2C-70A90D71D343 ASF_Binary_Media
  4175. >0 guid 776257D4-C627-41CB-8F81-7AC7FF1C40CC ASF_Web_Stream_Media_Subtype
  4176. >0 guid DA1E6B13-8359-4050-B398-388E965BF00C ASF_Web_Stream_Format
  4177. >0 guid 20FB5700-5B55-11CF-A8FD-00805F5C442B ASF_No_Error_Correction
  4178. >0 guid BFC3CD50-618F-11CF-8BB2-00AA00B4E220 ASF_Audio_Spread
  4179. >0 guid ABD3D211-A9BA-11cf-8EE6-00C00C205365 ASF_Reserved_1
  4180. >0 guid 7A079BB6-DAA4-4e12-A5CA-91D38DC11A8D ASF_Content_Encryption_System_Windows_Media_DRM
  4181. # _Network_Devices
  4182. >0 guid 86D15241-311D-11D0-A3A4-00A0C90348F6 ASF_Reserved_2
  4183. >0 guid 4B1ACBE3-100B-11D0-A39B-00A0C90348F6 ASF_Reserved_3
  4184. >0 guid 4CFEDB20-75F6-11CF-9C0F-00A0C90349CB ASF_Reserved_4
  4185. >0 guid D6E22A00-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Language
  4186. >0 guid D6E22A01-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Bitrate
  4187. >0 guid D6E22A02-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Unknown
  4188. >0 guid AF6060AA-5197-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Exclusive
  4189. >0 guid AF6060AB-5197-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Partial
  4190. >0 guid 399595EC-8667-4E2D-8FDB-98814CE76C1E ASF_Payload_Extension_System_Timecode
  4191. >0 guid E165EC0E-19ED-45D7-B4A7-25CBD1E28E9B ASF_Payload_Extension_System_File_Name
  4192. >0 guid D590DC20-07BC-436C-9CF7-F3BBFBF1A4DC ASF_Payload_Extension_System_Content_Type
  4193. >0 guid 1B1EE554-F9EA-4BC8-821A-376B74E4C4B8 ASF_Payload_Extension_System_Pixel_Aspect_Ratio
  4194. >0 guid C6BD9450-867F-4907-83A3-C77921B733AD ASF_Payload_Extension_System_Sample_Duration
  4195. >0 guid 6698B84E-0AFA-4330-AEB2-1C0A98D7A44D ASF_Payload_Extension_System_Encryption_Sample_ID
  4196. >0 guid 00E1AF06-7BEC-11D1-A582-00C04FC29CFB ASF_Payload_Extension_System_Degradable_JPEG
  4197. 0 name asf-object
  4198. >0 use asf-name
  4199. #>>16 lequad >0 (size %lld) [
  4200. >>16 lequad >0
  4201. >>>(16.q) use asf-object
  4202. #>>16 lequad 0 ]
  4203. # Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com>
  4204. 0 guid 75B22630-668E-11CF-A6D9-00AA0062CE6C Microsoft ASF
  4205. !:mime video/x-ms-asf
  4206. #>16 lequad >0 (size %lld
  4207. #>>24 lelong x \b, %d header objects)
  4208. >16 lequad >0
  4209. >>30 use asf-object
  4210. >>(16.q) use asf-object
  4211. #------------------------------------------------------------------------------
  4212. # $File: assembler,v 1.6 2013/12/11 14:14:20 christos Exp $
  4213. # make: file(1) magic for assembler source
  4214. #
  4215. 0 regex \^[\040\t]{0,50}\\.asciiz assembler source text
  4216. !:mime text/x-asm
  4217. 0 regex \^[\040\t]{0,50}\\.byte assembler source text
  4218. !:mime text/x-asm
  4219. 0 regex \^[\040\t]{0,50}\\.even assembler source text
  4220. !:mime text/x-asm
  4221. 0 regex \^[\040\t]{0,50}\\.globl assembler source text
  4222. !:mime text/x-asm
  4223. 0 regex \^[\040\t]{0,50}\\.text assembler source text
  4224. !:mime text/x-asm
  4225. 0 regex \^[\040\t]{0,50}\\.file assembler source text
  4226. !:mime text/x-asm
  4227. 0 regex \^[\040\t]{0,50}\\.type assembler source text
  4228. !:mime text/x-asm
  4229. #------------------------------------------------------------------------------
  4230. # $File: asterix,v 1.5 2009/09/19 16:28:08 christos Exp $
  4231. # asterix: file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character
  4232. # strings as "long" - we assume they're just strings:
  4233. # From: guy@netapp.com (Guy Harris)
  4234. #
  4235. 0 string *STA Aster*x
  4236. >7 string WORD Words Document
  4237. >7 string GRAP Graphic
  4238. >7 string SPRE Spreadsheet
  4239. >7 string MACR Macro
  4240. 0 string 2278 Aster*x Version 2
  4241. >29 byte 0x36 Words Document
  4242. >29 byte 0x35 Graphic
  4243. >29 byte 0x32 Spreadsheet
  4244. >29 byte 0x38 Macro
  4245. #------------------------------------------------------------------------------
  4246. # $File: att3b,v 1.10 2017/03/17 21:35:28 christos Exp $
  4247. # att3b: file(1) magic for AT&T 3B machines
  4248. #
  4249. # The `versions' should be un-commented if they work for you.
  4250. # (Was the problem just one of endianness?)
  4251. #
  4252. # 3B20
  4253. #
  4254. # The 3B20 conflicts with SCCS.
  4255. #0 beshort 0550 3b20 COFF executable
  4256. #>12 belong >0 not stripped
  4257. #>22 beshort >0 - version %d
  4258. #0 beshort 0551 3b20 COFF executable (TV)
  4259. #>12 belong >0 not stripped
  4260. #>22 beshort >0 - version %d
  4261. #
  4262. # WE32K
  4263. #
  4264. 0 beshort 0560 WE32000 COFF
  4265. >18 beshort ^00000020 object
  4266. >18 beshort &00000020 executable
  4267. >12 belong >0 not stripped
  4268. >18 beshort ^00010000 N/A on 3b2/300 w/paging
  4269. >18 beshort &00020000 32100 required
  4270. >18 beshort &00040000 and MAU hardware required
  4271. >20 beshort 0407 (impure)
  4272. >20 beshort 0410 (pure)
  4273. >20 beshort 0413 (demand paged)
  4274. >20 beshort 0443 (target shared library)
  4275. >22 beshort >0 - version %d
  4276. 0 beshort 0561 WE32000 COFF executable (TV)
  4277. >12 belong >0 not stripped
  4278. #>18 beshort &00020000 - 32100 required
  4279. #>18 beshort &00040000 and MAU hardware required
  4280. #>22 beshort >0 - version %d
  4281. #
  4282. # core file for 3b2
  4283. 0 string \000\004\036\212\200 3b2 core file
  4284. >364 string >\0 of '%s'
  4285. #------------------------------------------------------------------------------
  4286. # $File: audio,v 1.120 2021/02/23 00:51:10 christos Exp $
  4287. # audio: file(1) magic for sound formats (see also "iff")
  4288. #
  4289. # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
  4290. # and others
  4291. #
  4292. # Sun/NeXT audio data
  4293. 0 string .snd Sun/NeXT audio data:
  4294. >12 belong 1 8-bit ISDN mu-law,
  4295. !:mime audio/basic
  4296. >12 belong 2 8-bit linear PCM [REF-PCM],
  4297. !:mime audio/basic
  4298. >12 belong 3 16-bit linear PCM,
  4299. !:mime audio/basic
  4300. >12 belong 4 24-bit linear PCM,
  4301. !:mime audio/basic
  4302. >12 belong 5 32-bit linear PCM,
  4303. !:mime audio/basic
  4304. >12 belong 6 32-bit IEEE floating point,
  4305. !:mime audio/basic
  4306. >12 belong 7 64-bit IEEE floating point,
  4307. !:mime audio/basic
  4308. >12 belong 8 Fragmented sample data,
  4309. >12 belong 10 DSP program,
  4310. >12 belong 11 8-bit fixed point,
  4311. >12 belong 12 16-bit fixed point,
  4312. >12 belong 13 24-bit fixed point,
  4313. >12 belong 14 32-bit fixed point,
  4314. >12 belong 18 16-bit linear with emphasis,
  4315. >12 belong 19 16-bit linear compressed,
  4316. >12 belong 20 16-bit linear with emphasis and compression,
  4317. >12 belong 21 Music kit DSP commands,
  4318. >12 belong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
  4319. !:mime audio/x-adpcm
  4320. >12 belong 24 compressed (8-bit CCITT G.722 ADPCM)
  4321. >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM),
  4322. >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM),
  4323. >12 belong 27 8-bit A-law (CCITT G.711),
  4324. >20 belong 1 mono,
  4325. >20 belong 2 stereo,
  4326. >20 belong 4 quad,
  4327. >16 belong >0 %d Hz
  4328. # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
  4329. # that uses little-endian encoding and has a different magic number
  4330. 0 lelong 0x0064732E DEC audio data:
  4331. >12 lelong 1 8-bit ISDN mu-law,
  4332. !:mime audio/x-dec-basic
  4333. >12 lelong 2 8-bit linear PCM [REF-PCM],
  4334. !:mime audio/x-dec-basic
  4335. >12 lelong 3 16-bit linear PCM,
  4336. !:mime audio/x-dec-basic
  4337. >12 lelong 4 24-bit linear PCM,
  4338. !:mime audio/x-dec-basic
  4339. >12 lelong 5 32-bit linear PCM,
  4340. !:mime audio/x-dec-basic
  4341. >12 lelong 6 32-bit IEEE floating point,
  4342. !:mime audio/x-dec-basic
  4343. >12 lelong 7 64-bit IEEE floating point,
  4344. !:mime audio/x-dec-basic
  4345. >12 belong 8 Fragmented sample data,
  4346. >12 belong 10 DSP program,
  4347. >12 belong 11 8-bit fixed point,
  4348. >12 belong 12 16-bit fixed point,
  4349. >12 belong 13 24-bit fixed point,
  4350. >12 belong 14 32-bit fixed point,
  4351. >12 belong 18 16-bit linear with emphasis,
  4352. >12 belong 19 16-bit linear compressed,
  4353. >12 belong 20 16-bit linear with emphasis and compression,
  4354. >12 belong 21 Music kit DSP commands,
  4355. >12 lelong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
  4356. !:mime audio/x-dec-basic
  4357. >12 belong 24 compressed (8-bit CCITT G.722 ADPCM)
  4358. >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM),
  4359. >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM),
  4360. >12 belong 27 8-bit A-law (CCITT G.711),
  4361. >20 lelong 1 mono,
  4362. >20 lelong 2 stereo,
  4363. >20 lelong 4 quad,
  4364. >16 lelong >0 %d Hz
  4365. # Creative Labs AUDIO stuff
  4366. 0 string MThd Standard MIDI data
  4367. !:mime audio/midi
  4368. >8 beshort x (format %d)
  4369. >10 beshort x using %d track
  4370. >10 beshort >1 \bs
  4371. >12 beshort&0x7fff x at 1/%d
  4372. >12 beshort&0x8000 >0 SMPTE
  4373. 0 string CTMF Creative Music (CMF) data
  4374. !:mime audio/x-unknown
  4375. 0 string SBI SoundBlaster instrument data
  4376. !:mime audio/x-unknown
  4377. 0 string Creative\ Voice\ File Creative Labs voice data
  4378. !:mime audio/x-unknown
  4379. # is this next line right? it came this way...
  4380. >19 byte 0x1A
  4381. >23 byte >0 - version %d
  4382. >22 byte >0 \b.%d
  4383. # first entry is also the string "NTRK"
  4384. 0 belong 0x4e54524b MultiTrack sound data
  4385. >4 belong x - version %d
  4386. # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
  4387. # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
  4388. 0 string EMOD Extended MOD sound data,
  4389. >4 byte&0xf0 x version %d
  4390. >4 byte&0x0f x \b.%d,
  4391. >45 byte x %d instruments
  4392. >83 byte 0 (module)
  4393. >83 byte 1 (song)
  4394. # Real Audio (Magic .ra\0375)
  4395. 0 belong 0x2e7261fd RealAudio sound file
  4396. !:mime audio/x-pn-realaudio
  4397. 0 string .RMF\0\0\0 RealMedia file
  4398. !:mime application/vnd.rn-realmedia
  4399. #video/x-pn-realvideo
  4400. #video/vnd.rn-realvideo
  4401. #application/vnd.rn-realmedia
  4402. # sigh, there are many mimes for that but the above are the most common.
  4403. # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
  4404. # Oct 31, 1995
  4405. # fixed by <doj@cubic.org> 2003-06-24
  4406. # Too short...
  4407. #0 string MTM MultiTracker Module sound file
  4408. #0 string if Composer 669 Module sound data
  4409. #0 string JN Composer 669 Module sound data (extended format)
  4410. 0 string MAS_U ULT(imate) Module sound data
  4411. #0 string FAR Module sound data
  4412. #>4 string >\15 Title: "%s"
  4413. 0x2c string SCRM ScreamTracker III Module sound data
  4414. >0 string >\0 Title: "%s"
  4415. !:mime audio/x-s3m
  4416. # .stm before it got above .s3m extension
  4417. 0x16 string \!Scream\! ScreamTracker Module sound data
  4418. >0 string >\0 Title: "%s"
  4419. # Gravis UltraSound patches
  4420. # From <ache@nagual.ru>
  4421. 0 string GF1PATCH110\0ID#000002\0 GUS patch
  4422. 0 string GF1PATCH100\0ID#000002\0 Old GUS patch
  4423. # mime types according to http://www.geocities.com/nevilo/mod.htm:
  4424. # audio/it .it
  4425. # audio/x-zipped-it .itz
  4426. # audio/xm fasttracker modules
  4427. # audio/x-s3m screamtracker modules
  4428. # audio/s3m screamtracker modules
  4429. # audio/x-zipped-mod mdz
  4430. # audio/mod mod
  4431. # audio/x-mod All modules (mod, s3m, 669, mtm, med, xm, it, mdz, stm, itz, xmz, s3z)
  4432. #
  4433. # Taken from loader code from mikmod version 2.14
  4434. # by Steve McIntyre (stevem@chiark.greenend.org.uk)
  4435. # <doj@cubic.org> added title printing on 2003-06-24
  4436. 0 string MAS_UTrack_V00
  4437. >14 string >/0 ultratracker V1.%.1s module sound data
  4438. !:mime audio/x-mod
  4439. #audio/x-tracker-module
  4440. 0 string UN05 MikMod UNI format module sound data
  4441. 0 string Extended\ Module: Fasttracker II module sound data
  4442. !:mime audio/x-mod
  4443. #audio/x-tracker-module
  4444. >17 string >\0 Title: "%s"
  4445. 21 string/c =!SCREAM! Screamtracker 2 module sound data
  4446. !:mime audio/x-mod
  4447. #audio/x-screamtracker-module
  4448. 21 string BMOD2STM Screamtracker 2 module sound data
  4449. !:mime audio/x-mod
  4450. #audio/x-screamtracker-module
  4451. 1080 string M.K. 4-channel Protracker module sound data
  4452. !:mime audio/x-mod
  4453. #audio/x-protracker-module
  4454. >0 string >\0 Title: "%s"
  4455. 1080 string M!K! 4-channel Protracker module sound data
  4456. !:mime audio/x-mod
  4457. #audio/x-protracker-module
  4458. >0 string >\0 Title: "%s"
  4459. 1080 string FLT4 4-channel Startracker module sound data
  4460. !:mime audio/x-mod
  4461. #audio/x-startracker-module
  4462. >0 string >\0 Title: "%s"
  4463. 1080 string FLT8 8-channel Startracker module sound data
  4464. !:mime audio/x-mod
  4465. #audio/x-startracker-module
  4466. >0 string >\0 Title: "%s"
  4467. 1080 string 4CHN 4-channel Fasttracker module sound data
  4468. !:mime audio/x-mod
  4469. #audio/x-fasttracker-module
  4470. >0 string >\0 Title: "%s"
  4471. 1080 string 6CHN 6-channel Fasttracker module sound data
  4472. !:mime audio/x-mod
  4473. #audio/x-fasttracker-module
  4474. >0 string >\0 Title: "%s"
  4475. 1080 string 8CHN 8-channel Fasttracker module sound data
  4476. !:mime audio/x-mod
  4477. #audio/x-fasttracker-module
  4478. >0 string >\0 Title: "%s"
  4479. 1080 string CD81 8-channel Octalyser module sound data
  4480. !:mime audio/x-mod
  4481. #audio/x-octalysertracker-module
  4482. >0 string >\0 Title: "%s"
  4483. 1080 string OKTA 8-channel Octalyzer module sound data
  4484. !:mime audio/x-mod
  4485. #audio/x-octalysertracker-module
  4486. >0 string >\0 Title: "%s"
  4487. # Not good enough.
  4488. #1082 string CH
  4489. #>1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data
  4490. 1080 string 16CN 16-channel Taketracker module sound data
  4491. !:mime audio/x-mod
  4492. #audio/x-taketracker-module
  4493. >0 string >\0 Title: "%s"
  4494. 1080 string 32CN 32-channel Taketracker module sound data
  4495. !:mime audio/x-mod
  4496. #audio/x-taketracker-module
  4497. >0 string >\0 Title: "%s"
  4498. # TOC sound files -Trevor Johnson <trevor@jpj.net>
  4499. #
  4500. 0 string TOC TOC sound file
  4501. # sidfiles <pooka@iki.fi>
  4502. # added name,author,(c) and new RSID type by <doj@cubic.org> 2003-06-24
  4503. 0 string SIDPLAY\ INFOFILE Sidplay info file
  4504. 0 string PSID PlaySID v2.2+ (AMIGA) sidtune
  4505. >4 beshort >0 w/ header v%d,
  4506. >14 beshort =1 single song,
  4507. >14 beshort >1 %d songs,
  4508. >16 beshort >0 default song: %d
  4509. >0x16 string >\0 name: "%s"
  4510. >0x36 string >\0 author: "%s"
  4511. >0x56 string >\0 copyright: "%s"
  4512. 0 string RSID RSID sidtune PlaySID compatible
  4513. >4 beshort >0 w/ header v%d,
  4514. >14 beshort =1 single song,
  4515. >14 beshort >1 %d songs,
  4516. >16 beshort >0 default song: %d
  4517. >0x16 string >\0 name: "%s"
  4518. >0x36 string >\0 author: "%s"
  4519. >0x56 string >\0 copyright: "%s"
  4520. # IRCAM sound files - Michael Pruett <michael@68k.org>
  4521. # http://www-mmsp.ece.mcgill.ca/documents/AudioFormats/IRCAM/IRCAM.html
  4522. 0 belong 0x64a30100 IRCAM file (VAX little-endian)
  4523. 0 belong 0x0001a364 IRCAM file (VAX big-endian)
  4524. 0 belong 0x64a30200 IRCAM file (Sun big-endian)
  4525. 0 belong 0x0002a364 IRCAM file (Sun little-endian)
  4526. 0 belong 0x64a30300 IRCAM file (MIPS little-endian)
  4527. 0 belong 0x0003a364 IRCAM file (MIPS big-endian)
  4528. 0 belong 0x64a30400 IRCAM file (NeXT big-endian)
  4529. 0 belong 0x64a30400 IRCAM file (NeXT big-endian)
  4530. 0 belong 0x0004a364 IRCAM file (NeXT little-endian)
  4531. # NIST SPHERE <mpruett@sgi.com>
  4532. 0 string NIST_1A\n\ \ \ 1024\n NIST SPHERE file
  4533. # Sample Vision <mpruett@sgi.com>
  4534. 0 string SOUND\ SAMPLE\ DATA\ Sample Vision file
  4535. # Audio Visual Research <tonigonenstein@users.sourceforge.net>
  4536. 0 string 2BIT Audio Visual Research file,
  4537. >12 beshort =0 mono,
  4538. >12 beshort =-1 stereo,
  4539. >14 beshort x %d bits
  4540. >16 beshort =0 unsigned,
  4541. >16 beshort =-1 signed,
  4542. >22 belong&0x00ffffff x %d Hz,
  4543. >18 beshort =0 no loop,
  4544. >18 beshort =-1 loop,
  4545. >21 ubyte <128 note %d,
  4546. >22 byte =0 replay 5.485 KHz
  4547. >22 byte =1 replay 8.084 KHz
  4548. >22 byte =2 replay 10.971 KHz
  4549. >22 byte =3 replay 16.168 KHz
  4550. >22 byte =4 replay 21.942 KHz
  4551. >22 byte =5 replay 32.336 KHz
  4552. >22 byte =6 replay 43.885 KHz
  4553. >22 byte =7 replay 47.261 KHz
  4554. # SGI SoundTrack <mpruett@sgi.com>
  4555. 0 string _SGI_SoundTrack SGI SoundTrack project file
  4556. # ID3 version 2 tags <waschk@informatik.uni-rostock.de>
  4557. 0 string ID3 Audio file with ID3 version 2
  4558. >3 byte x \b.%d
  4559. >4 byte x \b.%d
  4560. >>5 byte &0x80 \b, unsynchronized frames
  4561. >>5 byte &0x40 \b, extended header
  4562. >>5 byte &0x20 \b, experimental
  4563. >>5 byte &0x10 \b, footer present
  4564. >(6.I+10) indirect x \b, contains:
  4565. # NSF (NES sound file) magic
  4566. 0 string NESM\x1a NES Sound File
  4567. >14 string >\0 ("%s" by
  4568. >46 string >\0 %s, copyright
  4569. >78 string >\0 %s),
  4570. >5 byte x version %d,
  4571. >6 byte x %d tracks,
  4572. >122 byte&0x2 =1 dual PAL/NTSC
  4573. >122 byte&0x1 =1 PAL
  4574. >122 byte&0x1 =0 NTSC
  4575. # NSFE (Extended NES sound file) magic
  4576. # http://slickproductions.org/docs/NSF/nsfespec.txt
  4577. # From: David Pflug <david@pflug.email>
  4578. 0 string NSFE Extended NES Sound File
  4579. >48 search/0x1000 auth
  4580. >>&0 string >\0 ("%s"
  4581. >>>&1 string >\0 by %s
  4582. >>>>&1 string >\0 \b, copyright %s
  4583. >>>>>&1 string >\0 \b, ripped by %s
  4584. >20 byte x \b), %d tracks,
  4585. >18 byte&0x2 =1 dual PAL/NTSC
  4586. >18 byte&0x2 =0
  4587. >>18 byte&0x1 =1 PAL
  4588. >>18 byte&0x1 =0 NTSC
  4589. # Type: SNES SPC700 sound files
  4590. # From: Josh Triplett <josh@freedesktop.org>
  4591. 0 string SNES-SPC700\ Sound\ File\ Data\ v SNES SPC700 sound file
  4592. >&0 string 0.30 \b, version %s
  4593. >>0x23 byte 0x1B \b, without ID666 tag
  4594. >>0x23 byte 0x1A \b, with ID666 tag
  4595. >>>0x2E string >\0 \b, song "%.32s"
  4596. >>>0x4E string >\0 \b, game "%.32s"
  4597. # Impulse tracker module (audio/x-it)
  4598. 0 string IMPM Impulse Tracker module sound data -
  4599. !:mime audio/x-mod
  4600. >4 string >\0 "%s"
  4601. >40 leshort !0 compatible w/ITv%x
  4602. >42 leshort !0 created w/ITv%x
  4603. # Imago Orpheus module (audio/x-imf)
  4604. 60 string IM10 Imago Orpheus module sound data -
  4605. >0 string >\0 "%s"
  4606. # From <collver1@attbi.com>
  4607. # These are the /etc/magic entries to decode modules, instruments, and
  4608. # samples in Impulse Tracker's native format.
  4609. 0 string IMPS Impulse Tracker Sample
  4610. >18 byte &2 16 bit
  4611. >18 byte ^2 8 bit
  4612. >18 byte &4 stereo
  4613. >18 byte ^4 mono
  4614. 0 string IMPI Impulse Tracker Instrument
  4615. >28 leshort !0 ITv%x
  4616. >30 byte !0 %d samples
  4617. # Yamaha TX Wave: file(1) magic for Yamaha TX Wave audio files
  4618. # From <collver1@attbi.com>
  4619. 0 string LM8953 Yamaha TX Wave
  4620. >22 byte 0x49 looped
  4621. >22 byte 0xC9 non-looped
  4622. >23 byte 1 33kHz
  4623. >23 byte 2 50kHz
  4624. >23 byte 3 16kHz
  4625. # scream tracker: file(1) magic for Scream Tracker sample files
  4626. #
  4627. # From <collver1@attbi.com>
  4628. 76 string SCRS Scream Tracker Sample
  4629. >0 byte 1 sample
  4630. >0 byte 2 adlib melody
  4631. >0 byte >2 adlib drum
  4632. >31 byte &2 stereo
  4633. >31 byte ^2 mono
  4634. >31 byte &4 16bit little endian
  4635. >31 byte ^4 8bit
  4636. >30 byte 0 unpacked
  4637. >30 byte 1 packed
  4638. # audio
  4639. # From: Cory Dikkers <cdikkers@swbell.net>
  4640. 0 string MMD0 MED music file, version 0
  4641. 0 string MMD1 OctaMED Pro music file, version 1
  4642. 0 string MMD3 OctaMED Soundstudio music file, version 3
  4643. 0 string OctaMEDCmpr OctaMED Soundstudio compressed file
  4644. 0 string MED MED_Song
  4645. 0 string SymM Symphonie SymMOD music file
  4646. #
  4647. # Track Length (TRL), Tracks (TRK), Samples (SMP), Subsongs (SS)
  4648. # http://lclevy.free.fr/exotica/ahx/ahxformat.txt
  4649. 0 string THX AHX version
  4650. >3 byte =0 1 module data
  4651. >3 byte =1 2 module data
  4652. >10 byte x TRL: %u
  4653. >11 byte x TRK: %u
  4654. >12 byte x SMP: %u
  4655. >13 byte x SS: %u
  4656. #
  4657. 0 string OKTASONG Oktalyzer module data
  4658. #
  4659. 0 string DIGI\ Booster\ module\0 %s
  4660. >20 byte >0 %c
  4661. >>21 byte >0 \b%c
  4662. >>>22 byte >0 \b%c
  4663. >>>>23 byte >0 \b%c
  4664. >610 string >\0 \b, "%s"
  4665. #
  4666. 0 string DBM0 DIGI Booster Pro Module
  4667. >4 byte >0 V%X.
  4668. >>5 byte x \b%02X
  4669. >16 string >\0 \b, "%s"
  4670. #
  4671. 0 string FTMN FaceTheMusic module
  4672. >16 string >\0d \b, "%s"
  4673. # From: <doj@cubic.org> 2003-06-24
  4674. 0 string AMShdr\32 Velvet Studio AMS Module v2.2
  4675. 0 string Extreme Extreme Tracker AMS Module v1.3
  4676. 0 string DDMF Xtracker DMF Module
  4677. >4 byte x v%i
  4678. >0xD string >\0 Title: "%s"
  4679. >0x2B string >\0 Composer: "%s"
  4680. 0 string DSM\32 Dynamic Studio Module DSM
  4681. 0 string SONG DigiTrekker DTM Module
  4682. 0 string DMDL DigiTrakker MDL Module
  4683. 0 string PSM\32 Protracker Studio PSM Module
  4684. 44 string PTMF Poly Tracker PTM Module
  4685. >0 string >\32 Title: "%s"
  4686. 0 string MT20 MadTracker 2.0 Module MT2
  4687. 0 string RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
  4688. 0 string RTMM RTM Module
  4689. 0x426 string MaDoKaN96 XMS Adlib Module
  4690. >0 string >\0 Composer: "%s"
  4691. 0 string AMF AMF Module
  4692. >4 string >\0 Title: "%s"
  4693. 0 string MODINFO1 Open Cubic Player Module Information MDZ
  4694. 0 string Extended\40Instrument: Fast Tracker II Instrument
  4695. # From: Takeshi Hamasaki <hma@syd.odn.ne.jp>
  4696. # NOA Nancy Codec file
  4697. 0 string \210NOA\015\012\032 NOA Nancy Codec Movie file
  4698. # Yamaha SMAF format
  4699. 0 string MMMD Yamaha SMAF file
  4700. # Sharp Jisaku Melody format for PDC
  4701. 0 string \001Sharp\040JisakuMelody SHARP Cell-Phone ringing Melody
  4702. >20 string Ver01.00 Ver. 1.00
  4703. >>32 byte x , %d tracks
  4704. # Free lossless audio codec <http://flac.sourceforge.net>
  4705. # From: Przemyslaw Augustyniak <silvathraec@rpg.pl>
  4706. 0 string fLaC FLAC audio bitstream data
  4707. !:mime audio/flac
  4708. >4 byte&0x7f >0 \b, unknown version
  4709. >4 byte&0x7f 0 \b
  4710. # some common bits/sample values
  4711. >>20 beshort&0x1f0 0x030 \b, 4 bit
  4712. >>20 beshort&0x1f0 0x050 \b, 6 bit
  4713. >>20 beshort&0x1f0 0x070 \b, 8 bit
  4714. >>20 beshort&0x1f0 0x0b0 \b, 12 bit
  4715. >>20 beshort&0x1f0 0x0f0 \b, 16 bit
  4716. >>20 beshort&0x1f0 0x170 \b, 24 bit
  4717. >>20 byte&0xe 0x0 \b, mono
  4718. >>20 byte&0xe 0x2 \b, stereo
  4719. >>20 byte&0xe 0x4 \b, 3 channels
  4720. >>20 byte&0xe 0x6 \b, 4 channels
  4721. >>20 byte&0xe 0x8 \b, 5 channels
  4722. >>20 byte&0xe 0xa \b, 6 channels
  4723. >>20 byte&0xe 0xc \b, 7 channels
  4724. >>20 byte&0xe 0xe \b, 8 channels
  4725. # sample rates derived from known oscillator frequencies;
  4726. # 24.576 MHz (video/fs=48kHz), 22.5792 (audio/fs=44.1kHz) and
  4727. # 16.384 (other/fs=32kHz).
  4728. >>17 belong&0xfffff0 0x02b110 \b, 11.025 kHz
  4729. >>17 belong&0xfffff0 0x03e800 \b, 16 kHz
  4730. >>17 belong&0xfffff0 0x056220 \b, 22.05 kHz
  4731. >>17 belong&0xfffff0 0x05dc00 \b, 24 kHz
  4732. >>17 belong&0xfffff0 0x07d000 \b, 32 kHz
  4733. >>17 belong&0xfffff0 0x0ac440 \b, 44.1 kHz
  4734. >>17 belong&0xfffff0 0x0bb800 \b, 48 kHz
  4735. >>17 belong&0xfffff0 0x0fa000 \b, 64 kHz
  4736. >>17 belong&0xfffff0 0x158880 \b, 88.2 kHz
  4737. >>17 belong&0xfffff0 0x177000 \b, 96 kHz
  4738. >>17 belong&0xfffff0 0x1f4000 \b, 128 kHz
  4739. >>17 belong&0xfffff0 0x2b1100 \b, 176.4 kHz
  4740. >>17 belong&0xfffff0 0x2ee000 \b, 192 kHz
  4741. >>17 belong&0xfffff0 0x3e8000 \b, 256 kHz
  4742. >>17 belong&0xfffff0 0x562200 \b, 352.8 kHz
  4743. >>17 belong&0xfffff0 0x5dc000 \b, 384 kHz
  4744. >>21 byte&0xf >0 \b, >4G samples
  4745. >>21 byte&0xf 0 \b
  4746. >>>22 belong >0 \b, %u samples
  4747. >>>22 belong 0 \b, length unknown
  4748. # (ISDN) VBOX voice message file (Wolfram Kleff)
  4749. 0 string VBOX VBOX voice message data
  4750. # ReBorn Song Files (.rbs)
  4751. # David J. Singer <doc@deadvirgins.org.uk>
  4752. 8 string RB40 RBS Song file
  4753. >29 string ReBorn created by ReBorn
  4754. >37 string Propellerhead created by ReBirth
  4755. # Synthesizer Generator and Kimwitu share their file format
  4756. 0 string A#S#C#S#S#L#V#3 Synthesizer Generator or Kimwitu data
  4757. # Kimwitu++ uses a slightly different magic
  4758. 0 string A#S#C#S#S#L#HUB Kimwitu++ data
  4759. # From "Simon Hosie
  4760. 0 string TFMX-SONG TFMX module sound data
  4761. # Monkey's Audio compressed audio format (.ape)
  4762. # From danny.milo@gmx.net (Danny Milosavljevic)
  4763. # New version from Abel Cheung <abel (@) oaka.org>
  4764. 0 string MAC\040 Monkey's Audio compressed format
  4765. !:mime audio/x-ape
  4766. >4 uleshort >0x0F8B version %d
  4767. >>(0x08.l) uleshort =1000 with fast compression
  4768. >>(0x08.l) uleshort =2000 with normal compression
  4769. >>(0x08.l) uleshort =3000 with high compression
  4770. >>(0x08.l) uleshort =4000 with extra high compression
  4771. >>(0x08.l) uleshort =5000 with insane compression
  4772. >>(0x08.l+18) uleshort =1 \b, mono
  4773. >>(0x08.l+18) uleshort =2 \b, stereo
  4774. >>(0x08.l+20) ulelong x \b, sample rate %d
  4775. >4 uleshort <0x0F8C version %d
  4776. >>6 uleshort =1000 with fast compression
  4777. >>6 uleshort =2000 with normal compression
  4778. >>6 uleshort =3000 with high compression
  4779. >>6 uleshort =4000 with extra high compression
  4780. >>6 uleshort =5000 with insane compression
  4781. >>10 uleshort =1 \b, mono
  4782. >>10 uleshort =2 \b, stereo
  4783. >>12 ulelong x \b, sample rate %d
  4784. # adlib sound files
  4785. # From: Alex Myczko <alex@aiei.ch>
  4786. # https://github.com/rerrahkr/BambooTracker
  4787. 0 string BambooTrackerMod BambooTracker module
  4788. >22 byte x \b, version %u
  4789. >21 byte x \b.%u
  4790. >20 byte x \b.%u
  4791. 0 string BambooTrackerIst BambooTracker instrument
  4792. >22 byte x \b, version %u
  4793. >21 byte x \b.%u
  4794. >20 byte x \b.%u
  4795. 0 string CC2x CheeseCutter 2 song
  4796. 0 string RAWADATA RdosPlay RAW
  4797. 1068 string RoR AMUSIC Adlib Tracker
  4798. 0 string JCH EdLib
  4799. 0 string mpu401tr MPU-401 Trakker
  4800. 0 string SAdT Surprise! Adlib Tracker
  4801. >4 byte x Version %d
  4802. 0 string XAD! eXotic ADlib
  4803. 0 string ofTAZ! eXtra Simple Music
  4804. 0 string FMK! FM Kingtracker Song
  4805. 0 string DFM DFM Song
  4806. 0 string \<CUD-FM-File\> CFF Song
  4807. 0 string _A2module A2M Song
  4808. # Spectrum 128 tunes (.ay files).
  4809. # From: Emanuel Haupt <ehaupt@critical.ch>
  4810. 0 string ZXAYEMUL Spectrum 128 tune
  4811. 0 string \0BONK BONK,
  4812. #>5 byte x version %d
  4813. >14 byte x %d channel(s),
  4814. >15 byte =1 lossless,
  4815. >15 byte =0 lossy,
  4816. >16 byte x mid-side
  4817. 384 string LockStream LockStream Embedded file (mostly MP3 on old Nokia phones)
  4818. # format VQF (proprietary codec for sound)
  4819. # some infos on the header file available at :
  4820. # http://www.twinvq.org/english/technology_format.html
  4821. 0 string TWIN97012000 VQF data
  4822. >27 short 0 \b, Mono
  4823. >27 short 1 \b, Stereo
  4824. >31 short >0 \b, %d kbit/s
  4825. >35 short >0 \b, %d kHz
  4826. # Nelson A. de Oliveira (naoliv@gmail.com)
  4827. # .eqf
  4828. 0 string Winamp\ EQ\ library\ file %s
  4829. # it will match only versions like v<digit>.<digit>
  4830. # Since I saw only eqf files with version v1.1 I think that it's OK
  4831. >23 string x \b%.4s
  4832. # .preset
  4833. 0 string [Equalizer\ preset] XMMS equalizer preset
  4834. # .m3u
  4835. 0 search/1 #EXTM3U M3U playlist text
  4836. # .pls
  4837. 0 search/1 [playlist] PLS playlist text
  4838. # licq.conf
  4839. 1 string [licq] LICQ configuration file
  4840. # Atari ST audio files by Dirk Jagdmann <doj@cubic.org>
  4841. # NOTE: Most SNDH music is packed using ICE, which has
  4842. # magic numbers "ICE!" and "Ice!". Some SNDH music is
  4843. # not packed, so we check for both packed and unpacked.
  4844. 12 string SNDH SNDH Atari ST music
  4845. 0 belong&0xFFDFDFFF 0x49434521
  4846. >14 search/40 NDH SNDH Atari ST music
  4847. >14 search/40 TITL SNDH Atari ST music
  4848. 0 string SC68\ Music-file\ /\ (c)\ (BeN)jami sc68 Atari ST music
  4849. # musepak support From: "Jiri Pejchal" <jiri.pejchal@gmail.com>
  4850. 0 string MP+ Musepack audio (MP+)
  4851. !:mime audio/x-musepack
  4852. >3 byte 255 \b, SV pre8
  4853. >3 byte&0xF 0x6 \b, SV 6
  4854. >3 byte&0xF 0x8 \b, SV 8
  4855. >3 byte&0xF 0x7 \b, SV 7
  4856. >>3 byte&0xF0 0x0 \b.0
  4857. >>3 byte&0xF0 0x10 \b.1
  4858. >>3 byte&0xF0 240 \b.15
  4859. >>10 byte&0xF0 0x0 \b, no profile
  4860. >>10 byte&0xF0 0x10 \b, profile 'Unstable/Experimental'
  4861. >>10 byte&0xF0 0x50 \b, quality 0
  4862. >>10 byte&0xF0 0x60 \b, quality 1
  4863. >>10 byte&0xF0 0x70 \b, quality 2 (Telephone)
  4864. >>10 byte&0xF0 0x80 \b, quality 3 (Thumb)
  4865. >>10 byte&0xF0 0x90 \b, quality 4 (Radio)
  4866. >>10 byte&0xF0 0xA0 \b, quality 5 (Standard)
  4867. >>10 byte&0xF0 0xB0 \b, quality 6 (Xtreme)
  4868. >>10 byte&0xF0 0xC0 \b, quality 7 (Insane)
  4869. >>10 byte&0xF0 0xD0 \b, quality 8 (BrainDead)
  4870. >>10 byte&0xF0 0xE0 \b, quality 9
  4871. >>10 byte&0xF0 0xF0 \b, quality 10
  4872. >>27 byte 0x0 \b, Buschmann 1.7.0-9, Klemm 0.90-1.05
  4873. >>27 byte 102 \b, Beta 1.02
  4874. >>27 byte 104 \b, Beta 1.04
  4875. >>27 byte 105 \b, Alpha 1.05
  4876. >>27 byte 106 \b, Beta 1.06
  4877. >>27 byte 110 \b, Release 1.1
  4878. >>27 byte 111 \b, Alpha 1.11
  4879. >>27 byte 112 \b, Beta 1.12
  4880. >>27 byte 113 \b, Alpha 1.13
  4881. >>27 byte 114 \b, Beta 1.14
  4882. >>27 byte 115 \b, Alpha 1.15
  4883. 0 string MPCK Musepack audio (MPCK)
  4884. !:mime audio/x-musepack
  4885. # IMY
  4886. # from http://filext.com/detaillist.php?extdetail=IMY
  4887. # https://cellphones.about.com/od/cellularfaqs/f/rf_imelody.htm
  4888. # http://download.ncl.ie/doc/api/ie/ncl/media/music/IMelody.html
  4889. # http://www.wx800.com/msg/download/irda/iMelody.pdf
  4890. 0 string BEGIN:IMELODY iMelody Ringtone Format
  4891. # From: "Mateus Caruccio" <mateus@caruccio.com>
  4892. # guitar pro v3,4,5 from http://filext.com/file-extension/gp3
  4893. 0 string \030FICHIER\ GUITAR\ PRO\ v3. Guitar Pro Ver. 3 Tablature
  4894. # From: "Leslie P. Polzer" <leslie.polzer@gmx.net>
  4895. 60 string SONG SoundFX Module sound file
  4896. # Type: Adaptive Multi-Rate Codec
  4897. # URL: http://filext.com/detaillist.php?extdetail=AMR
  4898. # From: Russell Coker <russell@coker.com.au>
  4899. 0 string #!AMR Adaptive Multi-Rate Codec (GSM telephony)
  4900. !:mime audio/amr
  4901. !:ext amr
  4902. # Type: SuperCollider 3 Synth Definition File Format
  4903. # From: Mario Lang <mlang@debian.org>
  4904. 0 string SCgf SuperCollider3 Synth Definition file,
  4905. >4 belong x version %d
  4906. # Type: True Audio Lossless Audio
  4907. # URL: https://wiki.multimedia.cx/index.php?title=True_Audio
  4908. # From: Mike Melanson <mike@multimedia.cx>
  4909. 0 string TTA1 True Audio Lossless Audio
  4910. # Type: WavPack Lossless Audio
  4911. # URL: https://wiki.multimedia.cx/index.php?title=WavPack
  4912. # From: Mike Melanson <mike@multimedia.cx>
  4913. 0 string wvpk WavPack Lossless Audio
  4914. # From Fabio R. Schmidlin <frs@pop.com.br>
  4915. # VGM music file
  4916. 0 string Vgm\040
  4917. >9 ubyte >0 VGM Video Game Music dump v
  4918. !:mime audio/x-vgm
  4919. !:ext vgm
  4920. >>9 ubyte/16 >0 \b%d
  4921. >>9 ubyte&0x0F x \b%d
  4922. >>8 ubyte/16 x \b.%d
  4923. >>8 ubyte&0x0F >0 \b%d
  4924. #Get soundchips
  4925. >>8 ubyte x \b, soundchip(s)=
  4926. >>0x0C ulelong >0 SN76489 (PSG),
  4927. >>0x10 ulelong >0 YM2413 (OPLL),
  4928. >>0x2C ulelong >0 YM2612 (OPN2),
  4929. >>0x30 ulelong >0 YM2151 (OPM),
  4930. >>0x38 ulelong >0 Sega PCM,
  4931. >>0x34 ulelong >0xC
  4932. >>>0x40 ulelong >0 RF5C68 (PCM),
  4933. >>0x34 ulelong >0x10
  4934. >>>0x44 ulelong >0 YM2203 (OPN),
  4935. >>0x34 ulelong >0x14
  4936. >>>0x48 ulelong >0 YM2608 (OPNA),
  4937. >>0x34 ulelong >0x18
  4938. >>>0x4C lelong >0 YM2610 (OPNB),
  4939. >>>0x4C lelong <0 YM2610B (OPNB+2FM),
  4940. >>0x34 ulelong >0x1C
  4941. >>>0x50 ulelong >0 YM3812 (OPL2),
  4942. >>0x34 ulelong >0x20
  4943. >>>0x54 ulelong >0 YM3526 (OPL),
  4944. >>0x34 ulelong >0x24
  4945. >>>0x58 ulelong >0 Y8950 (MSX-Audio),
  4946. >>0x34 ulelong >0x28
  4947. >>>0x5C ulelong >0 YMF262 (OPL3),
  4948. >>0x34 ulelong >0x2C
  4949. >>>0x60 ulelong >0 YMF278B (OPL4),
  4950. >>0x34 ulelong >0x30
  4951. >>>0x64 ulelong >0 YMF271 (OPX),
  4952. >>0x34 ulelong >0x34
  4953. >>>0x68 ulelong >0 YMZ280B (PCMD8),
  4954. >>0x34 ulelong >0x38
  4955. >>>0x6C ulelong >0 RF5C164 (PCM),
  4956. >>0x34 ulelong >0x3C
  4957. >>>0x70 ulelong >0 PWM,
  4958. >>0x34 ulelong >0x40
  4959. >>>0x74 ulelong >0
  4960. >>>>0x78 ubyte 0x00 AY-3-8910,
  4961. >>>>0x78 ubyte 0x01 AY-3-8912,
  4962. >>>>0x78 ubyte 0x02 AY-3-8913,
  4963. >>>>0x78 ubyte 0x03 AY-3-8930,
  4964. >>>>0x78 ubyte 0x10 YM2149,
  4965. >>>>0x78 ubyte 0x11 YM3439,
  4966. >>>>0x78 ubyte 0x12 YMZ284,
  4967. >>>>0x78 ubyte 0x13 YMZ294,
  4968. # VGM 1.61
  4969. >>0x34 ulelong >0x4C
  4970. >>>0x80 ulelong >0 DMG,
  4971. >>0x34 ulelong >0x50
  4972. >>>0x84 lelong >0 NES APU,
  4973. >>>0x84 lelong <0 NES APU with FDS,
  4974. >>0x34 ulelong >0x54
  4975. >>>0x88 ulelong >0 MultiPCM,
  4976. >>0x34 ulelong >0x58
  4977. >>>0x8C ulelong >0 uPD7759 (ADPCM Speech),
  4978. >>0x34 ulelong >0x5C
  4979. >>>0x90 ulelong >0 OKIM6258 (ADPCM Speech),
  4980. >>0x34 ulelong >0x64
  4981. >>>0x98 ulelong >0 OKIM6295 (ADPCM),
  4982. >>0x34 ulelong >0x68
  4983. >>>0x9C ulelong >0 K051649,
  4984. >>0x34 ulelong >0x6C
  4985. >>>0xA0 ulelong >0 K054539,
  4986. >>0x34 ulelong >0x70
  4987. >>>0xA4 ulelong >0 HuC6280,
  4988. >>0x34 ulelong >0x74
  4989. >>>0xA8 ulelong >0 C140,
  4990. >>0x34 ulelong >0x78
  4991. >>>0xAC ulelong >0 K053260,
  4992. >>0x34 ulelong >0x7C
  4993. >>>0xB0 ulelong >0 Pokey,
  4994. >>0x34 ulelong >0x80
  4995. >>>0xB4 ulelong >0 QSound,
  4996. # VGM 1.71
  4997. >>0x34 ulelong >0x84
  4998. >>>0xB8 ulelong >0 SCSP,
  4999. >>0x34 ulelong >0x8C
  5000. >>>0xC0 ulelong >0 WonderSwan,
  5001. >>0x34 ulelong >0x90
  5002. >>>0xC4 ulelong >0 VSU,
  5003. >>0x34 ulelong >0x94
  5004. >>>0xC8 ulelong >0 SAA1099,
  5005. >>0x34 ulelong >0x98
  5006. >>>0xCC ulelong >0 ES5503 (DOC),
  5007. >>0x34 ulelong >0x9C
  5008. >>>0xD0 lelong >0 ES5505 (OTIS),
  5009. >>>0xD0 lelong <0 ES5506 (OTTO),
  5010. >>0x34 ulelong >0xA4
  5011. >>>0xD8 ulelong >0 X1-010,
  5012. >>0x34 ulelong >0xA8
  5013. >>>0xDC ulelong >0 C352,
  5014. >>0x34 ulelong >0xAC
  5015. >>>0xE0 ulelong >0 GA20,
  5016. # GVOX Encore file format
  5017. # Since this is a proprietary file format and there is no publicly available
  5018. # format specification, this is just based on induction
  5019. #
  5020. 0 string SCOW
  5021. >4 byte 0xc4 GVOX Encore music, version 5.0 or above
  5022. >4 byte 0xc2 GVOX Encore music, version < 5.0
  5023. 0 string ZBOT
  5024. >4 byte 0xc5 GVOX Encore music, version < 5.0
  5025. # Summary: Garmin Voice Processing Module (WAVE audios)
  5026. # From: Joerg Jenderek
  5027. # URL: https://www.garmin.com/
  5028. # Reference: http://www.poi-factory.com/node/19580
  5029. # NOTE: there exist 2 other Garmin VPM formats
  5030. 0 string AUDIMG
  5031. # skip text files starting with string "AUDIMG"
  5032. >13 ubyte <13 Garmin Voice Processing Module
  5033. !:mime audio/x-vpm-wav-garmin
  5034. !:ext vpm
  5035. # 3 bytes indicating the voice version (200,220)
  5036. >>6 string x \b, version %3.3s
  5037. # day of release (01-31)
  5038. >>12 ubyte x \b, %.2d
  5039. # month of release (01-12)
  5040. >>13 ubyte x \b.%.2d
  5041. # year of release (like 2006, 2007, 2008)
  5042. >>14 uleshort x \b.%.4d
  5043. # hour of release (0-23)
  5044. >>11 ubyte x %.2d
  5045. # minute of release (0-59)
  5046. >>10 ubyte x \b:%.2d
  5047. # second of release (0-59)
  5048. >>9 ubyte x \b:%.2d
  5049. # if you select a language like german on your garmin device
  5050. # you can only select voice modules with corresponding language byte ID like 1
  5051. >>18 ubyte x \b, language ID %d
  5052. # structure for phrases/sentences?
  5053. # number of voice sample in the 1st phrase?
  5054. #>>19 uleshort x \b, 0x%x samples
  5055. #>>>21 uleshort >0 \b, at 0x%4.4x
  5056. #>>>(21.s) ubequad x 0x%llx
  5057. # 2nd phrase?
  5058. #>>23 uleshort x \b, 0x%x samples
  5059. #>>>25 uleshort >0 \b, at 0x%4.4x
  5060. #>>>(25.s) ubequad x 0x%llx
  5061. # pointer to 1st audio WAV sample
  5062. >>16 uleshort >0
  5063. >>>(16.s) ulelong >0 \b, at 0x%x
  5064. # WAV length
  5065. # 1 space char after "bytes" to get phrase "bytes RIFF"
  5066. >>>>(16.s+4) ulelong >0 %u bytes
  5067. # look for magic
  5068. >>>>>(&-8.l) string RIFF
  5069. # determine type by ./riff
  5070. >>>>>>&-4 indirect x
  5071. # 2 - ~ 131 WAV samples following same way
  5072. #
  5073. # Summary: encrypted Garmin Voice Processing Module
  5074. # From: Joerg Jenderek
  5075. # URL: https://www.garmin.com/us/products/ontheroad/voicestudio
  5076. # NOTE: Encrypted variant used in voices like DrNightmare, Elfred, Yeti.
  5077. # There exist 2 other Garmin VPM formats
  5078. 0 ubequad 0xa141190fecc8ced6 Garmin Voice Processing Module (encrypted)
  5079. !:mime audio/x-vpm-garmin
  5080. !:ext vpm
  5081. # From Martin Mueller Skarbiniks Pedersen
  5082. 0 string GDM
  5083. >0x3 byte 0xFE General Digital Music.
  5084. >0x4 string >\0 title: "%s"
  5085. >0x24 string >\0 musician: "%s"
  5086. >>0x44 beshort 0x0D0A
  5087. >>>0x46 byte 0x1A
  5088. >>>>0x47 string GMFS Version
  5089. >>>>0x4B byte x %d.
  5090. >>>>0x4C byte x \b%02d
  5091. >>>>0x4D beshort 0x000 (2GDM v
  5092. >>>>0x4F byte x \b%d.
  5093. >>>>>0x50 byte x \b%d)
  5094. 0 string MTM Multitracker
  5095. >0x3 byte/16 x Version %d.
  5096. >0x3 byte&0x0F x \b%02d
  5097. >>0x4 string >\0 title: "%s"
  5098. 0 string HVL
  5099. >3 byte <2 Hively Tracker Song
  5100. >3 byte 0 1 module data
  5101. >3 byte 1 2 module data
  5102. 0 string MO3
  5103. >3 ubyte <6 MOdule with MP3
  5104. >>3 byte 0 Version 0 (With MP3 and lossless)
  5105. >>3 byte 1 Version 1 (With ogg and lossless)
  5106. >>3 byte 3 Version 2.2
  5107. >>3 byte 4 (With no LAME header)
  5108. >>3 byte 5 Version 2.4
  5109. 0 string ADRVPACK AProSys module
  5110. # ftp://ftp.modland.com/pub/documents/format_documentation/\
  5111. # Art%20Of%20Noise%20(.aon).txt
  5112. 0 string AON
  5113. >4 string "ArtOfNoise by Bastian Spiegel(twice/lego)"
  5114. >0x2e string NAME Art of Noise Tracker Song
  5115. >3 string <9
  5116. >3 string 4 (4 voices)
  5117. >3 string 8 (8 voices)
  5118. >>0x36 string >\0 Title: "%s"
  5119. 0 string FAR
  5120. >0x2c byte 0x0d
  5121. >0x2d byte 0x0a
  5122. >0x2e byte 0x1a
  5123. >>0x3 byte 0xFE Farandole Tracker Song
  5124. >>>0x31 byte/16 x Version %d.
  5125. >>>0x31 byte&0x0F x \b%02d
  5126. >>>>0x4 string >\0 \b, title: "%s"
  5127. # magic for Klystrack, https://kometbomb.github.io/klystrack/
  5128. # from Alex Myczko <alex@aiei.ch>
  5129. 0 string cyd!song Klystrack song
  5130. >8 byte >0 \b, version %u
  5131. >8 byte >26
  5132. #>>9 byte x \b, channels %u
  5133. #>>10 leshort x \b, time signature %u
  5134. #>>12 leshort x \b, sequence step %u
  5135. #>>14 byte x \b, instruments %u
  5136. #>>15 leshort x \b, patterns %u
  5137. #>>17 leshort x \b, sequences %u
  5138. #>>19 leshort x \b, length %u
  5139. #>>21 leshort x \b, loop point %u
  5140. #>>23 byte x \b, master volume %u
  5141. #>>24 byte x \b, song speed %u
  5142. #>>25 byte x \b, song speed2 %u
  5143. #>>26 byte x \b, song rate %u
  5144. #>>27 belong x \b, flags %#x
  5145. #>>31 byte x \b, multiplex period %u
  5146. #>>32 byte x \b, pitch inaccuracy %u
  5147. >>149 pstring x \b, title %s
  5148. 0 string cyd!inst Klystrack instrument
  5149. # magic for WOPL instrument files, https://github.com/Wohlstand/OPL3BankEditor
  5150. # see Specifications/WOPL-and-OPLI-Specification.txt
  5151. 0 string WOPL3-INST\0 WOPL instrument
  5152. >11 leshort x \b, version %u
  5153. 0 string WOPL3-BANK\0 WOPL instrument bank
  5154. >11 leshort x \b, version %u
  5155. # AdLib/OPL instrument files. Format specifications on
  5156. # http://www.shikadi.net/moddingwiki
  5157. 0 string Junglevision\ Patch\ File Junglevision instrument data
  5158. 0 string #OPL_II# DMX OP2 instrument data
  5159. 0 string IBK\x1a IBK instrument data
  5160. 0 string 2OP\x1a IBK instrument data, 2 operators
  5161. 0 string 4OP\x1a IBK instrument data, 4 operators
  5162. 2 string ADLIB- AdLib instrument data
  5163. >0 byte x \b, version %u
  5164. >1 byte x \b.%u
  5165. # CRI ADX ADPCM audio
  5166. # Used by various Sega games.
  5167. # https://en.wikipedia.org/wiki/ADX_(file_format)
  5168. # https://wiki.multimedia.cx/index.php/CRI_ADX_file
  5169. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  5170. 0x00 beshort 0x8000
  5171. >(2.S-2) string (c)CRI CRI ADX ADPCM audio
  5172. !:ext adx
  5173. !:mime audio/x-adx
  5174. !:strength +50
  5175. >>0x12 byte x v%u
  5176. >>0x04 byte 0x02 \b, pre-set prediction coefficients
  5177. >>0x04 byte 0x03 \b, standard ADX
  5178. >>0x04 byte 0x04 \b, exponential scale
  5179. >>0x04 byte 0x10 \b, AHX (Dreamcast)
  5180. >>0x04 byte 0x11 \b, AHX
  5181. >>0x08 belong x \b, %u Hz
  5182. >>0x12 byte 0x03
  5183. >>>0x02 beshort >0x2B
  5184. >>>>0x18 belong !0 \b, looping
  5185. >>0x12 byte 0x04
  5186. >>>0x02 beshort >0x37
  5187. >>>>0x24 belong !0 \b, looping
  5188. >>0x13 byte&0x08 0x08 \b, encrypted
  5189. # Lossless audio (.la) (http://www.lossless-audio.com/)
  5190. 0 string LA
  5191. >2 string 03 Lossless audio version 0.3
  5192. >2 string 04 Lossless audio version 0.4
  5193. # Sony PlayStation Audio (.xa)
  5194. 0 leshort 0x4158 Sony PlayStation Audio
  5195. # Portable Sound Format
  5196. # Used for audio rips for various consoles.
  5197. # http://fileformats.archiveteam.org/wiki/Portable_Sound_Format
  5198. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  5199. 0 string PSF
  5200. >3 byte 0x01
  5201. >3 byte 0x02
  5202. >3 byte 0x11
  5203. >3 byte 0x12
  5204. >3 byte 0x13
  5205. >3 byte 0x21
  5206. >3 byte 0x22
  5207. >3 byte 0x23
  5208. >3 byte 0x41
  5209. >>0 string PSF Portable Sound Format
  5210. !:mime audio/x-psf
  5211. >>>3 byte 0x01 (Sony PlayStation)
  5212. >>>3 byte 0x02 (Sony PlayStation 2)
  5213. >>>3 byte 0x11 (Sega Saturn)
  5214. >>>3 byte 0x12 (Sega Dreamcast)
  5215. >>>3 byte 0x13 (Sega Mega Drive)
  5216. >>>3 byte 0x21 (Nintendo 64)
  5217. >>>3 byte 0x22 (Game Boy Advance)
  5218. >>>3 byte 0x23 (Super NES)
  5219. >>>3 byte 0x41 (Capcom QSound)
  5220. # Atari 8-bit SAP audio format
  5221. # http://asap.sourceforge.net/sap-format.html
  5222. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  5223. 0 string SAP\r\n Atari 8-bit SAP audio file
  5224. !:mime audio/x-sap
  5225. !:ext sap
  5226. >5 search/1024 NAME
  5227. >>&1 string x \b: %s
  5228. >>5 search/1024 AUTHOR
  5229. >>>&1 string x by %s
  5230. # Nintendo Wii BRSTM audio format (fields)
  5231. # NOTE: Assuming HEAD starts at 0x40.
  5232. # FIXME: Replace 0x48 with HEAD offset plus 8.
  5233. 0 name nintendo-wii-brstm-fields
  5234. >(0x10.L) string HEAD \b:
  5235. >>(0x10.L+0x0C) belong x
  5236. >>>(&-4.L+0x48) belong x
  5237. >>>>&-4 byte 0 PCM, signed 8-bit,
  5238. >>>>&-4 byte 1 PCM, signed 16-bit,
  5239. >>>>&-4 byte 2 THP ADPCM,
  5240. >>>>&-3 byte !0 looping,
  5241. >>>>&-2 byte 1 mono
  5242. >>>>&-2 byte 2 stereo
  5243. >>>>&-2 byte 3 3 channels
  5244. >>>>&-2 byte 4 quad
  5245. >>>>&-2 byte >4 %u channels
  5246. >>>>&0 beshort !0 %u Hz
  5247. # Nintendo Wii BRSTM audio format
  5248. # https://wiibrew.org/wiki/BRSTM_file
  5249. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  5250. 0 string RSTM Nintendo Wii BRSTM audio file
  5251. !:mime audio/x-brstm
  5252. !:ext brstm
  5253. # Wii is big-endian, so default to BE.
  5254. >4 beshort 0xFEFF
  5255. >>0 use nintendo-wii-brstm-fields
  5256. >4 leshort 0xFEFF
  5257. >>0 use \^nintendo-wii-brstm-fields
  5258. # Nintendo 3DS BCSTM audio format (fields)
  5259. 0 name nintendo-3ds-bcstm-fields
  5260. >(0x18.l) string INFO \b:
  5261. # INFO block: Stream information starts at 0x20 (minus 4 for the 'INFO' magic)
  5262. >>&0x1C byte 0 PCM, signed 8-bit,
  5263. >>&0x1C byte 1 PCM, signed 16-bit,
  5264. >>&0x1C byte 2 DSP ADPCM,
  5265. >>&0x1C byte 3 IMA ADPCM,
  5266. >>&0x1D byte !0 looping,
  5267. >>&0x1E byte 1 mono
  5268. >>&0x1E byte 2 stereo
  5269. >>&0x1E byte 3 3 channels
  5270. >>&0x1E byte 4 quad
  5271. >>&0x1E byte >4 %u channels
  5272. >>&0x20 lelong !0 %u Hz
  5273. # Nintendo 3DS BCSTM audio format
  5274. # https://www.3dbrew.org/wiki/BCSTM
  5275. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  5276. 0 string CSTM Nintendo 3DS BCSTM audio file
  5277. !:mime audio/x-bcstm
  5278. !:ext bcstm
  5279. # 3DS is little-endian, so default to LE.
  5280. >4 leshort 0xFEFF
  5281. >>0 use nintendo-3ds-bcstm-fields
  5282. >4 beshort 0xFEFF
  5283. >>0 use \^nintendo-3ds-bcstm-fields
  5284. # Nintendo Wii U BFSTM audio format
  5285. # http://mk8.tockdom.com/wiki/BFSTM_(File_Format)
  5286. # NOTE: This format is very similar to BCSTM.
  5287. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  5288. 0 string FSTM Nintendo Wii U BFSTM audio file
  5289. !:mime audio/x-bfstm
  5290. !:ext bfstm
  5291. # BFSTM is used on both Wii U (BE) and Switch (LE),
  5292. # so default to LE.
  5293. >4 leshort 0xFEFF
  5294. >>0 use nintendo-3ds-bcstm-fields
  5295. >4 beshort 0xFEFF
  5296. >>0 use \^nintendo-3ds-bcstm-fields
  5297. # Nintendo 3DS BCSTM audio format (fields)
  5298. 0 name nintendo-3ds-bcwav-fields
  5299. >(0x18.l) string INFO \b:
  5300. # INFO block (minus 4 for INFO magic)
  5301. >>&0x4 byte 0 PCM, signed 8-bit,
  5302. >>&0x4 byte 1 PCM, signed 16-bit,
  5303. >>&0x4 byte 2 DSP ADPCM,
  5304. >>&0x4 byte 3 IMA ADPCM,
  5305. >>&0x5 byte !0 looping,
  5306. >>&0x8 lelong x stereo
  5307. >>&0x8 lelong !0 %u Hz
  5308. # Nintendo 3DS BCWAV audio format
  5309. # https://www.3dbrew.org/wiki/BCWAV
  5310. # Added by David Korth <gerbilsoft@gerbilsoft.com>
  5311. 0 string CWAV Nintendo 3DS BCWAV audio file
  5312. !:mime audio/x-bcwav
  5313. !:ext bcwav
  5314. # 3DS is little-endian, so default to LE.
  5315. >4 leshort 0xFEFF
  5316. >>0 use nintendo-3ds-bcwav-fields
  5317. >4 beshort 0xFEFF
  5318. >>0 use \^nintendo-3ds-bcwav-fields
  5319. #------------------------------------------------------------------------------
  5320. # $File: avm,v 1.1 2020/08/28 20:37:58 christos Exp $
  5321. # avm: file(1) magic for avm files; this is not use
  5322. # Summary: FRITZ!Box router configuration backup
  5323. # From: Joerg Jenderek
  5324. # URL: https://en.wikipedia.org/wiki/Fritz!Box
  5325. # Reference: http://www.mengelke.de/Projekte/FritzBoxTools2
  5326. # Note: only tested with models 4040 and 6490 Cable (lgi)
  5327. 0 string ****\ FRITZ!Box\ FRITZ!Box configuration backup
  5328. #!:mime text/plain
  5329. !:mime application/x-avm-export
  5330. !:ext export
  5331. # router model name like "4040" , "6490 Cable (lgi)" followed by " CONFIGURATION EXPORT"
  5332. >15 string x of %-.4s
  5333. # on 2nd line hashed password
  5334. #>41 search/54 Password= \b, password
  5335. # on 3rd line firmware version like: 141.06.24 141.06.50 141.07.10 ... 155.06.83
  5336. >41 search/172 FirmwareVersion= \b, firmware version
  5337. >>&0 string x %s
  5338. # on 5th line oem like: avme lgi
  5339. >41 search/285 OEM= \b, oem
  5340. >>&0 string x %s
  5341. # on 7th line language like: de en
  5342. >41 search/305 Language= \b, language
  5343. >>&0 string x %s
  5344. # on 10th line cfg file name like: /var/tmp.cfg
  5345. >41 search/349 tmp.cfg
  5346. # on 11th line date inside c-comment like: Thu Jun 4 22:25:19 2015
  5347. >>&4 string x \b, %s
  5348. #
  5349. #----------------------------------------------------------------
  5350. # $File: basis,v 1.5 2019/04/19 00:42:27 christos Exp $
  5351. # basis: file(1) magic for BBx/Pro5-files
  5352. # Oliver Dammer <dammer@olida.de> 2005/11/07
  5353. # https://www.basis.com business-basic-files.
  5354. #
  5355. 0 string \074\074bbx\076\076 BBx
  5356. >7 string \000 indexed file
  5357. >7 string \001 serial file
  5358. >7 string \002 keyed file
  5359. >>13 short 0 (sort)
  5360. >7 string \004 program
  5361. >>18 byte x (LEVEL %d)
  5362. >>>23 string >\000 psaved
  5363. >7 string \006 mkeyed file
  5364. >>13 short 0 (sort)
  5365. >>8 string \000 (mkey)
  5366. #------------------------------------------------------------------------------
  5367. # $File: beetle,v 1.2 2018/02/05 23:42:17 rrt Exp $
  5368. # beetle: file(1) magic for Beetle VM object files
  5369. # https://github.com/rrthomas/beetle/
  5370. # Beetle object module
  5371. 0 string BEETLE\000 Beetle VM object file
  5372. #------------------------------------------------------------------------------
  5373. # $File: ber,v 1.2 2019/04/19 00:42:27 christos Exp $
  5374. # ber: file(1) magic for several BER formats used in the mobile
  5375. # telecommunications industry (Georg Sauthoff)
  5376. # The file formats are standardized by the GSMA (GSM association).
  5377. # They are specified via ASN.1 schemas and some prose. Basic encoding
  5378. # rules (BER) is the used encoding. The formats are used for exchanging
  5379. # call data records (CDRs) between mobile operators and associated
  5380. # parties for roaming clearing purposes and fraud detection.
  5381. # The magic file covers:
  5382. # - TAP files (TD.57) - CDR batches and notifications
  5383. # - RAP files (TD.32) - return batches and acknowledgements
  5384. # - NRT files (TD.35) - CDR batches for 'near real time' processing
  5385. #
  5386. # TAP 3 Files
  5387. # TAP -> Transferred Account Procedure
  5388. # cf. https://www.gsma.com/newsroom/wp-content/uploads/TD.57-v32.31.pdf
  5389. # TransferBatch short tag
  5390. 0 byte 0x61
  5391. # BatchControlInfo short tag
  5392. >&1 search/b5 \x64
  5393. # Sender long tag #TAP 3.x (BER encoded)
  5394. >>&1 search/b8 \x5f\x81\x44
  5395. # <SpecificationVersionNumber>3</><ReleaseVersionNumber> block
  5396. >>>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01
  5397. >>>>&0 byte x TAP 3.%d Batch (TD.57, Transferred Account)
  5398. # Notification short tag
  5399. 0 byte 0x62
  5400. # Sender long tag
  5401. >2 search/b8 \x5f\x81\x44
  5402. # <SpecificationVersionNumber>3</><ReleaseVersionNumber> block
  5403. >>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01
  5404. >>>&0 byte x TAP 3.%d Notification (TD.57, Transferred Account)
  5405. # NRT Files
  5406. # NRT a.k.a. NRTRDE
  5407. 0 byte 0x61
  5408. # <SpecificationVersionNumber>2</><ReleaseVersionNumber> block
  5409. >&1 search/b8 \x5f\x29\x01\x02\x5f\x25\x01
  5410. >>&0 byte x NRT 2.%d (TD.35, Near Real Time Roaming Data Exchange)
  5411. # RAP Files
  5412. # cf. https://www.gsma.com/newsroom/wp-content/uploads/TD.32-v6.11.pdf
  5413. # Long ReturnBatch tag
  5414. 0 string \x7f\x84\x16
  5415. # Long RapBatchControlInfo tag
  5416. >&1 search/b8 \x7f\x84\x19
  5417. # <SpecificationVersionNumber>3</><ReleaseVersionNumber> block
  5418. >>&64 search/b64 \x5f\x81\x49\x01\x03\x5f\x81\x3d\x01
  5419. # <RapSpecificationVersionNumber>1</><RapReleaseVersionNumber> block
  5420. >>>&1 string/b \x5f\x84\x20\x01\x01\x5f\x84\x1f\x01
  5421. >>>>&0 byte x RAP 1.%d Batch (TD.32, Returned Account Procedure),
  5422. >>>&0 byte x TAP 3.%d
  5423. # Long Acknowledgement tag
  5424. 0 string \x7f\x84\x17
  5425. # Long Sender tag
  5426. >&1 search/b5 \x5f\x81\x44 RAP Acknowledgement (TD.32, Returned Account Procedure)
  5427. #------------------------------------------------------------------------------
  5428. # $File: bflt,v 1.5 2014/04/30 21:41:02 christos Exp $
  5429. # bFLT: file(1) magic for BFLT uclinux binary files
  5430. #
  5431. # From Philippe De Muyter <phdm@macqel.be>
  5432. #
  5433. 0 string bFLT BFLT executable
  5434. >4 belong x - version %d
  5435. >4 belong 4
  5436. >>36 belong&0x1 0x1 ram
  5437. >>36 belong&0x2 0x2 gotpic
  5438. >>36 belong&0x4 0x4 gzip
  5439. >>36 belong&0x8 0x8 gzdata
  5440. #------------------------------------------------------------------------------
  5441. # $File: bhl,v 1.1 2017/06/11 22:20:02 christos Exp $
  5442. # BlockHashLoc
  5443. # ext: bhl
  5444. # Marco Pontello marcopon@gmail.com
  5445. # reference: https://github.com/MarcoPon/BlockHashLoc
  5446. 0 string BlockHashLoc\x1a BlockHashLoc recovery info,
  5447. >13 byte x version %d
  5448. !:ext bhl
  5449. #------------------------------------------------------------------------------
  5450. # $File: bioinformatics,v 1.5 2019/04/19 00:42:27 christos Exp $
  5451. # bioinfomatics: file(1) magic for Bioinfomatics file formats
  5452. ###############################################################################
  5453. # BGZF (Blocked GNU Zip Format) - gzip compatible, but also indexable
  5454. # used by SAMtools bgzip/tabix (http://samtools.sourceforge.net/tabix.shtml)
  5455. ###############################################################################
  5456. 0 string \037\213
  5457. >3 byte &0x04
  5458. >>12 string BC
  5459. >>>14 leshort &0x02 Blocked GNU Zip Format (BGZF; gzip compatible)
  5460. >>>>16 leshort x \b, block length %d
  5461. !:mime application/x-gzip
  5462. ###############################################################################
  5463. # Tabix index file
  5464. # used by SAMtools bgzip/tabix (http://samtools.sourceforge.net/tabix.shtml)
  5465. ###############################################################################
  5466. 0 string TBI\1 SAMtools TBI (Tabix index format)
  5467. >0x04 lelong =1 \b, with %d reference sequence
  5468. >0x04 lelong >1 \b, with %d reference sequences
  5469. >0x08 lelong &0x10000 \b, using half-closed-half-open coordinates (BED style)
  5470. >0x08 lelong ^0x10000
  5471. >>0x08 lelong =0 \b, using closed and one based coordinates (GFF style)
  5472. >>0x08 lelong =1 \b, using SAM format
  5473. >>0x08 lelong =2 \b, using VCF format
  5474. >0x0c lelong x \b, sequence name column: %d
  5475. >0x10 lelong x \b, region start column: %d
  5476. >0x08 lelong =0
  5477. >>0x14 lelong x \b, region end column: %d
  5478. >0x18 byte x \b, comment character: %c
  5479. >0x1c lelong x \b, skip line count: %d
  5480. ###############################################################################
  5481. # BAM (Binary Sequence Alignment/Map format)
  5482. # used by SAMtools (http://samtools.sourceforge.net/SAM1.pdf)
  5483. # data is normally present only within compressed BGZF blocks (CDATA), so use file -z to examine it
  5484. ###############################################################################
  5485. 0 string BAM\1 SAMtools BAM (Binary Sequence Alignment/Map)
  5486. >0x04 lelong >0
  5487. >>&0x00 regex =^[@]HD\t.*VN: \b, with SAM header
  5488. >>>&0 regex =[0-9.]+ \b version %s
  5489. >>&(0x04) lelong >0 \b, with %d reference sequences
  5490. ###############################################################################
  5491. # BAI (BAM indexing format)
  5492. # used by SAMtools (http://samtools.sourceforge.net/SAM1.pdf)
  5493. ###############################################################################
  5494. 0 string BAI\1 SAMtools BAI (BAM indexing format)
  5495. >0x04 lelong >0 \b, with %d reference sequences
  5496. ###############################################################################
  5497. # CRAM (Binary Sequence Alignment/Map format)
  5498. ###############################################################################
  5499. 0 string CRAM CRAM
  5500. >0x04 byte >-1 version %d.
  5501. >0x05 byte >-1 \b%d
  5502. >0x06 string >\0 (identified as %s)
  5503. ###############################################################################
  5504. # BCF (Binary Call Format), version 1
  5505. # used by SAMtools & VCFtools (http://vcftools.sourceforge.net/bcf.pdf)
  5506. # data is normally present only within compressed BGZF blocks (CDATA), so use file -z to examine it
  5507. ###############################################################################
  5508. 0 string BCF\4
  5509. # length of seqnm data in bytes is positive
  5510. >&0x00 lelong >0
  5511. # length of smpl data in bytes is positive
  5512. >>&(&-0x04) lelong >0 SAMtools BCF (Binary Call Format)
  5513. # length of meta in bytes
  5514. >>>&(&-0x04) lelong >0
  5515. # have meta text string
  5516. >>>>&0x00 search ##samtoolsVersion=
  5517. >>>>>&0x00 string x \b, generated by SAMtools version %s
  5518. ###############################################################################
  5519. # BCF (Binary Call Format), version 2.1
  5520. # used by SAMtools (https://samtools.github.io/hts-specs/BCFv2_qref.pdf)
  5521. # data is normally present only within compressed BGZF blocks (CDATA), so use file -z to examine it
  5522. ###############################################################################
  5523. 0 string BCF\2\1 Binary Call Format (BCF) version 2.1
  5524. # length of header text
  5525. >&0x00 lelong >0
  5526. # have header string
  5527. >>&0x00 search ##samtoolsVersion=
  5528. >>>&0x00 string x \b, generated by SAMtools version %s
  5529. ###############################################################################
  5530. # BCF (Binary Call Format), version 2.2
  5531. # used by SAMtools (https://samtools.github.io/hts-specs/BCFv2_qref.pdf)
  5532. # data is normally present only within compressed BGZF blocks (CDATA), so use file -z to examine it
  5533. ###############################################################################
  5534. 0 string BCF\2\2 Binary Call Format (BCF) version 2.2
  5535. # length of header text
  5536. >&0x00 lelong >0
  5537. # have header string
  5538. >>&0x00 search ##samtoolsVersion=
  5539. >>>&0x00 string x \b, generated by SAMtools version %s
  5540. ###############################################################################
  5541. # VCF (Variant Call Format)
  5542. # used by VCFtools (http://vcftools.sourceforge.net/)
  5543. ###############################################################################
  5544. 0 search ##fileformat=VCFv Variant Call Format (VCF)
  5545. >&0 string x \b version %s
  5546. ###############################################################################
  5547. # FASTQ
  5548. # used by MAQ (http://maq.sourceforge.net/fastq.shtml)
  5549. ###############################################################################
  5550. # XXX Broken?
  5551. # @<seqname>
  5552. #0 regex =^@[A-Za-z0-9_.:-]+\?\n
  5553. # <seq>
  5554. #>&1 regex =^[A-Za-z\n.~]++
  5555. # +[<seqname>]
  5556. #>>&1 regex =^[A-Za-z0-9_.:-]*\?\n
  5557. # <qual>
  5558. #>>>&1 regex =^[!-~\n]+\n FASTQ
  5559. ###############################################################################
  5560. # FASTA
  5561. # used by FASTA (https://fasta.bioch.virginia.edu/fasta_www2/fasta_guide.pdf)
  5562. ###############################################################################
  5563. #0 byte 0x3e
  5564. # q>0 regex =^[>][!-~\t\ ]+$
  5565. # Amino Acid codes: [A-IK-Z*-]+
  5566. #>>1 regex !=[!-'Jj;:=?@^`|~\\] FASTA
  5567. # IUPAC codes/gaps: [ACGTURYKMSWBDHVNX-]+
  5568. # not in IUPAC codes/gaps: [EFIJLOPQZ]
  5569. #>>>1 regex !=[EFIJLOPQZefijlopqz] \b, with IUPAC nucleotide codes
  5570. #>>>1 regex =^[EFIJLOPQZefijlopqz]+$ \b, with Amino Acid codes
  5571. ###############################################################################
  5572. # SAM (Sequence Alignment/Map format)
  5573. # used by SAMtools (http://samtools.sourceforge.net/SAM1.pdf)
  5574. ###############################################################################
  5575. # Short-cut version to recognise SAM files with (optional) header at beginning
  5576. ###############################################################################
  5577. 0 string @HD\t
  5578. >4 search VN: Sequence Alignment/Map (SAM), with header
  5579. >>&0 regex [0-9.]+ \b version %s
  5580. ###############################################################################
  5581. # Longer version to recognise SAM alignment lines using (many) regexes
  5582. ###############################################################################
  5583. # SAM Alignment QNAME
  5584. 0 regex =^[!-?A-~]{1,255}(\t[^\t]+){11}
  5585. # SAM Alignment FLAG
  5586. >0 regex =^([^\t]+\t){1}[0-9]{1,5}\t
  5587. # SAM Alignment RNAME
  5588. >>0 regex =^([^\t]+\t){2}\\*|[^*=]*\t
  5589. # SAM Alignment POS
  5590. >>>0 regex =^([^\t]+\t){3}[0-9]{1,9}\t
  5591. # SAM Alignment MAPQ
  5592. >>>>0 regex =^([^\t]+\t){4}[0-9]{1,3}\t
  5593. # SAM Alignment CIGAR
  5594. >>>>>0 regex =\t(\\*|([0-9]+[MIDNSHPX=])+)\t
  5595. # SAM Alignment RNEXT
  5596. >>>>>>0 regex =\t(\\*|=|[!-()+->?-~][!-~]*)\t
  5597. # SAM Alignment PNEXT
  5598. >>>>>>>0 regex =^([^\t]+\t){7}[0-9]{1,9}\t
  5599. # SAM Alignment TLEN
  5600. >>>>>>>>0 regex =\t[+-]{0,1}[0-9]{1,9}\t.*\t
  5601. # SAM Alignment SEQ
  5602. >>>>>>>>>0 regex =^([^\t]+\t){9}(\\*|[A-Za-z=.]+)\t
  5603. # SAM Alignment QUAL
  5604. >>>>>>>>>>0 regex =^([^\t]+\t){10}[!-~]+ Sequence Alignment/Map (SAM)
  5605. >>>>>>>>>>>0 regex =^[@]HD\t.*VN: \b, with header
  5606. >>>>>>>>>>>>&0 regex =[0-9.]+ \b version %s
  5607. ##############################################################################
  5608. #
  5609. # Magic ids for biomedical signal file formats
  5610. # Copyright (C) 2018 Alois Schloegl <alois.schloegl@gmail.com>
  5611. #
  5612. # The list has been derived from biosig projects
  5613. # http://biosig.sourceforge.net
  5614. # https://pub.ist.ac.at/~schloegl/matlab/eeg/
  5615. # https://pub.ist.ac.at/~schloegl/biosig/TESTED
  5616. #
  5617. ##############################################################################
  5618. #
  5619. 0 string ABF\x20 Biosig/Axon Binary format
  5620. !:mime biosig/abf2
  5621. 0 string ABF2\0\0 Biosig/Axon Binary format
  5622. !:mime biosig/abf2
  5623. #
  5624. 0 string ATES\x20MEDICA\x20SOFT.\x20EEG\x20for\x20Windows Biosig/ATES MEDICA SOFT. EEG for Windows
  5625. !:mime biosig/ates
  5626. #
  5627. 0 string ATF\x09 Biosig/Axon Text format
  5628. !:mime biosig/atf
  5629. #
  5630. 0 string ADU1 Biosig/Axona file format
  5631. !:mime biosig/axona
  5632. 0 string ADU2 Biosig/Axona file format
  5633. !:mime biosig/axona
  5634. #
  5635. 0 string ALPHA-TRACE-MEDICAL Biosig/alpha trace
  5636. !:mime biosig/alpha
  5637. #
  5638. 0 string AxGr Biosig/AXG
  5639. 0 string axgx Biosig/AXG
  5640. !:mime biosig/axg
  5641. #
  5642. 0 string HeaderLen= Biosig/BCI2000
  5643. 0 string BCI2000V Biosig/BCI2000
  5644. !:mime biosig/bci2000
  5645. #
  5646. ### Specification: https://www.biosemi.com/faq/file_format.htm
  5647. 0 string \xffBIOSEMI Biosig/Biosemi data format
  5648. !:mime biosig/bdf
  5649. #
  5650. 0 string Brain\x20Vision\x20Data\x20Exchange\x20Header\x20File Biosig/Brainvision data file
  5651. 0 string Brain\x20Vision\x20V-Amp\x20Data\x20Header\x20File\x20Version Biosig/Brainvision V-Amp file
  5652. 0 string Brain\x20Vision\x20Data\x20Exchange\x20Marker\x20File,\x20Version Biosig/Brainvision Marker file
  5653. !:mime biosig/brainvision
  5654. #
  5655. 0 string CEDFILE Biosig/CFS: Cambridge Electronic devices File format
  5656. !:mime biosig/ced
  5657. #
  5658. ### Specification: https://www.edfplus.info/specs/index.html
  5659. 0 string 0\x20\x20\x20\x20\x20\x20\x20 Biosig/EDF: European Data format
  5660. !:mime biosig/edf
  5661. #
  5662. ### Specifications: https://arxiv.org/abs/cs/0608052
  5663. 0 string GDF Biosig/GDF: General data format for biosignals
  5664. !:mime biosig/gdf
  5665. #
  5666. 0 string DATA\0\0\0\0 Biosig/Heka Patchmaster
  5667. 0 string DAT1\0\0\0\0 Biosig/Heka Patchmaster
  5668. 0 string DAT2\0\0\0\0 Biosig/Heka Patchmaster
  5669. !:mime biosig/heka
  5670. #
  5671. 0 string (C)\x20CED\x2087 Biosig/CED SMR
  5672. !:mime biosig/ced-smr
  5673. #
  5674. 0 string CFWB\1\0\0\0 Biosig/CFWB
  5675. !:mime biosig/cfwb
  5676. #
  5677. 0 string DEMG Biosig/DEMG
  5678. !:mime biosig/demg
  5679. #
  5680. 0 string EBS\x94\x0a\x13\x1a\x0d Biosig/EBS
  5681. !:mime biosig/ebs
  5682. #
  5683. 0 string Embla\x20data\x20file Biosig/Embla
  5684. !:mime biosig/embla
  5685. #
  5686. 0 string Header\r\nFile Version Biosig/ETG4000
  5687. !:mime biosig/etg4000
  5688. #
  5689. 0 string GALILEO\x20EEG\x20TRACE\x20FILE Biosig/Galileo
  5690. !:mime biosig/galileo
  5691. #
  5692. 0 string IGOR Biosig/IgorPro ITX file
  5693. !:mime biosig/igorpro
  5694. #
  5695. # Specification: http://www.ampsmedical.com/uploads/2017-12-7/The_ISHNE_Format.pdf
  5696. 0 string ISHNE1.0 Biosig/ISHNE
  5697. !:mime biosig/ishne
  5698. #
  5699. # CEN/ISO 11073/22077 series, http://www.mfer.org/en/document.htm
  5700. 0 string @\x20\x20MFER\x20 Biosig/MFER
  5701. 0 string @\x20MFR\x20 Biosig/MFER
  5702. !:mime biosig/mfer
  5703. #
  5704. 0 string NEURALEV Biosig/NEV
  5705. 0 string N.EV.\0 Biosig/NEV
  5706. !:mime biosig/nev
  5707. #
  5708. 0 string NEX1 Biosig/NEX
  5709. !:mime biosig/nex1
  5710. #
  5711. 0 string PLEX Biosig/Plexon v1.0
  5712. 10 string PLEXON Biosig/Plexon v2.0
  5713. !:mime biosig/plexon
  5714. #
  5715. 0 string \x02\x27\x91\xC6 Biosig/RHD2000: Intan RHD2000 format
  5716. #
  5717. # Specification: CEN 1064:2005/ISO 11073:91064
  5718. 16 string SCPECG\0\0 Biosig/SCP-ECG format CEN 1064:2005/ISO 11073:91064
  5719. !:mime biosig/scpecg
  5720. #
  5721. 0 string IAvSFo Biosig/SIGIF
  5722. !:mime biosig/sigif
  5723. #
  5724. 0 string POLY\x20SAMPLE\x20FILEversion\x20 Biosig/TMS32
  5725. !:mime biosig/tms32
  5726. #
  5727. 0 string FileId=TMSi\x20PortiLab\x20sample\x20log\x20file\x0a\x0dVersion= Biosig/TMSiLOG
  5728. !:mime biosig/tmsilog
  5729. #
  5730. 4 string Synergy\0\48\49\50\46\48\48\51\46\48\48\48\46\48\48\48\0\28\0\0\0\2\0\0\0
  5731. >63 string CRawDataElement
  5732. >>85 string CRawDataBuffer Biosig/SYNERGY
  5733. !:mime biosig/synergy
  5734. #
  5735. 4 string \40\0\4\1\44\1\102\2\146\3\44\0\190\3 Biosig/UNIPRO
  5736. !:mime biosig/unipro
  5737. #
  5738. 0 string VER=9\r\nCTIME= Biosig/WCP
  5739. !:mime biosig/wcp
  5740. #
  5741. 0 string \xAF\xFE\xDA\xDA Biosig/Walter Graphtek
  5742. 0 string \xDA\xDA\xFE\xAF Biosig/Walter Graphtek
  5743. 0 string \x55\x55\xFE\xAF Biosig/Walter Graphtek
  5744. !:mime biosig/walter-graphtek
  5745. #
  5746. 0 string V3.0\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
  5747. >32 string [PatInfo] Biosig/Sigma
  5748. !:mime biosig/sigma
  5749. #
  5750. 0 string \067\069\078\013\010\0x1a\04\0x84 Biosig/File exchange format (FEF)
  5751. !:mime biosig/fef
  5752. 0 string \67\69\78\0x13\0x10\0x1a\4\0x84 Biosig/File exchange format (FEF)
  5753. !:mime biosig/fef
  5754. #
  5755. 0 string \0\0\0\x64\0\0\0\x1f\0\0\0\x14\0\0\0\0\0\1
  5756. >36 string \0\0\0\x65\0\0\0\3\0\0\0\4\0\0
  5757. >>56 string \0\0\0\x6a\0\0\0\3\0\0\0\4\0\0\0\0\xff\xff\xff\xff\0\0 Biosig/FIFF
  5758. !:mime biosig/fiff
  5759. #
  5760. #------------------------------------------------------------------------------
  5761. # $File: blackberry,v 1.2 2017/03/17 21:35:28 christos Exp $
  5762. # blackberry: file(1) magic for BlackBerry file formats
  5763. #
  5764. 5 belong 0
  5765. >8 belong 010010010 BlackBerry RIM ETP file
  5766. >>22 string x \b for %s
  5767. # Berkeley Lab Checkpoint Restart (BLCR) checkpoint context files
  5768. # https://ftg.lbl.gov/checkpoint
  5769. 0 string C\0\0\0R\0\0\0 BLCR
  5770. >16 lelong 1 x86
  5771. >16 lelong 3 alpha
  5772. >16 lelong 5 x86-64
  5773. >16 lelong 7 ARM
  5774. >8 lelong x context data (little endian, version %d)
  5775. # Uncomment the following only of your "file" program supports "search"
  5776. #>0 search/1024 VMA\06 for kernel
  5777. #>>&1 byte x %d.
  5778. #>>&2 byte x %d.
  5779. #>>&3 byte x %d
  5780. 0 string \0\0\0C\0\0\0R BLCR
  5781. >16 belong 2 SPARC
  5782. >16 belong 4 ppc
  5783. >16 belong 6 ppc64
  5784. >16 belong 7 ARMEB
  5785. >16 belong 8 SPARC64
  5786. >8 belong x context data (big endian, version %d)
  5787. # Uncomment the following only of your "file" program supports "search"
  5788. #>0 search/1024 VMA\06 for kernel
  5789. #>>&1 byte x %d.
  5790. #>>&2 byte x \b%d.
  5791. #>>&3 byte x \b%d
  5792. #------------------------------------------------------------------------------
  5793. # $File: blender,v 1.8 2019/04/19 00:42:27 christos Exp $
  5794. # blender: file(1) magic for Blender 3D related files
  5795. #
  5796. # Native format rule v1.2. For questions use the developers list
  5797. # https://lists.blender.org/mailman/listinfo/bf-committers
  5798. # GLOB chunk was moved near start and provides subversion info since 2.42
  5799. 0 string =BLENDER Blender3D,
  5800. >7 string =_ saved as 32-bits
  5801. >>8 string =v little endian
  5802. >>>9 byte x with version %c.
  5803. >>>10 byte x \b%c
  5804. >>>11 byte x \b%c
  5805. >>>0x40 string =GLOB \b.
  5806. >>>>0x58 leshort x \b%.4d
  5807. >>8 string =V big endian
  5808. >>>9 byte x with version %c.
  5809. >>>10 byte x \b%c
  5810. >>>11 byte x \b%c
  5811. >>>0x40 string =GLOB \b.
  5812. >>>>0x58 beshort x \b%.4d
  5813. >7 string =- saved as 64-bits
  5814. >>8 string =v little endian
  5815. >>9 byte x with version %c.
  5816. >>10 byte x \b%c
  5817. >>11 byte x \b%c
  5818. >>0x44 string =GLOB \b.
  5819. >>>0x60 leshort x \b%.4d
  5820. >>8 string =V big endian
  5821. >>>9 byte x with version %c.
  5822. >>>10 byte x \b%c
  5823. >>>11 byte x \b%c
  5824. >>>0x44 string =GLOB \b.
  5825. >>>>0x60 beshort x \b%.4d
  5826. # Scripts that run in the embedded Python interpreter
  5827. 0 string #!BPY Blender3D BPython script
  5828. #------------------------------------------------------------------------------
  5829. # $File: blit,v 1.8 2009/09/19 16:28:08 christos Exp $
  5830. # blit: file(1) magic for 68K Blit stuff as seen from 680x0 machine
  5831. #
  5832. # Note that this 0407 conflicts with several other a.out formats...
  5833. #
  5834. # XXX - should this be redone with "be" and "le", so that it works on
  5835. # little-endian machines as well? If so, what's the deal with
  5836. # "VAX-order" and "VAX-order2"?
  5837. #
  5838. #0 long 0407 68K Blit (standalone) executable
  5839. #0 short 0407 VAX-order2 68K Blit (standalone) executable
  5840. 0 short 03401 VAX-order 68K Blit (standalone) executable
  5841. 0 long 0406 68k Blit mpx/mux executable
  5842. 0 short 0406 VAX-order2 68k Blit mpx/mux executable
  5843. 0 short 03001 VAX-order 68k Blit mpx/mux executable
  5844. # Need more values for WE32 DMD executables.
  5845. # Note that 0520 is the same as COFF
  5846. #0 short 0520 tty630 layers executable
  5847. #------------------------------------------------------------------------------
  5848. # $File: bm,v 1.2 2021/03/14 16:56:51 christos Exp $
  5849. # bm: file(1) magic for "Birtual Machine", cf. https://github.com/tsoding/bm
  5850. 0 string bm\001\244 Birtual Machine
  5851. >4 leshort x \b, version %d
  5852. >6 lelong x \b, program size %u
  5853. >14 lelong x \b, memory size %u
  5854. >22 lelong x \b, memory capacity %u
  5855. #------------------------------------------------------------------------------
  5856. # $File: bout,v 1.5 2009/09/19 16:28:08 christos Exp $
  5857. # i80960 b.out objects and archives
  5858. #
  5859. 0 long 0x10d i960 b.out relocatable object
  5860. >16 long >0 not stripped
  5861. #
  5862. # b.out archive (hp-rt on i960)
  5863. 0 string =!<bout> b.out archive
  5864. >8 string __.SYMDEF random library
  5865. #------------------------------------------------------------------------------
  5866. # $File: bsdi,v 1.7 2014/03/29 15:40:34 christos Exp $
  5867. # bsdi: file(1) magic for BSD/OS (from BSDI) objects
  5868. # Some object/executable formats use the same magic numbers as are used
  5869. # in other OSes; those are handled by entries in aout.
  5870. #
  5871. 0 lelong 0314 386 compact demand paged pure executable
  5872. >16 lelong >0 not stripped
  5873. >32 byte 0x6a (uses shared libs)
  5874. # same as in SunOS 4.x, except for static shared libraries
  5875. 0 belong&077777777 0600413 SPARC demand paged
  5876. >0 byte &0x80
  5877. >>20 belong <4096 shared library
  5878. >>20 belong =4096 dynamically linked executable
  5879. >>20 belong >4096 dynamically linked executable
  5880. >0 byte ^0x80 executable
  5881. >16 belong >0 not stripped
  5882. >36 belong 0xb4100001 (uses shared libs)
  5883. 0 belong&077777777 0600410 SPARC pure
  5884. >0 byte &0x80 dynamically linked executable
  5885. >0 byte ^0x80 executable
  5886. >16 belong >0 not stripped
  5887. >36 belong 0xb4100001 (uses shared libs)
  5888. 0 belong&077777777 0600407 SPARC
  5889. >0 byte &0x80 dynamically linked executable
  5890. >0 byte ^0x80 executable
  5891. >16 belong >0 not stripped
  5892. >36 belong 0xb4100001 (uses shared libs)
  5893. # Chiasmus is an encryption standard developed by the German Federal
  5894. # Office for Information Security (Bundesamt fuer Sicherheit in der
  5895. # Informationstechnik).
  5896. # https://www.bsi.bund.de/EN/Topics/OtherTopics/Chiasmus/Chiasmus_node.html
  5897. 0 string XIA1\r Chiasmus Encrypted data
  5898. !:ext xia
  5899. 0 string XIS Chiasmus key
  5900. !:ext xis
  5901. #------------------------------------------------------------------------------
  5902. # $File: btsnoop,v 1.5 2009/09/19 16:28:08 christos Exp $
  5903. # BTSnoop: file(1) magic for BTSnoop files
  5904. #
  5905. # From <marcel@holtmann.org>
  5906. 0 string btsnoop\0 BTSnoop
  5907. >8 belong x version %d,
  5908. >12 belong 1001 Unencapsulated HCI
  5909. >12 belong 1002 HCI UART (H4)
  5910. >12 belong 1003 HCI BCSP
  5911. >12 belong 1004 HCI Serial (H5)
  5912. >>12 belong x type %d
  5913. #------------------------------------------------------------------------------
  5914. # $File: c64,v 1.8 2020/12/20 16:17:43 christos Exp $
  5915. # c64: file(1) magic for various commodore 64 related files
  5916. #
  5917. # From: Dirk Jagdmann <doj@cubic.org>
  5918. 0x16500 belong 0x12014100 D64 Image
  5919. 0x16500 belong 0x12014180 D71 Image
  5920. 0x61800 belong 0x28034400 D81 Image
  5921. 0 string C64\40CARTRIDGE CCS C64 Emultar Cartridge Image
  5922. 0 belong 0x43154164 X64 Image
  5923. 0 string GCR-1541 GCR Image
  5924. >8 byte x version: %i
  5925. >9 byte x tracks: %i
  5926. 9 string PSUR ARC archive (c64)
  5927. 2 string -LH1- LHA archive (c64)
  5928. 0 string C64File PC64 Emulator file
  5929. >8 string >\0 "%s"
  5930. 0 string C64Image PC64 Freezer Image
  5931. 0 beshort 0x38CD C64 PCLink Image
  5932. 0 string CBM\144\0\0 Power 64 C64 Emulator Snapshot
  5933. 0 belong 0xFF424CFF WRAptor packer (c64)
  5934. 0 string C64S\x20tape\x20file T64 tape Image
  5935. >32 leshort x Version:0x%x
  5936. >36 leshort !0 Entries:%i
  5937. >40 string x Name:%.24s
  5938. 0 string C64\x20tape\x20image\x20file\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0 T64 tape Image
  5939. >32 leshort x Version:0x%x
  5940. >36 leshort !0 Entries:%i
  5941. >40 string x Name:%.24s
  5942. 0 string C64S\x20tape\x20image\x20file\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0 T64 tape Image
  5943. >32 leshort x Version:0x%x
  5944. >36 leshort !0 Entries:%i
  5945. >40 string x Name:%.24s
  5946. # Raw tape file format (.tap files)
  5947. # Esa Hyyti <esa@netlab.tkk.fi>
  5948. 0 string C64-TAPE-RAW C64 Raw Tape File (.tap),
  5949. >0x0c byte x Version:%u,
  5950. >0x10 lelong x Length:%u cycles
  5951. # magic for Goattracker2, http://covertbitops.c64.org/
  5952. # from Alex Myczko <alex@aiei.ch>
  5953. 0 string GTS5 GoatTracker 2 song
  5954. >4 string >\0 \b, "%s"
  5955. >36 string >\0 \b by %s
  5956. >68 string >\0 \b (C) %s
  5957. >100 byte >0 \b, %u subsong(s)
  5958. # CBM BASIC (cc65 compiled)
  5959. 0 leshort 0x0801
  5960. >2 leshort 0x080b
  5961. >6 string \x9e CBM BASIC
  5962. >7 string >\0 \b, SYS %s
  5963. #------------------------------------------------------------------------------
  5964. # $File: cad,v 1.25 2021/02/23 00:51:10 christos Exp $
  5965. # autocad: file(1) magic for cad files
  5966. #
  5967. # Microstation DGN/CIT Files (www.bentley.com)
  5968. # Last updated July 29, 2005 by Lester Hightower
  5969. # DGN is the default file extension of Microstation/Intergraph CAD files.
  5970. # CIT is the proprietary raster format (similar to TIFF) used to attach
  5971. # raster underlays to Microstation DGN (vector) drawings.
  5972. #
  5973. # http://www.wotsit.org/search.asp
  5974. # https://filext.com/detaillist.php?extdetail=DGN
  5975. # https://filext.com/detaillist.php?extdetail=CIT
  5976. #
  5977. # https://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2
  5978. # 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928
  5979. # https://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682
  5980. # 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F
  5981. #
  5982. # URL: https://en.wikipedia.org/wiki/MicroStation
  5983. # reference: http://dgnlib.maptools.org/dgn.html
  5984. # http://dgnlib.maptools.org/dl/ref18.pdf
  5985. # Update: Joerg Jenderek
  5986. # Note: verfied by command like `dgndump seed2d_b.dgn`
  5987. # test for level 8 and type 5 or 9
  5988. 0 beshort&0x3F73 0x0801
  5989. # level of element like 8
  5990. #>0 ubyte&0x3F x \b, level %u
  5991. #>0 ubyte &0x80 \b, complex
  5992. #>0 ubyte &0x40 \b, reserved
  5993. # type of element 9~TCB 8~Digitizer setup 5~Group Data Elements
  5994. #>1 ubyte&0x7F x \b, type %u
  5995. # words to follow in element: 17H~CEL library 2FEh~DGN 9FEh,DFEh~CIT
  5996. #>2 uleshort x \b, words 0x%4.4x to follow
  5997. # test for 3 reserved 0 bytes in CIT or "conversion" in ViewInfo structure (DGN CEL)
  5998. #>508 ubelong x \b, RESERVED %8.8x
  5999. >508 ubelong&0xFFffFF00 =0
  6000. # test for level 8 and type 9 for INGR raster image
  6001. >>0 beshort 0x0809
  6002. # test for length of 1st element is multiple of blocks a 512 bytes
  6003. >>>2 ubyte 0xfe
  6004. >>>>0 use ingr-image
  6005. # test for DGN or CEL by jump words (uleshort) forward to next element
  6006. >(2.s*2) ulong x
  6007. # 2nd element type: 8~Digitizer~DesiGNfile 1~library cell header other~CIT
  6008. #>>&1 ubyte&0x7F x \b, 2nd type %u
  6009. # DGN
  6010. >>&1 ubyte&0x7F 8
  6011. >>>2 uleshort =0x02FE Bentley/Intergraph Microstation CAD drawing
  6012. !:mime application/x-bentley-dgn
  6013. !:ext dgn
  6014. # The 0x40 bit of this byte is 1 if the file is 3D, otherwise 0
  6015. >>>>1214 ubyte &0x40 3D
  6016. >>>>1214 ubyte ^0x40 2D
  6017. # 2 chars for name of subunits like ft FT in IN mu m mm '\0 '\040
  6018. >>>>1120 string x \b, units %-.2s
  6019. # 2 chars for name of master unit like IN in ML SU tn th TH HU mm "\0 "\040 \0\0
  6020. >>>>1122 string >\0 %-.2s
  6021. #>>>>1120 ubelong x \b, units 0x%8.8x
  6022. # element range low,high x y z like xlow=0 08010000h 01080000h
  6023. #>>>>4 ubelong !0 \b, xlow %8.8x
  6024. #>>>>8 ubelong !0 \b, ylow %8.8x
  6025. #>>>>12 ubelong !0 \b, zlow %8.8x
  6026. #>>>>16 ubelong !0 \b, xhigh %8.8x
  6027. #>>>>20 ubelong !0 \b, yhigh %8.8x
  6028. #>>>>24 ubelong !0 \b, zhigh %8.8x
  6029. # graphic group number; all other elements in that group have same non-0 number
  6030. #>>>>28 leshort x \b, grphgrp 0x%4.4x
  6031. # words to optional attribute linkage
  6032. #>>>>30 ubyte x \b, attindx \%o
  6033. #>>>>31 ubyte x \b\%o
  6034. # >>30 string \026\105 DGNFile
  6035. # >>30 string \034\105 DGNFile
  6036. # >>30 string \073\107 DGNFile
  6037. # >>30 string \073\110 DGNFile
  6038. # >>30 string \106\107 DGNFile
  6039. # >>30 string \110\103 DGNFile
  6040. # >>30 string \120\104 DGNFile
  6041. # >>30 string \172\104 DGNFile
  6042. # >>30 string \172\105 DGNFile
  6043. # >>30 string \172\106 DGNFile
  6044. # >>30 string \234\106 DGNFile
  6045. # >>30 string \273\105 DGNFile
  6046. # >>30 string \306\106 DGNFile
  6047. # >>30 string \310\104 DGNFile
  6048. # >>30 string \341\104 DGNFile
  6049. # >>30 string \372\103 DGNFile
  6050. # >>30 string \372\104 DGNFile
  6051. # >>30 string \372\106 DGNFile
  6052. # >>30 string \376\103 DGNFile
  6053. # elements properties indicator
  6054. #>>>>32 uleshort !0 \b, properties 0x%4.4x
  6055. # class 0~Primary
  6056. #>>>>>32 uleshort&0x000F !0 \b, class 0x%4.4x
  6057. # Symbology
  6058. #>>>>>34 uleshort x \b, Symbology 0x%4.4x
  6059. # test for 2nd element type 1~library cell header
  6060. >>&1 ubyte&0x7F 1
  6061. # test for 1st element with level 8 and type 5 for cell library
  6062. >>>0 beshort 0x0805 Bentley/Intergraph Microstation CAD cell library
  6063. !:mime application/x-bentley-cel
  6064. !:ext cel
  6065. #
  6066. # URL: http://fileformats.archiveteam.org/wiki/Intergraph_Raster
  6067. # reference: https://web.archive.org/web/20140903185431/
  6068. # http://oreilly.com/www/centers/gff/formats/ingr/index.htm
  6069. # note: verfied by command like `nconvert -fullinfo LONGLAT.CIT`
  6070. # display information for intergraph raster bitmap
  6071. 0 name ingr-image
  6072. # in 5.37 "Microstation CITFile" "Bentley/Intergraph MicroStation CIT raster CAD"
  6073. # DataTypeCode indicates format, depth of the pixel data and used compression
  6074. >4 uleshort x Intergraph raster image
  6075. >>4 uleshort 0x0009 \b, Run-Length Encoded 1-bit
  6076. !:mime image/x-intergraph-rle
  6077. !:ext rel
  6078. >>4 uleshort 0x0018 \b, CCITT Group 4 1-bit
  6079. !:mime image/x-intergraph-cit
  6080. !:ext cit
  6081. >>4 uleshort 27 \b, Adaptive RLE RGB
  6082. !:mime image/x-intergraph-rgb
  6083. !:ext rgb
  6084. >>4 default x
  6085. >>>4 uleshort x \b, Type %u
  6086. !:mime image/x-intergraph
  6087. # TODO:
  6088. #>4 uleshort 0 \b, no data
  6089. # ...
  6090. #>4 uleshort 0x0045 \b, Continuous Tone CMKY (Uncompressed)
  6091. # ApplicationType: 0~generic raster image 3~drawing, scanning
  6092. # 8~I/IMAGE and MicroStation Imager 9~ModelView
  6093. >6 uleshort !0 \b, ApplicationType %u
  6094. #>6 uleshort x \b, ApplicationType %u
  6095. # XViewOrigin; Raster grid data X origin
  6096. #>8 ulequad !0 \b, XViewOrigin %llx
  6097. # PixelsPerLine is the number of pixels in a scan line of bitmapp
  6098. >184 ulelong x \b, %u x
  6099. # NumberOfLines is height of the raster data in scanlines
  6100. >188 ulelong x %u
  6101. # DeviceResolution; resolution of scanning device
  6102. # positive indicates number of micros between lines; negative indicates DPI
  6103. #>192 leshort x \b, DeviceResolution %d
  6104. # ScanlineOrient indicates the origin and the orientation of the scan lines
  6105. #>194 ubyte x \b, ScanlineOrient %x
  6106. >194 ubyte x \b, orientation
  6107. >194 ubyte &0x01 right
  6108. >194 ubyte ^0x01 left
  6109. >194 ubyte &0x02 down
  6110. >194 ubyte ^0x02 top
  6111. >194 ubyte &0x04 horizontal
  6112. >194 ubyte ^0x04 vertical
  6113. # ScannableFlag; Scanline indexing method used
  6114. #>195 ubyte !0 \b, ScannableFlag 0x%x
  6115. # RotationAngle; Rotation angle of raster data
  6116. #>196 ubequad !0 \b, RotationAngle 0x%llx
  6117. # SkewAngle; Skew angle of raster data
  6118. #>204 ubequad !0 \b, SkewAngle %llx
  6119. # DataTypeModifier; Additional raster data format info
  6120. #>212 uleshort !0 \b, DataTypeModifier 0x%4.4x
  6121. # DesignFile[66]; Name of the design file
  6122. >214 string >\0 \b, DesignFile %-.66s
  6123. # DatabaseFile[66]; Name of the database file
  6124. >280 string >\0 \b, DatabaseFile %-.66s
  6125. # ParentGridFile[66]; Name of parent grid file
  6126. >346 string >\0 \b, ParentGridFile %-.66s
  6127. # FileDescription[80]; Text description of file and contents
  6128. >412 string >\0 \b, FileDescription %-.80s
  6129. # MinValue
  6130. #>492 ubequad !0 \b, MinValue 0x%llx
  6131. # MaxValue
  6132. #>500 ubequad !0 \b, MaxValue 0x%llx
  6133. # Reserved[3]; Unused (always 0)
  6134. #>508 ubelong&0xFFffFF00 x \b, RESERVED %8.8x
  6135. # GridFileVersion; Grid File Version like 2 3
  6136. #>511 ubyte x \b, GridFileVersion %x
  6137. # AutoCAD
  6138. # Merge of the different contributions and updates from https://en.wikipedia.org/wiki/Dwg
  6139. # and https://www.iana.org/assignments/media-types/image/vnd.dwg
  6140. 0 string MC0.0 DWG AutoDesk AutoCAD Release 1.0
  6141. !:mime image/vnd.dwg
  6142. 0 string AC1.2 DWG AutoDesk AutoCAD Release 1.2
  6143. !:mime image/vnd.dwg
  6144. 0 string AC1.3 DWG AutoDesk AutoCAD Release 1.3
  6145. !:mime image/vnd.dwg
  6146. 0 string AC1.40 DWG AutoDesk AutoCAD Release 1.40
  6147. !:mime image/vnd.dwg
  6148. 0 string AC1.50 DWG AutoDesk AutoCAD Release 2.05
  6149. !:mime image/vnd.dwg
  6150. 0 string AC2.10 DWG AutoDesk AutoCAD Release 2.10
  6151. !:mime image/vnd.dwg
  6152. 0 string AC2.21 DWG AutoDesk AutoCAD Release 2.21
  6153. !:mime image/vnd.dwg
  6154. 0 string AC2.22 DWG AutoDesk AutoCAD Release 2.22
  6155. !:mime image/vnd.dwg
  6156. 0 string AC1001 DWG AutoDesk AutoCAD Release 2.22
  6157. !:mime image/vnd.dwg
  6158. 0 string AC1002 DWG AutoDesk AutoCAD Release 2.50
  6159. !:mime image/vnd.dwg
  6160. 0 string AC1003 DWG AutoDesk AutoCAD Release 2.60
  6161. !:mime image/vnd.dwg
  6162. 0 string AC1004 DWG AutoDesk AutoCAD Release 9
  6163. !:mime image/vnd.dwg
  6164. 0 string AC1006 DWG AutoDesk AutoCAD Release 10
  6165. !:mime image/vnd.dwg
  6166. 0 string AC1009 DWG AutoDesk AutoCAD Release 11/12
  6167. !:mime image/vnd.dwg
  6168. # AutoCAD DWG versions R13/R14 (www.autodesk.com)
  6169. # Written December 01, 2003 by Lester Hightower
  6170. # Based on the DWG File Format Specifications at http://www.opendwg.org/
  6171. # AutoCad, from Nahuel Greco
  6172. # AutoCAD DWG versions R12/R13/R14 (www.autodesk.com)
  6173. 0 string AC1012 DWG AutoDesk AutoCAD Release 13
  6174. !:mime image/vnd.dwg
  6175. 0 string AC1013 DWG AutoDesk AutoCAD Release 13c3
  6176. !:mime image/vnd.dwg
  6177. 0 string AC1014 DWG AutoDesk AutoCAD Release 14
  6178. !:mime image/vnd.dwg
  6179. 0 string AC1015 DWG AutoDesk AutoCAD 2000
  6180. !:mime image/vnd.dwg
  6181. # A new version of AutoCAD DWG
  6182. # Sergey Zaykov (mail_of_sergey@mail.ru, sergey_zaikov@rambler.ru,
  6183. # ICQ 358572321)
  6184. # From various sources like:
  6185. # https://autodesk.blogs.com/between_the_lines/autocad-release-history.html
  6186. 0 string AC1018 DWG AutoDesk AutoCAD 2004/2005/2006
  6187. !:mime image/vnd.dwg
  6188. 0 string AC1021 DWG AutoDesk AutoCAD 2007/2008/2009
  6189. !:mime image/vnd.dwg
  6190. 0 string AC1024 DWG AutoDesk AutoCAD 2010/2011/2012
  6191. !:mime image/vnd.dwg
  6192. 0 string AC1027 DWG AutoDesk AutoCAD 2013-2017
  6193. !:mime image/vnd.dwg
  6194. # From GNU LibreDWG
  6195. 0 string AC1032 DWG AutoDesk AutoCAD 2018/2019/2020
  6196. !:mime image/vnd.dwg
  6197. 0 string AC1035 DWG AutoDesk AutoCAD 2021
  6198. !:mime image/vnd.dwg
  6199. # KOMPAS 2D drawing from ASCON
  6200. # This is KOMPAS 2D drawing or fragment of drawing but is not detailed nor
  6201. # gathered nor specification
  6202. # ASCON https://ascon.net/main/ in English,
  6203. # https://ascon.ru/ main site in Russian
  6204. # Extension is CDW for drawing and FRW for fragment of drawing
  6205. # Sergey Zaykov (mail_of_sergey@mail.ru, sergey_zaikov@rambler.ru,
  6206. # ICQ 358572321, https://vkontakte.ru/id16076543)
  6207. # From:
  6208. # https://sd.ascon.ru/otrs/customer.pl?Action=CustomerFAQ&CategoryID=4&ItemID=292
  6209. # (in russian) and my experiments
  6210. 0 string KF
  6211. >2 belong 0x4E00000C Kompas drawing 12.0 SP1
  6212. >2 belong 0x4D00000C Kompas drawing 12.0
  6213. >2 belong 0x3200000B Kompas drawing 11.0 SP1
  6214. >2 belong 0x3100000B Kompas drawing 11.0
  6215. >2 belong 0x2310000A Kompas drawing 10.0 SP1
  6216. >2 belong 0x2110000A Kompas drawing 10.0
  6217. >2 belong 0x08000009 Kompas drawing 9.0 SP1
  6218. >2 belong 0x05000009 Kompas drawing 9.0
  6219. >2 belong 0x33010008 Kompas drawing 8+
  6220. >2 belong 0x1A000008 Kompas drawing 8.0
  6221. >2 belong 0x2C010107 Kompas drawing 7+
  6222. >2 belong 0x05000007 Kompas drawing 7.0
  6223. >2 belong 0x32000006 Kompas drawing 6+
  6224. >2 belong 0x09000006 Kompas drawing 6.0
  6225. >2 belong 0x5C009005 Kompas drawing 5.11R03
  6226. >2 belong 0x54009005 Kompas drawing 5.11R02
  6227. >2 belong 0x51009005 Kompas drawing 5.11R01
  6228. >2 belong 0x22009005 Kompas drawing 5.10R03
  6229. >2 belong 0x22009005 Kompas drawing 5.10R02 mar
  6230. >2 belong 0x21009005 Kompas drawing 5.10R02 febr
  6231. >2 belong 0x19009005 Kompas drawing 5.10R01
  6232. >2 belong 0xF4008005 Kompas drawing 5.9R01.003
  6233. >2 belong 0x1C008005 Kompas drawing 5.9R01.002
  6234. >2 belong 0x11008005 Kompas drawing 5.8R01.003
  6235. # CAD: file(1) magic for computer aided design files
  6236. # Phillip Griffith <phillip dot griffith at gmail dot com>
  6237. # AutoCAD magic taken from the Open Design Alliance's OpenDWG specifications.
  6238. #
  6239. # 3DS (3d Studio files)
  6240. 0 leshort 0x4d4d
  6241. >6 leshort 0x2
  6242. >>8 lelong 0xa
  6243. >>>16 leshort 0x3d3d 3D Studio model
  6244. !:mime image/x-3ds
  6245. !:ext 3ds
  6246. # MegaCAD 2D/3D drawing (.prt)
  6247. # https://megacad.de/
  6248. # From: Markus Heidelberg <markus.heidelberg@web.de>
  6249. 0 string MegaCad23\0 MegaCAD 2D/3D drawing
  6250. # Hoops CAD files
  6251. # https://docs.techsoft3d.com/visualize/3df/latest/build/general/hsf/\
  6252. # HSF_architecture.html
  6253. # Stephane Charette <stephane.charette@gmail.com>
  6254. 0 string ;;\020HSF\020V OpenHSF (Hoops Stream Format)
  6255. >7 regex/9 V[.0-9]{4,5}\020 %s
  6256. !:ext hsf
  6257. # AutoCAD Drawing Exchange Format
  6258. 0 regex \^[\ \t]*0\r?\000$
  6259. >1 regex \^[\ \t]*SECTION\r?$
  6260. >>2 regex \^[\ \t]*2\r?$
  6261. >>>3 regex \^[\ \t]*HEADER\r?$ AutoCAD Drawing Exchange Format
  6262. !:mime application/x-dxf
  6263. !:ext dxf
  6264. >>>>&1 search/8192 AC1006 \b, R10
  6265. >>>>&1 search/8192 AC1009 \b, R11/R12
  6266. >>>>&1 search/8192 AC1012 \b, R13
  6267. >>>>&1 search/8192 AC1013 \b, R13c3
  6268. >>>>&1 search/8192 AC1014 \b, R14
  6269. >>>>&1 search/8192 AC1015 \b, version 2000
  6270. >>>>&1 search/8192 AC1018 \b, version 2004
  6271. >>>>&1 search/8192 AC1021 \b, version 2007
  6272. >>>>&1 search/8192 AC1024 \b, version 2010
  6273. >>>>&1 search/8192 AC1027 \b, version 2013
  6274. >>>>&1 search/8192 AC1032 \b, version 2018
  6275. >>>>&1 search/8192 AC1035 \b, version 2021
  6276. # The Sketchup 3D model format https://www.sketchup.com/
  6277. 0 string \xff\xfe\xff\x0e\x53\x00\x6b\x00\x65\x00\x74\x00\x63\x00\x68\x00\x55\x00\x70\x00\x20\x00\x4d\x00\x6f\x00\x64\x00\x65\x00\x6c\x00 SketchUp Model
  6278. !:mime application/vnd.sketchup.skp
  6279. !:ext skp
  6280. 4 regex/b P[0-9][0-9]\\.[0-9][0-9][0-9][0-9]\\.[0-9][0-9][0-9][0-9]\\.[0-9] NAXOS CAD System file from version %s
  6281. !:strength +40
  6282. #------------------------------------------------------------------------------
  6283. # $File: cafebabe,v 1.26 2020/12/12 20:01:47 christos Exp $
  6284. # Cafe Babes unite!
  6285. #
  6286. # Since Java bytecode and Mach-O universal binaries have the same magic number,
  6287. # the test must be performed in the same "magic" sequence to get both right.
  6288. # The long at offset 4 in a Mach-O universal binary tells the number of
  6289. # architectures; the short at offset 4 in a Java bytecode file is the JVM minor
  6290. # version and the short at offset 6 is the JVM major version. Since there are only
  6291. # only 18 labeled Mach-O architectures at current, and the first released
  6292. # Java class format was version 43.0, we can safely choose any number
  6293. # between 18 and 39 to test the number of architectures against
  6294. # (and use as a hack). Let's not use 18, because the Mach-O people
  6295. # might add another one or two as time goes by...
  6296. #
  6297. ### JAVA START ###
  6298. # Reference: http://en.wikipedia.org/wiki/Java_class_file
  6299. # Update: Joerg Jenderek
  6300. 0 belong 0xcafebabe
  6301. >4 ubelong >30 compiled Java class data,
  6302. !:mime application/x-java-applet
  6303. #!:mime application/java-byte-code
  6304. !:ext class
  6305. >>6 ubeshort x version %d.
  6306. >>4 ubeshort x \b%d
  6307. # for debugging purpose version as hexadecimal to compare with Mach-O universal binary
  6308. #>>4 ubelong x (0x%8.8x)
  6309. # Which is which?
  6310. # https://docs.oracle.com/javase/specs/jvms/se6/html/ClassFile.doc.html
  6311. #>>4 belong 0x002b (Java 0.?)
  6312. #>>4 belong 0x032d (Java 1.0)
  6313. #>>4 belong 0x032d (Java 1.1)
  6314. >>4 belong 0x002e (Java 1.2)
  6315. >>4 belong 0x002f (Java 1.3)
  6316. >>4 belong 0x0030 (Java 1.4)
  6317. >>4 belong 0x0031 (Java 1.5)
  6318. >>4 belong 0x0032 (Java 1.6)
  6319. >>4 belong 0x0033 (Java 1.7)
  6320. >>4 belong 0x0034 (Java 1.8)
  6321. >>4 belong 0x0035 (Java SE 9)
  6322. >>4 belong 0x0036 (Java SE 10)
  6323. >>4 belong 0x0037 (Java SE 11)
  6324. >>4 belong 0x0038 (Java SE 12)
  6325. >>4 belong 0x0039 (Java SE 13)
  6326. >>4 belong 0x003A (Java SE 14)
  6327. # pool count unequal zero
  6328. #>>8 beshort x \b, pool count 0x%x
  6329. # pool table
  6330. #>>10 ubequad x \b, pool 0x%16.16llx...
  6331. 0 belong 0xcafed00d JAR compressed with pack200,
  6332. >5 byte x version %d.
  6333. >4 byte x \b%d
  6334. !:mime application/x-java-pack200
  6335. 0 belong 0xcafed00d JAR compressed with pack200,
  6336. >5 byte x version %d.
  6337. >4 byte x \b%d
  6338. !:mime application/x-java-pack200
  6339. ### JAVA END ###
  6340. ### MACH-O START ###
  6341. # URL: https://en.wikipedia.org/wiki/Mach-O
  6342. 0 name mach-o \b [
  6343. # for debugging purpose CPU type as hexadecimal
  6344. #>0 ubequad x CPU=%16.16llx
  6345. # display CPU type as string like: i386 x86_64 ... armv7 armv7k ...
  6346. >0 use mach-o-cpu \b
  6347. # for debugging purpose print offset to 1st mach_header like:
  6348. # 1000h 4000h seldom 2d000h 88000h 5b000h 10e000 h
  6349. #>8 ubelong x at 0x%x offset
  6350. >(8.L) indirect x \b:
  6351. >0 belong x \b]
  6352. # Reference: https://opensource.apple.com/source/cctools/cctools-949.0.1/
  6353. # include/mach-o/fat.h
  6354. # include/mach/machine.h
  6355. 0 belong 0xcafebabe
  6356. >4 belong 1 Mach-O universal binary with 1 architecture:
  6357. !:mime application/x-mach-binary
  6358. >>8 use mach-o \b
  6359. # nfat_arch; number of CPU architectures; highest is 18 for CPU_TYPE_POWERPC in 2020
  6360. >4 ubelong >1
  6361. >>4 ubelong <20 Mach-O universal binary with %d architectures:
  6362. !:mime application/x-mach-binary
  6363. >>>8 use mach-o \b
  6364. >>>4 ubelong >1
  6365. >>>>28 use mach-o \b
  6366. >>>4 ubelong >2
  6367. >>>>48 use mach-o \b
  6368. >>>4 ubelong >3
  6369. >>>>68 use mach-o \b
  6370. >>>4 ubelong >4
  6371. >>>>88 use mach-o \b
  6372. >>>4 ubelong >5
  6373. >>>>108 use mach-o \b
  6374. ### MACH-O END ###
  6375. #------------------------------------------------------------------------------
  6376. # $File: cbor,v 1.1 2015/01/28 01:05:21 christos Exp $
  6377. # cbor: file(1) magic for CBOR files as defined in RFC 7049
  6378. 0 string \xd9\xd9\xf7 Concise Binary Object Representation (CBOR) container
  6379. !:mime application/cbor
  6380. >3 ubyte <0x20 (positive integer)
  6381. >3 ubyte <0x40
  6382. >>3 ubyte >0x1f (negative integer)
  6383. >3 ubyte <0x60
  6384. >>3 ubyte >0x3f (byte string)
  6385. >3 ubyte <0x80
  6386. >>3 ubyte >0x5f (text string)
  6387. >3 ubyte <0xa0
  6388. >3 ubyte >0x7f (array)
  6389. >3 ubyte <0xc0
  6390. >>3 ubyte >0x9f (map)
  6391. >3 ubyte <0xe0
  6392. >>3 ubyte >0xbf (tagged)
  6393. >3 ubyte >0xdf (other)
  6394. #------------------------------------------------------------------------------
  6395. # $File: cddb,v 1.4 2009/09/19 16:28:08 christos Exp $
  6396. # CDDB: file(1) magic for CDDB(tm) format CD text data files
  6397. #
  6398. # From <steve@gracenote.com>
  6399. #
  6400. # This is the /etc/magic entry to decode datafiles as used by
  6401. # CDDB-enabled CD player applications.
  6402. #
  6403. 0 search/1/w #\040xmcd CDDB(tm) format CD text data
  6404. #------------------------------------------------------------------------------
  6405. # $File: chord,v 1.5 2010/09/20 19:19:16 rrt Exp $
  6406. # chord: file(1) magic for Chord music sheet typesetting utility input files
  6407. #
  6408. # From Philippe De Muyter <phdm@macqel.be>
  6409. # File format is actually free, but many distributed files begin with `{title'
  6410. #
  6411. 0 string {title Chord text file
  6412. # Type: PowerTab file format
  6413. # URL: http://www.power-tab.net/
  6414. # From: Jelmer Vernooij <jelmer@samba.org>
  6415. 0 string ptab\003\000 Power-Tab v3 Tablature File
  6416. 0 string ptab\004\000 Power-Tab v4 Tablature File
  6417. #------------------------------------------------------------------------------
  6418. # $File: cisco,v 1.4 2009/09/19 16:28:08 christos Exp $
  6419. # cisco: file(1) magic for cisco Systems routers
  6420. #
  6421. # Most cisco file-formats are covered by the generic elf code
  6422. #
  6423. # Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
  6424. 0 belong&0xffffff00 0x85011400 cisco IOS microcode
  6425. >7 string >\0 for '%s'
  6426. 0 belong&0xffffff00 0x8501cb00 cisco IOS experimental microcode
  6427. >7 string >\0 for '%s'
  6428. #------------------------------------------------------------------------------
  6429. # $File: citrus,v 1.5 2021/01/04 19:48:31 christos Exp $
  6430. # citrus locale declaration
  6431. #
  6432. 0 string RuneCT Citrus locale declaration for LC_CTYPE
  6433. 0 string CtrsME Citrus locale declaration for LC_MESSAGES
  6434. 0 string CtrsMO Citrus locale declaration for LC_MONETARY
  6435. 0 string CtrsNU Citrus locale declaration for LC_NUMERIC
  6436. 0 string CtrsTI Citrus locale declaration for LC_TIME
  6437. #------------------------------------------------------------------------------
  6438. # $File: c-lang,v 1.28 2019/11/15 21:03:14 christos Exp $
  6439. # c-lang: file(1) magic for C and related languages programs
  6440. #
  6441. # The strength is to beat standard HTML
  6442. # BCPL
  6443. 0 search/8192 "libhdr" BCPL source text
  6444. !:mime text/x-bcpl
  6445. 0 search/8192 "LIBHDR" BCPL source text
  6446. !:mime text/x-bcpl
  6447. # C
  6448. # Check for class if include is found, otherwise class is beaten by include because of lowered strength
  6449. 0 search/8192 #include
  6450. >0 regex \^#include C
  6451. >>0 regex \^class[[:space:]]+
  6452. >>>&0 regex \\{[\.\*]\\}(;)?$ \b++
  6453. >>&0 clear x source text
  6454. !:strength + 13
  6455. !:mime text/x-c
  6456. 0 search/8192 pragma
  6457. >0 regex \^#[[:space:]]*pragma C source text
  6458. !:mime text/x-c
  6459. 0 search/8192 endif
  6460. >0 regex \^#[[:space:]]*(if\|ifn)def
  6461. >>&0 regex \^#[[:space:]]*endif$ C source text
  6462. !:mime text/x-c
  6463. 0 search/8192 define
  6464. >0 regex \^#[[:space:]]*(if\|ifn)def
  6465. >>&0 regex \^#[[:space:]]*define C source text
  6466. !:mime text/x-c
  6467. 0 search/8192 char
  6468. >0 regex \^[[:space:]]*char(\ \\*|\\*)(.+)(=.*)?;[[:space:]]*$ C source text
  6469. !:mime text/x-c
  6470. 0 search/8192 double
  6471. >0 regex \^[[:space:]]*double(\ \\*|\\*)(.+)(=.*)?;[[:space:]]*$ C source text
  6472. !:mime text/x-c
  6473. 0 search/8192 extern
  6474. >0 regex \^[[:space:]]*extern[[:space:]]+ C source text
  6475. !:mime text/x-c
  6476. 0 search/8192 float
  6477. >0 regex \^[[:space:]]*float(\ \\*|\\*)(.+)(=.*)?;[[:space:]]*$ C source text
  6478. !:mime text/x-c
  6479. 0 search/8192 struct
  6480. >0 regex \^struct[[:space:]]+ C source text
  6481. !:mime text/x-c
  6482. 0 search/8192 union
  6483. >0 regex \^union[[:space:]]+ C source text
  6484. !:mime text/x-c
  6485. 0 search/8192 main(
  6486. >&0 regex \\)[[:space:]]*\\{ C source text
  6487. !:mime text/x-c
  6488. # C++
  6489. # The strength of these rules is increased so they beat the C rules above
  6490. 0 search/8192 namespace
  6491. >0 regex \^namespace[[:space:]]+[_[:alpha:]]{1,30}[[:space:]]*\\{ C++ source text
  6492. !:strength + 30
  6493. !:mime text/x-c++
  6494. # using namespace [namespace] or using std::[lib]
  6495. 0 search/8192 using
  6496. >0 regex \^using[[:space:]]+(namespace\ )?std(::)?[[:alpha:]]*[[:space:]]*; C++ source text
  6497. !:strength + 30
  6498. !:mime text/x-c++
  6499. 0 search/8192 template
  6500. >0 regex \^[[:space:]]*template[[:space:]]*<.*>[[:space:]]*$ C++ source text
  6501. !:strength + 30
  6502. !:mime text/x-c++
  6503. 0 search/8192 virtual
  6504. >0 regex \^[[:space:]]*virtual[[:space:]]+.*[};][[:space:]]*$ C++ source text
  6505. !:strength + 30
  6506. !:mime text/x-c++
  6507. # But class alone is reduced to avoid beating php (Jens Schleusener)
  6508. 0 search/8192 class
  6509. >0 regex \^[[:space:]]*class[[:space:]]+[[:digit:][:alpha:]:_]+[[:space:]]*\\{(.*[\n]*)*\\}(;)?$ C++ source text
  6510. !:strength + 13
  6511. !:mime text/x-c++
  6512. 0 search/8192 public
  6513. >0 regex \^[[:space:]]*public: C++ source text
  6514. !:strength + 30
  6515. !:mime text/x-c++
  6516. 0 search/8192 private
  6517. >0 regex \^[[:space:]]*private: C++ source text
  6518. !:strength + 30
  6519. !:mime text/x-c++
  6520. 0 search/8192 protected
  6521. >0 regex \^[[:space:]]*protected: C++ source text
  6522. !:strength + 30
  6523. !:mime text/x-c++
  6524. # Objective-C
  6525. 0 search/8192 #import
  6526. >0 regex \^#import Objective-C source text
  6527. !:strength + 25
  6528. !:mime text/x-objective-c
  6529. # From: Mikhail Teterin <mi@aldan.algebra.com>
  6530. 0 string cscope cscope reference data
  6531. >7 string x version %.2s
  6532. # We skip the path here, because it is often long (so file will
  6533. # truncate it) and mostly redundant.
  6534. # The inverted index functionality was added some time between
  6535. # versions 11 and 15, so look for -q if version is above 14:
  6536. >7 string >14
  6537. >>10 search/100 \ -q\ with inverted index
  6538. >10 search/100 \ -c\ text (non-compressed)
  6539. #------------------------------------------------------------------------------
  6540. # $File: clarion,v 1.5 2014/04/30 21:41:02 christos Exp $
  6541. # clarion: file(1) magic for # Clarion Personal/Professional Developer
  6542. # (v2 and above)
  6543. # From: Julien Blache <jb@jblache.org>
  6544. # Database files
  6545. # signature
  6546. 0 leshort 0x3343 Clarion Developer (v2 and above) data file
  6547. # attributes
  6548. >2 leshort &0x0001 \b, locked
  6549. >2 leshort &0x0004 \b, encrypted
  6550. >2 leshort &0x0008 \b, memo file exists
  6551. >2 leshort &0x0010 \b, compressed
  6552. >2 leshort &0x0040 \b, read only
  6553. # number of records
  6554. >5 lelong x \b, %d records
  6555. # Memo files
  6556. 0 leshort 0x334d Clarion Developer (v2 and above) memo data
  6557. # Key/Index files
  6558. # No magic? :(
  6559. # Help files
  6560. 0 leshort 0x49e0 Clarion Developer (v2 and above) help data
  6561. #------------------------------------------------------------------------------
  6562. # $File: claris,v 1.8 2016/07/18 19:23:38 christos Exp $
  6563. # claris: file(1) magic for claris
  6564. # "H. Nanosecond" <aldomel@ix.netcom.com>
  6565. # Claris Works a word processor, etc.
  6566. # Version 3.0
  6567. # .pct claris works clip art files
  6568. #0000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
  6569. #*
  6570. #0001000 #010 250 377 377 377 377 000 213 000 230 000 021 002 377 014 000
  6571. #null to byte 1000 octal
  6572. 514 string \377\377\377\377\000
  6573. >0 string \0\0\0\0\0\0\0\0\0\0\0\0\0 Claris clip art
  6574. 514 string \377\377\377\377\001
  6575. >0 string \0\0\0\0\0\0\0\0\0\0\0\0\0 Claris clip art
  6576. # Claris works files
  6577. # .cwk
  6578. # Moved to Apple AppleWorks document
  6579. #0 string \002\000\210\003\102\117\102\117\000\001\206 Claris works document
  6580. # .plt
  6581. 0 string \020\341\000\000\010\010 Claris Works palette files .plt
  6582. # .msp a dictionary file I am not sure about this I have only one .msp file
  6583. 0 string \002\271\262\000\040\002\000\164 Claris works dictionary
  6584. # .usp are user dictionary bits
  6585. # I am not sure about a magic header:
  6586. #0000000 001 123 160 146 070 125 104 040 136 123 015 012 160 157 144 151
  6587. # soh S p f 8 U D sp ^ S cr nl p o d i
  6588. #0000020 141 164 162 151 163 164 040 136 123 015 012 144 151 166 040 043
  6589. # a t r i s t sp ^ S cr nl d i v sp #
  6590. # .mth Thesaurus
  6591. # starts with \0 but no magic header
  6592. # .chy Hyphenation file
  6593. # I am not sure: 000 210 034 000 000
  6594. # other claris files
  6595. #./windows/claris/useng.ndx: data
  6596. #./windows/claris/xtndtran.l32: data
  6597. #./windows/claris/xtndtran.lst: data
  6598. #./windows/claris/clworks.lbl: data
  6599. #./windows/claris/clworks.prf: data
  6600. #./windows/claris/userd.spl: data
  6601. #------------------------------------------------------------------------------
  6602. # $File: clipper,v 1.9 2020/12/15 23:57:27 christos Exp $
  6603. # clipper: file(1) magic for Intergraph (formerly Fairchild) Clipper.
  6604. #
  6605. # XXX - what byte order does the Clipper use?
  6606. #
  6607. # XXX - what's the "!" stuff:
  6608. #
  6609. # >18 short !074000,000000 C1 R1
  6610. # >18 short !074000,004000 C2 R1
  6611. # >18 short !074000,010000 C3 R1
  6612. # >18 short !074000,074000 TEST
  6613. #
  6614. # I shall assume it's ANDing the field with the first value and
  6615. # comparing it with the second, and rewrite it as:
  6616. #
  6617. # >18 short&074000 000000 C1 R1
  6618. # >18 short&074000 004000 C2 R1
  6619. # >18 short&074000 010000 C3 R1
  6620. # >18 short&074000 074000 TEST
  6621. #
  6622. # as SVR3.1's "file" doesn't support anything of the "!074000,000000"
  6623. # sort, nor does SunOS 4.x, so either it's something Intergraph added
  6624. # in CLIX, or something AT&T added in SVR3.2 or later, or something
  6625. # somebody else thought was a good idea; it's not documented in the
  6626. # man page for this version of "magic", nor does it appear to be
  6627. # implemented (at least not after I blew off the bogus code to turn
  6628. # old-style "&"s into new-style "&"s, which just didn't work at all).
  6629. #
  6630. 0 short 0575 CLIPPER COFF executable (VAX #)
  6631. >20 short 0407 (impure)
  6632. >20 short 0410 (5.2 compatible)
  6633. >20 short 0411 (pure)
  6634. >20 short 0413 (demand paged)
  6635. >20 short 0443 (target shared library)
  6636. >12 long >0 not stripped
  6637. >22 short >0 - version %d
  6638. 0 short 0577 CLIPPER COFF executable
  6639. >18 short&074000 000000 C1 R1
  6640. >18 short&074000 004000 C2 R1
  6641. >18 short&074000 010000 C3 R1
  6642. >18 short&074000 074000 TEST
  6643. >20 short 0407 (impure)
  6644. >20 short 0410 (pure)
  6645. >20 short 0411 (separate I&D)
  6646. >20 short 0413 (paged)
  6647. >20 short 0443 (target shared library)
  6648. >12 long >0 not stripped
  6649. >22 short >0 - version %d
  6650. >48 long&01 01 alignment trap enabled
  6651. >52 byte 1 -Ctnc
  6652. >52 byte 2 -Ctsw
  6653. >52 byte 3 -Ctpw
  6654. >52 byte 4 -Ctcb
  6655. >53 byte 1 -Cdnc
  6656. >53 byte 2 -Cdsw
  6657. >53 byte 3 -Cdpw
  6658. >53 byte 4 -Cdcb
  6659. >54 byte 1 -Csnc
  6660. >54 byte 2 -Cssw
  6661. >54 byte 3 -Cspw
  6662. >54 byte 4 -Cscb
  6663. #4 string pipe CLIPPER instruction trace
  6664. #4 string prof CLIPPER instruction profile
  6665. #------------------------------------------------------------------------------
  6666. # file: file(1) magic for Clojure
  6667. # URL: https://clojure.org/
  6668. # From: Jason Felice <jason.m.felice@gmail.com>
  6669. 0 string/w #!\ /usr/bin/clj Clojure script text executable
  6670. !:mime text/x-clojure
  6671. 0 string/w #!\ /usr/local/bin/clj Clojure script text executable
  6672. !:mime text/x-clojure
  6673. 0 string/w #!\ /usr/bin/clojure Clojure script text executable
  6674. !:mime text/x-clojure
  6675. 0 string/w #!\ /usr/local/bin/clojure Clojure script text executable
  6676. !:mime text/x-clojure
  6677. 0 string/W #!/usr/bin/env\ clj Clojure script text executable
  6678. !:mime text/x-clojure
  6679. 0 string/W #!/usr/bin/env\ clojure Clojure script text executable
  6680. !:mime text/x-clojure
  6681. 0 string/W #!\ /usr/bin/env\ clj Clojure script text executable
  6682. !:mime text/x-clojure
  6683. 0 string/W #!\ /usr/bin/env\ clojure Clojure script text executable
  6684. !:mime text/x-clojure
  6685. 0 regex \^\\\(ns[[:space:]]+[a-z] Clojure module source text
  6686. !:mime text/x-clojure
  6687. 0 regex \^\\\(ns[[:space:]]+\\\^\\{: Clojure module source text
  6688. !:mime text/x-clojure
  6689. 0 regex \^\\\(defn-?[[:space:]] Clojure module source text
  6690. !:mime text/x-clojure
  6691. #------------------------------------------------------------------------------
  6692. # $File: coff,v 1.4 2021/02/10 00:37:02 christos Exp $
  6693. # coff: file(1) magic for Common Object Files not specific to known cpu types or manufactures
  6694. #
  6695. # COFF
  6696. #
  6697. # by Joerg Jenderek at Oct 2015, Feb 2021
  6698. # https://en.wikipedia.org/wiki/COFF
  6699. # https://de.wikipedia.org/wiki/Common_Object_File_Format
  6700. # http://www.delorie.com/djgpp/doc/coff/filhdr.html
  6701. # display name+variables+flags of Common Object Files Format (32bit)
  6702. # Maybe used also in adi,att3b,clipper,hitachi-sh,hp,ibm6000,intel,
  6703. # mips,motorola,msdos,osf1,sharc,varied.out,vax
  6704. 0 name display-coff
  6705. # test for unused flag bits (0x8000,0x0800,0x0400,0x0200,x0080) in f_flags
  6706. >18 uleshort&0x8E80 0
  6707. # skip DOCTOR.DAILY READER.NDA REDBOX.ROOT by looking for positive number of sections
  6708. >>2 uleshort >0
  6709. # skip ega80woa.fnt svgafix.fnt HP3FNTS1.DAT HP3FNTS2.DAT INTRO.ACT LEARN.PIF by looking for low number of sections
  6710. >>>2 uleshort <4207
  6711. >>>>0 clear x
  6712. # f_magic - magic number
  6713. # DJGPP, 80386 COFF executable, MS Windows COFF Intel 80386 object file (./intel)
  6714. >>>>0 uleshort 0x014C Intel 80386
  6715. # Hitachi SH big-endian COFF (./hitachi-sh)
  6716. >>>>0 uleshort 0x0500 Hitachi SH big-endian
  6717. # Hitachi SH little-endian COFF (./hitachi-sh)
  6718. >>>>0 uleshort 0x0550 Hitachi SH little-endian
  6719. # executable (RISC System/6000 V3.1) or obj module (./ibm6000)
  6720. #>>>>0 uleshort 0x01DF
  6721. # MS Windows COFF Intel Itanium, AMD64
  6722. # https://msdn.microsoft.com/en-us/library/windows/desktop/ms680313(v=vs.85).aspx
  6723. >>>>0 uleshort 0x0200 Intel ia64
  6724. >>>>0 uleshort 0x8664 Intel amd64
  6725. # TODO for other COFFs
  6726. #>>>>0 uleshort 0xABCD COFF_TEMPLATE
  6727. >>>>0 default x
  6728. >>>>>0 uleshort x type 0x%04x
  6729. >>>>0 uleshort x COFF
  6730. # F_EXEC flag bit
  6731. >>>>18 leshort ^0x0002 object file
  6732. !:mime application/x-coff
  6733. !:ext o/obj/lib
  6734. # no cof sample found
  6735. #!:ext cof/o/obj/lib
  6736. >>>>18 leshort &0x0002 executable
  6737. #!:mime application/x-coffexec
  6738. # F_RELFLG flag bit,static object
  6739. >>>>18 leshort &0x0001 \b, no relocation info
  6740. # F_LNNO flag bit
  6741. >>>>18 leshort &0x0004 \b, no line number info
  6742. # F_LSYMS flag bit
  6743. >>>>18 leshort &0x0008 \b, stripped
  6744. >>>>18 leshort ^0x0008 \b, not stripped
  6745. # flags in other COFF versions
  6746. #0x0010 F_FDPR_PROF
  6747. #0x0020 F_FDPR_OPTI
  6748. #0x0040 F_DSA
  6749. # F_AR32WR flag bit
  6750. #>>>>18 leshort &0x0100 \b, 32 bit little endian
  6751. #0x1000 F_DYNLOAD
  6752. #0x2000 F_SHROBJ
  6753. #0x4000 F_LOADONLY
  6754. # f_nscns - number of sections like: 1 2 3 4 5 7 8 9 11 12 15 16 19 20 21 22 26 30 36 40 42 56 80 89 96 124
  6755. >>>>2 uleshort <2 \b, %u section
  6756. >>>>2 uleshort >1 \b, %u sections
  6757. # f_symptr - symbol table pointer, only for not stripped
  6758. # like: 0 0x7c 0xf4 0x104 0x182 0x1c2 0x1c6 0x468 0x948 0x416e 0x149a6 0x1c9d8 0x23a68 0x35120 0x7afa0
  6759. >>>>8 ulelong >0 \b, symbol offset=0x%x
  6760. # f_nsyms - number of symbols, only for not stripped
  6761. # like: 0 2 7 9 10 11 20 35 41 63 71 80 105 146 153 158 170 208 294 572 831 1546
  6762. >>>>12 ulelong >0 \b, %d symbols
  6763. # f_opthdr - optional header size. An object file should have a value of 0
  6764. >>>>16 uleshort >0 \b, optional header size %u
  6765. # f_timdat - file time & date stamp only for little endian
  6766. >>>>4 ledate >0 \b, created %s
  6767. # at offset 20 can be optional header, extra bytes FILHSZ-20 because
  6768. # do not rely on sizeof(FILHDR) to give the correct size for header.
  6769. # or first section header
  6770. # additional variables for other COFF files
  6771. >>>>16 uleshort =0
  6772. # first section name s_name[8] like: .text .data .debug$S .drectve .testseg
  6773. >>>>>20 string x \b, 1st section name "%.8s"
  6774. # >20 beshort 0407 (impure)
  6775. # >20 beshort 0410 (pure)
  6776. # >20 beshort 0413 (demand paged)
  6777. # >20 beshort 0421 (standalone)
  6778. # >22 leshort >0 - version %d
  6779. # >168 string .lowmem Apple toolbox
  6780. #------------------------------------------------------------------------------
  6781. # $File: commands,v 1.63 2020/06/06 15:36:30 christos Exp $
  6782. # commands: file(1) magic for various shells and interpreters
  6783. #
  6784. #0 string/w : shell archive or script for antique kernel text
  6785. 0 string/wt #!\ /bin/sh POSIX shell script text executable
  6786. !:mime text/x-shellscript
  6787. 0 string/wb #!\ /bin/sh POSIX shell script executable (binary data)
  6788. !:mime text/x-shellscript
  6789. 0 string/wt #!\ /bin/csh C shell script text executable
  6790. !:mime text/x-shellscript
  6791. # korn shell magic, sent by George Wu, gwu@clyde.att.com
  6792. 0 string/wt #!\ /bin/ksh Korn shell script text executable
  6793. !:mime text/x-shellscript
  6794. 0 string/wb #!\ /bin/ksh Korn shell script executable (binary data)
  6795. !:mime text/x-shellscript
  6796. 0 string/wt #!\ /bin/tcsh Tenex C shell script text executable
  6797. !:mime text/x-shellscript
  6798. 0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text executable
  6799. !:mime text/x-shellscript
  6800. 0 string/wt #!\ /usr/local/tcsh Tenex C shell script text executable
  6801. !:mime text/x-shellscript
  6802. 0 string/wt #!\ /usr/local/bin/tcsh Tenex C shell script text executable
  6803. !:mime text/x-shellscript
  6804. #
  6805. # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
  6806. 0 string/wt #!\ /bin/zsh Paul Falstad's zsh script text executable
  6807. !:mime text/x-shellscript
  6808. 0 string/wt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable
  6809. !:mime text/x-shellscript
  6810. 0 string/wt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable
  6811. !:mime text/x-shellscript
  6812. 0 search/1 #!/usr/bin/env\ zsh Paul Falstad's zsh script text executable
  6813. !:mime text/x-shellscript
  6814. 0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text executable
  6815. !:mime text/x-shellscript
  6816. 0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text executable
  6817. !:mime text/x-shellscript
  6818. 0 string/wt #!\ /bin/nawk new awk script text executable
  6819. !:mime text/x-nawk
  6820. 0 string/wt #!\ /usr/bin/nawk new awk script text executable
  6821. !:mime text/x-nawk
  6822. 0 string/wt #!\ /usr/local/bin/nawk new awk script text executable
  6823. !:mime text/x-nawk
  6824. 0 string/wt #!\ /bin/gawk GNU awk script text executable
  6825. !:mime text/x-gawk
  6826. 0 string/wt #!\ /usr/bin/gawk GNU awk script text executable
  6827. !:mime text/x-gawk
  6828. 0 string/wt #!\ /usr/local/bin/gawk GNU awk script text executable
  6829. !:mime text/x-gawk
  6830. #
  6831. 0 string/wt #!\ /bin/awk awk script text executable
  6832. !:mime text/x-awk
  6833. 0 string/wt #!\ /usr/bin/awk awk script text executable
  6834. !:mime text/x-awk
  6835. 0 regex/4096 =^[\040\t\f\r\n]{0,100}BEGIN[\040\t\f\r\n]{0,100}[{] awk or perl script text
  6836. # AT&T Bell Labs' Plan 9 shell
  6837. 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
  6838. # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
  6839. 0 string/wt #!\ /bin/bash Bourne-Again shell script text executable
  6840. !:mime text/x-shellscript
  6841. 0 string/wb #!\ /bin/bash Bourne-Again shell script executable (binary data)
  6842. !:mime text/x-shellscript
  6843. 0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text executable
  6844. !:mime text/x-shellscript
  6845. 0 string/wb #!\ /usr/bin/bash Bourne-Again shell script executable (binary data)
  6846. !:mime text/x-shellscript
  6847. 0 string/wt #!\ /usr/local/bash Bourne-Again shell script text executable
  6848. !:mime text/x-shellscript
  6849. 0 string/wb #!\ /usr/local/bash Bourne-Again shell script executable (binary data)
  6850. !:mime text/x-shellscript
  6851. 0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text executable
  6852. !:mime text/x-shellscript
  6853. 0 string/wb #!\ /usr/local/bin/bash Bourne-Again shell script executable (binary data)
  6854. !:mime text/x-shellscript
  6855. 0 string/wt #!\ /usr/bin/env\ bash Bourne-Again shell script text executable
  6856. !:mime text/x-shellscript
  6857. # Fish shell magic
  6858. # From: Benjamin Lowry <ben@ben.gmbh>
  6859. 0 string/wt #!\ /usr/local/bin/fish fish shell script text executable
  6860. !:mime text/x-shellscript
  6861. 0 string/wt #!\ /usr/bin/fish fish shell script text executable
  6862. !:mime text/x-shellscript
  6863. 0 string/wt #!\ /usr/bin/env\ fish fish shell script text executable
  6864. !:mime text/x-shellscript
  6865. 0 search/1/wt #!\ /usr/bin/tclsh Tcl/Tk script text executable
  6866. !:mime text/x-tcl
  6867. 0 search/1/wt #!\ /usr/bin/texlua LuaTex script text executable
  6868. !:mime text/x-luatex
  6869. 0 search/1/wt #!\ /usr/bin/luatex LuaTex script text executable
  6870. !:mime text/x-luatex
  6871. 0 search/1/wt #!\ /usr/bin/stap Systemtap script text executable
  6872. !:mime text/x-systemtap
  6873. # PHP scripts
  6874. # Ulf Harnhammar <ulfh@update.uu.se>
  6875. 0 search/1/c =<?php PHP script text
  6876. !:strength + 30
  6877. !:mime text/x-php
  6878. 0 search/1 =<?\n PHP script text
  6879. !:mime text/x-php
  6880. 0 search/1 =<?\r PHP script text
  6881. !:mime text/x-php
  6882. 0 search/1/w #!\ /usr/local/bin/php PHP script text executable
  6883. !:strength + 10
  6884. !:mime text/x-php
  6885. 0 search/1/w #!\ /usr/bin/php PHP script text executable
  6886. !:strength + 10
  6887. !:mime text/x-php
  6888. # Smarty compiled template, https://www.smarty.net/
  6889. # Elan Ruusamae <glen@delfi.ee>
  6890. 0 string =<?php
  6891. >5 regex [\ \n]
  6892. >>6 string /*\ Smarty\ version Smarty compiled template
  6893. >>>24 regex [0-9.]+ \b, version %s
  6894. !:mime text/x-php
  6895. 0 string Zend\x00 PHP script Zend Optimizer data
  6896. 0 string/t $! DCL command file
  6897. # Type: Pdmenu
  6898. # URL: https://packages.debian.org/pdmenu
  6899. # From: Edward Betts <edward@debian.org>
  6900. 0 string #!/usr/bin/pdmenu Pdmenu configuration file text
  6901. # From Danny Weldon
  6902. 0 string \x0b\x13\x08\x00
  6903. >0x04 uleshort <4 ksh byte-code version %d
  6904. #----------------------------------------------------------------------------
  6905. # $File: communications,v 1.5 2009/09/19 16:28:08 christos Exp $
  6906. # communication
  6907. # TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3.
  6908. # It is used for conformance testing of communication protocols.
  6909. # Added by W. Borgert <debacle@debian.org>.
  6910. 0 string $Suite TTCN Abstract Test Suite
  6911. >&1 string $SuiteId
  6912. >>&1 string >\n %s
  6913. >&2 string $SuiteId
  6914. >>&1 string >\n %s
  6915. >&3 string $SuiteId
  6916. >>&1 string >\n %s
  6917. # MSC (message sequence charts) are a formal description technique,
  6918. # described in ITU-T Z.120, mainly used for communication protocols.
  6919. # Added by W. Borgert <debacle@debian.org>.
  6920. 0 string mscdocument Message Sequence Chart (document)
  6921. 0 string msc Message Sequence Chart (chart)
  6922. 0 string submsc Message Sequence Chart (subchart)
  6923. #------------------------------------------------------------------------------
  6924. # $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $
  6925. # compress: file(1) magic for pure-compression formats (no archives)
  6926. #
  6927. # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
  6928. #
  6929. # Formats for various forms of compressed data
  6930. # Formats for "compress" proper have been moved into "compress.c",
  6931. # because it tries to uncompress it to figure out what's inside.
  6932. # standard unix compress
  6933. 0 string \037\235 compress'd data
  6934. !:mime application/x-compress
  6935. !:apple LZIVZIVU
  6936. >2 byte&0x80 >0 block compressed
  6937. >2 byte&0x1f x %d bits
  6938. # gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
  6939. # URL: https://en.wikipedia.org/wiki/Gzip
  6940. # Reference: https://tools.ietf.org/html/rfc1952
  6941. # Update: Joerg Jenderek, Apr 2019
  6942. # Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
  6943. # * Original filename is only at offset 10 if "extra field" absent
  6944. # * Produce shorter output - notably, only report compression methods
  6945. # other than 8 ("deflate", the only method defined in RFC 1952).
  6946. # Note: find defs -iname '*.trid.xml' -exec grep -q '<Bytes>1F8B08' {} \; -ls
  6947. # TODO:
  6948. # FBR Blueberry FlashBack screen Record https://www.flashbackrecorder.com/
  6949. # KPR KOffice/Calligra KPresenter application/x-kpresenter
  6950. # KPT KOffice/Calligra KPresenter template? application/x-kpresenter
  6951. # SAV Diggles Saved Game File http://www.innonics.com
  6952. # SAV FarCry (demo) saved game http://www.farcry-thegame.com
  6953. # DAT ZOAGZIP game data format http://en.wikipedia.org/wiki/SD_Gundam_Capsule_Fighter
  6954. 0 string \037\213
  6955. # to display gzip compressed (strength=100=2*50) before other (strength=50)?
  6956. #!:strength * 2
  6957. # no FNAME and FCOMMENT bit implies no file name/comment. That means only binary
  6958. >3 byte&0x18 =0
  6959. # For binary gzipped no ASCII text should occur
  6960. # mcd-monu-cad.trid.xml
  6961. >>10 string MCD Monu-Cad Drawing, Component or Font
  6962. #>>36 string Created\ with\ MONU-CAD
  6963. #!:mime application/octet-stream
  6964. # http://fileformats.archiveteam.org/wiki/Monu-CAD
  6965. # http://www.monucad.com/downloads/FullDemo-2005.EXE
  6966. # /HANDS96.MCC Component
  6967. # /DEMO_DD01.MCD Drawing
  6968. # /MCALF020.FNT Font
  6969. !:ext mcc/mcd/fnt
  6970. # http://www.generalcadd.com
  6971. >>10 string GXD General CADD, Drawing or Component
  6972. #!:mime application/octet-stream
  6973. # /gxc/BUILDINGEDGE.gxc Component
  6974. # /gxd/HOCKETT-STPAUL-WRHSE.gxd Drawing
  6975. # /gxd/POWERLAND-MILL-ADD-11.gxd Drawing v9.1.06
  6976. !:ext gxc/gxd
  6977. #>>>13 ubyte 0 \b, version 0
  6978. >>>13 string 09 \b, version 9
  6979. # other gzipped binary like gzipped tar, VirtualBox extension package,...
  6980. >>10 default x gzip compressed data
  6981. !:mime application/gzip
  6982. >>>0 use gzip-info
  6983. # size of the original (uncompressed) input data modulo 2^32
  6984. >>-0 offset >48
  6985. >>>-4 ulelong x \b, original size modulo 2^32 %u
  6986. >>-0 offset <48 \b, truncated
  6987. # gzipped TAR or VirtualBox extension package
  6988. #!:mime application/x-compressed-tar
  6989. #!:mime application/x-virtualbox-vbox-extpack
  6990. # https://www.w3.org/TR/SVG/mimereg.html
  6991. #!:mime image/image/svg+xml-compressed
  6992. # zlib.3.gz
  6993. # microcode-20180312.tgz
  6994. # tpz same as tgz
  6995. # lua-md5_1.2-1_i386_i486.ipk https://en.wikipedia.org/wiki/Opkg
  6996. # Oracle_VM_VirtualBox_Extension_Pack-5.0.12-104815.vbox-extpack
  6997. !:ext gz/tgz/tpz/ipk/vbox-extpack/svgz
  6998. # FNAME/FCOMMENT bit implies file name/comment as iso-8859-1 text
  6999. >3 byte&0x18 >0 gzip compressed data
  7000. !:mime application/gzip
  7001. # gzipped tar, gzipped Abiword document
  7002. #!:mime application/x-compressed-tar
  7003. #!:mime application/x-abiword-compressed
  7004. #!:mime image/image/svg+xml-compressed
  7005. # kleopatra_splashscreen.svgz gzipped .svg
  7006. !:ext gz/tgz/tpz/zabw/svgz
  7007. >>0 use gzip-info
  7008. # size of the original (uncompressed) input data modulo 2^32
  7009. >>-0 offset >48
  7010. >>>-4 ulelong x \b, original size modulo 2^32 %u
  7011. >>-0 offset <48 \b, truncated
  7012. # display information of gzip compressed files
  7013. 0 name gzip-info
  7014. #>2 byte x THIS iS GZIP
  7015. >2 byte <8 \b, reserved method
  7016. >2 byte >8 \b, unknown method
  7017. >3 byte &0x01 \b, ASCII
  7018. >3 byte &0x02 \b, has CRC
  7019. >3 byte &0x04 \b, extra field
  7020. >3 byte&0xC =0x08
  7021. >>10 string x \b, was "%s"
  7022. >3 byte &0x10 \b, has comment
  7023. >3 byte &0x20 \b, encrypted
  7024. >4 ledate >0 \b, last modified: %s
  7025. >8 byte 2 \b, max compression
  7026. >8 byte 4 \b, max speed
  7027. >9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT)
  7028. >9 byte =0x01 \b, from Amiga
  7029. >9 byte =0x02 \b, from VMS
  7030. >9 byte =0x03 \b, from Unix
  7031. >9 byte =0x04 \b, from VM/CMS
  7032. >9 byte =0x05 \b, from Atari
  7033. >9 byte =0x06 \b, from HPFS filesystem (OS/2, NT)
  7034. >9 byte =0x07 \b, from MacOS
  7035. >9 byte =0x08 \b, from Z-System
  7036. >9 byte =0x09 \b, from CP/M
  7037. >9 byte =0x0A \b, from TOPS/20
  7038. >9 byte =0x0B \b, from NTFS filesystem (NT)
  7039. >9 byte =0x0C \b, from QDOS
  7040. >9 byte =0x0D \b, from Acorn RISCOS
  7041. # size of the original (uncompressed) input data modulo 2^32
  7042. #>-4 ulelong x \b, original size modulo 2^32 %u
  7043. #ERROR: line 114: non zero offset 1048572 at level 1
  7044. # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
  7045. 0 string \037\036 packed data
  7046. !:mime application/octet-stream
  7047. >2 belong >1 \b, %d characters originally
  7048. >2 belong =1 \b, %d character originally
  7049. #
  7050. # This magic number is byte-order-independent.
  7051. 0 short 0x1f1f old packed data
  7052. !:mime application/octet-stream
  7053. # XXX - why *two* entries for "compacted data", one of which is
  7054. # byte-order independent, and one of which is byte-order dependent?
  7055. #
  7056. 0 short 0x1fff compacted data
  7057. !:mime application/octet-stream
  7058. # This string is valid for SunOS (BE) and a matching "short" is listed
  7059. # in the Ultrix (LE) magic file.
  7060. 0 string \377\037 compacted data
  7061. !:mime application/octet-stream
  7062. 0 short 0145405 huf output
  7063. !:mime application/octet-stream
  7064. # bzip2
  7065. 0 string BZh bzip2 compressed data
  7066. !:mime application/x-bzip2
  7067. >3 byte >47 \b, block size = %c00k
  7068. # bzip a block-sorting file compressor
  7069. # by Julian Seward <sewardj@cs.man.ac.uk> and others
  7070. 0 string BZ0 bzip compressed data
  7071. !:mime application/x-bzip
  7072. >3 byte >47 \b, block size = %c00k
  7073. # lzip
  7074. 0 string LZIP lzip compressed data
  7075. !:mime application/x-lzip
  7076. >4 byte x \b, version: %d
  7077. # squeeze and crunch
  7078. # Michael Haardt <michael@cantor.informatik.rwth-aachen.de>
  7079. 0 beshort 0x76FF squeezed data,
  7080. >4 string x original name %s
  7081. 0 beshort 0x76FE crunched data,
  7082. >2 string x original name %s
  7083. 0 beshort 0x76FD LZH compressed data,
  7084. >2 string x original name %s
  7085. # Freeze
  7086. 0 string \037\237 frozen file 2.1
  7087. 0 string \037\236 frozen file 1.0 (or gzip 0.5)
  7088. # SCO compress -H (LZH)
  7089. 0 string \037\240 SCO compress -H (LZH) data
  7090. # European GSM 06.10 is a provisional standard for full-rate speech
  7091. # transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
  7092. # excitation/long term prediction) coding at 13 kbit/s.
  7093. #
  7094. # There's only a magic nibble (4 bits); that nibble repeats every 33
  7095. # bytes. This isn't suited for use, but maybe we can use it someday.
  7096. #
  7097. # This will cause very short GSM files to be declared as data and
  7098. # mismatches to be declared as data too!
  7099. #0 byte&0xF0 0xd0 data
  7100. #>33 byte&0xF0 0xd0
  7101. #>66 byte&0xF0 0xd0
  7102. #>99 byte&0xF0 0xd0
  7103. #>132 byte&0xF0 0xd0 GSM 06.10 compressed audio
  7104. # lzop from <markus.oberhumer@jk.uni-linz.ac.at>
  7105. 0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data
  7106. >9 beshort <0x0940
  7107. >>9 byte&0xf0 =0x00 - version 0.
  7108. >>9 beshort&0x0fff x \b%03x,
  7109. >>13 byte 1 LZO1X-1,
  7110. >>13 byte 2 LZO1X-1(15),
  7111. >>13 byte 3 LZO1X-999,
  7112. ## >>22 bedate >0 last modified: %s,
  7113. >>14 byte =0x00 os: MS-DOS
  7114. >>14 byte =0x01 os: Amiga
  7115. >>14 byte =0x02 os: VMS
  7116. >>14 byte =0x03 os: Unix
  7117. >>14 byte =0x05 os: Atari
  7118. >>14 byte =0x06 os: OS/2
  7119. >>14 byte =0x07 os: MacOS
  7120. >>14 byte =0x0A os: Tops/20
  7121. >>14 byte =0x0B os: WinNT
  7122. >>14 byte =0x0E os: Win32
  7123. >9 beshort >0x0939
  7124. >>9 byte&0xf0 =0x00 - version 0.
  7125. >>9 byte&0xf0 =0x10 - version 1.
  7126. >>9 byte&0xf0 =0x20 - version 2.
  7127. >>9 beshort&0x0fff x \b%03x,
  7128. >>15 byte 1 LZO1X-1,
  7129. >>15 byte 2 LZO1X-1(15),
  7130. >>15 byte 3 LZO1X-999,
  7131. ## >>25 bedate >0 last modified: %s,
  7132. >>17 byte =0x00 os: MS-DOS
  7133. >>17 byte =0x01 os: Amiga
  7134. >>17 byte =0x02 os: VMS
  7135. >>17 byte =0x03 os: Unix
  7136. >>17 byte =0x05 os: Atari
  7137. >>17 byte =0x06 os: OS/2
  7138. >>17 byte =0x07 os: MacOS
  7139. >>17 byte =0x0A os: Tops/20
  7140. >>17 byte =0x0B os: WinNT
  7141. >>17 byte =0x0E os: Win32
  7142. # 4.3BSD-Quasijarus Strong Compression
  7143. # https://minnie.tuhs.org/Quasijarus/compress.html
  7144. 0 string \037\241 Quasijarus strong compressed data
  7145. # From: Cory Dikkers <cdikkers@swbell.net>
  7146. 0 string XPKF Amiga xpkf.library compressed data
  7147. 0 string PP11 Power Packer 1.1 compressed data
  7148. 0 string PP20 Power Packer 2.0 compressed data,
  7149. >4 belong 0x09090909 fast compression
  7150. >4 belong 0x090A0A0A mediocre compression
  7151. >4 belong 0x090A0B0B good compression
  7152. >4 belong 0x090A0C0C very good compression
  7153. >4 belong 0x090A0C0D best compression
  7154. # 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at)
  7155. # https://www.7-zip.org or DOC/7zFormat.txt
  7156. #
  7157. 0 string 7z\274\257\047\034 7-zip archive data,
  7158. >6 byte x version %d
  7159. >7 byte x \b.%d
  7160. !:mime application/x-7z-compressed
  7161. !:ext 7z/cb7
  7162. # Type: LZMA
  7163. 0 lelong&0xffffff =0x5d
  7164. >12 leshort 0xff LZMA compressed data,
  7165. !:mime application/x-lzma
  7166. >>5 lequad =0xffffffffffffffff streamed
  7167. >>5 lequad !0xffffffffffffffff non-streamed, size %lld
  7168. >12 leshort 0 LZMA compressed data,
  7169. >>5 lequad =0xffffffffffffffff streamed
  7170. >>5 lequad !0xffffffffffffffff non-streamed, size %lld
  7171. # http://tukaani.org/xz/xz-file-format.txt
  7172. 0 ustring \xFD7zXZ\x00 XZ compressed data, checksum
  7173. >7 byte&0xf 0x0 NONE
  7174. >7 byte&0xf 0x1 CRC32
  7175. >7 byte&0xf 0x4 CRC64
  7176. >7 byte&0xf 0xa SHA-256
  7177. !:strength * 2
  7178. !:mime application/x-xz
  7179. # https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt
  7180. 0 string LRZI LRZIP compressed data
  7181. >4 byte x - version %d
  7182. >5 byte x \b.%d
  7183. !:mime application/x-lrzip
  7184. # https://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html
  7185. 0 lelong 0x184d2204 LZ4 compressed data (v1.4+)
  7186. !:mime application/x-lz4
  7187. # Added by osm0sis@xda-developers.com
  7188. 0 lelong 0x184c2103 LZ4 compressed data (v1.0-v1.3)
  7189. !:mime application/x-lz4
  7190. 0 lelong 0x184c2102 LZ4 compressed data (v0.1-v0.9)
  7191. !:mime application/x-lz4
  7192. # Zstandard/LZ4 skippable frames
  7193. # https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md
  7194. 0 lelong&0xFFFFFFF0 0x184D2A50
  7195. >(4.l+8) indirect x
  7196. # Zstandard Dictionary ID subroutine
  7197. 0 name zstd-dictionary-id
  7198. # Single Segment = True
  7199. >0 byte &0x20 \b, Dictionary ID:
  7200. >>0 byte&0x03 0 None
  7201. >>0 byte&0x03 1
  7202. >>>1 byte x %u
  7203. >>0 byte&0x03 2
  7204. >>>1 leshort x %u
  7205. >>0 byte&0x03 3
  7206. >>>1 lelong x %u
  7207. # Single Segment = False
  7208. >0 byte ^0x20 \b, Dictionary ID:
  7209. >>0 byte&0x03 0 None
  7210. >>0 byte&0x03 1
  7211. >>>2 byte x %u
  7212. >>0 byte&0x03 2
  7213. >>>2 leshort x %u
  7214. >>0 byte&0x03 3
  7215. >>>2 lelong x %u
  7216. # Zstandard compressed data
  7217. # https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md
  7218. 0 lelong 0xFD2FB522 Zstandard compressed data (v0.2)
  7219. !:mime application/zstd
  7220. 0 lelong 0xFD2FB523 Zstandard compressed data (v0.3)
  7221. !:mime application/zstd
  7222. 0 lelong 0xFD2FB524 Zstandard compressed data (v0.4)
  7223. !:mime application/zstd
  7224. 0 lelong 0xFD2FB525 Zstandard compressed data (v0.5)
  7225. !:mime application/zstd
  7226. 0 lelong 0xFD2FB526 Zstandard compressed data (v0.6)
  7227. !:mime application/zstd
  7228. 0 lelong 0xFD2FB527 Zstandard compressed data (v0.7)
  7229. !:mime application/zstd
  7230. >4 use zstd-dictionary-id
  7231. 0 lelong 0xFD2FB528 Zstandard compressed data (v0.8+)
  7232. !:mime application/zstd
  7233. >4 use zstd-dictionary-id
  7234. # https://github.com/facebook/zstd/blob/dev/zstd_compression_format.md
  7235. 0 lelong 0xEC30A437 Zstandard dictionary
  7236. !:mime application/x-std-dictionary
  7237. >4 lelong x (ID %u)
  7238. # AFX compressed files (Wolfram Kleff)
  7239. 2 string -afx- AFX compressed file data
  7240. # Supplementary magic data for the file(1) command to support
  7241. # rzip(1). The format is described in magic(5).
  7242. #
  7243. # Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with
  7244. # this file.
  7245. #
  7246. 0 string RZIP rzip compressed data
  7247. >4 byte x - version %d
  7248. >5 byte x \b.%d
  7249. >6 belong x (%d bytes)
  7250. 0 string ArC\x01 FreeArc archive <http://freearc.org>
  7251. # Type: DACT compressed files
  7252. 0 long 0x444354C3 DACT compressed data
  7253. >4 byte >-1 (version %i.
  7254. >5 byte >-1 %i.
  7255. >6 byte >-1 %i)
  7256. >7 long >0 , original size: %i bytes
  7257. >15 long >30 , block size: %i bytes
  7258. # Valve Pack (VPK) files
  7259. 0 lelong 0x55aa1234 Valve Pak file
  7260. >0x4 lelong x \b, version %u
  7261. >0x8 lelong x \b, %u entries
  7262. # Snappy framing format
  7263. # https://code.google.com/p/snappy/source/browse/trunk/framing_format.txt
  7264. 0 string \377\006\0\0sNaPpY snappy framed data
  7265. !:mime application/x-snappy-framed
  7266. # qpress, https://www.quicklz.com/
  7267. 0 string qpress10 qpress compressed data
  7268. !:mime application/x-qpress
  7269. # Zlib https://www.ietf.org/rfc/rfc6713.txt
  7270. 0 string/b x
  7271. >0 beshort%31 =0
  7272. >>0 byte&0xf =8
  7273. >>>0 byte&0x80 =0 zlib compressed data
  7274. !:mime application/zlib
  7275. # BWC compression
  7276. 0 string BWC
  7277. >3 byte 0 BWC compressed data
  7278. # UCL compression
  7279. 0 bequad 0x00e955434cff011a UCL compressed data
  7280. # Softlib archive
  7281. 0 string SLIB Softlib archive
  7282. >4 leshort x \b, version %d
  7283. >6 leshort x (contains %d files)
  7284. # URL: https://github.com/lzfse/lzfse/blob/master/src/lzfse_internal.h#L276
  7285. # From: Eric Hall <eric.hall@darkart.com>
  7286. 0 string bvx- lzfse encoded, no compression
  7287. 0 string bvx1 lzfse compressed, uncompressed tables
  7288. 0 string bvx2 lzfse compressed, compressed tables
  7289. 0 string bvxn lzfse encoded, lzvn compressed
  7290. # pcxLib.exe compression program
  7291. # http://www.shikadi.net/moddingwiki/PCX_Library
  7292. 0 string/b pcxLib
  7293. >0x0A string/b Copyright\020(c)\020Genus\020Microprogramming,\020Inc. pcxLib compressed
  7294. #------------------------------------------------------------------------------
  7295. # $File: console,v 1.62 2021/02/05 21:51:06 christos Exp $
  7296. # Console game magic
  7297. # Toby Deshane <hac@shoelace.digivill.net>
  7298. # ines: file(1) magic for Marat's iNES Nintendo Entertainment System ROM dump format
  7299. # Updated by David Korth <gerbilsoft@gerbilsoft.com>
  7300. # References:
  7301. # - https://wiki.nesdev.com/w/index.php/INES
  7302. # - https://wiki.nesdev.com/w/index.php/NES_2.0
  7303. # Common header for iNES, NES 2.0, and Wii U iNES.
  7304. 0 name nes-rom-image-ines
  7305. >7 byte&0x0C =0x8 (NES 2.0)
  7306. >4 byte x \b: %ux16k PRG
  7307. >5 byte x \b, %ux8k CHR
  7308. >6 byte&0x08 =0x8 [4-Scr]
  7309. >6 byte&0x09 =0x0 [H-mirror]
  7310. >6 byte&0x09 =0x1 [V-mirror]
  7311. >6 byte&0x02 =0x2 [SRAM]
  7312. >6 byte&0x04 =0x4 [Trainer]
  7313. >7 byte&0x03 =0x2 [PC10]
  7314. >7 byte&0x03 =0x1 [VS]
  7315. >>7 byte&0x0C =0x8
  7316. # NES 2.0: VS PPU
  7317. >>>13 byte&0x0F =0x0 \b, RP2C03B
  7318. >>>13 byte&0x0F =0x1 \b, RP2C03G
  7319. >>>13 byte&0x0F =0x2 \b, RP2C04-0001
  7320. >>>13 byte&0x0F =0x3 \b, RP2C04-0002
  7321. >>>13 byte&0x0F =0x4 \b, RP2C04-0003
  7322. >>>13 byte&0x0F =0x5 \b, RP2C04-0004
  7323. >>>13 byte&0x0F =0x6 \b, RP2C03B
  7324. >>>13 byte&0x0F =0x7 \b, RP2C03C
  7325. >>>13 byte&0x0F =0x8 \b, RP2C05-01
  7326. >>>13 byte&0x0F =0x9 \b, RP2C05-02
  7327. >>>13 byte&0x0F =0xA \b, RP2C05-03
  7328. >>>13 byte&0x0F =0xB \b, RP2C05-04
  7329. >>>13 byte&0x0F =0xC \b, RP2C05-05
  7330. # TODO: VS protection hardware?
  7331. >>7 byte x \b]
  7332. # NES 2.0-specific flags.
  7333. >7 byte&0x0C =0x8
  7334. >>12 byte&0x03 =0x0 [NTSC]
  7335. >>12 byte&0x03 =0x1 [PAL]
  7336. >>12 byte&0x02 =0x2 [NTSC+PAL]
  7337. # Standard iNES ROM header.
  7338. 0 string NES\x1A NES ROM image (iNES)
  7339. !:mime application/x-nes-rom
  7340. >0 use nes-rom-image-ines
  7341. # Wii U Virtual Console iNES ROM header.
  7342. 0 belong 0x4E455300 NES ROM image (Wii U Virtual Console)
  7343. !:mime application/x-nes-rom
  7344. >0 use nes-rom-image-ines
  7345. #------------------------------------------------------------------------------
  7346. # unif: file(1) magic for UNIF-format Nintendo Entertainment System ROM images
  7347. # Reference: https://wiki.nesdev.com/w/index.php/UNIF
  7348. # From: David Korth <gerbilsoft@gerbilsoft.com>
  7349. #
  7350. # NOTE: The UNIF format uses chunks instead of a fixed header,
  7351. # so most of the data isn't easily parseable.
  7352. #
  7353. 0 string UNIF
  7354. >4 lelong <16 NES ROM image (UNIF v%d format)
  7355. !:mime application/x-nes-rom
  7356. #------------------------------------------------------------------------------
  7357. # fds: file(1) magic for Famciom Disk System disk images
  7358. # Reference: https://wiki.nesdev.com/w/index.php/Family_Computer_Disk_System#.FDS_format
  7359. # From: David Korth <gerbilsoft@gerbilsoft.com>
  7360. # TODO: Check "Disk info block" and get info from that in addition to the optional header.
  7361. # Disk info block. (block 1)
  7362. 0 name nintendo-fds-disk-info-block
  7363. >23 byte !1 FMC-
  7364. >23 byte 1 FSC-
  7365. >16 string x \b%.3s
  7366. >15 byte x \b, mfr %02X
  7367. >20 byte x (Rev.%02u)
  7368. # Headered version.
  7369. 0 string FDS\x1A
  7370. >0x11 string *NINTENDO-HVC* Famicom Disk System disk image:
  7371. !:mime application/x-fds-disk
  7372. >>0x10 use nintendo-fds-disk-info-block
  7373. >4 byte 1 (%u side)
  7374. >4 byte !1 (%u sides)
  7375. # Unheadered version.
  7376. 1 string *NINTENDO-HVC* Famicom Disk System disk image:
  7377. !:mime application/x-fds-disk
  7378. >0 use nintendo-fds-disk-info-block
  7379. #------------------------------------------------------------------------------
  7380. # tnes: file(1) magic for TNES-format Nintendo Entertainment System ROM images
  7381. # Used by Nintendo 3DS NES Virtual Console games.
  7382. # From: David Korth <gerbilsoft@gerbilsoft.com>
  7383. #
  7384. 0 string TNES NES ROM image (Nintendo 3DS Virtual Console)
  7385. !:mime application/x-nes-rom
  7386. >4 byte 100 \b: FDS,
  7387. >>0x2010 use nintendo-fds-disk-info-block
  7388. >4 byte !100 \b: TNES mapper %u
  7389. >>5 byte x \b, %ux8k PRG
  7390. >>6 byte x \b, %ux8k CHR
  7391. >>7 byte&0x08 =1 [WRAM]
  7392. >>8 byte&0x09 =1 [H-mirror]
  7393. >>8 byte&0x09 =2 [V-mirror]
  7394. >>8 byte&0x02 =3 [VRAM]
  7395. #------------------------------------------------------------------------------
  7396. # gameboy: file(1) magic for the Nintendo (Color) Gameboy raw ROM format
  7397. # Reference: http://gbdev.gg8.se/wiki/articles/The_Cartridge_Header
  7398. #
  7399. 0x104 bequad 0xCEED6666CC0D000B Game Boy ROM image
  7400. # TODO: application/x-gameboy-color-rom for GBC.
  7401. !:mime application/x-gameboy-rom
  7402. >0x143 byte&0x80 0x80
  7403. >>0x134 string >\0 \b: "%.15s"
  7404. >0x143 byte&0x80 !0x80
  7405. >>0x134 string >\0 \b: "%.16s"
  7406. >0x14c byte x (Rev.%02u)
  7407. # Machine type. (SGB, CGB, SGB+CGB)
  7408. # Old licensee code 0x33 is required for SGB, but not CGB.
  7409. >0x14b byte 0x33
  7410. >>0x146 byte 0x03
  7411. >>>0x143 byte&0x80 0x80 [SGB+CGB]
  7412. >>>0x143 byte&0x80 !0x80 [SGB]
  7413. >>0x146 byte !0x03
  7414. >>>0x143 byte&0xC0 0x80 [CGB]
  7415. >>>0x143 byte&0xC0 0xC0 [CGB ONLY]
  7416. >0x14b byte !0x33
  7417. >>0x143 byte&0xC0 0x80 [CGB]
  7418. >>0x143 byte&0xC0 0xC0 [CGB ONLY]
  7419. # Mapper.
  7420. >0x147 byte 0x00 [ROM ONLY]
  7421. >0x147 byte 0x01 [MBC1]
  7422. >0x147 byte 0x02 [MBC1+RAM]
  7423. >0x147 byte 0x03 [MBC1+RAM+BATT]
  7424. >0x147 byte 0x05 [MBC2]
  7425. >0x147 byte 0x06 [MBC2+BATTERY]
  7426. >0x147 byte 0x08 [ROM+RAM]
  7427. >0x147 byte 0x09 [ROM+RAM+BATTERY]
  7428. >0x147 byte 0x0B [MMM01]
  7429. >0x147 byte 0x0C [MMM01+SRAM]
  7430. >0x147 byte 0x0D [MMM01+SRAM+BATT]
  7431. >0x147 byte 0x0F [MBC3+TIMER+BATT]
  7432. >0x147 byte 0x10 [MBC3+TIMER+RAM+BATT]
  7433. >0x147 byte 0x11 [MBC3]
  7434. >0x147 byte 0x12 [MBC3+RAM]
  7435. >0x147 byte 0x13 [MBC3+RAM+BATT]
  7436. >0x147 byte 0x19 [MBC5]
  7437. >0x147 byte 0x1A [MBC5+RAM]
  7438. >0x147 byte 0x1B [MBC5+RAM+BATT]
  7439. >0x147 byte 0x1C [MBC5+RUMBLE]
  7440. >0x147 byte 0x1D [MBC5+RUMBLE+SRAM]
  7441. >0x147 byte 0x1E [MBC5+RUMBLE+SRAM+BATT]
  7442. >0x147 byte 0xFC [Pocket Camera]
  7443. >0x147 byte 0xFD [Bandai TAMA5]
  7444. >0x147 byte 0xFE [Hudson HuC-3]
  7445. >0x147 byte 0xFF [Hudson HuC-1]
  7446. # ROM size.
  7447. >0x148 byte 0 \b, ROM: 256Kbit
  7448. >0x148 byte 1 \b, ROM: 512Kbit
  7449. >0x148 byte 2 \b, ROM: 1Mbit
  7450. >0x148 byte 3 \b, ROM: 2Mbit
  7451. >0x148 byte 4 \b, ROM: 4Mbit
  7452. >0x148 byte 5 \b, ROM: 8Mbit
  7453. >0x148 byte 6 \b, ROM: 16Mbit
  7454. >0x148 byte 7 \b, ROM: 32Mbit
  7455. >0x148 byte 0x52 \b, ROM: 9Mbit
  7456. >0x148 byte 0x53 \b, ROM: 10Mbit
  7457. >0x148 byte 0x54 \b, ROM: 12Mbit
  7458. # RAM size.
  7459. >0x149 byte 1 \b, RAM: 16Kbit
  7460. >0x149 byte 2 \b, RAM: 64Kbit
  7461. >0x149 byte 3 \b, RAM: 256Kbit
  7462. >0x149 byte 4 \b, RAM: 1Mbit
  7463. >0x149 byte 5 \b, RAM: 512Kbit
  7464. #------------------------------------------------------------------------------
  7465. # genesis: file(1) magic for various Sega Mega Drive / Genesis ROM image and disc formats
  7466. # Updated by David Korth <gerbilsoft@gerbilsoft.com>
  7467. # References:
  7468. # - https://www.retrodev.com/segacd.html
  7469. # - http://devster.monkeeh.com/sega/32xguide1.txt
  7470. #
  7471. # Common Sega Mega Drive header format.
  7472. # FIXME: Name fields are 48 bytes, but have spaces for padding instead of 00s.
  7473. 0 name sega-mega-drive-header
  7474. # ROM title. (Use domestic if present; if not, use international.)
  7475. >0x120 byte >0x20
  7476. >>0x120 string >\0 \b: "%.16s"
  7477. >0x120 byte <0x21
  7478. >>0x150 string >\0 \b: "%.16s"
  7479. # Other information.
  7480. >0x180 string >\0 (%.14s
  7481. >>0x110 string >\0 \b, %.16s
  7482. >0x180 byte 0
  7483. >>0x110 string >\0 (%.16s
  7484. >0 byte x \b)
  7485. # TODO: Check for 32X CD?
  7486. # Sega Mega CD disc images: 2048-byte sectors.
  7487. 0 string SEGADISCSYSTEM\ \ Sega Mega CD disc image
  7488. !:mime application/x-sega-cd-rom
  7489. >0 use sega-mega-drive-header
  7490. >0 byte x \b, 2048-byte sectors
  7491. 0 string SEGABOOTDISC\ \ \ \ Sega Mega CD disc image
  7492. !:mime application/x-sega-cd-rom
  7493. >0 use sega-mega-drive-header
  7494. >0 byte x \b, 2048-byte sectors
  7495. # Sega Mega CD disc images: 2352-byte sectors.
  7496. 0x10 string SEGADISCSYSTEM\ \ Sega Mega CD disc image
  7497. !:mime application/x-sega-cd-rom
  7498. >0x10 use sega-mega-drive-header
  7499. >0 byte x \b, 2352-byte sectors
  7500. 0x10 string SEGABOOTDISC\ \ \ \ Sega Mega CD disc image
  7501. !:mime application/x-sega-cd-rom
  7502. >0x10 use sega-mega-drive-header
  7503. >0 byte x \b, 2352-byte sectors
  7504. # Sega Mega Drive, 32X, Pico, and Mega CD Boot ROM images.
  7505. 0x100 string SEGA
  7506. >0x3C0 bequad 0x4D41525320434845 Sega 32X ROM image
  7507. !:mime application/x-genesis-32x-rom
  7508. >>0 use sega-mega-drive-header
  7509. >0x3C0 bequad !0x4D41525320434845
  7510. >>0x105 belong 0x5049434F Sega Pico ROM image
  7511. !:mime application/x-sega-pico-rom
  7512. >>>0 use sega-mega-drive-header
  7513. >>0x105 belong !0x5049434F
  7514. >>>0x180 beshort 0x4252 Sega Mega CD Boot ROM image
  7515. !:mime application/x-genesis-rom
  7516. >>>0x180 beshort !0x4252 Sega Mega Drive / Genesis ROM image
  7517. !:mime application/x-genesis-rom
  7518. >>>0 use sega-mega-drive-header
  7519. #------------------------------------------------------------------------------
  7520. # genesis: file(1) magic for the Super MegaDrive ROM dump format
  7521. #
  7522. # NOTE: Due to interleaving, we can't display anything
  7523. # other than the copier header information.
  7524. 0 name sega-genesis-smd-header
  7525. >0 byte x %dx16k blocks
  7526. >2 byte 0 \b, last in series or standalone
  7527. >2 byte >0 \b, split ROM
  7528. # "Sega Genesis" header.
  7529. 0x280 string EAGN
  7530. >8 beshort 0xAABB Sega Mega Drive / Genesis ROM image (SMD format):
  7531. !:mime application/x-genesis-rom
  7532. >>0 use sega-genesis-smd-header
  7533. # "Sega Mega Drive" header.
  7534. 0x280 string EAMG
  7535. >8 beshort 0xAABB Sega Mega Drive / Genesis ROM image (SMD format):
  7536. !:mime application/x-genesis-rom
  7537. >>0 use sega-genesis-smd-header
  7538. #------------------------------------------------------------------------------
  7539. # smsgg: file(1) magic for Sega Master System and Game Gear ROM images
  7540. # Detects all Game Gear and export Sega Master System ROM images,
  7541. # and some Japanese Sega Master System ROM images.
  7542. # From: David Korth <gerbilsoft@gerbilsoft.com>
  7543. # Reference: https://www.smspower.org/Development/ROMHeader
  7544. #
  7545. # General SMS header rule.
  7546. # The SMS boot ROM checks the header at three locations.
  7547. 0 name sega-master-system-rom-header
  7548. # Machine type.
  7549. >0x0F byte&0xF0 0x30 Sega Master System
  7550. !:mime application/x-sms-rom
  7551. >0x0F byte&0xF0 0x40 Sega Master System
  7552. !:mime application/x-sms-rom
  7553. >0x0F byte&0xF0 0x50 Sega Game Gear
  7554. !:mime application/x-gamegear-rom
  7555. >0x0F byte&0xF0 0x60 Sega Game Gear
  7556. !:mime application/x-gamegear-rom
  7557. >0x0F byte&0xF0 0x70 Sega Game Gear
  7558. !:mime application/x-gamegear-rom
  7559. >0x0F default x Sega Master System / Game Gear
  7560. !:mime application/x-sms-rom
  7561. >0 byte x ROM image:
  7562. # Product code.
  7563. >0x0E byte&0xF0 0x10 1
  7564. >0x0E byte&0xF0 0x20 2
  7565. >0x0E byte&0xF0 0x30 3
  7566. >0x0E byte&0xF0 0x40 4
  7567. >0x0E byte&0xF0 0x50 5
  7568. >0x0E byte&0xF0 0x60 6
  7569. >0x0E byte&0xF0 0x70 7
  7570. >0x0E byte&0xF0 0x80 8
  7571. >0x0E byte&0xF0 0x90 9
  7572. >0x0E byte&0xF0 0xA0 10
  7573. >0x0E byte&0xF0 0xB0 11
  7574. >0x0E byte&0xF0 0xC0 12
  7575. >0x0E byte&0xF0 0xD0 13
  7576. >0x0E byte&0xF0 0xE0 14
  7577. >0x0E byte&0xF0 0xF0 15
  7578. # If the product code is 5 digits, we'll need to backspace here.
  7579. >0x0E byte&0xF0 !0
  7580. >>0x0C leshort x \b%04x
  7581. >0x0E byte&0xF0 0
  7582. >>0x0C leshort x %04x
  7583. # Revision.
  7584. >0x0E byte&0x0F x (Rev.%02d)
  7585. # ROM size. (Used for the boot ROM checksum routine.)
  7586. >0x0F byte&0x0F 0x0A (8 KB)
  7587. >0x0F byte&0x0F 0x0B (16 KB)
  7588. >0x0F byte&0x0F 0x0C (32 KB)
  7589. >0x0F byte&0x0F 0x0D (48 KB)
  7590. >0x0F byte&0x0F 0x0E (64 KB)
  7591. >0x0F byte&0x0F 0x0F (128 KB)
  7592. >0x0F byte&0x0F 0x00 (256 KB)
  7593. >0x0F byte&0x0F 0x01 (512 KB)
  7594. >0x0F byte&0x0F 0x02 (1 MB)
  7595. # SMS/GG header locations.
  7596. 0x7FF0 string TMR\ SEGA
  7597. >0x7FF0 use sega-master-system-rom-header
  7598. 0x3FF0 string TMR\ SEGA
  7599. >0x3FF0 use sega-master-system-rom-header
  7600. 0x1FF0 string TMR\ SEGA
  7601. >0x1FF0 use sega-master-system-rom-header
  7602. #------------------------------------------------------------------------------
  7603. # saturn: file(1) magic for the Sega Saturn disc image format.
  7604. # From: David Korth <gerbilsoft@gerbilsoft.com>
  7605. #
  7606. # Common Sega Saturn disc header format.
  7607. # NOTE: Title is 112 bytes, but we're only showing 32 due to space padding.
  7608. # TODO: Release date, device information, region code, others?
  7609. 0 name sega-saturn-disc-header
  7610. >0x60 string >\0 \b: "%.32s"
  7611. >0x20 string >\0 (%.10s
  7612. >>0x2A string >\0 \b, %.6s)
  7613. >>0x2A byte 0 \b)
  7614. # 2048-byte sector version.
  7615. 0 string SEGA\ SEGASATURN\ Sega Saturn disc image
  7616. !:mime application/x-saturn-rom
  7617. >0 use sega-saturn-disc-header
  7618. >0 byte x (2048-byte sectors)
  7619. # 2352-byte sector version.
  7620. 0x10 string SEGA\ SEGASATURN\ Sega Saturn disc image
  7621. !:mime application/x-saturn-rom
  7622. >0x10 use sega-saturn-disc-header
  7623. >0 byte x (2352-byte sectors)
  7624. #------------------------------------------------------------------------------
  7625. # dreamcast: file(1) magic for the Sega Dreamcast disc image format.
  7626. # From: David Korth <gerbilsoft@gerbilsoft.com>
  7627. # Reference: https://mc.pp.se/dc/ip0000.bin.html
  7628. #
  7629. # Common Sega Dreamcast disc header format.
  7630. # NOTE: Title is 128 bytes, but we're only showing 32 due to space padding.
  7631. # TODO: Release date, device information, region code, others?
  7632. 0 name sega-dreamcast-disc-header
  7633. >0x80 string >\0 \b: "%.32s"
  7634. >0x40 string >\0 (%.10s
  7635. >>0x4A string >\0 \b, %.6s)
  7636. >>0x4A byte 0 \b)
  7637. # 2048-byte sector version.
  7638. 0 string SEGA\ SEGAKATANA\ Sega Dreamcast disc image
  7639. !:mime application/x-dc-rom
  7640. >0 use sega-dreamcast-disc-header
  7641. >0 byte x (2048-byte sectors)
  7642. # 2352-byte sector version.
  7643. 0x10 string SEGA\ SEGAKATANA\ Sega Dreamcast disc image
  7644. !:mime application/x-dc-rom
  7645. >0x10 use sega-dreamcast-disc-header
  7646. >0 byte x (2352-byte sectors)
  7647. #------------------------------------------------------------------------------
  7648. # dreamcast: file(1) uncertain magic for the Sega Dreamcast VMU image format
  7649. #
  7650. 0 belong 0x21068028 Sega Dreamcast VMU game image
  7651. 0 string LCDi Dream Animator file
  7652. #------------------------------------------------------------------------------
  7653. # z64: file(1) magic for the Z64 format N64 ROM dumps
  7654. # Reference: http://forum.pj64-emu.com/showthread.php?t=2239
  7655. # From: David Korth <gerbilsoft@gerbilsoft.com>
  7656. #
  7657. 0 bequad 0x803712400000000F Nintendo 64 ROM image
  7658. !:mime application/x-n64-rom
  7659. >0x20 string >\0 \b: "%.20s"
  7660. >0x3B string x (%.4s
  7661. >0x3F byte x \b, Rev.%02u)
  7662. #------------------------------------------------------------------------------
  7663. # v64: file(1) magic for the V64 format N64 ROM dumps
  7664. # Same as z64 format, but with 16-bit byteswapping.
  7665. #
  7666. 0 bequad 0x3780401200000F00 Nintendo 64 ROM image (V64)
  7667. !:mime application/x-n64-rom
  7668. #------------------------------------------------------------------------------
  7669. # n64-swap2: file(1) magic for the swap2 format N64 ROM dumps
  7670. # Same as z64 format, but with swapped 16-bit words.
  7671. #
  7672. 0 bequad 0x12408037000F0000 Nintendo 64 ROM image (wordswapped)
  7673. !:mime application/x-n64-rom
  7674. #------------------------------------------------------------------------------
  7675. # n64-le32: file(1) magic for the 32-bit byteswapped format N64 ROM dumps
  7676. # Same as z64 format, but with 32-bit byteswapping.
  7677. #
  7678. 0 bequad 0x401237800F000000 Nintendo 64 ROM image (32-bit byteswapped)
  7679. !:mime application/x-n64-rom
  7680. #------------------------------------------------------------------------------
  7681. # gba: file(1) magic for the Nintendo Game Boy Advance raw ROM format
  7682. # Reference: https://problemkaputt.de/gbatek.htm#gbacartridgeheader
  7683. #
  7684. # Original version from: "Nelson A. de Oliveira" <naoliv@gmail.com>
  7685. # Updated version from: David Korth <gerbilsoft@gerbilsoft.com>
  7686. #
  7687. 4 bequad 0x24FFAE51699AA221 Game Boy Advance ROM image
  7688. !:mime application/x-gba-rom
  7689. >0xA0 string >\0 \b: "%.12s"
  7690. >0xAC string x (%.6s
  7691. >0xBC byte x \b, Rev.%02u)
  7692. #------------------------------------------------------------------------------
  7693. # nds: file(1) magic for the Nintendo DS(i) raw ROM format
  7694. # Reference: https://problemkaputt.de/gbatek.htm#dscartridgeheader
  7695. #
  7696. # Original version from: "Nelson A. de Oliveira" <naoliv@gmail.com>
  7697. # Updated version from: David Korth <gerbilsoft@gerbilsoft.com>
  7698. #
  7699. 0xC0 bequad 0x24FFAE51699AA221 Nintendo DS ROM image
  7700. !:mime application/x-nintendo-ds-rom
  7701. >0x00 string >\0 \b: "%.12s"
  7702. >0x0C string x (%.6s
  7703. >0x1E byte x \b, Rev.%02u)
  7704. >0x12 byte 2 (DSi enhanced)
  7705. >0x12 byte 3 (DSi only)
  7706. # Secure Area check.
  7707. >0x20 lelong <0x4000 (homebrew)
  7708. >0x20 lelong >0x3FFF
  7709. >>0x4000 lequad 0x0000000000000000 (multiboot)
  7710. >>0x4000 lequad !0x0000000000000000
  7711. >>>0x4000 lequad 0xE7FFDEFFE7FFDEFF (decrypted)
  7712. >>>0x4000 lequad !0xE7FFDEFFE7FFDEFF
  7713. >>>>0x1000 lequad 0x0000000000000000 (encrypted)
  7714. >>>>0x1000 lequad !0x0000000000000000 (mask ROM)
  7715. #------------------------------------------------------------------------------
  7716. # nds_passme: file(1) magic for Nintendo DS ROM images for GBA cartridge boot.
  7717. # This is also used for loading .nds files using the MSET exploit on 3DS.
  7718. # Reference: https://github.com/devkitPro/ndstool/blob/master/source/ndscreate.cpp
  7719. 0xC0 bequad 0xC8604FE201708FE2 Nintendo DS Slot-2 ROM image (PassMe)
  7720. !:mime application/x-nintendo-ds-rom
  7721. #------------------------------------------------------------------------------
  7722. # ngp: file(1) magic for the Neo Geo Pocket (Color) raw ROM format.
  7723. # From: David Korth <gerbilsoft@gerbilsoft.com>
  7724. # References:
  7725. # - https://neogpc.googlecode.com/svn-history/r10/trunk/src/core/neogpc.cpp
  7726. # - https://www.devrs.com/ngp/files/ngpctech.txt
  7727. #
  7728. 0x0A string BY\ SNK\ CORPORATION Neo Geo Pocket
  7729. !:mime application/x-neo-geo-pocket-rom
  7730. >0x23 byte 0x10 Color
  7731. >0 byte x ROM image
  7732. >0x24 string >\0 \b: "%.12s"
  7733. >0x1F byte 0xFF (debug mode enabled)
  7734. #------------------------------------------------------------------------------
  7735. # msx: file(1) magic for MSX game cartridge dumps
  7736. # Too simple - MPi
  7737. #0 beshort 0x4142 MSX game cartridge dump
  7738. #------------------------------------------------------------------------------
  7739. # Sony Playstation executables (Adam Sjoegren <asjo@diku.dk>) :
  7740. 0 string PS-X\ EXE Sony Playstation executable
  7741. >16 lelong x PC=0x%08x,
  7742. >20 lelong !0 GP=0x%08x,
  7743. >24 lelong !0 .text=[0x%08x,
  7744. >>28 lelong x \b0x%x],
  7745. >32 lelong !0 .data=[0x%08x,
  7746. >>36 lelong x \b0x%x],
  7747. >40 lelong !0 .bss=[0x%08x,
  7748. >>44 lelong x \b0x%x],
  7749. >48 lelong !0 Stack=0x%08x,
  7750. >48 lelong =0 No Stack!,
  7751. >52 lelong !0 StackSize=0x%x,
  7752. #>76 string >\0 (%s)
  7753. # Area:
  7754. >113 string x (%s)
  7755. # CPE executables
  7756. 0 string CPE CPE executable
  7757. >3 byte x (version %d)
  7758. #------------------------------------------------------------------------------
  7759. # Microsoft Xbox executables .xbe (Esa Hyytia <ehyytia@cc.hut.fi>)
  7760. 0 string XBEH Microsoft Xbox executable
  7761. !:mime audio/x-xbox-executable
  7762. !:ext xbe
  7763. # expect base address of 0x10000
  7764. >0x0104 ulelong =0x10000
  7765. >>(0x0118.l-0x0FFF4) lestring16 x \b: "%.40s"
  7766. >>(0x0118.l-0x0FFF5) byte x (%c
  7767. >>(0x0118.l-0x0FFF6) byte x \b%c-
  7768. >>(0x0118.l-0x0FFF8) uleshort x \b%03u)
  7769. >>(0x0118.l-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions
  7770. >>(0x0118.l-0x0FF60) ulelong&0x80000007 !0x80000007
  7771. >>>(0x0118.l-0x0FF60) ulelong >0 (regions:
  7772. >>>>(0x0118.l-0x0FF60) ulelong &0x00000001 NA
  7773. >>>>(0x0118.l-0x0FF60) ulelong &0x00000002 Japan
  7774. >>>>(0x0118.l-0x0FF60) ulelong &0x00000004 Rest_of_World
  7775. >>>>(0x0118.l-0x0FF60) ulelong &0x80000000 Manufacturer
  7776. >>>(0x0118.l-0x0FF60) ulelong >0 \b)
  7777. # probabilistic checks whether signed or not
  7778. >0x0004 ulelong =0x0
  7779. >>&2 ulelong =0x0
  7780. >>>&2 ulelong =0x0 \b, not signed
  7781. >0x0004 ulelong >0
  7782. >>&2 ulelong >0
  7783. >>>&2 ulelong >0 \b, signed
  7784. # --------------------------------
  7785. # Microsoft Xbox data file formats
  7786. 0 string XIP0 XIP, Microsoft Xbox data
  7787. 0 string XTF0 XTF, Microsoft Xbox data
  7788. #------------------------------------------------------------------------------
  7789. # Microsoft Xbox 360 executables (.xex)
  7790. # From: David Korth <gerbilsoft@gerbilsoft.com>
  7791. # References:
  7792. # - https://free60project.github.io/wiki/XEX.html
  7793. # - https://github.com/xenia-project/xenia/blob/HEAD/src/xenia/kernel/util/xex2_info.h
  7794. # Title ID (part of Execution ID section)
  7795. 0 name xbox-360-xex-execution-id
  7796. >(0.L+0xC) byte x (%c
  7797. >(0.L+0xD) byte x \b%c
  7798. >(0.L+0xE) beshort x \b-%04u, media ID:
  7799. >(0.L) belong x %08X)
  7800. # Region code (part of Security Info)
  7801. 0 name xbox-360-xex-region-code
  7802. >0 ubelong 0xFFFFFFFF \b, all regions
  7803. >0 ubelong !0xFFFFFFFF
  7804. >>0 ubelong >0 (regions:
  7805. >>0 ubelong&0x000000FF 0x000000FF USA
  7806. >>0 ubelong&0x00000100 0x00000100 Japan
  7807. >>0 ubelong&0x00000200 0x00000200 China
  7808. >>0 ubelong&0x0000FC00 0x0000FC00 Asia
  7809. >>0 ubelong&0x00FF0000 0x00FF0000 PAL
  7810. >>0 ubelong&0x00FF0000 0x00FE0000 PAL [except AU/NZ]
  7811. >>0 ubelong&0x00FF0000 0x00010000 AU/NZ
  7812. >>0 ubelong&0xFF000000 0xFF000000 Other
  7813. >>0 ubelong >0 \b)
  7814. 0 string XEX2 Microsoft Xbox 360 executable
  7815. !:mime audio/x-xbox360-executable
  7816. !:ext xex
  7817. >0x18 search/0x100 \x00\x04\x00\x06
  7818. >>&0 use xbox-360-xex-execution-id
  7819. >(0x010.L+0x178) use xbox-360-xex-region-code
  7820. 0 string XEX1 Microsoft Xbox 360 executable (XEX1)
  7821. !:mime audio/x-xbox360-executable
  7822. !:ext xex
  7823. >0x18 search/0x100 \x00\x04\x00\x06
  7824. >>&0 use xbox-360-xex-execution-id
  7825. >(0x010.L+0x154) use xbox-360-xex-region-code
  7826. #------------------------------------------------------------------------------
  7827. # Microsoft Xbox 360 packages
  7828. # From: David Korth <gerbilsoft@gerbilsoft.com>
  7829. # References:
  7830. # - https://free60project.github.io/wiki/STFS.html
  7831. # - https://github.com/xenia-project/xenia/blob/HEAD/src/xenia/kernel/util/xex2_info.h
  7832. # TODO: More information for console-signed packages.
  7833. 0 name xbox-360-package
  7834. >0x360 byte x (%c
  7835. >0x361 byte x \b%c
  7836. >0x362 beshort x \b-%04u, media ID:
  7837. >0x354 belong x %08X)
  7838. >0x344 belong x \b, content type:
  7839. >>0x344 belong 0x1 Saved Game
  7840. >>0x344 belong 0x2 Marketplace Content
  7841. >>0x344 belong 0x3 Publisher
  7842. >>0x344 belong 0x1000 Xbox 360 Title
  7843. >>0x344 belong 0x2000 IPTV Pause Buffer
  7844. >>0x344 belong 0x4000 Installed Game
  7845. >>0x344 belong 0x5000 Original Xbox Game
  7846. >>0x344 belong 0x9000 Avatar Item
  7847. >>0x344 belong 0x10000 Profile
  7848. >>0x344 belong 0x20000 Gamer Picture
  7849. >>0x344 belong 0x30000 Theme
  7850. >>0x344 belong 0x40000 Cache File
  7851. >>0x344 belong 0x50000 Storage Download
  7852. >>0x344 belong 0x60000 Xbox Saved Game
  7853. >>0x344 belong 0x70000 Xbox Download
  7854. >>0x344 belong 0x80000 Game Demo
  7855. >>0x344 belong 0x90000 Video
  7856. >>0x344 belong 0xA0000 Game
  7857. >>0x344 belong 0xB0000 Installer
  7858. >>0x344 belong 0xC0000 Game Trailer
  7859. >>0x344 belong 0xD0000 Arcade Title
  7860. >>0x344 belong 0xE0000 XNA
  7861. >>0x344 belong 0xF0000 License Store
  7862. >>0x344 belong 0x100000 Movie
  7863. >>0x344 belong 0x200000 TV
  7864. >>0x344 belong 0x300000 Music Video
  7865. >>0x344 belong 0x400000 Game Video
  7866. >>0x344 belong 0x500000 Podcast Video
  7867. >>0x344 belong 0x600000 Viral Video
  7868. >>0x344 belong 0x2000000 Community Game
  7869. 0 string CON\x20 Microsoft Xbox 360 package (console-signed)
  7870. >0 use xbox-360-package
  7871. 0 string PIRS
  7872. >0 belong 0 Microsoft Xbox 360 package (non-Xbox Live)
  7873. >>0 use xbox-360-package
  7874. 0 string LIVE
  7875. >0x104 belong 0 Microsoft Xbox 360 package (Xbox Live)
  7876. >>0 use xbox-360-package
  7877. # Atari Lynx cartridge dump (EXE/BLL header)
  7878. # From: "Stefan A. Haubenthal" <polluks@web.de>
  7879. # Double-check that the image type matches too, 0x8008 conflicts with
  7880. # 8 character OMF-86 object file headers.
  7881. 0 beshort 0x8008
  7882. >6 string BS93 Lynx homebrew cartridge
  7883. !:mime application/x-atari-lynx-rom
  7884. >>2 beshort x \b, RAM start $%04x
  7885. >6 string LYNX Lynx cartridge
  7886. !:mime application/x-atari-lynx-rom
  7887. >>2 beshort x \b, RAM start $%04x
  7888. # Opera file system that is used on the 3DO console
  7889. # From: Serge van den Boom <svdb@stack.nl>
  7890. 0 string \x01ZZZZZ\x01 3DO "Opera" file system
  7891. # From: Alex Myczko <alex@aiei.ch>
  7892. # From: David Pflug <david@pflug.email>
  7893. # is the offset 12 or the offset 16 correct?
  7894. # GBS (Game Boy Sound) magic
  7895. # ftp://ftp.modland.com/pub/documents/format_documentation/\
  7896. # Gameboy%20Sound%20System%20(.gbs).txt
  7897. 0 string GBS Nintendo Gameboy Music/Audio Data
  7898. #12 string GameBoy\ Music\ Module Nintendo Gameboy Music Module
  7899. >16 string >\0 ("%.32s" by
  7900. >48 string >\0 %.32s, copyright
  7901. >80 string >\0 %.32s),
  7902. >3 byte x version %u,
  7903. >4 byte x %u tracks
  7904. # IPS Patch Files from: From: Thomas Klausner <tk@giga.or.at>
  7905. # see https://zerosoft.zophar.net/ips.php
  7906. 0 string PATCH IPS patch file
  7907. !:ext ips
  7908. # BPS Patch Files - from: David Korth <gerbilsoft@gerbilsoft.com>
  7909. # Reference: https://www.romhacking.net/documents/746/
  7910. 0 string BPS1 BPS patch file
  7911. !:ext bps
  7912. # APS Patch Files - from: David Korth <gerbilsoft@gerbilsoft.com>
  7913. # Reference: https://github.com/btimofeev/UniPatcher/wiki/APS-(N64)
  7914. 0 string APS10 APS patch file
  7915. !:ext aps
  7916. >5 byte 0 \b, simple patch
  7917. >5 byte 1 \b, N64-specific patch for
  7918. >>58 byte x N%c
  7919. >>59 byte x \b%c
  7920. >>60 byte x \b%c
  7921. >7 byte !0x20
  7922. # FIXME: /T specifier isn't working with a fixed-length string.
  7923. >>7 string x \b: "%.50s"
  7924. # UPS Patch Files - from: David Korth <gerbilsoft@gerbilsoft.com>
  7925. # Reference: http://fileformats.archiveteam.org/wiki/UPS_(binary_patch_format)
  7926. 0 string UPS1 UPS patch file
  7927. !:ext ups
  7928. # Playstations Patch Files from: From: Thomas Klausner <tk@giga.or.at>
  7929. 0 string PPF30 Playstation Patch File version 3.0
  7930. >5 byte 0 \b, PPF 1.0 patch
  7931. >5 byte 1 \b, PPF 2.0 patch
  7932. >5 byte 2 \b, PPF 3.0 patch
  7933. >>56 byte 0 \b, Imagetype BIN (any)
  7934. >>56 byte 1 \b, Imagetype GI (PrimoDVD)
  7935. >>57 byte 0 \b, Blockcheck disabled
  7936. >>57 byte 1 \b, Blockcheck enabled
  7937. >>58 byte 0 \b, Undo data not available
  7938. >>58 byte 1 \b, Undo data available
  7939. >6 string x \b, description: %s
  7940. 0 string PPF20 Playstation Patch File version 2.0
  7941. >5 byte 0 \b, PPF 1.0 patch
  7942. >5 byte 1 \b, PPF 2.0 patch
  7943. >>56 lelong >0 \b, size of file to patch %d
  7944. >6 string x \b, description: %s
  7945. 0 string PPF10 Playstation Patch File version 1.0
  7946. >5 byte 0 \b, Simple Encoding
  7947. >6 string x \b, description: %s
  7948. # From: Daniel Dawson <ddawson@icehouse.net>
  7949. # SNES9x .smv "movie" file format.
  7950. 0 string SMV\x1A SNES9x input recording
  7951. >0x4 lelong x \b, version %d
  7952. # version 4 is latest so far
  7953. >0x4 lelong <5
  7954. >>0x8 ledate x \b, recorded at %s
  7955. >>0xc lelong >0 \b, rerecorded %d times
  7956. >>0x10 lelong x \b, %d frames long
  7957. >>0x14 byte >0 \b, data for controller(s):
  7958. >>>0x14 byte &0x1 #1
  7959. >>>0x14 byte &0x2 #2
  7960. >>>0x14 byte &0x4 #3
  7961. >>>0x14 byte &0x8 #4
  7962. >>>0x14 byte &0x10 #5
  7963. >>0x15 byte ^0x1 \b, begins from snapshot
  7964. >>0x15 byte &0x1 \b, begins from reset
  7965. >>0x15 byte ^0x2 \b, NTSC standard
  7966. >>0x15 byte &0x2 \b, PAL standard
  7967. >>0x17 byte &0x1 \b, settings:
  7968. # WIP1Timing not used as of version 4
  7969. >>>0x4 lelong <4
  7970. >>>>0x17 byte &0x2 WIP1Timing
  7971. >>>0x17 byte &0x4 Left+Right
  7972. >>>0x17 byte &0x8 VolumeEnvX
  7973. >>>0x17 byte &0x10 FakeMute
  7974. >>>0x17 byte &0x20 SyncSound
  7975. # New flag as of version 4
  7976. >>>0x4 lelong >3
  7977. >>>>0x17 byte &0x80 NoCPUShutdown
  7978. >>0x4 lelong <4
  7979. >>>0x18 lelong >0x23
  7980. >>>>0x20 leshort !0
  7981. >>>>>0x20 lestring16 x \b, metadata: "%s"
  7982. >>0x4 lelong >3
  7983. >>>0x24 byte >0 \b, port 1:
  7984. >>>>0x24 byte 1 joypad
  7985. >>>>0x24 byte 2 mouse
  7986. >>>>0x24 byte 3 SuperScope
  7987. >>>>0x24 byte 4 Justifier
  7988. >>>>0x24 byte 5 multitap
  7989. >>>0x24 byte >0 \b, port 2:
  7990. >>>>0x25 byte 1 joypad
  7991. >>>>0x25 byte 2 mouse
  7992. >>>>0x25 byte 3 SuperScope
  7993. >>>>0x25 byte 4 Justifier
  7994. >>>>0x25 byte 5 multitap
  7995. >>>0x18 lelong >0x43
  7996. >>>>0x40 leshort !0
  7997. >>>>>0x40 lestring16 x \b, metadata: "%s"
  7998. >>0x17 byte &0x40 \b, ROM:
  7999. >>>(0x18.l-26) lelong x CRC32 0x%08x
  8000. >>>(0x18.l-23) string x "%s"
  8001. # Type: scummVM savegame files
  8002. # From: Sven Hartge <debian@ds9.argh.org>
  8003. 0 string SCVM ScummVM savegame
  8004. >12 string >\0 "%s"
  8005. #------------------------------------------------------------------------------
  8006. # Nintendo GameCube / Wii file formats.
  8007. #
  8008. # Type: Nintendo GameCube/Wii common disc header data.
  8009. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8010. # Reference: https://wiibrew.org/wiki/Wii_Disc
  8011. 0 name nintendo-gcn-disc-common
  8012. >0x20 string x "%.64s"
  8013. >0x00 string x (%.6s
  8014. >0x06 byte >0
  8015. >>0x06 byte 1 \b, Disc 2
  8016. >>0x06 byte 2 \b, Disc 3
  8017. >>0x06 byte 3 \b, Disc 4
  8018. >0x07 byte x \b, Rev.%02u)
  8019. >0x18 belong 0x5D1C9EA3
  8020. >>0x60 beshort 0x0101 \b (Unencrypted)
  8021. >0x200 string NKIT \b (NKit compressed)
  8022. # Type: Nintendo GameCube disc image
  8023. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8024. # Reference: https://wiibrew.org/wiki/Wii_Disc
  8025. 0x1C belong 0xC2339F3D Nintendo GameCube disc image:
  8026. !:mime application/x-gamecube-rom
  8027. >0 use nintendo-gcn-disc-common
  8028. # Type: Nintendo GameCube embedded disc image
  8029. # Commonly found on demo discs.
  8030. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8031. # Reference: http://hitmen.c02.at/files/yagcd/yagcd/index.html#idx14.8
  8032. 0 belong 0xAE0F38A2
  8033. >0x0C belong 0x00100000
  8034. >>(8.L+0x1C) belong 0xC2339F3D Nintendo GameCube embedded disc image:
  8035. !:mime application/x-gamecube-rom
  8036. >>>(8.L) use nintendo-gcn-disc-common
  8037. # Type: Nintendo Wii disc image
  8038. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8039. # Reference: https://wiibrew.org/wiki/Wii_Disc
  8040. 0x18 belong 0x5D1C9EA3 Nintendo Wii disc image:
  8041. >0 use nintendo-gcn-disc-common
  8042. # Type: Nintendo Wii disc image (WBFS format)
  8043. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8044. # Reference: https://wiibrew.org/wiki/Wii_Disc
  8045. 0 string WBFS
  8046. >0x218 belong 0x5D1C9EA3 Nintendo Wii disc image (WBFS format):
  8047. !:mime application/x-wii-rom
  8048. >>0x200 use nintendo-gcn-disc-common
  8049. # Type: Nintendo GameCube/Wii disc image (CISO format)
  8050. # NOTE: This is NOT the same as Compact ISO or PSP CISO,
  8051. # though it has the same magic number.
  8052. 0 string CISO
  8053. # Other fields are used to determine what type of CISO this is:
  8054. # - 0x04 == 0x00200000: GameCube/Wii CISO (block_size)
  8055. # - 0x10 == 0x00000800: PSP CISO (ISO-9660 sector size)
  8056. # - None of the above: Compact ISO.
  8057. >4 lelong 0x200000
  8058. >>8 byte 1
  8059. >>>0x801C belong 0xC2339F3D Nintendo GameCube disc image (CISO format):
  8060. !:mime application/x-wii-rom
  8061. >>>>0x8000 use nintendo-gcn-disc-common
  8062. >>>0x8018 belong 0x5D1C9EA3 Nintendo Wii disc image (CISO format):
  8063. !:mime application/x-wii-rom
  8064. >>>>0x8000 use nintendo-gcn-disc-common
  8065. # Type: Nintendo GameCube/Wii disc image (GCZ format)
  8066. # Due to zlib compression, we can't get the actual disc information.
  8067. 0 lelong 0xB10BC001
  8068. >4 lelong 0 Nintendo GameCube disc image (GCZ format)
  8069. !:mime application/x-gamecube-rom
  8070. >4 lelong 1 Nintendo Wii disc image (GCZ format)
  8071. !:mime application/x-wii-rom
  8072. >4 default x Nintendo GameCube/Wii disc image (GCZ format)
  8073. # Type: Nintendo GameCube/Wii disc image (WDF format)
  8074. 0 string WII\001DISC
  8075. >8 belong 1
  8076. # WDFv1
  8077. >>0x54 belong 0xC2339F3D Nintendo GameCube disc image (WDFv1 format):
  8078. !:mime application/x-gamecube-rom
  8079. >>>0x38 use nintendo-gcn-disc-common
  8080. >>0x58 belong 0x5D1C9EA3 Nintendo Wii disc image (WDFv1 format):
  8081. !:mime application/x-wii-rom
  8082. >>>0x38 use nintendo-gcn-disc-common
  8083. >8 belong 2
  8084. # WDFv2
  8085. >>(12.L+0x1C) belong 0xC2339F3D Nintendo GameCube disc image (WDFv2 format):
  8086. !:mime application/x-gamecube-rom
  8087. >>>(12.L) use nintendo-gcn-disc-common
  8088. >>(12.L+0x18) belong 0x5D1C9EA3 Nintendo Wii disc image (WDFv2 format):
  8089. !:mime application/x-wii-rom
  8090. >>>(12.L) use nintendo-gcn-disc-common
  8091. # Type: Nintendo GameCube/Wii disc image (WIA format)
  8092. 0 string WIA\001 Nintendo
  8093. >0x48 belong 1 GameCube
  8094. !:mime application/x-gamecube-rom
  8095. >0x48 belong 2 Wii
  8096. !:mime application/x-wii-rom
  8097. >0x48 default x GameCube/Wii
  8098. >0x48 belong x disc image (WIA format):
  8099. >>0x58 use nintendo-gcn-disc-common
  8100. # Type: Nintendo GameCube/Wii disc image (with SDK header)
  8101. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8102. # Reference: https://wiibrew.org/wiki/Wii_Disc
  8103. 0 belong 0xFFFF0000
  8104. >0x18 belong 0x00000000
  8105. >>0x1C belong 0x00000000
  8106. >>>0x8018 belong 0x5D1C9EA3 Nintendo Wii SDK disc image:
  8107. !:mime application/x-wii-rom
  8108. >>>>0x8000 use nintendo-gcn-disc-common
  8109. >>>0x801C belong 0xC2339F3D Nintendo GameCube SDK disc image:
  8110. !:mime application/x-gamecube-rom
  8111. >>>>0x8000 use nintendo-gcn-disc-common
  8112. #------------------------------------------------------------------------------
  8113. # Nintendo 3DS file formats.
  8114. #
  8115. # Type: Nintendo 3DS "NCSD" image. (game cards and eMMC)
  8116. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8117. # Reference: https://www.3dbrew.org/wiki/NCSD
  8118. 0x100 string NCSD
  8119. >0x118 lequad 0 Nintendo 3DS Game Card image
  8120. # NCCH header for partition 0. (game data)
  8121. >>0x1150 string >\0 \b: "%.16s"
  8122. >>0x312 byte x (Rev.%02u)
  8123. >>0x118C byte 2 (New3DS only)
  8124. >>0x18D byte 0 (inner device)
  8125. >>0x18D byte 1 (Card1)
  8126. >>0x18D byte 2 (Card2)
  8127. >>0x18D byte 3 (extended device)
  8128. >0x118 bequad 0x0102020202000000 Nintendo 3DS eMMC dump (Old3DS)
  8129. >0x118 bequad 0x0102020203000000 Nintendo 3DS eMMC dump (New3DS)
  8130. # Nintendo 3DS version code.
  8131. # Reference: https://www.3dbrew.org/wiki/Titles
  8132. # Format: leshort containing three fields:
  8133. # - 6-bit: Major
  8134. # - 6-bit: Minor
  8135. # - 4-bit: Revision
  8136. # NOTE: Only supporting major/minor versions from 0-15 right now.
  8137. # NOTE: Should be prefixed with "v".
  8138. 0 name nintendo-3ds-version-code
  8139. # Raw version.
  8140. >0 leshort x \b%u,
  8141. # Major version.
  8142. >0 leshort&0xFC00 0x0000 0
  8143. >0 leshort&0xFC00 0x0400 1
  8144. >0 leshort&0xFC00 0x0800 2
  8145. >0 leshort&0xFC00 0x0C00 3
  8146. >0 leshort&0xFC00 0x1000 4
  8147. >0 leshort&0xFC00 0x1400 5
  8148. >0 leshort&0xFC00 0x1800 6
  8149. >0 leshort&0xFC00 0x1C00 7
  8150. >0 leshort&0xFC00 0x2000 8
  8151. >0 leshort&0xFC00 0x2400 9
  8152. >0 leshort&0xFC00 0x2800 10
  8153. >0 leshort&0xFC00 0x2C00 11
  8154. >0 leshort&0xFC00 0x3000 12
  8155. >0 leshort&0xFC00 0x3400 13
  8156. >0 leshort&0xFC00 0x3800 14
  8157. >0 leshort&0xFC00 0x3C00 15
  8158. # Minor version.
  8159. >0 leshort&0x03F0 0x0000 \b.0
  8160. >0 leshort&0x03F0 0x0010 \b.1
  8161. >0 leshort&0x03F0 0x0020 \b.2
  8162. >0 leshort&0x03F0 0x0030 \b.3
  8163. >0 leshort&0x03F0 0x0040 \b.4
  8164. >0 leshort&0x03F0 0x0050 \b.5
  8165. >0 leshort&0x03F0 0x0060 \b.6
  8166. >0 leshort&0x03F0 0x0070 \b.7
  8167. >0 leshort&0x03F0 0x0080 \b.8
  8168. >0 leshort&0x03F0 0x0090 \b.9
  8169. >0 leshort&0x03F0 0x00A0 \b.10
  8170. >0 leshort&0x03F0 0x00B0 \b.11
  8171. >0 leshort&0x03F0 0x00C0 \b.12
  8172. >0 leshort&0x03F0 0x00D0 \b.13
  8173. >0 leshort&0x03F0 0x00E0 \b.14
  8174. >0 leshort&0x03F0 0x00F0 \b.15
  8175. # Revision.
  8176. >0 leshort&0x000F x \b.%u
  8177. # Type: Nintendo 3DS "NCCH" container.
  8178. # https://www.3dbrew.org/wiki/NCCH
  8179. 0x100 string NCCH Nintendo 3DS
  8180. >0x18D byte&2 0 File Archive (CFA)
  8181. >0x18D byte&2 2 Executable Image (CXI)
  8182. >0x150 string >\0 \b: "%.16s"
  8183. >0x18D byte 0x05
  8184. >>0x10E leshort x (Old3DS System Update v
  8185. >>0x10E use nintendo-3ds-version-code
  8186. >>0x10E leshort x \b)
  8187. >0x18D byte 0x15
  8188. >>0x10E leshort x (New3DS System Update v
  8189. >>0x10E use nintendo-3ds-version-code
  8190. >>0x10E leshort x \b)
  8191. >0x18D byte !0x05
  8192. >>0x18D byte !0x15
  8193. >>>0x112 byte x (v
  8194. >>>0x112 use nintendo-3ds-version-code
  8195. >>>0x112 byte x \b)
  8196. >0x18C byte 2 (New3DS only)
  8197. # Type: Nintendo 3DS "SMDH" file. (application description)
  8198. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8199. # Reference: https://3dbrew.org/wiki/SMDH
  8200. 0 string SMDH Nintendo 3DS SMDH file
  8201. >0x208 leshort !0
  8202. >>0x208 lestring16 x \b: "%.128s"
  8203. >>0x388 leshort !0
  8204. >>>0x388 lestring16 x by %.128s
  8205. >0x208 leshort 0
  8206. >>0x008 leshort !0
  8207. >>>0x008 lestring16 x \b: "%.128s"
  8208. >>>0x188 leshort !0
  8209. >>>>0x188 lestring16 x by %.128s
  8210. # Type: Nintendo 3DS Homebrew Application.
  8211. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8212. # Reference: https://3dbrew.org/wiki/3DSX_Format
  8213. 0 string 3DSX Nintendo 3DS Homebrew Application (3DSX)
  8214. # Type: Nintendo 3DS Banner Model Data.
  8215. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8216. # Reference: https://3dbrew.org/wiki/CBMD
  8217. 0 string CBMD\0\0\0\0 Nintendo 3DS Banner Model Data
  8218. #------------------------------------------------------------------------------
  8219. # a7800: file(1) magic for the Atari 7800 raw ROM format.
  8220. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8221. # Reference: https://sites.google.com/site/atari7800wiki/a78-header
  8222. 0 byte >0
  8223. >0 byte <3
  8224. >>1 string ATARI7800 Atari 7800 ROM image
  8225. !:mime application/x-atari-7800-rom
  8226. >>>0x11 string >\0 \b: "%.32s"
  8227. # Display type.
  8228. >>>0x39 byte 0 (NTSC)
  8229. >>>0x39 byte 1 (PAL)
  8230. >>>0x36 byte&1 1 (POKEY)
  8231. #------------------------------------------------------------------------------
  8232. # vectrex: file(1) magic for the GCE Vectrex raw ROM format.
  8233. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8234. # Reference: http://www.playvectrex.com/designit/chrissalo/hello1.htm
  8235. #
  8236. # NOTE: Title is terminated with 0x80, not 0.
  8237. # The header is terminated with a 0, so that will
  8238. # terminate the title as well.
  8239. #
  8240. 0 string g\ GCE Vectrex ROM image
  8241. >0x11 string >\0 \b: "%.16s"
  8242. #------------------------------------------------------------------------------
  8243. # amiibo: file(1) magic for Nintendo amiibo NFC dumps.
  8244. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8245. # Reference: https://www.3dbrew.org/wiki/Amiibo
  8246. 0x00 byte 0x04
  8247. >0x0A beshort 0x0FE0
  8248. >>0x0C belong 0xF110FFEE
  8249. >>>0x208 beshort 0x0100
  8250. >>>>0x020A byte 0x0F
  8251. >>>>>0x020C bequad 0x000000045F000000
  8252. >>>>>>0x5B byte 0x02
  8253. >>>>>>>0x54 belong x Nintendo amiibo NFC dump - amiibo ID: %08X-
  8254. >>>>>>>0x58 belong x \b%08X
  8255. #------------------------------------------------------------------------------
  8256. # Type: Nintendo Switch XCI (Game Cartridge Image)
  8257. # From: Benjamin Lowry <ben@ben.gmbh>
  8258. # Reference: https://switchbrew.org/wiki/Gamecard_Format
  8259. 0x100 string HEAD
  8260. >0x10D byte 0xFA Nintendo Switch cartridge image (XCI), 1GB
  8261. >0x10D byte 0xF8 Nintendo Switch cartridge image (XCI), 2GB
  8262. >0x10D byte 0xF0 Nintendo Switch cartridge image (XCI), 4GB
  8263. >0x10D byte 0xE0 Nintendo Switch cartridge image (XCI), 8GB
  8264. >0x10D byte 0xE1 Nintendo Switch cartridge image (XCI), 16GB
  8265. >0x10D byte 0xE2 Nintendo Switch cartridge image (XCI), 32GB
  8266. #------------------------------------------------------------------------------
  8267. # Type: Nintendo Switch Executable
  8268. # From: Benjamin Lowry <ben@ben.gmbh>
  8269. # Reference: https://switchbrew.org/wiki/NSO
  8270. 0x00 string NSO0 Nintendo Switch executable (NSO)
  8271. #------------------------------------------------------------------------------
  8272. # Type: Nintendo Switch PFS0
  8273. # From: Benjamin Lowry <ben@ben.gmbh>
  8274. # Reference: https://switchbrew.org/wiki/NCA_Format#PFS0
  8275. 0x00 string PFS0 Nintendo Switch partition filesystem (PFS0)
  8276. >0x04 ulelong x \b, %d files
  8277. #------------------------------------------------------------------------------
  8278. # amiibo: file(1) magic for Nintendo Badge Arcade files.
  8279. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8280. # References:
  8281. # - https://github.com/GerbilSoft/rom-properties/issues/92
  8282. # - https://github.com/CaitSith2/BadgeArcadeTool
  8283. # - https://github.com/TheMachinumps/Advanced-badge-editor
  8284. # PRBS: Individual badge and/or mega badge.
  8285. 0 string PRBS
  8286. >0x44 byte >0x20 Nintendo Badge Arcade
  8287. >>0xB8 ulelong <2
  8288. >>>0xBC ulelong <2 badge:
  8289. >>>0xBC ulelong >1 Mega Badge
  8290. >>>>0xB8 ulelong x (%ux
  8291. >>>>0xBC ulelong x \b%u):
  8292. >>0xB8 ulelong >1 Mega Badge
  8293. >>>0xB8 ulelong x (%ux
  8294. >>>0xBC ulelong x \b%u):
  8295. >0x44 string x "%s"
  8296. >0x3C ulelong x \b, badge ID: %u
  8297. >0x74 byte >0x20
  8298. >>0x74 string x \b, set: "%s"
  8299. >0xA8 ulelong !0xFFFFFFFF
  8300. >>0xA8 ulelong x \b, launch title ID: %08X
  8301. >>0xA4 ulelong x \b-%08X
  8302. # CABS: Badge set.
  8303. 0 string CABS
  8304. >0x2C byte >0x20 Nintendo Badge Arcade badge set:
  8305. >>0x2C string x "%.48s"
  8306. >>0x24 ulelong x \b, set ID: %u
  8307. #------------------------------------------------------------------------------
  8308. # sufami: file(1) magic for Sufami Turbo ROM images.
  8309. # From: David Korth <gerbilsoft@gerbilsoft.com>
  8310. # References:
  8311. # - https://problemkaputt.de/fullsnes.htm#snescartsufamiturbominicartridgeadaptor
  8312. 0 string BANDAI\ SFC-ADX
  8313. >0x10 string !SFC-ADX\ BACKUP Sufami Turbo ROM image:
  8314. >>0x10 string/T x "%.14s"
  8315. >>0x30 byte x \b, ID %02X
  8316. >>0x31 byte x \b%02X
  8317. >>0x32 byte x \b%02X
  8318. >>0x33 ubyte >0 \b, series index %u
  8319. >>0x34 ubyte 0 [SlowROM]
  8320. >>0x34 ubyte 1 [FastROM]
  8321. >>0x35 ubyte 1 [SRAM]
  8322. >>0x35 ubyte 3 [Special]
  8323. # Type: Nintendo GameCube/Wii disc image (RVZ format)
  8324. 0 string RVZ\001 Nintendo
  8325. >0x48 belong 1 GameCube
  8326. !:mime application/x-gamecube-rom
  8327. >0x48 belong 2 Wii
  8328. !:mime application/x-wii-rom
  8329. >0x48 default x GameCube/Wii
  8330. >0x48 belong x disc image (RVZ format):
  8331. >>0x58 use nintendo-gcn-disc-common
  8332. #------------------------------------------------------------------------------
  8333. # $File: convex,v 1.8 2012/10/03 23:44:43 christos Exp $
  8334. # convex: file(1) magic for Convex boxes
  8335. #
  8336. # Convexes are big-endian.
  8337. #
  8338. # /*\
  8339. # * Below are the magic numbers and tests added for Convex.
  8340. # * Added at beginning, because they are expected to be used most.
  8341. # \*/
  8342. 0 belong 0507 Convex old-style object
  8343. >16 belong >0 not stripped
  8344. 0 belong 0513 Convex old-style demand paged executable
  8345. >16 belong >0 not stripped
  8346. 0 belong 0515 Convex old-style pre-paged executable
  8347. >16 belong >0 not stripped
  8348. 0 belong 0517 Convex old-style pre-paged, non-swapped executable
  8349. >16 belong >0 not stripped
  8350. 0 belong 0x011257 Core file
  8351. #
  8352. # The following are a series of dump format magic numbers. Each one
  8353. # corresponds to a drastically different dump format. The first on is
  8354. # the original dump format on a 4.1 BSD or earlier file system. The
  8355. # second marks the change between the 4.1 file system and the 4.2 file
  8356. # system. The Third marks the changing of the block size from 1K
  8357. # to 2K to be compatible with an IDC file system. The fourth indicates
  8358. # a dump that is dependent on Convex Storage Manager, because data in
  8359. # secondary storage is not physically contained within the dump.
  8360. # The restore program uses these number to determine how the data is
  8361. # to be extracted.
  8362. #
  8363. 24 belong =60013 dump format, 4.2 or 4.3 BSD (IDC compatible)
  8364. 24 belong =60014 dump format, Convex Storage Manager by-reference dump
  8365. #
  8366. # what follows is a bunch of bit-mask checks on the flags field of the opthdr.
  8367. # If there is no `=' sign, assume just checking for whether the bit is set?
  8368. #
  8369. 0 belong 0601 Convex SOFF
  8370. >88 belong&0x000f0000 =0x00000000 c1
  8371. >88 belong &0x00010000 c2
  8372. >88 belong &0x00020000 c2mp
  8373. >88 belong &0x00040000 parallel
  8374. >88 belong &0x00080000 intrinsic
  8375. >88 belong &0x00000001 demand paged
  8376. >88 belong &0x00000002 pre-paged
  8377. >88 belong &0x00000004 non-swapped
  8378. >88 belong &0x00000008 POSIX
  8379. #
  8380. >84 belong &0x80000000 executable
  8381. >84 belong &0x40000000 object
  8382. >84 belong&0x20000000 =0 not stripped
  8383. >84 belong&0x18000000 =0x00000000 native fpmode
  8384. >84 belong&0x18000000 =0x10000000 ieee fpmode
  8385. >84 belong&0x18000000 =0x18000000 undefined fpmode
  8386. #
  8387. 0 belong 0605 Convex SOFF core
  8388. #
  8389. 0 belong 0607 Convex SOFF checkpoint
  8390. >88 belong&0x000f0000 =0x00000000 c1
  8391. >88 belong &0x00010000 c2
  8392. >88 belong &0x00020000 c2mp
  8393. >88 belong &0x00040000 parallel
  8394. >88 belong &0x00080000 intrinsic
  8395. >88 belong &0x00000008 POSIX
  8396. #
  8397. >84 belong&0x18000000 =0x00000000 native fpmode
  8398. >84 belong&0x18000000 =0x10000000 ieee fpmode
  8399. >84 belong&0x18000000 =0x18000000 undefined fpmode
  8400. #------------------------------------------------------------------------------
  8401. # $File: coverage,v 1.3 2021/02/23 00:51:10 christos Exp $
  8402. # xoverage: file(1) magic for test coverage data
  8403. # File formats used to store test coverage data
  8404. # 2016-05-21, Georg Sauthoff <mail@georg.so>
  8405. # - GCC gcno - written by GCC at compile time when compiling with
  8406. # gcc -ftest-coverage
  8407. # - GCC gcda - written by a program that was compiled with
  8408. # gcc -fprofile-arcs
  8409. # - LLVM raw profiles - generated by a program compiled with
  8410. # clang -fprofile-instr-generate -fcoverage-mapping ...
  8411. # - LLVM indexed profiles - generated by
  8412. # llvm-profdata
  8413. # - GCOV reports, i.e. the annotated source code
  8414. # - LCOV trace files, i.e. aggregated GCC profiles
  8415. #
  8416. # GCC coverage tracefiles
  8417. # .gcno file are created during compile time,
  8418. # while data collected during runtime is stored in .gcda files
  8419. # cf. gcov-io.h
  8420. # https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Gcov-Data-Files.html
  8421. # Examples:
  8422. # Fedora 23/x86-64/gcc-5.3.1: 6f 6e 63 67 52 33 30 35
  8423. # Debian 8 PPC64/gcc-4.9.2 : 67 63 6e 6f 34 30 39 2a
  8424. 0 lelong 0x67636e6f GCC gcno coverage (-ftest-coverage),
  8425. >&3 byte x version %c.
  8426. >&1 byte x \b%c
  8427. # big endian
  8428. 0 belong 0x67636e6f GCC gcno coverage (-ftest-coverage),
  8429. >&0 byte x version %c.
  8430. >&2 byte x \b%c (big-endian)
  8431. # Examples:
  8432. # Fedora 23/x86-64/gcc-5.3.1: 61 64 63 67 52 33 30 35
  8433. # Debian 8 PPC64/gcc-4.9.2 : 67 63 64 61 34 30 39 2a
  8434. 0 lelong 0x67636461 GCC gcda coverage (-fprofile-arcs),
  8435. >&3 byte x version %c.
  8436. >&1 byte x \b%c
  8437. # big endian
  8438. 0 belong 0x67636461 GCC gcda coverage (-fprofile-arcs),
  8439. >&0 byte x version %c.
  8440. >&2 byte x \b%c (big-endian)
  8441. # LCOV tracefiles
  8442. # cf. http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php
  8443. 0 string TN:
  8444. >&0 search/64 \nSF:/ LCOV coverage tracefile
  8445. # Coverage reports generated by gcov
  8446. # i.e. source code annotated with coverage information
  8447. 0 string \x20\x20\x20\x20\x20\x20\x20\x20-:\x20\x20\x20\ 0:Source:
  8448. >&0 search/128 \x20\x20\x20\x20\x20\x20\x20\x20-:\x20\x20\x20\ 0:Graph:
  8449. >>&0 search/128 \x20\x20\x20\x20\x20\x20\x20\x20-:\x20\x20\x20\ 0:Data: GCOV coverage report
  8450. # LLVM coverage files
  8451. # raw data after running a program compiled with:
  8452. # `clang -fprofile-instr-generate -fcoverage-mapping ...`
  8453. # default name: default.profraw
  8454. # magic is: \xFF lprofr \x81
  8455. # cf. https://llvm.org/docs/doxygen/html/InstrProfData_8inc_source.html
  8456. 0 lequad 0xff6c70726f667281 LLVM raw profile data,
  8457. >&0 byte x version %d
  8458. # big endian
  8459. 0 bequad 0xff6c70726f667281 LLVM raw profile data,
  8460. >&7 byte x version %d (big-endian)
  8461. # LLVM indexed instruction profile (as generated by llvm-profdata)
  8462. # magic is: reverse(\xFF lprofi \x81)
  8463. # cf. https://llvm.org/docs/CoverageMappingFormat.html
  8464. # https://llvm.org/docs/doxygen/html/namespacellvm_1_1IndexedInstrProf.html
  8465. # https://llvm.org/docs/CommandGuide/llvm-cov.html
  8466. # https://llvm.org/docs/CommandGuide/llvm-profdata.html
  8467. 0 lequad 0x8169666f72706cff LLVM indexed profile data,
  8468. >&0 byte x version %d
  8469. # big endian
  8470. 0 bequad 0x8169666f72706cff LLVM indexed profile data,
  8471. >&7 byte x version %d (big-endian)
  8472. #------------------------------------------------------------------------------
  8473. # $File: cracklib,v 1.7 2009/09/19 16:28:08 christos Exp $
  8474. # cracklib: file (1) magic for cracklib v2.7
  8475. 0 lelong 0x70775631 Cracklib password index, little endian
  8476. >4 long >0 (%i words)
  8477. >4 long 0 ("64-bit")
  8478. >>8 long >-1 (%i words)
  8479. 0 belong 0x70775631 Cracklib password index, big endian
  8480. >4 belong >-1 (%i words)
  8481. # really bellong 0x0000000070775631
  8482. 0 search/1 \0\0\0\0pwV1 Cracklib password index, big endian ("64-bit")
  8483. >12 belong >0 (%i words)
  8484. #------------------------------------------------------------------------------
  8485. # $File: crypto,v 1.2 2021/03/27 20:15:53 christos Exp $
  8486. # crypto: file(1) magic for crypto formats
  8487. #
  8488. # ----------------------------------------------------------------------------
  8489. # $File: ctags,v 1.6 2009/09/19 16:28:08 christos Exp $
  8490. # ctags: file (1) magic for Exuberant Ctags files
  8491. # From: Alexander Mai <mai@migdal.ikp.physik.tu-darmstadt.de>
  8492. 0 search/1 =!_TAG Exuberant Ctags tag file text
  8493. #--------------------------------------------------------------
  8494. # ctf: file(1) magic for CTF (Common Trace Format) trace files
  8495. #
  8496. # Specs. available here: <https://www.efficios.com/ctf>
  8497. #--------------------------------------------------------------
  8498. # CTF trace data
  8499. 0 lelong 0xc1fc1fc1 Common Trace Format (CTF) trace data (LE)
  8500. 0 belong 0xc1fc1fc1 Common Trace Format (CTF) trace data (BE)
  8501. # CTF metadata (packetized)
  8502. 0 lelong 0x75d11d57 Common Trace Format (CTF) packetized metadata (LE)
  8503. >35 byte x \b, v%d
  8504. >36 byte x \b.%d
  8505. 0 belong 0x75d11d57 Common Trace Format (CTF) packetized metadata (BE)
  8506. >35 byte x \b, v%d
  8507. >36 byte x \b.%d
  8508. # CTF metadata (plain text)
  8509. 0 string /*\x20CTF\x20 Common Trace Format (CTF) plain text metadata
  8510. !:strength + 5 # this is to make sure we beat C
  8511. >&0 regex [0-9]+\.[0-9]+ \b, v%s
  8512. #------------------------------------------------------------------------------
  8513. # $File: cubemap,v 1.1 2012/06/06 13:03:20 christos Exp $
  8514. # file(1) magic(5) data for cubemaps Martin Erik Werner <martinerikwerner@gmail.com>
  8515. #
  8516. 0 string ACMP Map file for the AssaultCube FPS game
  8517. 0 string CUBE Map file for cube and cube2 engine games
  8518. 0 string MAPZ) Map file for the Blood Frontier/Red Eclipse FPS games
  8519. #------------------------------------------------------------------------------
  8520. # $File: cups,v 1.6 2019/04/19 00:42:27 christos Exp $
  8521. # Cups: file(1) magic for the cups raster file format
  8522. # From: Laurent Martelli <martellilaurent@gmail.com>
  8523. # https://www.cups.org/documentation.php/spec-raster.html
  8524. #
  8525. 0 name cups-le
  8526. >280 lelong x \b, %d
  8527. >284 lelong x \bx%d dpi
  8528. >376 lelong x \b, %dx
  8529. >380 lelong x \b%d pixels
  8530. >388 lelong x %d bits/color
  8531. >392 lelong x %d bits/pixel
  8532. >400 lelong 0 ColorOrder=Chunky
  8533. >400 lelong 1 ColorOrder=Banded
  8534. >400 lelong 2 ColorOrder=Planar
  8535. >404 lelong 0 ColorSpace=gray
  8536. >404 lelong 1 ColorSpace=RGB
  8537. >404 lelong 2 ColorSpace=RGBA
  8538. >404 lelong 3 ColorSpace=black
  8539. >404 lelong 4 ColorSpace=CMY
  8540. >404 lelong 5 ColorSpace=YMC
  8541. >404 lelong 6 ColorSpace=CMYK
  8542. >404 lelong 7 ColorSpace=YMCK
  8543. >404 lelong 8 ColorSpace=KCMY
  8544. >404 lelong 9 ColorSpace=KCMYcm
  8545. >404 lelong 10 ColorSpace=GMCK
  8546. >404 lelong 11 ColorSpace=GMCS
  8547. >404 lelong 12 ColorSpace=WHITE
  8548. >404 lelong 13 ColorSpace=GOLD
  8549. >404 lelong 14 ColorSpace=SILVER
  8550. >404 lelong 15 ColorSpace=CIE XYZ
  8551. >404 lelong 16 ColorSpace=CIE Lab
  8552. >404 lelong 17 ColorSpace=RGBW
  8553. >404 lelong 18 ColorSpace=sGray
  8554. >404 lelong 19 ColorSpace=sRGB
  8555. >404 lelong 20 ColorSpace=AdobeRGB
  8556. # Cups Raster image format, Big Endian
  8557. 0 string RaS
  8558. >3 string t Cups Raster version 1, Big Endian
  8559. >3 string 2 Cups Raster version 2, Big Endian
  8560. >3 string 3 Cups Raster version 3, Big Endian
  8561. !:mime application/vnd.cups-raster
  8562. >0 use \^cups-le
  8563. # Cups Raster image format, Little Endian
  8564. 1 string SaR
  8565. >0 string t Cups Raster version 1, Little Endian
  8566. >0 string 2 Cups Raster version 2, Little Endian
  8567. >0 string 3 Cups Raster version 3, Little Endian
  8568. !:mime application/vnd.cups-raster
  8569. >0 use cups-le
  8570. #------------------------------------------------------------------------------
  8571. # $File: dact,v 1.4 2009/09/19 16:28:08 christos Exp $
  8572. # dact: file(1) magic for DACT compressed files
  8573. #
  8574. 0 long 0x444354C3 DACT compressed data
  8575. >4 byte >-1 (version %i.
  8576. >5 byte >-1 $BS%i.
  8577. >6 byte >-1 $BS%i)
  8578. >7 long >0 $BS, original size: %i bytes
  8579. >15 long >30 $BS, block size: %i bytes
  8580. #------------------------------------------------------------------------------
  8581. # $File: database,v 1.61 2021/02/23 00:51:10 christos Exp $
  8582. # database: file(1) magic for various databases
  8583. #
  8584. # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
  8585. #
  8586. #
  8587. # GDBM magic numbers
  8588. # Will be maintained as part of the GDBM distribution in the future.
  8589. # <downsj@teeny.org>
  8590. 0 belong 0x13579acd GNU dbm 1.x or ndbm database, big endian, 32-bit
  8591. !:mime application/x-gdbm
  8592. 0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian, old
  8593. !:mime application/x-gdbm
  8594. 0 belong 0x13579acf GNU dbm 1.x or ndbm database, big endian, 64-bit
  8595. !:mime application/x-gdbm
  8596. 0 lelong 0x13579acd GNU dbm 1.x or ndbm database, little endian, 32-bit
  8597. !:mime application/x-gdbm
  8598. 0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian, old
  8599. !:mime application/x-gdbm
  8600. 0 lelong 0x13579acf GNU dbm 1.x or ndbm database, little endian, 64-bit
  8601. !:mime application/x-gdbm
  8602. 0 string GDBM GNU dbm 2.x database
  8603. !:mime application/x-gdbm
  8604. #
  8605. # Berkeley DB
  8606. #
  8607. # Ian Darwin's file /etc/magic files: big/little-endian version.
  8608. #
  8609. # Hash 1.85/1.86 databases store metadata in network byte order.
  8610. # Btree 1.85/1.86 databases store the metadata in host byte order.
  8611. # Hash and Btree 2.X and later databases store the metadata in host byte order.
  8612. 0 long 0x00061561 Berkeley DB
  8613. !:mime application/x-dbm
  8614. >8 belong 4321
  8615. >>4 belong >2 1.86
  8616. >>4 belong <3 1.85
  8617. >>4 belong >0 (Hash, version %d, native byte-order)
  8618. >8 belong 1234
  8619. >>4 belong >2 1.86
  8620. >>4 belong <3 1.85
  8621. >>4 belong >0 (Hash, version %d, little-endian)
  8622. 0 belong 0x00061561 Berkeley DB
  8623. >8 belong 4321
  8624. >>4 belong >2 1.86
  8625. >>4 belong <3 1.85
  8626. >>4 belong >0 (Hash, version %d, big-endian)
  8627. >8 belong 1234
  8628. >>4 belong >2 1.86
  8629. >>4 belong <3 1.85
  8630. >>4 belong >0 (Hash, version %d, native byte-order)
  8631. 0 long 0x00053162 Berkeley DB 1.85/1.86
  8632. >4 long >0 (Btree, version %d, native byte-order)
  8633. 0 belong 0x00053162 Berkeley DB 1.85/1.86
  8634. >4 belong >0 (Btree, version %d, big-endian)
  8635. 0 lelong 0x00053162 Berkeley DB 1.85/1.86
  8636. >4 lelong >0 (Btree, version %d, little-endian)
  8637. 12 long 0x00061561 Berkeley DB
  8638. >16 long >0 (Hash, version %d, native byte-order)
  8639. 12 belong 0x00061561 Berkeley DB
  8640. >16 belong >0 (Hash, version %d, big-endian)
  8641. 12 lelong 0x00061561 Berkeley DB
  8642. >16 lelong >0 (Hash, version %d, little-endian)
  8643. 12 long 0x00053162 Berkeley DB
  8644. >16 long >0 (Btree, version %d, native byte-order)
  8645. 12 belong 0x00053162 Berkeley DB
  8646. >16 belong >0 (Btree, version %d, big-endian)
  8647. 12 lelong 0x00053162 Berkeley DB
  8648. >16 lelong >0 (Btree, version %d, little-endian)
  8649. 12 long 0x00042253 Berkeley DB
  8650. >16 long >0 (Queue, version %d, native byte-order)
  8651. 12 belong 0x00042253 Berkeley DB
  8652. >16 belong >0 (Queue, version %d, big-endian)
  8653. 12 lelong 0x00042253 Berkeley DB
  8654. >16 lelong >0 (Queue, version %d, little-endian)
  8655. # From Max Bowsher.
  8656. 12 long 0x00040988 Berkeley DB
  8657. >16 long >0 (Log, version %d, native byte-order)
  8658. 12 belong 0x00040988 Berkeley DB
  8659. >16 belong >0 (Log, version %d, big-endian)
  8660. 12 lelong 0x00040988 Berkeley DB
  8661. >16 lelong >0 (Log, version %d, little-endian)
  8662. #
  8663. #
  8664. # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
  8665. 0 string/b RRD\0 RRDTool DB
  8666. >4 string/b x version %s
  8667. >>10 short !0 16bit aligned
  8668. >>>10 bedouble 8.642135e+130 big-endian
  8669. >>>>18 short x 32bit long (m68k)
  8670. >>10 short 0
  8671. >>>12 long !0 32bit aligned
  8672. >>>>12 bedouble 8.642135e+130 big-endian
  8673. >>>>>20 long 0 64bit long
  8674. >>>>>20 long !0 32bit long
  8675. >>>>12 ledouble 8.642135e+130 little-endian
  8676. >>>>>24 long 0 64bit long
  8677. >>>>>24 long !0 32bit long (i386)
  8678. >>>>12 string \x43\x2b\x1f\x5b\x2f\x25\xc0\xc7 middle-endian
  8679. >>>>>24 short !0 32bit long (arm)
  8680. >>8 quad 0 64bit aligned
  8681. >>>16 bedouble 8.642135e+130 big-endian
  8682. >>>>24 long 0 64bit long (s390x)
  8683. >>>>24 long !0 32bit long (hppa/mips/ppc/s390/SPARC)
  8684. >>>16 ledouble 8.642135e+130 little-endian
  8685. >>>>28 long 0 64bit long (alpha/amd64/ia64)
  8686. >>>>28 long !0 32bit long (armel/mipsel)
  8687. #----------------------------------------------------------------------
  8688. # ROOT: file(1) magic for ROOT databases
  8689. #
  8690. 0 string root\0 ROOT file
  8691. >4 belong x Version %d
  8692. >33 belong x (Compression: %d)
  8693. # XXX: Weak magic.
  8694. # Alex Ott <ott@jet.msk.su>
  8695. ## Paradox file formats
  8696. #2 leshort 0x0800 Paradox
  8697. #>0x39 byte 3 v. 3.0
  8698. #>0x39 byte 4 v. 3.5
  8699. #>0x39 byte 9 v. 4.x
  8700. #>0x39 byte 10 v. 5.x
  8701. #>0x39 byte 11 v. 5.x
  8702. #>0x39 byte 12 v. 7.x
  8703. #>>0x04 byte 0 indexed .DB data file
  8704. #>>0x04 byte 1 primary index .PX file
  8705. #>>0x04 byte 2 non-indexed .DB data file
  8706. #>>0x04 byte 3 non-incrementing secondary index .Xnn file
  8707. #>>0x04 byte 4 secondary index .Ynn file
  8708. #>>0x04 byte 5 incrementing secondary index .Xnn file
  8709. #>>0x04 byte 6 non-incrementing secondary index .XGn file
  8710. #>>0x04 byte 7 secondary index .YGn file
  8711. #>>>0x04 byte 8 incrementing secondary index .XGn file
  8712. ## XBase database files
  8713. # updated by Joerg Jenderek at Feb 2013
  8714. # https://www.dbase.com/Knowledgebase/INT/db7_file_fmt.htm
  8715. # https://www.clicketyclick.dk/databases/xbase/format/dbf.html
  8716. # inspect VVYYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
  8717. 0 ubelong&0x0000FFFF <0x00000C20
  8718. # skip Infocom game Z-machine
  8719. >2 ubyte >0
  8720. # skip Androids *.xml
  8721. >>3 ubyte >0
  8722. >>>3 ubyte <32
  8723. # 1 < version VV
  8724. >>>>0 ubyte >1
  8725. # skip HELP.CA3 by test for reserved byte ( NULL )
  8726. >>>>>27 ubyte 0
  8727. # reserved bytes not always 0 ; also found 0x3901 (T4.DBF) ,0x7101 (T5.DBF,T6.DBF)
  8728. #>>>>>30 ubeshort x 30NULL?%x
  8729. # possible production flag,tag numbers(<=0x30),tag length(<=0x20), reserved (NULL)
  8730. >>>>>>24 ubelong&0xffFFFFff >0x01302000
  8731. # .DBF or .MDX
  8732. >>>>>>24 ubelong&0xffFFFFff <0x01302001
  8733. # for Xbase Database file (*.DBF) reserved (NULL) for multi-user
  8734. >>>>>>>24 ubelong&0xffFFFFff =0
  8735. # test for 2 reserved NULL bytes,transaction and encryption byte flag
  8736. >>>>>>>>12 ubelong&0xFFFFfEfE 0
  8737. # test for MDX flag
  8738. >>>>>>>>>28 ubyte x
  8739. >>>>>>>>>28 ubyte&0xf8 0
  8740. # header size >= 32
  8741. >>>>>>>>>>8 uleshort >31
  8742. # skip PIC15736.PCX by test for language driver name or field name
  8743. >>>>>>>>>>>32 ubyte >0
  8744. #!:mime application/x-dbf; charset=unknown-8bit ??
  8745. #!:mime application/x-dbase
  8746. >>>>>>>>>>>>0 use xbase-type
  8747. # database file
  8748. >>>>>>>>>>>>0 ubyte x \b DBF
  8749. >>>>>>>>>>>>4 lelong 0 \b, no records
  8750. >>>>>>>>>>>>4 lelong >0 \b, %d record
  8751. # plural s appended
  8752. >>>>>>>>>>>>>4 lelong >1 \bs
  8753. # https://www.clicketyclick.dk/databases/xbase/format/dbf_check.html#CHECK_DBF
  8754. # 1 <= record size <= 4000 (dBase 3,4) or 32 * KB (=0x8000)
  8755. >>>>>>>>>>>>10 uleshort x * %d
  8756. # file size = records * record size + header size
  8757. >>>>>>>>>>>>1 ubyte x \b, update-date
  8758. >>>>>>>>>>>>1 use xbase-date
  8759. # https://msdn.microsoft.com/de-de/library/cc483186(v=vs.71).aspx
  8760. #>>>>>>>>>>>>29 ubyte =0 \b, codepage ID=0x%x
  8761. # 2~cp850 , 3~cp1252 , 0x1b~?? ; what code page is 0x1b ?
  8762. >>>>>>>>>>>>29 ubyte >0 \b, codepage ID=0x%x
  8763. #>>>>>>>>>>>>28 ubyte&0x01 0 \b, no index file
  8764. >>>>>>>>>>>>28 ubyte&0x01 1 \b, with index file .MDX
  8765. >>>>>>>>>>>>28 ubyte&0x02 2 \b, with memo .FPT
  8766. >>>>>>>>>>>>28 ubyte&0x04 4 \b, DataBaseContainer
  8767. # 1st record offset + 1 = header size
  8768. >>>>>>>>>>>>8 uleshort >0
  8769. >>>>>>>>>>>>(8.s+1) ubyte >0
  8770. >>>>>>>>>>>>>8 uleshort >0 \b, at offset %d
  8771. >>>>>>>>>>>>>(8.s+1) ubyte >0
  8772. >>>>>>>>>>>>>>&-1 string >\0 1st record "%s"
  8773. # for multiple index files (*.MDX) Production flag,tag numbers(<=0x30),tag length(<=0x20), reserved (NULL)
  8774. >>>>>>>24 ubelong&0x0133f7ff >0
  8775. # test for reserved NULL byte
  8776. >>>>>>>>47 ubyte 0
  8777. # test for valid TAG key format (0x10 or 0)
  8778. >>>>>>>>>559 ubyte&0xeF 0
  8779. # test MM <= 12
  8780. >>>>>>>>>>45 ubeshort <0x0C20
  8781. >>>>>>>>>>>45 ubyte >0
  8782. >>>>>>>>>>>>46 ubyte <32
  8783. >>>>>>>>>>>>>46 ubyte >0
  8784. #!:mime application/x-mdx
  8785. >>>>>>>>>>>>>>0 use xbase-type
  8786. >>>>>>>>>>>>>>0 ubyte x \b MDX
  8787. >>>>>>>>>>>>>>1 ubyte x \b, creation-date
  8788. >>>>>>>>>>>>>>1 use xbase-date
  8789. >>>>>>>>>>>>>>44 ubyte x \b, update-date
  8790. >>>>>>>>>>>>>>44 use xbase-date
  8791. # No.of tags in use (1,2,5,12)
  8792. >>>>>>>>>>>>>>28 uleshort x \b, %d
  8793. # No. of entries in tag (0x30)
  8794. >>>>>>>>>>>>>>25 ubyte x \b/%d tags
  8795. # Length of tag
  8796. >>>>>>>>>>>>>>26 ubyte x * %d
  8797. # 1st tag name_
  8798. >>>>>>>>>>>>>548 string x \b, 1st tag "%.11s"
  8799. # 2nd tag name
  8800. #>>>>>>>>>>>>(26.b+548) string x \b, 2nd tag "%.11s"
  8801. #
  8802. # Print the xBase names of different version variants
  8803. 0 name xbase-type
  8804. >0 ubyte <2
  8805. # 1 < version
  8806. >0 ubyte >1
  8807. >>0 ubyte 0x02 FoxBase
  8808. # FoxBase+/dBaseIII+, no memo
  8809. >>0 ubyte 0x03 FoxBase+/dBase III
  8810. !:mime application/x-dbf
  8811. # dBASE IV no memo file
  8812. >>0 ubyte 0x04 dBase IV
  8813. !:mime application/x-dbf
  8814. # dBASE V no memo file
  8815. >>0 ubyte 0x05 dBase V
  8816. !:mime application/x-dbf
  8817. >>0 ubyte 0x30 Visual FoxPro
  8818. !:mime application/x-dbf
  8819. >>0 ubyte 0x31 Visual FoxPro, autoincrement
  8820. !:mime application/x-dbf
  8821. # Visual FoxPro, with field type Varchar or Varbinary
  8822. >>0 ubyte 0x32 Visual FoxPro, with field type Varchar
  8823. !:mime application/x-dbf
  8824. # dBASE IV SQL, no memo;dbv memo var size (Flagship)
  8825. >>0 ubyte 0x43 dBase IV, with SQL table
  8826. !:mime application/x-dbf
  8827. # https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  8828. #>>0 ubyte 0x62 dBase IV, with SQL table
  8829. #!:mime application/x-dbf
  8830. # dBASE IV, with memo!!
  8831. >>0 ubyte 0x7b dBase IV, with memo
  8832. !:mime application/x-dbf
  8833. # https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  8834. #>>0 ubyte 0x82 dBase IV, with SQL system
  8835. #!:mime application/x-dbf
  8836. # FoxBase+/dBaseIII+ with memo .DBT!
  8837. >>0 ubyte 0x83 FoxBase+/dBase III, with memo .DBT
  8838. !:mime application/x-dbf
  8839. # VISUAL OBJECTS (first 1.0 versions) for the Dbase III files (NTX clipper driver); memo file
  8840. >>0 ubyte 0x87 VISUAL OBJECTS, with memo file
  8841. !:mime application/x-dbf
  8842. # https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  8843. #>>0 ubyte 0x8A FoxBase+/dBase III, with memo .DBT
  8844. #!:mime application/x-dbf
  8845. # dBASE IV with memo!
  8846. >>0 ubyte 0x8B dBase IV, with memo .DBT
  8847. !:mime application/x-dbf
  8848. # dBase IV with SQL Table,no memo?
  8849. >>0 ubyte 0x8E dBase IV, with SQL table
  8850. !:mime application/x-dbf
  8851. # .dbv and .dbt memo (Flagship)?
  8852. >>0 ubyte 0xB3 Flagship
  8853. # https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  8854. #>>0 ubyte 0xCA dBase IV with memo .DBT
  8855. #!:mime application/x-dbf
  8856. # dBASE IV with SQL table, with memo .DBT
  8857. >>0 ubyte 0xCB dBase IV with SQL table, with memo .DBT
  8858. !:mime application/x-dbf
  8859. # HiPer-Six format;Clipper SIX, with SMT memo file
  8860. >>0 ubyte 0xE5 Clipper SIX with memo
  8861. !:mime application/x-dbf
  8862. # https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  8863. #>>0 ubyte 0xF4 dBase IV, with SQL table, with memo
  8864. #!:mime application/x-dbf
  8865. >>0 ubyte 0xF5 FoxPro with memo
  8866. !:mime application/x-dbf
  8867. # https://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  8868. #>>0 ubyte 0xFA FoxPro 2.x, with memo
  8869. #!:mime application/x-dbf
  8870. # unknown version (should not happen)
  8871. >>0 default x xBase
  8872. !:mime application/x-dbf
  8873. >>>0 ubyte x (0x%x)
  8874. # flags in version byte
  8875. # DBT flag (with dBASE III memo .DBT)!!
  8876. # >>0 ubyte&0x80 >0 DBT_FLAG=%x
  8877. # memo flag ??
  8878. # >>0 ubyte&0x08 >0 MEMO_FLAG=%x
  8879. # SQL flag ??
  8880. # >>0 ubyte&0x70 >0 SQL_FLAG=%x
  8881. # test and print the date of xBase .DBF .MDX
  8882. 0 name xbase-date
  8883. # inspect YYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
  8884. >0 ubelong x
  8885. >1 ubyte <13
  8886. >>1 ubyte >0
  8887. >>>2 ubyte >0
  8888. >>>>2 ubyte <32
  8889. >>>>>0 ubyte x
  8890. # YY is interpreted as 20YY or 19YY
  8891. >>>>>>0 ubyte <100 \b %.2d
  8892. # YY is interpreted 1900+YY; TODO: display yy or 20yy instead 1YY
  8893. >>>>>>0 ubyte >99 \b %d
  8894. >>>>>1 ubyte x \b-%d
  8895. >>>>>2 ubyte x \b-%d
  8896. # dBase memo files .DBT or .FPT
  8897. # https://msdn.microsoft.com/en-us/library/8599s21w(v=vs.80).aspx
  8898. 16 ubyte <4
  8899. >16 ubyte !2
  8900. >>16 ubyte !1
  8901. # next free block index is positive
  8902. >>>0 ulelong >0
  8903. # skip many JPG. ZIP, BZ2 by test for reserved bytes NULL , 0|2 , 0|1 , low byte of block size
  8904. >>>>17 ubelong&0xFFfdFEff 0x00000000
  8905. # skip many RAR by test for low byte 0 ,high byte 0|2|even of block size, 0|a|e|d7 , 0|64h
  8906. >>>>>20 ubelong&0xFF01209B 0x00000000
  8907. # dBASE III
  8908. >>>>>>16 ubyte 3
  8909. # dBASE III DBT
  8910. >>>>>>>0 use dbase3-memo-print
  8911. # dBASE III DBT without version, dBASE IV DBT , FoxPro FPT , or many ZIP , DBF garbage
  8912. >>>>>>16 ubyte 0
  8913. # unusual dBASE III DBT like angest.dbt, dBASE IV DBT with block size 0 , FoxPro FPT , or garbage PCX DBF
  8914. >>>>>>>20 uleshort 0
  8915. # FoxPro FPT , unusual dBASE III DBT like biblio.dbt or garbage
  8916. >>>>>>>>8 ulong =0
  8917. >>>>>>>>>6 ubeshort >0
  8918. # skip emacs.PIF
  8919. >>>>>>>>>>4 ushort 0
  8920. # check for valid FoxPro field type
  8921. >>>>>>>>>>>512 ubelong <3
  8922. >>>>>>>>>>>>0 use foxpro-memo-print
  8923. # dBASE III DBT , garbage
  8924. # skip WORD1XW.DOC with improbably high free block index
  8925. >>>>>>>>>0 ulelong <0x400000
  8926. # skip WinStore.App.exe by looking for printable 2nd character of 1st memo item
  8927. >>>>>>>>>>513 ubyte >037
  8928. # unusual dBASE III DBT like adressen.dbt
  8929. >>>>>>>>>>>0 use dbase3-memo-print
  8930. # dBASE III DBT like angest.dbt, or garbage PCX DBF
  8931. >>>>>>>>8 ubelong !0
  8932. # skip PCX and some DBF by test for for reserved NULL bytes
  8933. >>>>>>>>>510 ubeshort 0
  8934. # skip bad symples with improbably high free block index above 2 GiB file limit
  8935. >>>>>>>>>>0 ulelong <0x400000
  8936. # skip AI070GEP.EPS by printable 1st character of 1st memo item
  8937. >>>>>>>>>>>512 ubyte >037
  8938. # skip gluon-ffhat-1.0-tp-link-tl-wr1043n-nd-v2-sysupgrade.bin by printable 2nd character
  8939. >>>>>>>>>>>>513 ubyte >037
  8940. >>>>>>>>>>>>>0 use dbase3-memo-print
  8941. # dBASE IV DBT with positive block size
  8942. >>>>>>>20 uleshort >0
  8943. # dBASE IV DBT with valid block length like 512, 1024
  8944. # multiple of 2 in between 16 and 16 K ,implies upper and lower bits are zero
  8945. # skip also 3600h 3E00h size
  8946. >>>>>>>>20 uleshort&0xE00f 0
  8947. >>>>>>>>>0 use dbase4-memo-print
  8948. # Print the information of dBase III DBT memo file
  8949. 0 name dbase3-memo-print
  8950. >0 ubyte x dBase III DBT
  8951. !:mime application/x-dbt
  8952. !:ext dbt
  8953. # instead 3 as version number 0 for unusual examples like biblio.dbt
  8954. >16 ubyte !3 \b, version number %u
  8955. # Number of next available block for appending data
  8956. #>0 lelong =0 \b, next free block index %u
  8957. >0 lelong !0 \b, next free block index %u
  8958. # no positive block length
  8959. #>20 uleshort =0 \b, block length %u
  8960. >20 uleshort !0 \b, block length %u
  8961. # dBase III memo field terminated by \032\032
  8962. >512 string >\0 \b, 1st item "%s"
  8963. # https://www.clicketyclick.dk/databases/xbase/format/dbt.html
  8964. # Print the information of dBase IV DBT memo file
  8965. 0 name dbase4-memo-print
  8966. >0 lelong x dBase IV DBT
  8967. !:mime application/x-dbt
  8968. !:ext dbt
  8969. # 8 character shorted main name of corresponding dBASE IV DBF file
  8970. >8 ubelong >0x20000000
  8971. # skip unusual like for angest.dbt
  8972. >>20 uleshort >0
  8973. >>>8 string >\0 \b of %-.8s.DBF
  8974. # value 0 implies 512 as size
  8975. #>4 ulelong =0 \b, blocks size %u
  8976. # size of blocks not reliable like 0x2020204C in angest.dbt
  8977. >4 ulelong !0
  8978. >>4 ulelong&0x0000003f 0 \b, blocks size %u
  8979. # dBase IV DBT with positive block length (found 512 , 1024)
  8980. >20 uleshort >0 \b, block length %u
  8981. # next available block
  8982. #>0 lelong =0 \b, next free block index %u
  8983. >0 lelong !0 \b, next free block index %u
  8984. >20 uleshort >0
  8985. >>(20.s) ubelong x
  8986. >>>&-4 use dbase4-memofield-print
  8987. # unusual dBase IV DBT without block length (implies 512 as length)
  8988. >20 uleshort =0
  8989. >>512 ubelong x
  8990. >>>&-4 use dbase4-memofield-print
  8991. # Print the information of dBase IV memo field
  8992. 0 name dbase4-memofield-print
  8993. # free dBase IV memo field
  8994. >0 ubelong !0xFFFF0800
  8995. >>0 lelong x \b, next free block %u
  8996. >>4 lelong x \b, next used block %u
  8997. # used dBase IV memo field
  8998. >0 ubelong =0xFFFF0800
  8999. # length of memo field
  9000. >>4 lelong x \b, field length %d
  9001. >>>8 string >\0 \b, 1st used item "%s"
  9002. # http://www.dbfree.org/webdocs/1-documentation/0018-developers_stuff_(advanced)/os_related_stuff/xbase_file_format.htm
  9003. # Print the information of FoxPro FPT memo file
  9004. 0 name foxpro-memo-print
  9005. >0 belong x FoxPro FPT
  9006. !:mime application/x-fpt
  9007. !:ext fpt
  9008. # Size of blocks for FoxPro ( 64,256 )
  9009. >6 ubeshort x \b, blocks size %u
  9010. # next available block
  9011. #>0 belong =0 \b, next free block index %u
  9012. >0 belong !0 \b, next free block index %u
  9013. # field type ( 0~picture, 1~memo, 2~object )
  9014. >512 ubelong <3 \b, field type %u
  9015. # length of memo field
  9016. >512 ubelong 1
  9017. >>516 belong >0 \b, field length %d
  9018. >>>520 string >\0 \b, 1st item "%s"
  9019. # TODO:
  9020. # DBASE index file *.NDX
  9021. # DBASE Compound Index file *.CDX
  9022. # dBASE IV Printer Driver *.PRF
  9023. ## End of XBase database stuff
  9024. # MS Access database
  9025. 4 string Standard\ Jet\ DB Microsoft Access Database
  9026. !:mime application/x-msaccess
  9027. 4 string Standard\ ACE\ DB Microsoft Access Database
  9028. !:mime application/x-msaccess
  9029. # From: Joerg Jenderek
  9030. # URL: http://fileformats.archiveteam.org/wiki/Extensible_Storage_Engine
  9031. # Reference: https://github.com/libyal/libesedb/archive/master.zip
  9032. # libesedb-master/documentation/
  9033. # Extensible Storage Engine (ESE) Database File (EDB) format.asciidoc
  9034. # Note: also known as "JET Blue". Used by numerous Windows components such as
  9035. # Windows Search, Mail, Exchange and Active Directory.
  9036. 4 ubelong 0xefcdab89
  9037. # unknown1
  9038. >132 ubelong 0 Extensible storage engine
  9039. !:mime application/x-ms-ese
  9040. # file_type 0~database 1~stream
  9041. >>12 ulelong 0 DataBase
  9042. # Security DataBase (sdb)
  9043. !:ext edb/sdb
  9044. >>12 ulelong 1 STreaMing
  9045. !:ext stm
  9046. # format_version 620h
  9047. >>8 uleshort x \b, version 0x%x
  9048. >>10 uleshort >0 revision 0x%4.4x
  9049. >>0 ubelong x \b, checksum 0x%8.8x
  9050. # Page size 4096 8192 32768
  9051. >>236 ulequad x \b, page size %lld
  9052. # database_state
  9053. >>52 ulelong 1 \b, JustCreated
  9054. >>52 ulelong 2 \b, DirtyShutdown
  9055. #>>52 ulelong 3 \b, CleanShutdown
  9056. >>52 ulelong 4 \b, BeingConverted
  9057. >>52 ulelong 5 \b, ForceDetach
  9058. # Windows NT major version when the databases indexes were updated.
  9059. >>216 ulelong x \b, Windows version %d
  9060. # Windows NT minor version
  9061. >>220 ulelong x \b.%d
  9062. # From: Joerg Jenderek
  9063. # URL: https://forensicswiki.org/wiki/Windows_Application_Compatibility
  9064. # Note: files contain application compatibility fixes, application compatibility modes and application help messages.
  9065. 8 string sdbf
  9066. >7 ubyte 0
  9067. # TAG_TYPE_LIST+TAG_INDEXES
  9068. >>12 uleshort 0x7802 Windows application compatibility Shim DataBase
  9069. # version? 2 3
  9070. #>>>0 ulelong x \b, version %d
  9071. !:mime application/x-ms-sdb
  9072. !:ext sdb
  9073. # TDB database from Samba et al - Martin Pool <mbp@samba.org>
  9074. 0 string TDB\ file TDB database
  9075. >32 lelong 0x2601196D version 6, little-endian
  9076. >>36 lelong x hash size %d bytes
  9077. # SE Linux policy database
  9078. 0 lelong 0xf97cff8c SE Linux policy
  9079. >16 lelong x v%d
  9080. >20 lelong 1 MLS
  9081. >24 lelong x %d symbols
  9082. >28 lelong x %d ocons
  9083. # ICE authority file data (Wolfram Kleff)
  9084. 2 string ICE ICE authority data
  9085. # X11 Xauthority file (Wolfram Kleff)
  9086. 10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  9087. 11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  9088. 12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  9089. 13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  9090. 14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  9091. 15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  9092. 16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  9093. 17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  9094. 18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  9095. # From: Maxime Henrion <mux@FreeBSD.org>
  9096. # PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
  9097. 0 string PGDMP PostgreSQL custom database dump
  9098. >5 byte x - v%d
  9099. >6 byte x \b.%d
  9100. >5 beshort <0x101 \b-0
  9101. >5 beshort >0x100
  9102. >>7 byte x \b-%d
  9103. # Type: Advanced Data Format (ADF) database
  9104. # URL: https://www.grc.nasa.gov/WWW/cgns/adf/
  9105. # From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
  9106. 0 string @(#)ADF\ Database CGNS Advanced Data Format
  9107. # Tokyo Cabinet magic data
  9108. # http://tokyocabinet.sourceforge.net/index.html
  9109. 0 string ToKyO\ CaBiNeT\n Tokyo Cabinet
  9110. >14 string x \b (%s)
  9111. >32 byte 0 \b, Hash
  9112. !:mime application/x-tokyocabinet-hash
  9113. >32 byte 1 \b, B+ tree
  9114. !:mime application/x-tokyocabinet-btree
  9115. >32 byte 2 \b, Fixed-length
  9116. !:mime application/x-tokyocabinet-fixed
  9117. >32 byte 3 \b, Table
  9118. !:mime application/x-tokyocabinet-table
  9119. >33 byte &1 \b, [open]
  9120. >33 byte &2 \b, [fatal]
  9121. >34 byte x \b, apow=%d
  9122. >35 byte x \b, fpow=%d
  9123. >36 byte &0x01 \b, [large]
  9124. >36 byte &0x02 \b, [deflate]
  9125. >36 byte &0x04 \b, [bzip]
  9126. >36 byte &0x08 \b, [tcbs]
  9127. >36 byte &0x10 \b, [excodec]
  9128. >40 lequad x \b, bnum=%lld
  9129. >48 lequad x \b, rnum=%lld
  9130. >56 lequad x \b, fsiz=%lld
  9131. # Type: QDBM Quick Database Manager
  9132. # From: Benoit Sibaud <bsibaud@april.org>
  9133. 0 string \\[depot\\]\n\f Quick Database Manager, little endian
  9134. 0 string \\[DEPOT\\]\n\f Quick Database Manager, big endian
  9135. # Type: TokyoCabinet database
  9136. # URL: http://tokyocabinet.sourceforge.net/
  9137. # From: Benoit Sibaud <bsibaud@april.org>
  9138. 0 string ToKyO\ CaBiNeT\n TokyoCabinet database
  9139. >14 string x (version %s)
  9140. # From: Stephane Blondon https://www.yaal.fr
  9141. # Database file for Zope (done by FileStorage)
  9142. 0 string FS21 Zope Object Database File Storage v3 (data)
  9143. 0 string FS30 Zope Object Database File Storage v4 (data)
  9144. # Cache file for the database of Zope (done by ClientStorage)
  9145. 0 string ZEC3 Zope Object Database Client Cache File (data)
  9146. # IDA (Interactive Disassembler) database
  9147. 0 string IDA1 IDA (Interactive Disassembler) database
  9148. # Hopper (reverse engineering tool) https://www.hopperapp.com/
  9149. 0 string hopperdb Hopper database
  9150. # URL: https://en.wikipedia.org/wiki/Panorama_(database_engine)
  9151. # Reference: http://www.provue.com/Panorama/
  9152. # From: Joerg Jenderek
  9153. # NOTE: test only versions 4 and 6.0 with Windows
  9154. # length of Panorama database name
  9155. 5 ubyte >0
  9156. # look after database name for "some" null bits
  9157. >(5.B+7) ubelong&0xF3ffF000 0
  9158. # look for first keyword
  9159. >>&1 search/2 DESIGN Panorama database
  9160. #!:mime application/x-panorama-database
  9161. !:apple KASXZEPD
  9162. !:ext pan
  9163. # database name
  9164. >>>5 pstring x \b, "%s"
  9165. #
  9166. #
  9167. # askSam Database by Stefan A. Haubenthal <polluks@web.de>
  9168. 0 string askw40\0 askSam DB
  9169. #
  9170. #
  9171. # MUIbase Database Tool by Stefan A. Haubenthal <polluks@web.de>
  9172. 0 string MBSTV\040 MUIbase DB
  9173. >6 string x version %s
  9174. #
  9175. # CDB database
  9176. 0 string NBCDB\012 NetBSD Constant Database
  9177. >7 byte x \b, version %d
  9178. >8 string x \b, for '%s'
  9179. >24 lelong x \b, datasize %d
  9180. >28 lelong x \b, entries %d
  9181. >32 lelong x \b, index %d
  9182. >36 lelong x \b, seed %#x
  9183. #
  9184. # Redis RDB - https://redis.io/topics/persistence
  9185. 0 string REDIS Redis RDB file,
  9186. >5 regex [0-9][0-9][0-9][0-9] version %s
  9187. # Mork database.
  9188. # Used by older versions of Mozilla Suite and Firefox,
  9189. # and current versions of Thunderbird.
  9190. # From: David Korth <gerbilsoft@gerbilsoft.com>
  9191. 0 string //\ <!--\ <mdb:mork:z\ v=" Mozilla Mork database
  9192. >23 string x \b, version %.3s
  9193. # URL: https://en.wikipedia.org/wiki/Management_Information_Format
  9194. # Reference: https://www.dmtf.org/sites/default/files/standards/documents/DSP0005.pdf
  9195. # From: Joerg Jenderek
  9196. # Note: only tested with monitor asset reports of Dell Display Manager
  9197. # skip start like Language=fr|CA|iso8859-1
  9198. 0 search/27/C Start\040Component DMI Management Information Format
  9199. #!:mime text/plain
  9200. !:mime text/x-dmtf-mif
  9201. !:ext mif
  9202. #------------------------------------------------------------------------------
  9203. # $File: dataone,v 1.2 2019/04/19 00:42:27 christos Exp $
  9204. #
  9205. # DataONE- files from Dave Vieglais <dave.vieglais@gmail.com> &
  9206. # Pratik Shrivastava <pratikshrivastava23@gmail.com>
  9207. #
  9208. # file formats: https://cn.dataone.org/cn/v2/formats
  9209. #------------------------------------------------------------------------------
  9210. # EML (Ecological Metadata Language Format)
  9211. 0 string <?xml
  9212. >&0 regex (eml)-[0-9].[0-9].[0-9]+ eml://ecoinformatics.org/%s
  9213. # onedcx (DataONE Dublin Core Extended v1.0)
  9214. >&0 regex (onedcx/v)[0-9].[0-9]+ https://ns.dataone.org/metadata/schema/onedcx/v1.0
  9215. # FGDC-STD-001-1998 (Content Standard for Digital Geospatial Metadata,
  9216. # version 001-1998)
  9217. >&0 regex fgdc FGDC-STD-001-1998
  9218. # Mercury (Oak Ridge National Lab Mercury Metadata version 1.0)
  9219. >&0 regex (mercury/terms/v)[0-9].[0-9] https://purl.org/ornl/schema/mercury/terms/v1.0
  9220. # ISOTC211 (Geographic MetaData (GMD) Extensible Markup Language)
  9221. >&0 regex isotc211
  9222. >>&0 regex eng;USA https://www.isotc211.org/2005/gmd
  9223. # ISOTC211 (NOAA Variant Geographic MetaData (GMD) Extensible Markup Language)
  9224. >>&0 regex gov.noaa.nodc:[0-9]+ https://www.isotc211.org/2005/gmd-noaa
  9225. # ISOTC211 PANGAEA Variant Geographic MetaData (GMD) Extensible Markup Language
  9226. >>&0 regex pangaea.dataset[0-9][0-9][0-9][0-9][0-9][0-9]+ https://www.isotc211.org/2005/gmd-pangaea
  9227. !:mime text/xml
  9228. # Object Reuse and Exchange Vocabulary
  9229. 0 string <?xml
  9230. >&0 regex rdf
  9231. >>&0 regex openarchives https://www.openarchives.org/ore/terms
  9232. !:mime application/rdf+xml
  9233. # Dryad Metadata Application Profile Version 3.1
  9234. 0 string <DryadData
  9235. >&0 regex (dryad-bibo/v)[0-9].[0-9] https://datadryad.org/profile/v3.1
  9236. !:mime text/xml
  9237. #------------------------------------------------------------------------------
  9238. # $File: dbpf,v 1.3 2019/04/19 00:42:27 christos Exp $
  9239. # dppf: Maxis Database Packed Files, the stored data file format used by all
  9240. # Maxis games after the Sims: http://wiki.niotso.org/DBPF
  9241. # https://www.wiki.sc4devotion.com/index.php?title=DBPF
  9242. # 13 Oct 2017, Kip Warner <kip at thevertigo dot com>
  9243. 0 string DBPF Maxis Database Packed File
  9244. >4 ulelong x \b, version: %u.
  9245. >>8 ulelong x \b%u
  9246. >>>36 ulelong x \b, files: %u
  9247. >>24 ledate !0 \b, created: %s
  9248. >>28 ledate !0 \b, modified: %s
  9249. !:ext dbpf/package/dat/sc4
  9250. !:mime application/x-maxis-dbpf
  9251. #------------------------------------------------------------------------------
  9252. # $File: der,v 1.4 2021/03/14 17:12:04 christos Exp $
  9253. # der: file(1) magic for DER encoded files
  9254. #
  9255. # Certificate information piece
  9256. 0 name certinfo
  9257. >0 der seq
  9258. >>&0 der set
  9259. >>>&0 der seq
  9260. >>>>&0 der obj_id3=550406
  9261. >>>>&0 der prt_str=x \b, countryName=%s
  9262. >>&0 der set
  9263. >>>&0 der seq
  9264. >>>>&0 der obj_id3=550408
  9265. >>>>&0 der utf8_str=x \b, stateOrProvinceName=%s
  9266. >>&0 der set
  9267. >>>&0 der seq
  9268. >>>>&0 der obj_id3=55040a
  9269. >>>>&0 der utf8_str=x \b, organizationName=%s
  9270. >>&0 der set
  9271. >>>&0 der seq
  9272. >>>>&0 der obj_id3=550403
  9273. >>>>&0 der utf8_str=x \b, commonName=%s
  9274. >>&0 der seq
  9275. # Certificate requests
  9276. 0 der seq
  9277. >&0 der seq
  9278. >>&0 der int1=00 DER Encoded Certificate request
  9279. >>&0 use certinfo
  9280. # Key Pairs
  9281. 0 der seq
  9282. >&0 der int1=00
  9283. >&0 der int65=x
  9284. >&0 der int3=010001 DER Encoded Key Pair, 512 bits
  9285. 0 der seq
  9286. >&0 der int1=00
  9287. >&0 der int129=x
  9288. >&0 der int3=010001 DER Encoded Key Pair, 1024 bits
  9289. 0 der seq
  9290. >&0 der int1=00
  9291. >&0 der int257=x
  9292. >&0 der int3=010001 DER Encoded Key Pair, 2048 bits
  9293. 0 der seq
  9294. >&0 der int1=00
  9295. >&0 der int513=x
  9296. >&0 der int3=010001 DER Encoded Key Pair, 4096 bits
  9297. 0 der seq
  9298. >&0 der int1=00
  9299. >&0 der int1025=x
  9300. >&0 der int3=010001 DER Encoded Key Pair, 8192 bits
  9301. 0 der seq
  9302. >&0 der int1=00
  9303. >&0 der int2049=x
  9304. >&0 der int3=010001 DER Encoded Key Pair, 16k bits
  9305. 0 der seq
  9306. >&0 der int1=00
  9307. >&0 der int4097=x
  9308. >&0 der int3=010001 DER Encoded Key Pair, 32k bits
  9309. # Certificates
  9310. 0 der seq
  9311. >&0 der seq
  9312. >>&0 der int2=0dfa DER Encoded Certificate, 512 bits
  9313. >>&0 der int2=0dfb DER Encoded Certificate, 1024 bits
  9314. >>&0 der int2=0dfc DER Encoded Certificate, 2048 bits
  9315. >>&0 der int2=0dfd DER Encoded Certificate, 4096 bits
  9316. >>&0 der int2=0dfe DER Encoded Certificate, 8192 bits
  9317. >>&0 der int2=0dff DER Encoded Certificate, 16k bits
  9318. >>&0 der int2=0e04 DER Encoded Certificate, 32k bits
  9319. >>&0 der int2=x DER Encoded Certificate, ? bits (%s)
  9320. >>&0 der seq
  9321. >>>&0 der obj_id9=2a864886f70d010105 \b, sha1WithRSAEncryption
  9322. >>>&0 der obj_id9=x \b, ? Encryption (%s)
  9323. >>>&0 der null
  9324. >>&0 der seq
  9325. >>>&0 der set
  9326. >>>>&0 der seq
  9327. >>>>>&0 der obj_id3=550406
  9328. >>>>>&0 der prt_str=x \b, countryName=%s
  9329. >>>&0 der set
  9330. >>>>&0 der seq
  9331. >>>>>&0 der obj_id3=550408
  9332. >>>>>&0 der prt_str=x \b, stateOrProvinceName=%s
  9333. >>>&0 der set
  9334. >>>>&0 der seq
  9335. >>>>>&0 der obj_id3=550407
  9336. >>>>>&0 der prt_str=x \b, localityName=%s
  9337. >>>&0 der set
  9338. >>>>&0 der seq
  9339. >>>>>&0 der obj_id3=55040a
  9340. >>>>>&0 der prt_str=x \b, organizationName=%s
  9341. >>>&0 der set
  9342. >>>>&0 der seq
  9343. >>>>>&0 der obj_id3=55040b
  9344. >>>>>&0 der prt_str=x \b, organizationUnitName=%s
  9345. >>>&0 der set
  9346. >>>>&0 der seq
  9347. >>>>>&0 der obj_id3=550403
  9348. >>>>>&0 der prt_str=x \b, commonName=%s
  9349. >>>&0 der set
  9350. >>>>&0 der seq
  9351. >>>>>&0 der obj_id9=2a864886f70d010901
  9352. >>>>>&0 der ia5_str=x \b, emailAddress=%s
  9353. >>&0 der seq
  9354. >>>&0 der utc_time=x \b, utcTime=%s
  9355. >>>&0 der utc_time=x \b, utcTime=%s
  9356. >>&0 use certinfo
  9357. 0 der seq
  9358. >&0 der seq
  9359. >>&0 der eoc
  9360. >>>&0 der int1=02 Certificate, Version=3
  9361. >>>&0 der int1=x Certificate, Version=%s
  9362. >>&0 der int9=x \b, Serial=%s
  9363. >>&0 der seq
  9364. >>>&0 der obj_id9=2a864886f70d01010b
  9365. >>>&0 der null
  9366. >>&0 der seq
  9367. >>>&0 der set
  9368. >>>>&0 der seq
  9369. >>>>>&0 der obj_id3=550403
  9370. >>>>>&0 der utf8_str=x \b, Issuer=%s
  9371. >>&0 der seq
  9372. >>>&0 der utc_time=x \b, not-valid-before=%s
  9373. >>>&0 der utc_time=x \b, not-valid-after=%s
  9374. >>&0 der seq
  9375. >>>&0 der set
  9376. >>>>&0 der seq
  9377. >>>>>&0 der obj_id3=550403
  9378. >>>>>&0 der utf8_str=x \b, Subject=%s
  9379. #------------------------------------------------------------------------------
  9380. # $File: diamond,v 1.7 2009/09/19 16:28:08 christos Exp $
  9381. # diamond: file(1) magic for Diamond system
  9382. #
  9383. # ... diamond is a multi-media mail and electronic conferencing system....
  9384. #
  9385. # XXX - I think it was either renamed Slate, or replaced by Slate....
  9386. #
  9387. # The full deal is too long...
  9388. #0 string <list>\n<protocol\ bbn-multimedia-format> Diamond Multimedia Document
  9389. 0 string =<list>\n<protocol\ bbn-m Diamond Multimedia Document
  9390. #------------------------------------------------------------------------------
  9391. # $File: dif,v 1.1 2020/04/09 19:14:01 christos Exp $
  9392. # dif: file(1) magic for DIF text files
  9393. #------------------------------------------------------------------------------
  9394. # From: Joerg Jenderek
  9395. # URL: http://en.wikipedia.org/wiki/Data_Interchange_Format
  9396. # http://fileformats.archiveteam.org/wiki/Data_Interchange_Format
  9397. # Note: called by TrID "Data Interchange Format",
  9398. # by DROID x-fmt/368 "VisiCalc Database"
  9399. 0 string TABLE
  9400. # skip text starting with TABLE by looking for numeric version on 2nd line
  9401. >6 search/2 0,
  9402. # skip DROID x-fmt-41-signature-id-380.dif by looking for key word TUPLES at the beginning
  9403. >>27 search/128 TUPLES Data Interchange Format
  9404. # https://www.pcmatic.com/company/libraries/fileextension/detail.asp?ext=dif.html
  9405. #!:mime application/x-dif-spreadsheet Gnumeric
  9406. # https://github.com/LibreOffice/online/blob/master/discovery.xml
  9407. #!:mime application/x-dif-document LibreOffice
  9408. # https://www.wikidata.org/wiki/Wikidata:WikiProject_Informatics/File_formats/Lists/File_formats
  9409. !:mime application/x-dif
  9410. # https://extension.nirsoft.net/dif
  9411. #!:mime application/vnd.ms-excel
  9412. #!:mime text/plain
  9413. !:ext dif
  9414. # look for double quote 0x22 on 3rd line
  9415. >>>10 search/3 "
  9416. # skip if next character also double quote
  9417. >>>>&0 ubyte !0x22 \b, generator or table name
  9418. # comment like EXCEL, pwm enclosed in double quotes
  9419. >>>>>&-2 string x %s
  9420. #------------------------------------------------------------------------------
  9421. # $File: diff,v 1.17 2020/08/22 18:16:58 christos Exp $
  9422. # diff: file(1) magic for diff(1) output
  9423. #
  9424. 0 search/1 diff\040 diff output text
  9425. !:mime text/x-diff
  9426. 0 search/1 ***\040
  9427. >&0 search/1024 \n---\040 context diff output text
  9428. !:mime text/x-diff
  9429. 0 search/1 Only\040in\040 diff output text
  9430. !:mime text/x-diff
  9431. 0 search/1 Common\040subdirectories:\040 diff output text
  9432. !:mime text/x-diff
  9433. 0 search/1 Index: RCS/CVS diff output text
  9434. !:mime text/x-diff
  9435. # bsdiff: file(1) magic for bsdiff(1) output
  9436. 0 string/b BSDIFF40 bsdiff(1) patch file
  9437. # unified diff
  9438. 0 search/4096 ---\040
  9439. >&0 search/1024 \n
  9440. >>&0 search/1 +++\040
  9441. >>>&0 search/1024 \n
  9442. >>>>&0 search/1 @@ unified diff output text
  9443. !:mime text/x-diff
  9444. !:strength + 90
  9445. # librsync -- the library for network deltas
  9446. #
  9447. # Copyright (C) 2001 by Martin Pool. You may do whatever you want with
  9448. # this file.
  9449. #
  9450. 0 belong 0x72730236 rdiff network-delta data
  9451. 0 belong 0x72730136 rdiff network-delta signature data
  9452. >4 belong x (block length=%d,
  9453. >8 belong x signature strength=%d)
  9454. #------------------------------------------------------------------------------
  9455. # $File: digital,v 1.11 2013/01/11 16:45:23 christos Exp $
  9456. # Digital UNIX - Info
  9457. #
  9458. 0 string =!<arch>\n________64E Alpha archive
  9459. >22 string X -- out of date
  9460. #
  9461. 0 leshort 0603
  9462. >24 leshort 0410 COFF format alpha pure
  9463. >24 leshort 0413 COFF format alpha demand paged
  9464. >>22 leshort&030000 !020000 executable
  9465. >>22 leshort&020000 !0 dynamically linked
  9466. >>16 lelong !0 not stripped
  9467. >>16 lelong 0 stripped
  9468. >>27 byte x - version %d
  9469. >>26 byte x \b.%d
  9470. >>28 byte x \b-%d
  9471. >24 leshort 0407 COFF format alpha object
  9472. >>22 leshort&030000 020000 shared library
  9473. >>27 byte x - version %d
  9474. >>26 byte x \b.%d
  9475. >>28 byte x \b-%d
  9476. # Basic recognition of Digital UNIX core dumps - Mike Bremford <mike@opac.bl.uk>
  9477. #
  9478. # The actual magic number is just "Core", followed by a 2-byte version
  9479. # number; however, treating any file that begins with "Core" as a Digital
  9480. # UNIX core dump file may produce too many false hits, so we include one
  9481. # byte of the version number as well; DU 5.0 appears only to be up to
  9482. # version 2.
  9483. #
  9484. 0 string Core\001 Alpha COFF format core dump (Digital UNIX)
  9485. >24 string >\0 \b, from '%s'
  9486. 0 string Core\002 Alpha COFF format core dump (Digital UNIX)
  9487. >24 string >\0 \b, from '%s'
  9488. #
  9489. # The next is incomplete, we could tell more about this format,
  9490. # but its not worth it.
  9491. 0 leshort 0x188 Alpha compressed COFF
  9492. 0 leshort 0x18f Alpha u-code object
  9493. #
  9494. #
  9495. # Some other interesting Digital formats,
  9496. 0 string \377\377\177 ddis/ddif
  9497. 0 string \377\377\174 ddis/dots archive
  9498. 0 string \377\377\176 ddis/dtif table data
  9499. 0 string \033c\033 LN03 output
  9500. 0 long 04553207 X image
  9501. #
  9502. 0 string =!<PDF>!\n profiling data file
  9503. #
  9504. # Locale data tables (MIPS and Alpha).
  9505. #
  9506. 0 short 0x0501 locale data table
  9507. >6 short 0x24 for MIPS
  9508. >6 short 0x40 for Alpha
  9509. #------------------------------------------------------------------------------
  9510. # $File: dolby,v 1.9 2019/04/19 00:42:27 christos Exp $
  9511. # ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at>
  9512. # from https://www.atsc.org/standards/a_52a.pdf
  9513. # corrections, additions, etc. are always welcome!
  9514. #
  9515. # syncword
  9516. 0 beshort 0x0b77 ATSC A/52 aka AC-3 aka Dolby Digital stream,
  9517. # Proposed audio/ac3 RFC/4184
  9518. !:mime audio/vnd.dolby.dd-raw
  9519. # fscod
  9520. >4 byte&0xc0 = 0x00 48 kHz,
  9521. >4 byte&0xc0 = 0x40 44.1 kHz,
  9522. >4 byte&0xc0 = 0x80 32 kHz,
  9523. # is this one used for 96 kHz?
  9524. >4 byte&0xc0 = 0xc0 reserved frequency,
  9525. #
  9526. >5 byte&0x07 = 0x00 \b, complete main (CM)
  9527. >5 byte&0x07 = 0x01 \b, music and effects (ME)
  9528. >5 byte&0x07 = 0x02 \b, visually impaired (VI)
  9529. >5 byte&0x07 = 0x03 \b, hearing impaired (HI)
  9530. >5 byte&0x07 = 0x04 \b, dialogue (D)
  9531. >5 byte&0x07 = 0x05 \b, commentary (C)
  9532. >5 byte&0x07 = 0x06 \b, emergency (E)
  9533. >5 beshort&0x07e0 0x0720 \b, voiceover (VO)
  9534. >5 beshort&0x07e0 >0x0720 \b, karaoke
  9535. # acmod
  9536. >6 byte&0xe0 = 0x00 1+1 front,
  9537. >>6 byte&0x10 = 0x10 LFE on,
  9538. >6 byte&0xe0 = 0x20 1 front/0 rear,
  9539. >>6 byte&0x10 = 0x10 LFE on,
  9540. >6 byte&0xe0 = 0x40 2 front/0 rear,
  9541. # dsurmod (for stereo only)
  9542. >>6 byte&0x18 = 0x00 Dolby Surround not indicated
  9543. >>6 byte&0x18 = 0x08 not Dolby Surround encoded
  9544. >>6 byte&0x18 = 0x10 Dolby Surround encoded
  9545. >>6 byte&0x18 = 0x18 reserved Dolby Surround mode
  9546. >>6 byte&0x04 = 0x04 LFE on,
  9547. >6 byte&0xe0 = 0x60 3 front/0 rear,
  9548. >>6 byte&0x04 = 0x04 LFE on,
  9549. >6 byte&0xe0 = 0x80 2 front/1 rear,
  9550. >>6 byte&0x04 = 0x04 LFE on,
  9551. >6 byte&0xe0 = 0xa0 3 front/1 rear,
  9552. >>6 byte&0x01 = 0x01 LFE on,
  9553. >6 byte&0xe0 = 0xc0 2 front/2 rear,
  9554. >>6 byte&0x04 = 0x04 LFE on,
  9555. >6 byte&0xe0 = 0xe0 3 front/2 rear,
  9556. >>6 byte&0x01 = 0x01 LFE on,
  9557. #
  9558. >4 byte&0x3e = 0x00 \b, 32 kbit/s
  9559. >4 byte&0x3e = 0x02 \b, 40 kbit/s
  9560. >4 byte&0x3e = 0x04 \b, 48 kbit/s
  9561. >4 byte&0x3e = 0x06 \b, 56 kbit/s
  9562. >4 byte&0x3e = 0x08 \b, 64 kbit/s
  9563. >4 byte&0x3e = 0x0a \b, 80 kbit/s
  9564. >4 byte&0x3e = 0x0c \b, 96 kbit/s
  9565. >4 byte&0x3e = 0x0e \b, 112 kbit/s
  9566. >4 byte&0x3e = 0x10 \b, 128 kbit/s
  9567. >4 byte&0x3e = 0x12 \b, 160 kbit/s
  9568. >4 byte&0x3e = 0x14 \b, 192 kbit/s
  9569. >4 byte&0x3e = 0x16 \b, 224 kbit/s
  9570. >4 byte&0x3e = 0x18 \b, 256 kbit/s
  9571. >4 byte&0x3e = 0x1a \b, 320 kbit/s
  9572. >4 byte&0x3e = 0x1c \b, 384 kbit/s
  9573. >4 byte&0x3e = 0x1e \b, 448 kbit/s
  9574. >4 byte&0x3e = 0x20 \b, 512 kbit/s
  9575. >4 byte&0x3e = 0x22 \b, 576 kbit/s
  9576. >4 byte&0x3e = 0x24 \b, 640 kbit/s
  9577. #------------------------------------------------------------------------------
  9578. # $File: dump,v 1.17 2018/06/26 01:07:17 christos Exp $
  9579. # dump: file(1) magic for dump file format--for new and old dump filesystems
  9580. #
  9581. # We specify both byte orders in order to recognize byte-swapped dumps.
  9582. #
  9583. 0 name new-dump-be
  9584. >4 bedate x This dump %s,
  9585. >8 bedate x Previous dump %s,
  9586. >12 belong >0 Volume %d,
  9587. >692 belong 0 Level zero, type:
  9588. >692 belong >0 Level %d, type:
  9589. >0 belong 1 tape header,
  9590. >0 belong 2 beginning of file record,
  9591. >0 belong 3 map of inodes on tape,
  9592. >0 belong 4 continuation of file record,
  9593. >0 belong 5 end of volume,
  9594. >0 belong 6 map of inodes deleted,
  9595. >0 belong 7 end of medium (for floppy),
  9596. >676 string >\0 Label %s,
  9597. >696 string >\0 Filesystem %s,
  9598. >760 string >\0 Device %s,
  9599. >824 string >\0 Host %s,
  9600. >888 belong >0 Flags %x
  9601. 0 name old-dump-be
  9602. #>4 bedate x This dump %s,
  9603. #>8 bedate x Previous dump %s,
  9604. >12 belong >0 Volume %d,
  9605. >692 belong 0 Level zero, type:
  9606. >692 belong >0 Level %d, type:
  9607. >0 belong 1 tape header,
  9608. >0 belong 2 beginning of file record,
  9609. >0 belong 3 map of inodes on tape,
  9610. >0 belong 4 continuation of file record,
  9611. >0 belong 5 end of volume,
  9612. >0 belong 6 map of inodes deleted,
  9613. >0 belong 7 end of medium (for floppy),
  9614. >676 string >\0 Label %s,
  9615. >696 string >\0 Filesystem %s,
  9616. >760 string >\0 Device %s,
  9617. >824 string >\0 Host %s,
  9618. >888 belong >0 Flags %x
  9619. 0 name ufs2-dump-be
  9620. >896 beqdate x This dump %s,
  9621. >904 beqdate x Previous dump %s,
  9622. >12 belong >0 Volume %d,
  9623. >692 belong 0 Level zero, type:
  9624. >692 belong >0 Level %d, type:
  9625. >0 belong 1 tape header,
  9626. >0 belong 2 beginning of file record,
  9627. >0 belong 3 map of inodes on tape,
  9628. >0 belong 4 continuation of file record,
  9629. >0 belong 5 end of volume,
  9630. >0 belong 6 map of inodes deleted,
  9631. >0 belong 7 end of medium (for floppy),
  9632. >676 string >\0 Label %s,
  9633. >696 string >\0 Filesystem %s,
  9634. >760 string >\0 Device %s,
  9635. >824 string >\0 Host %s,
  9636. >888 belong >0 Flags %x
  9637. 24 belong 60012 new-fs dump file (big endian),
  9638. >0 use new-dump-be
  9639. 24 belong 60011 old-fs dump file (big endian),
  9640. >0 use old-dump-be
  9641. 24 lelong 60012 new-fs dump file (little endian),
  9642. # to correctly recognize '*.mo' GNU message catalog (little endian)
  9643. !:strength - 15
  9644. >0 use \^new-dump-be
  9645. 24 lelong 60011 old-fs dump file (little endian),
  9646. >0 use \^old-dump-be
  9647. 24 belong 0x19540119 new-fs dump file (ufs2, big endian),
  9648. >0 use ufs2-dump-be
  9649. 24 lelong 0x19540119 new-fs dump file (ufs2, little endian),
  9650. >0 use \^ufs2-dump-be
  9651. 18 leshort 60011 old-fs dump file (16-bit, assuming PDP-11 endianness),
  9652. >2 medate x Previous dump %s,
  9653. >6 medate x This dump %s,
  9654. >10 leshort >0 Volume %d,
  9655. >0 leshort 1 tape header.
  9656. >0 leshort 2 beginning of file record.
  9657. >0 leshort 3 map of inodes on tape.
  9658. >0 leshort 4 continuation of file record.
  9659. >0 leshort 5 end of volume.
  9660. >0 leshort 6 map of inodes deleted.
  9661. >0 leshort 7 end of medium (for floppy).
  9662. #------------------------------------------------------------------------------
  9663. # $File: dyadic,v 1.9 2019/04/19 00:42:27 christos Exp $
  9664. # Dyadic: file(1) magic for Dyalog APL.
  9665. #
  9666. # updated by Joerg Jenderek at Oct 2013
  9667. # https://en.wikipedia.org/wiki/Dyalog_APL
  9668. # https://www.dyalog.com/
  9669. # .DXV Dyalog APL External Variable
  9670. # .DIN Dyalog APL Input Table
  9671. # .DOT Dyalog APL Output Table
  9672. # .DFT Dyalog APL Format File
  9673. 0 ubeshort&0xFF60 0xaa00
  9674. # skip biblio.dbt
  9675. >1 byte !4
  9676. # real Dyalog APL have non zero version numbers like 7.3 or 13.4
  9677. >>2 ubeshort >0x0000 Dyalog APL
  9678. >>>1 byte 0x00 aplcore
  9679. #>>>1 byte 0x00 incomplete workspace
  9680. # *.DCF Dyalog APL Component File
  9681. >>>1 byte 0x01 component file 32-bit non-journaled non-checksummed
  9682. #>>>1 byte 0x01 component file
  9683. >>>1 byte 0x02 external variable exclusive
  9684. #>>>1 byte 0x02 external variable
  9685. # *.DWS Dyalog APL Workspace
  9686. >>>1 byte 0x03 workspace
  9687. >>>>7 byte&0x28 0x00 32-bit
  9688. >>>>7 byte&0x28 0x20 64-bit
  9689. >>>>7 byte&0x0c 0x00 classic
  9690. >>>>7 byte&0x0c 0x04 unicode
  9691. >>>>7 byte&0x88 0x00 big-endian
  9692. >>>>7 byte&0x88 0x80 little-endian
  9693. >>>1 byte 0x06 external variable shared
  9694. # *.DSE Dyalog APL Session , *.DLF Dyalog APL Session Log File
  9695. >>>1 byte 0x07 session
  9696. >>>1 byte 0x08 mapped file 32-bit
  9697. >>>1 byte 0x09 component file 64-bit non-journaled non-checksummed
  9698. >>>1 byte 0x0a mapped file 64-bit
  9699. >>>1 byte 0x0b component file 32-bit level 1 journaled non-checksummed
  9700. >>>1 byte 0x0c component file 64-bit level 1 journaled non-checksummed
  9701. >>>1 byte 0x0d component file 32-bit level 1 journaled checksummed
  9702. >>>1 byte 0x0e component file 64-bit level 1 journaled checksummed
  9703. >>>1 byte 0x0f component file 32-bit level 2 journaled checksummed
  9704. >>>1 byte 0x10 component file 64-bit level 2 journaled checksummed
  9705. >>>1 byte 0x11 component file 32-bit level 3 journaled checksummed
  9706. >>>1 byte 0x12 component file 64-bit level 3 journaled checksummed
  9707. >>>1 byte 0x13 component file 32-bit non-journaled checksummed
  9708. >>>1 byte 0x14 component file 64-bit non-journaled checksummed
  9709. >>>1 byte 0x15 component file under construction
  9710. >>>1 byte 0x16 DFS component file 64-bit level 1 journaled checksummed
  9711. >>>1 byte 0x17 DFS component file 64-bit level 2 journaled checksummed
  9712. >>>1 byte 0x18 DFS component file 64-bit level 3 journaled checksummed
  9713. >>>1 byte 0x19 external workspace
  9714. >>>1 byte 0x80 DDB
  9715. >>>2 byte x version %d
  9716. >>>3 byte x \b.%d
  9717. #>>>2 byte x type %d
  9718. #>>>3 byte x subtype %d
  9719. # *.DXF Dyalog APL Transfer File
  9720. 0 short 0x6060 Dyalog APL transfer
  9721. #------------------------------------------------------------------------------
  9722. # $File: ebml,v 1.2 2019/04/19 00:42:27 christos Exp $
  9723. # ebml: file(1) magic for various Extensible Binary Meta Language
  9724. # https://www.matroska.org/technical/specs/index.html#track
  9725. 0 belong 0x1a45dfa3 EBML file
  9726. >4 search/b/100 \102\202
  9727. >>&1 string x \b, creator %.8s
  9728. #------------------------------------------------------------------------------
  9729. # $File: edid,v 1.1 2019/03/28 12:36:01 christos Exp $
  9730. # edid: file(1) magic for EDID dump files
  9731. 0 quad 0x00ffffffffffff00 Extended display identification data dump
  9732. !:mime application/x-edid-dump
  9733. >18 byte 0x01 Version 1
  9734. >>19 byte <0x04 \b.%d
  9735. >18 byte 0x02 Version 2
  9736. >>19 byte 0x00 \b.0
  9737. #------------------------------------------------------------------------------
  9738. # $File: editors,v 1.12 2020/10/11 20:28:07 christos Exp $
  9739. # T602 editor documents
  9740. # by David Necas <yeti@physics.muni.cz>
  9741. 0 string @CT\ T602 document data,
  9742. >4 string 0 Kamenicky
  9743. >4 string 1 CP 852
  9744. >4 string 2 KOI8-CS
  9745. >4 string >2 unknown encoding
  9746. # Vi IMproved Encrypted file
  9747. # by David Necas <yeti@physics.muni.cz>
  9748. # updated by Osman Surkatty
  9749. 0 string VimCrypt~ Vim encrypted file data
  9750. >9 string 01! with zip cryptmethod
  9751. >9 string 02! with blowfish cryptmethod
  9752. >9 string 03! with blowfish2 cryptmethod
  9753. 0 name vimnanoswap
  9754. >67 byte 0
  9755. >>107 byte 0
  9756. #>>>2 string x %s swap file
  9757. >>>24 ulelong x \b, pid %d
  9758. >>>28 string >\0 \b, user %s
  9759. >>>68 string >\0 \b, host %s
  9760. >>>108 string >\0 \b, file %s
  9761. >>>1007 byte 0x55 \b, modified
  9762. # Vi IMproved Swap file
  9763. # by Sven Wegener <swegener@gentoo.org>
  9764. 0 string b0VIM\ Vim swap file
  9765. >&0 string >\0 \b, version %s
  9766. >0 use vimnanoswap
  9767. # Lock/swap file for several editors, at least
  9768. # Vi IMproved and nano
  9769. 0 string b0nano Nano swap file
  9770. >0 use vimnanoswap
  9771. # kate (K Advanced Text Editor)
  9772. 0 string \x00\x00\x00\x12Kate\ Swap\ File\ 2.0\x00 Kate swap file
  9773. #------------------------------------------------------------------------------
  9774. # $File: efi,v 1.5 2014/04/30 21:41:02 christos Exp $
  9775. # efi: file(1) magic for Universal EFI binaries
  9776. 0 lelong 0x0ef1fab9
  9777. >4 lelong 1 Universal EFI binary with 1 architecture
  9778. >>&0 lelong 7 \b, i386
  9779. >>&0 lelong 0x01000007 \b, x86_64
  9780. >4 lelong 2 Universal EFI binary with 2 architectures
  9781. >>&0 lelong 7 \b, i386
  9782. >>&0 lelong 0x01000007 \b, x86_64
  9783. >>&20 lelong 7 \b, i386
  9784. >>&20 lelong 0x01000007 \b, x86_64
  9785. >4 lelong >2 Universal EFI binary with %d architectures
  9786. #------------------------------------------------------------------------------
  9787. # $File: elf,v 1.85 2021/03/27 20:18:38 christos Exp $
  9788. # elf: file(1) magic for ELF executables
  9789. #
  9790. # We have to check the byte order flag to see what byte order all the
  9791. # other stuff in the header is in.
  9792. #
  9793. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  9794. #
  9795. # Created by: unknown
  9796. # Modified by (1): Daniel Quinlan <quinlan@yggdrasil.com>
  9797. # Modified by (2): Peter Tobias <tobias@server.et-inf.fho-emden.de> (core support)
  9798. # Modified by (3): Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de> (fix of core support)
  9799. # Modified by (4): <gerardo.cacciari@gmail.com> (VMS Itanium)
  9800. # Modified by (5): Matthias Urlichs <smurf@debian.org> (Listing of many architectures)
  9801. 0 name elf-mips
  9802. >0 lelong&0xf0000000 0x00000000 MIPS-I
  9803. >0 lelong&0xf0000000 0x10000000 MIPS-II
  9804. >0 lelong&0xf0000000 0x20000000 MIPS-III
  9805. >0 lelong&0xf0000000 0x30000000 MIPS-IV
  9806. >0 lelong&0xf0000000 0x40000000 MIPS-V
  9807. >0 lelong&0xf0000000 0x50000000 MIPS32
  9808. >0 lelong&0xf0000000 0x60000000 MIPS64
  9809. >0 lelong&0xf0000000 0x70000000 MIPS32 rel2
  9810. >0 lelong&0xf0000000 0x80000000 MIPS64 rel2
  9811. >0 lelong&0xf0000000 0x90000000 MIPS32 rel6
  9812. >0 lelong&0xf0000000 0xa0000000 MIPS64 rel6
  9813. 0 name elf-sparc
  9814. >0 lelong&0x00ffff00 0x00000100 V8+ Required,
  9815. >0 lelong&0x00ffff00 0x00000200 Sun UltraSPARC1 Extensions Required,
  9816. >0 lelong&0x00ffff00 0x00000400 HaL R1 Extensions Required,
  9817. >0 lelong&0x00ffff00 0x00000800 Sun UltraSPARC3 Extensions Required,
  9818. >0 lelong&0x3 0 total store ordering,
  9819. >0 lelong&0x3 1 partial store ordering,
  9820. >0 lelong&0x3 2 relaxed memory ordering,
  9821. 0 name elf-pa-risc
  9822. >2 leshort 0x020b 1.0
  9823. >2 leshort 0x0210 1.1
  9824. >2 leshort 0x0214 2.0
  9825. >0 leshort &0x0008 (LP64)
  9826. 0 name elf-riscv
  9827. >0 lelong&0x00000001 0x00000001 RVC,
  9828. >0 lelong&0x00000008 0x00000008 RVE,
  9829. >0 lelong&0x00000006 0x00000000 soft-float ABI,
  9830. >0 lelong&0x00000006 0x00000002 single-float ABI,
  9831. >0 lelong&0x00000006 0x00000004 double-float ABI,
  9832. >0 lelong&0x00000006 0x00000006 quad-float ABI,
  9833. 0 name elf-le
  9834. >16 leshort 0 no file type,
  9835. !:mime application/octet-stream
  9836. >16 leshort 1 relocatable,
  9837. !:mime application/x-object
  9838. >16 leshort 2 executable,
  9839. !:mime application/x-executable
  9840. >16 leshort 3 ${x?pie executable:shared object},
  9841. !:mime application/x-${x?pie-executable:sharedlib}
  9842. >16 leshort 4 core file,
  9843. !:mime application/x-coredump
  9844. # OS-specific
  9845. >7 byte 202
  9846. >>16 leshort 0xFE01 executable,
  9847. !:mime application/x-executable
  9848. # Core file detection is not reliable.
  9849. #>>>(0x38+0xcc) string >\0 of '%s'
  9850. #>>>(0x38+0x10) lelong >0 (signal %d),
  9851. >16 leshort &0xff00
  9852. >>18 leshort !8 processor-specific,
  9853. >>18 leshort 8
  9854. >>>16 leshort 0xFF80 PlayStation 2 IOP module,
  9855. !:mime application/x-sharedlib
  9856. >>>16 leshort !0xFF80 processor-specific,
  9857. >18 clear x
  9858. >18 leshort 0 no machine,
  9859. >18 leshort 1 AT&T WE32100,
  9860. >18 leshort 2 SPARC,
  9861. >18 leshort 3 Intel 80386,
  9862. >18 leshort 4 Motorola m68k,
  9863. >>4 byte 1
  9864. >>>36 lelong &0x01000000 68000,
  9865. >>>36 lelong &0x00810000 CPU32,
  9866. >>>36 lelong 0 68020,
  9867. >18 leshort 5 Motorola m88k,
  9868. >18 leshort 6 Intel 80486,
  9869. >18 leshort 7 Intel 80860,
  9870. # The official e_machine number for MIPS is now #8, regardless of endianness.
  9871. # The second number (#10) will be deprecated later. For now, we still
  9872. # say something if #10 is encountered, but only gory details for #8.
  9873. >18 leshort 8 MIPS,
  9874. >>4 byte 1
  9875. >>>36 lelong &0x20 N32
  9876. >18 leshort 10 MIPS,
  9877. >>4 byte 1
  9878. >>>36 lelong &0x20 N32
  9879. >18 leshort 8
  9880. # only for 32-bit
  9881. >>4 byte 1
  9882. >>>36 use elf-mips
  9883. # only for 64-bit
  9884. >>4 byte 2
  9885. >>>48 use elf-mips
  9886. >18 leshort 9 Amdahl,
  9887. >18 leshort 10 MIPS (deprecated),
  9888. >18 leshort 11 RS6000,
  9889. >18 leshort 15 PA-RISC,
  9890. # only for 32-bit
  9891. >>4 byte 1
  9892. >>>36 use elf-pa-risc
  9893. # only for 64-bit
  9894. >>4 byte 2
  9895. >>>48 use elf-pa-risc
  9896. >18 leshort 16 nCUBE,
  9897. >18 leshort 17 Fujitsu VPP500,
  9898. >18 leshort 18 SPARC32PLUS,
  9899. # only for 32-bit
  9900. >>4 byte 1
  9901. >>>36 use elf-sparc
  9902. >18 leshort 19 Intel 80960,
  9903. >18 leshort 20 PowerPC or cisco 4500,
  9904. >18 leshort 21 64-bit PowerPC or cisco 7500,
  9905. >>48 lelong 0 Unspecified or Power ELF V1 ABI,
  9906. >>48 lelong 1 Power ELF V1 ABI,
  9907. >>48 lelong 2 OpenPOWER ELF V2 ABI,
  9908. >18 leshort 22 IBM S/390,
  9909. >18 leshort 23 Cell SPU,
  9910. >18 leshort 24 cisco SVIP,
  9911. >18 leshort 25 cisco 7200,
  9912. >18 leshort 36 NEC V800 or cisco 12000,
  9913. >18 leshort 37 Fujitsu FR20,
  9914. >18 leshort 38 TRW RH-32,
  9915. >18 leshort 39 Motorola RCE,
  9916. >18 leshort 40 ARM,
  9917. >>4 byte 1
  9918. >>>36 lelong&0xff000000 0x04000000 EABI4
  9919. >>>36 lelong&0xff000000 0x05000000 EABI5
  9920. >>>36 lelong &0x00800000 BE8
  9921. >>>36 lelong &0x00400000 LE8
  9922. >18 leshort 41 Alpha,
  9923. >18 leshort 42 Renesas SH,
  9924. >18 leshort 43 SPARC V9,
  9925. >>4 byte 2
  9926. >>>48 use elf-sparc
  9927. >18 leshort 44 Siemens Tricore Embedded Processor,
  9928. >18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
  9929. >18 leshort 46 Renesas H8/300,
  9930. >18 leshort 47 Renesas H8/300H,
  9931. >18 leshort 48 Renesas H8S,
  9932. >18 leshort 49 Renesas H8/500,
  9933. >18 leshort 50 IA-64,
  9934. >18 leshort 51 Stanford MIPS-X,
  9935. >18 leshort 52 Motorola Coldfire,
  9936. >18 leshort 53 Motorola M68HC12,
  9937. >18 leshort 54 Fujitsu MMA,
  9938. >18 leshort 55 Siemens PCP,
  9939. >18 leshort 56 Sony nCPU,
  9940. >18 leshort 57 Denso NDR1,
  9941. >18 leshort 58 Start*Core,
  9942. >18 leshort 59 Toyota ME16,
  9943. >18 leshort 60 ST100,
  9944. >18 leshort 61 Tinyj emb.,
  9945. >18 leshort 62 x86-64,
  9946. >18 leshort 63 Sony DSP,
  9947. >18 leshort 64 DEC PDP-10,
  9948. >18 leshort 65 DEC PDP-11,
  9949. >18 leshort 66 FX66,
  9950. >18 leshort 67 ST9+ 8/16 bit,
  9951. >18 leshort 68 ST7 8 bit,
  9952. >18 leshort 69 MC68HC16,
  9953. >18 leshort 70 MC68HC11,
  9954. >18 leshort 71 MC68HC08,
  9955. >18 leshort 72 MC68HC05,
  9956. >18 leshort 73 SGI SVx or Cray NV1,
  9957. >18 leshort 74 ST19 8 bit,
  9958. >18 leshort 75 Digital VAX,
  9959. >18 leshort 76 Axis cris,
  9960. >18 leshort 77 Infineon 32-bit embedded,
  9961. >18 leshort 78 Element 14 64-bit DSP,
  9962. >18 leshort 79 LSI Logic 16-bit DSP,
  9963. >18 leshort 80 MMIX,
  9964. >18 leshort 81 Harvard machine-independent,
  9965. >18 leshort 82 SiTera Prism,
  9966. >18 leshort 83 Atmel AVR 8-bit,
  9967. >18 leshort 84 Fujitsu FR30,
  9968. >18 leshort 85 Mitsubishi D10V,
  9969. >18 leshort 86 Mitsubishi D30V,
  9970. >18 leshort 87 NEC v850,
  9971. >18 leshort 88 Renesas M32R,
  9972. >18 leshort 89 Matsushita MN10300,
  9973. >18 leshort 90 Matsushita MN10200,
  9974. >18 leshort 91 picoJava,
  9975. >18 leshort 92 OpenRISC,
  9976. >18 leshort 93 Synopsys ARCompact ARC700 cores,
  9977. >18 leshort 94 Tensilica Xtensa,
  9978. >18 leshort 95 Alphamosaic VideoCore,
  9979. >18 leshort 96 Thompson Multimedia,
  9980. >18 leshort 97 NatSemi 32k,
  9981. >18 leshort 98 Tenor Network TPC,
  9982. >18 leshort 99 Trebia SNP 1000,
  9983. >18 leshort 100 STMicroelectronics ST200,
  9984. >18 leshort 101 Ubicom IP2022,
  9985. >18 leshort 102 MAX Processor,
  9986. >18 leshort 103 NatSemi CompactRISC,
  9987. >18 leshort 104 Fujitsu F2MC16,
  9988. >18 leshort 105 TI msp430,
  9989. >18 leshort 106 Analog Devices Blackfin,
  9990. >18 leshort 107 S1C33 Family of Seiko Epson,
  9991. >18 leshort 108 Sharp embedded,
  9992. >18 leshort 109 Arca RISC,
  9993. >18 leshort 110 PKU-Unity Ltd.,
  9994. >18 leshort 111 eXcess: 16/32/64-bit,
  9995. >18 leshort 112 Icera Deep Execution Processor,
  9996. >18 leshort 113 Altera Nios II,
  9997. >18 leshort 114 NatSemi CRX,
  9998. >18 leshort 115 Motorola XGATE,
  9999. >18 leshort 116 Infineon C16x/XC16x,
  10000. >18 leshort 117 Renesas M16C series,
  10001. >18 leshort 118 Microchip dsPIC30F,
  10002. >18 leshort 119 Freescale RISC core,
  10003. >18 leshort 120 Renesas M32C series,
  10004. >18 leshort 131 Altium TSK3000 core,
  10005. >18 leshort 132 Freescale RS08,
  10006. >18 leshort 134 Cyan Technology eCOG2,
  10007. >18 leshort 135 Sunplus S+core7 RISC,
  10008. >18 leshort 136 New Japan Radio (NJR) 24-bit DSP,
  10009. >18 leshort 137 Broadcom VideoCore III,
  10010. >18 leshort 138 LatticeMico32,
  10011. >18 leshort 139 Seiko Epson C17 family,
  10012. >18 leshort 140 TI TMS320C6000 DSP family,
  10013. >18 leshort 141 TI TMS320C2000 DSP family,
  10014. >18 leshort 142 TI TMS320C55x DSP family,
  10015. >18 leshort 144 TI Programmable Realtime Unit
  10016. >18 leshort 160 STMicroelectronics 64bit VLIW DSP,
  10017. >18 leshort 161 Cypress M8C,
  10018. >18 leshort 162 Renesas R32C series,
  10019. >18 leshort 163 NXP TriMedia family,
  10020. >18 leshort 164 QUALCOMM DSP6,
  10021. >18 leshort 165 Intel 8051 and variants,
  10022. >18 leshort 166 STMicroelectronics STxP7x family,
  10023. >18 leshort 167 Andes embedded RISC,
  10024. >18 leshort 168 Cyan eCOG1X family,
  10025. >18 leshort 169 Dallas MAXQ30,
  10026. >18 leshort 170 New Japan Radio (NJR) 16-bit DSP,
  10027. >18 leshort 171 M2000 Reconfigurable RISC,
  10028. >18 leshort 172 Cray NV2 vector architecture,
  10029. >18 leshort 173 Renesas RX family,
  10030. >18 leshort 174 META,
  10031. >18 leshort 175 MCST Elbrus,
  10032. >18 leshort 176 Cyan Technology eCOG16 family,
  10033. >18 leshort 177 NatSemi CompactRISC,
  10034. >18 leshort 178 Freescale Extended Time Processing Unit,
  10035. >18 leshort 179 Infineon SLE9X,
  10036. >18 leshort 180 Intel L1OM,
  10037. >18 leshort 181 Intel K1OM,
  10038. >18 leshort 183 ARM aarch64,
  10039. >18 leshort 185 Atmel 32-bit family,
  10040. >18 leshort 186 STMicroeletronics STM8 8-bit,
  10041. >18 leshort 187 Tilera TILE64,
  10042. >18 leshort 188 Tilera TILEPro,
  10043. >18 leshort 189 Xilinx MicroBlaze 32-bit RISC,
  10044. >18 leshort 190 NVIDIA CUDA architecture,
  10045. >18 leshort 191 Tilera TILE-Gx,
  10046. >18 leshort 195 Synopsys ARCv2/HS3x/HS4x cores,
  10047. >18 leshort 197 Renesas RL78 family,
  10048. >18 leshort 199 Renesas 78K0R,
  10049. >18 leshort 200 Freescale 56800EX,
  10050. >18 leshort 201 Beyond BA1,
  10051. >18 leshort 202 Beyond BA2,
  10052. >18 leshort 203 XMOS xCORE,
  10053. >18 leshort 204 Microchip 8-bit PIC(r),
  10054. >18 leshort 210 KM211 KM32,
  10055. >18 leshort 211 KM211 KMX32,
  10056. >18 leshort 212 KM211 KMX16,
  10057. >18 leshort 213 KM211 KMX8,
  10058. >18 leshort 214 KM211 KVARC,
  10059. >18 leshort 215 Paneve CDP,
  10060. >18 leshort 216 Cognitive Smart Memory,
  10061. >18 leshort 217 iCelero CoolEngine,
  10062. >18 leshort 218 Nanoradio Optimized RISC,
  10063. >18 leshort 243 UCB RISC-V,
  10064. # only for 32-bit
  10065. >>4 byte 1
  10066. >>>36 use elf-riscv
  10067. # only for 64-bit
  10068. >>4 byte 2
  10069. >>>48 use elf-riscv
  10070. >18 leshort 244 Lanai 32-bit processor,
  10071. >18 leshort 245 CEVA Processor Architecture Family,
  10072. >18 leshort 246 CEVA X2 Processor Family,
  10073. >18 leshort 247 eBPF,
  10074. >18 leshort 248 Graphcore Intelligent Processing Unit,
  10075. >18 leshort 249 Imagination Technologies,
  10076. >18 leshort 250 Netronome Flow Processor,
  10077. >18 leshort 251 NEC Vector Engine,
  10078. >18 leshort 252 C-SKY processor family,
  10079. >18 leshort 253 Synopsys ARCv3 64-bit ISA/HS6x cores,
  10080. >18 leshort 254 MOS Technology MCS 6502 processor,
  10081. >18 leshort 255 Synopsys ARCv3 32-bit,
  10082. >18 leshort 256 Kalray VLIW core of the MPPA family,
  10083. >18 leshort 257 WDC 65816/65C816,
  10084. >18 leshort 258 Loongson Loongarch,
  10085. >18 leshort 259 ChipON KungFu32,
  10086. >18 leshort 0x1057 AVR (unofficial),
  10087. >18 leshort 0x1059 MSP430 (unofficial),
  10088. >18 leshort 0x1223 Adapteva Epiphany (unofficial),
  10089. >18 leshort 0x2530 Morpho MT (unofficial),
  10090. >18 leshort 0x3330 FR30 (unofficial),
  10091. >18 leshort 0x3426 OpenRISC (obsolete),
  10092. >18 leshort 0x4688 Infineon C166 (unofficial),
  10093. >18 leshort 0x5441 Cygnus FRV (unofficial),
  10094. >18 leshort 0x5aa5 DLX (unofficial),
  10095. >18 leshort 0x7650 Cygnus D10V (unofficial),
  10096. >18 leshort 0x7676 Cygnus D30V (unofficial),
  10097. >18 leshort 0x8217 Ubicom IP2xxx (unofficial),
  10098. >18 leshort 0x8472 OpenRISC (obsolete),
  10099. >18 leshort 0x9025 Cygnus PowerPC (unofficial),
  10100. >18 leshort 0x9026 Alpha (unofficial),
  10101. >18 leshort 0x9041 Cygnus M32R (unofficial),
  10102. >18 leshort 0x9080 Cygnus V850 (unofficial),
  10103. >18 leshort 0xa390 IBM S/390 (obsolete),
  10104. >18 leshort 0xabc7 Old Xtensa (unofficial),
  10105. >18 leshort 0xad45 xstormy16 (unofficial),
  10106. >18 leshort 0xbaab Old MicroBlaze (unofficial),,
  10107. >18 leshort 0xbeef Cygnus MN10300 (unofficial),
  10108. >18 leshort 0xdead Cygnus MN10200 (unofficial),
  10109. >18 leshort 0xf00d Toshiba MeP (unofficial),
  10110. >18 leshort 0xfeb0 Renesas M32C (unofficial),
  10111. >18 leshort 0xfeba Vitesse IQ2000 (unofficial),
  10112. >18 leshort 0xfebb NIOS (unofficial),
  10113. >18 leshort 0xfeed Moxie (unofficial),
  10114. >18 default x
  10115. >>18 leshort x *unknown arch 0x%x*
  10116. >20 lelong 0 invalid version
  10117. >20 lelong 1 version 1
  10118. 0 string \177ELF ELF
  10119. !:strength *2
  10120. >4 byte 0 invalid class
  10121. >4 byte 1 32-bit
  10122. >4 byte 2 64-bit
  10123. >5 byte 0 invalid byte order
  10124. >5 byte 1 LSB
  10125. >>0 use elf-le
  10126. >5 byte 2 MSB
  10127. >>0 use \^elf-le
  10128. >7 byte 0 (SYSV)
  10129. >7 byte 1 (HP-UX)
  10130. >7 byte 2 (NetBSD)
  10131. >7 byte 3 (GNU/Linux)
  10132. >7 byte 4 (GNU/Hurd)
  10133. >7 byte 5 (86Open)
  10134. >7 byte 6 (Solaris)
  10135. >7 byte 7 (Monterey)
  10136. >7 byte 8 (IRIX)
  10137. >7 byte 9 (FreeBSD)
  10138. >7 byte 10 (Tru64)
  10139. >7 byte 11 (Novell Modesto)
  10140. >7 byte 12 (OpenBSD)
  10141. >7 byte 13 (OpenVMS)
  10142. >7 byte 14 (HP NonStop Kernel)
  10143. >7 byte 15 (AROS Research Operating System)
  10144. >7 byte 16 (FenixOS)
  10145. >7 byte 17 (Nuxi CloudABI)
  10146. >7 byte 97 (ARM)
  10147. >7 byte 202 (Cafe OS)
  10148. >7 byte 255 (embedded)
  10149. #------------------------------------------------------------------------------
  10150. # $File: encore,v 1.7 2014/04/30 21:41:02 christos Exp $
  10151. # encore: file(1) magic for Encore machines
  10152. #
  10153. # XXX - needs to have the byte order specified (NS32K was little-endian,
  10154. # dunno whether they run the 88K in little-endian mode or not).
  10155. #
  10156. 0 short 0x154 Encore
  10157. >20 short 0x107 executable
  10158. >20 short 0x108 pure executable
  10159. >20 short 0x10b demand-paged executable
  10160. >20 short 0x10f unsupported executable
  10161. >12 long >0 not stripped
  10162. >22 short >0 - version %d
  10163. >22 short 0 -
  10164. #>4 date x stamp %s
  10165. 0 short 0x155 Encore unsupported executable
  10166. >12 long >0 not stripped
  10167. >22 short >0 - version %d
  10168. >22 short 0 -
  10169. #>4 date x stamp %s
  10170. #------------------------------------------------------------------------------
  10171. # $File: epoc,v 1.9 2013/12/21 14:28:15 christos Exp $
  10172. # EPOC : file(1) magic for EPOC documents [Psion Series 5/Osaris/Geofox 1]
  10173. # Stefan Praszalowicz <hpicollo@worldnet.fr> and Peter Breitenlohner <peb@mppmu.mpg.de>
  10174. # Useful information for improving this file can be found at:
  10175. # http://software.frodo.looijaard.name/psiconv/formats/Index.html
  10176. #------------------------------------------------------------------------------
  10177. 0 lelong 0x10000037 Psion Series 5
  10178. >4 lelong 0x10000039 font file
  10179. >4 lelong 0x1000003A printer driver
  10180. >4 lelong 0x1000003B clipboard
  10181. >4 lelong 0x10000042 multi-bitmap image
  10182. !:mime image/x-epoc-mbm
  10183. >4 lelong 0x1000006A application information file
  10184. >4 lelong 0x1000006D
  10185. >>8 lelong 0x1000007D Sketch image
  10186. !:mime image/x-epoc-sketch
  10187. >>8 lelong 0x1000007E voice note
  10188. >>8 lelong 0x1000007F Word file
  10189. !:mime application/x-epoc-word
  10190. >>8 lelong 0x10000085 OPL program (TextEd)
  10191. !:mime application/x-epoc-opl
  10192. >>8 lelong 0x10000087 Comms settings
  10193. >>8 lelong 0x10000088 Sheet file
  10194. !:mime application/x-epoc-sheet
  10195. >>8 lelong 0x100001C4 EasyFax initialisation file
  10196. >4 lelong 0x10000073 OPO module
  10197. !:mime application/x-epoc-opo
  10198. >4 lelong 0x10000074 OPL application
  10199. !:mime application/x-epoc-app
  10200. >4 lelong 0x1000008A exported multi-bitmap image
  10201. >4 lelong 0x1000016D
  10202. >>8 lelong 0x10000087 Comms names
  10203. 0 lelong 0x10000041 Psion Series 5 ROM multi-bitmap image
  10204. 0 lelong 0x10000050 Psion Series 5
  10205. >4 lelong 0x1000006D database
  10206. >>8 lelong 0x10000084 Agenda file
  10207. !:mime application/x-epoc-agenda
  10208. >>8 lelong 0x10000086 Data file
  10209. !:mime application/x-epoc-data
  10210. >>8 lelong 0x10000CEA Jotter file
  10211. !:mime application/x-epoc-jotter
  10212. >4 lelong 0x100000E4 ini file
  10213. 0 lelong 0x10000079 Psion Series 5 binary:
  10214. >4 lelong 0x00000000 DLL
  10215. >4 lelong 0x10000049 comms hardware library
  10216. >4 lelong 0x1000004A comms protocol library
  10217. >4 lelong 0x1000005D OPX
  10218. >4 lelong 0x1000006C application
  10219. >4 lelong 0x1000008D DLL
  10220. >4 lelong 0x100000AC logical device driver
  10221. >4 lelong 0x100000AD physical device driver
  10222. >4 lelong 0x100000E5 file transfer protocol
  10223. >4 lelong 0x100000E5 file transfer protocol
  10224. >4 lelong 0x10000140 printer definition
  10225. >4 lelong 0x10000141 printer definition
  10226. 0 lelong 0x1000007A Psion Series 5 executable
  10227. #------------------------------------------------------------------------------
  10228. # $File: erlang,v 1.7 2019/04/19 00:42:27 christos Exp $
  10229. # erlang: file(1) magic for Erlang JAM and BEAM files
  10230. # URL: https://www.erlang.org/faq/x779.html#AEN812
  10231. # OTP R3-R4
  10232. 0 string \0177BEAM! Old Erlang BEAM file
  10233. >6 short >0 - version %d
  10234. # OTP R5 and onwards
  10235. 0 string FOR1
  10236. >8 string BEAM Erlang BEAM file
  10237. # 4.2 version may have a copyright notice!
  10238. 4 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2
  10239. 79 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2
  10240. 4 string 1.0\ Fri\ Feb\ 3\ 09:55:56\ MET\ 1995 Erlang JAM file - version 4.3
  10241. 0 bequad 0x0000000000ABCDEF Erlang DETS file
  10242. # $File: espressif,v 1.2 2019/11/15 21:03:14 christos Exp $
  10243. # configuration dump of Tasmota firmware for ESP8266 based devices by Espressif
  10244. # URL: https://github.com/arendst/Sonoff-Tasmota/
  10245. # Reference: https://codeload.github.com/arendst/Sonoff-Tasmota/zip/release-6.2/
  10246. # Sonoff-Tasmota-release-6.2.zip/Sonoff-Tasmota-release-6.2/sonoff/settings.h
  10247. # From: Joerg Jenderek
  10248. #
  10249. # cfg_holder=4617=0x1209
  10250. 0 uleshort 4617
  10251. # remaining settings normally 0x5A+offset XORed; free_1D5[20] empty since 5.12.0e
  10252. >0x1D5 ubequad 0x2f30313233343536 configuration of Tasmota firmware (ESP8266)
  10253. !:mime application/x-tasmota-dmp
  10254. !:ext dmp
  10255. # version like 6.2.1.0 ~ 0x06020100 XORed to 0x63666262
  10256. >>11 ubyte^0x65 x \b, version %u
  10257. >>10 ubyte^0x64 x \b.%u
  10258. >>9 ubyte^0x63 x \b.%u
  10259. >>8 ubyte^0x62 x \b.%u
  10260. #>8 ubelong x (0x%x)
  10261. # hostname[33] XORed
  10262. >>0x165 ubyte^0x1BF x \b, hostname %c
  10263. >>0x166 ubyte^0x1C0 >037 \b%c
  10264. >>0x167 ubyte^0x1C1 >037 \b%c
  10265. >>0x168 ubyte^0x1C2 >037 \b%c
  10266. >>0x169 ubyte^0x1C3 >037 \b%c
  10267. >>0x16A ubyte^0x1C4 >037 \b%c
  10268. >>0x16B ubyte^0x1C5 >037 \b%c
  10269. >>0x16C ubyte^0x1C6 >037 \b%c
  10270. >>0x16D ubyte^0x1C7 >037 \b%c
  10271. >>0x16E ubyte^0x1C8 >037 \b%c
  10272. >>0x16F ubyte^0x1C9 >037 \b%c
  10273. >>0x170 ubyte^0x1CA >037 \b%c
  10274. >>0x171 ubyte^0x1CB >037 \b%c
  10275. >>0x172 ubyte^0x1CC >037 \b%c
  10276. >>0x173 ubyte^0x1CD >037 \b%c
  10277. >>0x174 ubyte^0x1CE >037 \b%c
  10278. >>0x175 ubyte^0x1CF >037 \b%c
  10279. >>0x176 ubyte^0x1D0 >037 \b%c
  10280. >>0x177 ubyte^0x1D1 >037 \b%c
  10281. >>0x178 ubyte^0x1D2 >037 \b%c
  10282. >>0x179 ubyte^0x1D3 >037 \b%c
  10283. >>0x17A ubyte^0x1D4 >037 \b%c
  10284. >>0x17B ubyte^0x1D5 >037 \b%c
  10285. >>0x17C ubyte^0x1D6 >037 \b%c
  10286. >>0x17D ubyte^0x1D7 >037 \b%c
  10287. >>0x17E ubyte^0x1D8 >037 \b%c
  10288. >>0x17F ubyte^0x1D9 >037 \b%c
  10289. >>0x180 ubyte^0x1DA >037 \b%c
  10290. >>0x181 ubyte^0x1DB >037 \b%c
  10291. >>0x182 ubyte^0x1DC >037 \b%c
  10292. >>0x183 ubyte^0x1DD >037 \b%c
  10293. >>0x184 ubyte^0x1DE >037 \b%c
  10294. >>0x185 ubyte^0x1DF >037 \b%c
  10295. #>>0x165 string x (%.33s)
  10296. #------------------------------------------------------------------------------
  10297. # $File: esri,v 1.5 2019/04/19 00:42:27 christos Exp $
  10298. # ESRI Shapefile format (.shp .shx .dbf=DBaseIII)
  10299. # Based on info from
  10300. # <URL:https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf>
  10301. 0 belong 9994 ESRI Shapefile
  10302. >4 belong =0
  10303. >8 belong =0
  10304. >12 belong =0
  10305. >16 belong =0
  10306. >20 belong =0
  10307. >28 lelong x version %d
  10308. >24 belong x length %d
  10309. >32 lelong =0 type Null Shape
  10310. >32 lelong =1 type Point
  10311. >32 lelong =3 type PolyLine
  10312. >32 lelong =5 type Polygon
  10313. >32 lelong =8 type MultiPoint
  10314. >32 lelong =11 type PointZ
  10315. >32 lelong =13 type PolyLineZ
  10316. >32 lelong =15 type PolygonZ
  10317. >32 lelong =18 type MultiPointZ
  10318. >32 lelong =21 type PointM
  10319. >32 lelong =23 type PolyLineM
  10320. >32 lelong =25 type PolygonM
  10321. >32 lelong =28 type MultiPointM
  10322. >32 lelong =31 type MultiPatch
  10323. #------------------------------------------------------------------------------
  10324. # $File: fcs,v 1.4 2009/09/19 16:28:09 christos Exp $
  10325. # fcs: file(1) magic for FCS (Flow Cytometry Standard) data files
  10326. # From Roger Leigh <roger@whinlatter.uklinux.net>
  10327. 0 string FCS1.0 Flow Cytometry Standard (FCS) data, version 1.0
  10328. 0 string FCS2.0 Flow Cytometry Standard (FCS) data, version 2.0
  10329. 0 string FCS3.0 Flow Cytometry Standard (FCS) data, version 3.0
  10330. #------------------------------------------------------------------------------
  10331. # $File: filesystems,v 1.140 2021/02/23 00:51:10 christos Exp $
  10332. # filesystems: file(1) magic for different filesystems
  10333. #
  10334. 0 name partid
  10335. >0 ubyte 0x00 Unused
  10336. >0 ubyte 0x01 12-bit FAT
  10337. >0 ubyte 0x02 XENIX /
  10338. >0 ubyte 0x03 XENIX /usr
  10339. >0 ubyte 0x04 16-bit FAT, less than 32M
  10340. >0 ubyte 0x05 extended partition
  10341. >0 ubyte 0x06 16-bit FAT, more than 32M
  10342. >0 ubyte 0x07 OS/2 HPFS, NTFS, QNX2, Adv. UNIX
  10343. >0 ubyte 0x08 AIX or os, or etc.
  10344. >0 ubyte 0x09 AIX boot partition or Coherent
  10345. >0 ubyte 0x0a O/2 boot manager or Coherent swap
  10346. >0 ubyte 0x0b 32-bit FAT
  10347. >0 ubyte 0x0c 32-bit FAT, LBA-mapped
  10348. >0 ubyte 0x0d 7XXX, LBA-mapped
  10349. >0 ubyte 0x0e 16-bit FAT, LBA-mapped
  10350. >0 ubyte 0x0f extended partition, LBA-mapped
  10351. >0 ubyte 0x10 OPUS
  10352. >0 ubyte 0x11 OS/2 DOS 12-bit FAT
  10353. >0 ubyte 0x12 Compaq diagnostics
  10354. >0 ubyte 0x14 OS/2 DOS 16-bit FAT <32M
  10355. >0 ubyte 0x16 OS/2 DOS 16-bit FAT >=32M
  10356. >0 ubyte 0x17 OS/2 hidden IFS
  10357. >0 ubyte 0x18 AST Windows swapfile
  10358. >0 ubyte 0x19 Willowtech Photon coS
  10359. >0 ubyte 0x1b hidden win95 fat 32
  10360. >0 ubyte 0x1c hidden win95 fat 32 lba
  10361. >0 ubyte 0x1d hidden win95 fat 16 lba
  10362. >0 ubyte 0x20 Willowsoft OFS1
  10363. >0 ubyte 0x21 reserved
  10364. >0 ubyte 0x23 reserved
  10365. >0 ubyte 0x24 NEC DOS
  10366. >0 ubyte 0x26 reserved
  10367. >0 ubyte 0x31 reserved
  10368. >0 ubyte 0x32 Alien Internet Services NOS
  10369. >0 ubyte 0x33 reserved
  10370. >0 ubyte 0x34 reserved
  10371. >0 ubyte 0x35 JFS on OS2
  10372. >0 ubyte 0x36 reserved
  10373. >0 ubyte 0x38 Theos
  10374. >0 ubyte 0x39 Plan 9, or Theos spanned
  10375. >0 ubyte 0x3a Theos ver 4 4gb partition
  10376. >0 ubyte 0x3b Theos ve 4 extended partition
  10377. >0 ubyte 0x3c PartitionMagic recovery
  10378. >0 ubyte 0x3d Hidden Netware
  10379. >0 ubyte 0x40 VENIX 286 or LynxOS
  10380. >0 ubyte 0x41 PReP
  10381. >0 ubyte 0x42 linux swap sharing DRDOS disk
  10382. >0 ubyte 0x43 linux sharing DRDOS disk
  10383. >0 ubyte 0x44 GoBack change utility
  10384. >0 ubyte 0x45 Boot US Boot manager
  10385. >0 ubyte 0x46 EUMEL/Elan or Ergos 3
  10386. >0 ubyte 0x47 EUMEL/Elan or Ergos 3
  10387. >0 ubyte 0x48 EUMEL/Elan or Ergos 3
  10388. >0 ubyte 0x4a ALFX/THIN filesystem for DOS
  10389. >0 ubyte 0x4c Oberon partition
  10390. >0 ubyte 0x4d QNX4.x
  10391. >0 ubyte 0x4e QNX4.x 2nd part
  10392. >0 ubyte 0x4f QNX4.x 3rd part
  10393. >0 ubyte 0x50 DM (disk manager)
  10394. >0 ubyte 0x51 DM6 Aux1 (or Novell)
  10395. >0 ubyte 0x52 CP/M or Microport SysV/AT
  10396. >0 ubyte 0x53 DM6 Aux3
  10397. >0 ubyte 0x54 DM6 DDO
  10398. >0 ubyte 0x55 EZ-Drive (disk manager)
  10399. >0 ubyte 0x56 Golden Bow (disk manager)
  10400. >0 ubyte 0x57 Drive PRO
  10401. >0 ubyte 0x5c Priam Edisk (disk manager)
  10402. >0 ubyte 0x61 SpeedStor
  10403. >0 ubyte 0x63 GNU HURD or Mach or Sys V/386
  10404. >0 ubyte 0x64 Novell Netware 2.xx or Speedstore
  10405. >0 ubyte 0x65 Novell Netware 3.xx
  10406. >0 ubyte 0x66 Novell 386 Netware
  10407. >0 ubyte 0x67 Novell
  10408. >0 ubyte 0x68 Novell
  10409. >0 ubyte 0x69 Novell
  10410. >0 ubyte 0x70 DiskSecure Multi-Boot
  10411. >0 ubyte 0x71 reserved
  10412. >0 ubyte 0x73 reserved
  10413. >0 ubyte 0x74 reserved
  10414. >0 ubyte 0x75 PC/IX
  10415. >0 ubyte 0x76 reserved
  10416. >0 ubyte 0x77 M2FS/M2CS partition
  10417. >0 ubyte 0x78 XOSL boot loader filesystem
  10418. >0 ubyte 0x80 MINIX until 1.4a
  10419. >0 ubyte 0x81 MINIX since 1.4b
  10420. >0 ubyte 0x82 Linux swap or Solaris
  10421. >0 ubyte 0x83 Linux native
  10422. >0 ubyte 0x84 OS/2 hidden C: drive
  10423. >0 ubyte 0x85 Linux extended partition
  10424. >0 ubyte 0x86 NT FAT volume set
  10425. >0 ubyte 0x87 NTFS volume set or HPFS mirrored
  10426. >0 ubyte 0x8a Linux Kernel AiR-BOOT partition
  10427. >0 ubyte 0x8b Legacy Fault tolerant FAT32
  10428. >0 ubyte 0x8c Legacy Fault tolerant FAT32 ext
  10429. >0 ubyte 0x8d Hidden free FDISK FAT12
  10430. >0 ubyte 0x8e Linux Logical Volume Manager
  10431. >0 ubyte 0x90 Hidden free FDISK FAT16
  10432. >0 ubyte 0x91 Hidden free FDISK DOS EXT
  10433. >0 ubyte 0x92 Hidden free FDISK FAT16 Big
  10434. >0 ubyte 0x93 Amoeba filesystem
  10435. >0 ubyte 0x94 Amoeba bad block table
  10436. >0 ubyte 0x95 MIT EXOPC native partitions
  10437. >0 ubyte 0x97 Hidden free FDISK FAT32
  10438. >0 ubyte 0x98 Datalight ROM-DOS Super-Boot
  10439. >0 ubyte 0x99 Mylex EISA SCSI
  10440. >0 ubyte 0x9a Hidden free FDISK FAT16 LBA
  10441. >0 ubyte 0x9b Hidden free FDISK EXT LBA
  10442. >0 ubyte 0x9f BSDI?
  10443. >0 ubyte 0xa0 IBM Thinkpad hibernation
  10444. >0 ubyte 0xa1 HP Volume expansion (SpeedStor)
  10445. >0 ubyte 0xa3 HP Volume expansion (SpeedStor)
  10446. >0 ubyte 0xa4 HP Volume expansion (SpeedStor)
  10447. >0 ubyte 0xa5 386BSD partition type
  10448. >0 ubyte 0xa6 OpenBSD partition type
  10449. >0 ubyte 0xa7 NeXTSTEP 486
  10450. >0 ubyte 0xa8 Apple UFS
  10451. >0 ubyte 0xa9 NetBSD partition type
  10452. >0 ubyte 0xaa Olivetty Fat12 1.44MB Service part
  10453. >0 ubyte 0xab Apple Boot
  10454. >0 ubyte 0xae SHAG OS filesystem
  10455. >0 ubyte 0xaf Apple HFS
  10456. >0 ubyte 0xb0 BootStar Dummy
  10457. >0 ubyte 0xb1 reserved
  10458. >0 ubyte 0xb3 reserved
  10459. >0 ubyte 0xb4 reserved
  10460. >0 ubyte 0xb6 reserved
  10461. >0 ubyte 0xb7 BSDI BSD/386 filesystem
  10462. >0 ubyte 0xb8 BSDI BSD/386 swap
  10463. >0 ubyte 0xbb Boot Wizard Hidden
  10464. >0 ubyte 0xbe Solaris 8 partition type
  10465. >0 ubyte 0xbf Solaris partition type
  10466. >0 ubyte 0xc0 CTOS
  10467. >0 ubyte 0xc1 DRDOS/sec (FAT-12)
  10468. >0 ubyte 0xc2 Hidden Linux
  10469. >0 ubyte 0xc3 Hidden Linux swap
  10470. >0 ubyte 0xc4 DRDOS/sec (FAT-16, < 32M)
  10471. >0 ubyte 0xc5 DRDOS/sec (EXT)
  10472. >0 ubyte 0xc6 DRDOS/sec (FAT-16, >= 32M)
  10473. >0 ubyte 0xc7 Syrinx (Cyrnix?) or HPFS disabled
  10474. >0 ubyte 0xc8 Reserved for DR-DOS 8.0+
  10475. >0 ubyte 0xc9 Reserved for DR-DOS 8.0+
  10476. >0 ubyte 0xca Reserved for DR-DOS 8.0+
  10477. >0 ubyte 0xcb DR-DOS 7.04+ Secured FAT32 CHS
  10478. >0 ubyte 0xcc DR-DOS 7.04+ Secured FAT32 LBA
  10479. >0 ubyte 0xcd CTOS Memdump
  10480. >0 ubyte 0xce DR-DOS 7.04+ FAT16X LBA
  10481. >0 ubyte 0xcf DR-DOS 7.04+ EXT LBA
  10482. >0 ubyte 0xd0 REAL/32 secure big partition
  10483. >0 ubyte 0xd1 Old Multiuser DOS FAT12
  10484. >0 ubyte 0xd4 Old Multiuser DOS FAT16 Small
  10485. >0 ubyte 0xd5 Old Multiuser DOS Extended
  10486. >0 ubyte 0xd6 Old Multiuser DOS FAT16 Big
  10487. >0 ubyte 0xd8 CP/M 86
  10488. >0 ubyte 0xdb CP/M or Concurrent CP/M
  10489. >0 ubyte 0xdd Hidden CTOS Memdump
  10490. >0 ubyte 0xde Dell PowerEdge Server utilities
  10491. >0 ubyte 0xdf DG/UX virtual disk manager
  10492. >0 ubyte 0xe0 STMicroelectronics ST AVFS
  10493. >0 ubyte 0xe1 DOS access or SpeedStor 12-bit
  10494. >0 ubyte 0xe3 DOS R/O or Storage Dimensions
  10495. >0 ubyte 0xe4 SpeedStor 16-bit FAT < 1024 cyl.
  10496. >0 ubyte 0xe5 reserved
  10497. >0 ubyte 0xe6 reserved
  10498. >0 ubyte 0xeb BeOS
  10499. >0 ubyte 0xee GPT Protective MBR
  10500. >0 ubyte 0xef EFI system partition
  10501. >0 ubyte 0xf0 Linux PA-RISC boot loader
  10502. >0 ubyte 0xf1 SpeedStor or Storage Dimensions
  10503. >0 ubyte 0xf2 DOS 3.3+ Secondary
  10504. >0 ubyte 0xf3 reserved
  10505. >0 ubyte 0xf4 SpeedStor large partition
  10506. >0 ubyte 0xf5 Prologue multi-volumen partition
  10507. >0 ubyte 0xf6 reserved
  10508. >0 ubyte 0xf9 pCache: ext2/ext3 persistent cache
  10509. >0 ubyte 0xfa Bochs x86 emulator
  10510. >0 ubyte 0xfb VMware File System
  10511. >0 ubyte 0xfc VMware Swap
  10512. >0 ubyte 0xfd Linux RAID partition persistent sb
  10513. >0 ubyte 0xfe LANstep or IBM PS/2 IML
  10514. >0 ubyte 0xff Xenix Bad Block Table
  10515. 0 string \366\366\366\366 PC formatted floppy with no filesystem
  10516. # Sun disk labels
  10517. # From /usr/include/sun/dklabel.h:
  10518. 0774 beshort 0xdabe
  10519. # modified by Joerg Jenderek, because original test
  10520. # succeeds for Cabinet archive dao360.dl_ with negative blocks
  10521. >0770 long >0 Sun disk label
  10522. >>0 string x '%s
  10523. >>>31 string >\0 \b%s
  10524. >>>>63 string >\0 \b%s
  10525. >>>>>95 string >\0 \b%s
  10526. >>0 string x \b'
  10527. >>0734 short >0 %d rpm,
  10528. >>0736 short >0 %d phys cys,
  10529. >>0740 short >0 %d alts/cyl,
  10530. >>0746 short >0 %d interleave,
  10531. >>0750 short >0 %d data cyls,
  10532. >>0752 short >0 %d alt cyls,
  10533. >>0754 short >0 %d heads/partition,
  10534. >>0756 short >0 %d sectors/track,
  10535. >>0764 long >0 start cyl %d,
  10536. >>0770 long x %d blocks
  10537. # Is there a boot block written 1 sector in?
  10538. >512 belong&077777777 0600407 \b, boot block present
  10539. # Joerg Jenderek: Smart Boot Manager backup file is 25 (MSDOS) or 41 (LINUX) byte header + first sectors of disk
  10540. # (http://btmgr.sourceforge.net/docs/user-guide-3.html)
  10541. 0 string SBMBAKUP_ Smart Boot Manager backup file
  10542. >9 string x \b, version %-5.5s
  10543. >>14 string =_
  10544. >>>15 string x %-.1s
  10545. >>>>16 string =_ \b.
  10546. >>>>>17 string x \b%-.1s
  10547. >>>>>>18 string =_ \b.
  10548. >>>>>>>19 string x \b%-.1s
  10549. >>>22 ubyte 0
  10550. >>>>21 ubyte x \b, from drive 0x%x
  10551. >>>22 ubyte >0
  10552. >>>>21 string x \b, from drive %s
  10553. >>>535 search/17 \x55\xAA
  10554. >>>>&-512 indirect x \b; contains
  10555. # updated by Joerg Jenderek at Nov 2012
  10556. # DOS Emulator image is 128 byte, null right padded header + harddisc image
  10557. 0 string DOSEMU\0
  10558. >0x27E leshort 0xAA55
  10559. #offset is 128
  10560. >>19 ubyte 128
  10561. >>>(19.b-1) ubyte 0x0 DOS Emulator image
  10562. >>>>7 ulelong >0 \b, %u heads
  10563. >>>>11 ulelong >0 \b, %d sectors/track
  10564. >>>>15 ulelong >0 \b, %d cylinders
  10565. >>>>128 indirect x \b; contains
  10566. # added by Joerg Jenderek at Nov 2012
  10567. # http://www.thenakedpc.com/articles/v04/08/0408-05.html
  10568. # Symantec (Peter Norton) Image.dat file consists of variable header, bootrecord, part of FAT and root directory data
  10569. 0 string PNCIHISK\0 Norton Utilities disc image data
  10570. # real x86 boot sector with jump instruction
  10571. >509 search/1026 \x55\xAA\xeb
  10572. >>&-1 indirect x \b; contains
  10573. # http://file-extension.net/seeker/file_extension_dat
  10574. 0 string PNCIUNDO Norton Disk Doctor UnDo file
  10575. #
  10576. # DOS/MBR boot sector updated by Joerg Jenderek at Sep 2007,May 2011,2013
  10577. # for any allowed sector sizes
  10578. 30 search/481 \x55\xAA
  10579. # to display DOS/MBR boot sector (40) before old one (strength=50+21),Syslinux bootloader (71),SYSLINUX MBR (37+36),NetBSD mbr (110),AdvanceMAME mbr (111)
  10580. # DOS BPB information (70) and after DOS floppy (120) like in previous file version
  10581. !:strength +65
  10582. # for sector sizes < 512 Bytes
  10583. >11 uleshort <512
  10584. >>(11.s-2) uleshort 0xAA55 DOS/MBR boot sector
  10585. # for sector sizes with 512 or more Bytes
  10586. >0x1FE leshort 0xAA55 DOS/MBR boot sector
  10587. # ExFAT
  10588. 3 string/w =EXFAT
  10589. >0x1FE leshort 0xAA55
  10590. >>0x6E ubyte 1
  10591. >>>0x6F ubyte 0x80
  10592. >>>0 ubyte 0xEB DOS/MBR boot sector,
  10593. >>>0x69 ubyte x ExFAT Filesystem version %d.
  10594. >>>0x68 ubyte x \b%d
  10595. >>>0x6d ubyte x \b, (1<<%d) sectors per cluster
  10596. >>>0x48 ulequad x \b, sectors %lld
  10597. >>>0x64 ulelong x \b, serial number 0x%x
  10598. # keep old DOS/MBR boot sector as dummy for mbr and bootloader displaying
  10599. # only for sector sizes with 512 or more Bytes
  10600. 0x1FE leshort 0xAA55 DOS/MBR boot sector
  10601. #
  10602. # to display information (50) before DOS BPB (strength=70) and after DOS floppy (120) like in old file version
  10603. !:strength +65
  10604. >2 string OSBS OS/BS MBR
  10605. # added by Joerg Jenderek at Feb 2013 according to https://thestarman.pcministry.com/asm/mbr/
  10606. # and https://en.wikipedia.org/wiki/Master_Boot_Record
  10607. # test for nearly all MS-DOS Master Boot Record initial program loader (IPL) is now done by
  10608. # characteristic assembler instructions: xor ax,ax;mov ss,ax;mov sp,7c00
  10609. >0 search/2 \x33\xc0\x8e\xd0\xbc\x00\x7c MS-MBR
  10610. # Microsoft Windows 95A and early ( https://thestarman.pcministry.com/asm/mbr/STDMBR.htm )
  10611. # assembler instructions: mov si,sp;push ax;pop es;push ax;pop ds;sti;cld
  10612. >>8 ubequad 0x8bf45007501ffbfc
  10613. # https://thestarman.pcministry.com/asm/mbr/200MBR.htm
  10614. >>>0x16 ubyte 0xF3 \b,DOS 2
  10615. >>>>219 regex Author\ -\ Author:
  10616. # found "David Litton" , "A Pehrsson "
  10617. >>>>>&0 string x "%s"
  10618. >>>0x16 ubyte 0xF2
  10619. # NEC MS-DOS 3.30 Rev. 3 . See https://thestarman.pcministry.com/asm/mbr/DOS33MBR.htm
  10620. # assembler instructions: mov di,077c;cmp word ptrl[di],a55a;jnz
  10621. >>>>0x22 ubequad 0xbf7c07813d5aa575 \b,NEC 3.3
  10622. # version MS-DOS 3.30 til MS-Windows 95A (WinVer=4.00.1111)
  10623. >>>>0x22 default x \b,D0S version 3.3-7.0
  10624. # error messages are printed by assembler instructions: mov si,06nn;...;int 10 (0xBEnn06;...)
  10625. # where nn is string offset varying for different languages
  10626. # "Invalid partition table" nn=0x8b for english version
  10627. >>>>>(0x49.b) string Invalid\ partition\ table english
  10628. >>>>>(0x49.b) string Ung\201ltige\ Partitionstabelle german
  10629. >>>>>(0x49.b) string Table\ de\ partition\ invalide french
  10630. >>>>>(0x49.b) string Tabela\ de\ parti\207ao\ inv\240lida portuguese
  10631. >>>>>(0x49.b) string Tabla\ de\ partici\242n\ no\ v\240lida spanish
  10632. >>>>>(0x49.b) string Tavola\ delle\ partizioni\ non\ valida italian
  10633. >>>>>0x49 ubyte >0 at offset 0x%x
  10634. >>>>>>(0x49.b) string >\0 "%s"
  10635. # "Error loading operating system" nn=0xa3 for english version
  10636. # "Fehler beim Laden des Betriebssystems" nn=0xa7 for german version
  10637. # "Erreur en chargeant syst\212me d'exploitation" nn=0xa7 for french version
  10638. # "Erro na inicializa\207ao do sistema operacional" nn=0xa7 for portuguese Brazilian version
  10639. # "Error al cargar sistema operativo" nn=0xa8 for spanish version
  10640. # "Errore durante il caricamento del sistema operativo" nn=0xae for italian version
  10641. >>>>>0x74 ubyte >0 at offset 0x%x
  10642. >>>>>>(0x74.b) string >\0 "%s"
  10643. # "Missing operating system" nn=0xc2 for english version
  10644. # "Betriebssystem fehlt" nn=0xcd for german version
  10645. # "Syst\212me d'exploitation absent" nn=0xd2 for french version
  10646. # "Sistema operacional nao encontrado" nn=0xd4 for portuguese Brazilian version
  10647. # "Falta sistema operativo" nn=0xca for spanish version
  10648. # "Sistema operativo mancante" nn=0xe2 for italian version
  10649. >>>>>0x79 ubyte >0 at offset 0x%x
  10650. >>>>>>(0x79.b) string >\0 "%s"
  10651. # Microsoft Windows 95B to XP (https://thestarman.pcministry.com/asm/mbr/95BMEMBR.htm)
  10652. # assembler instructions: push ax;pop es;push ax;pop ds;cld;mov si,7c1b
  10653. >>8 ubequad 0x5007501ffcbe1b7c
  10654. # assembler instructions: rep;movsb;retf;mov si,07be;mov cl,04
  10655. >>>24 ubequad 0xf3a4cbbebe07b104 9M
  10656. # "Invalid partition table" nn=0x10F for english version
  10657. # "Ung\201ltige Partitionstabelle" nn=0x10F for german version
  10658. # "Table de partition erron\202e" nn=0x10F for french version
  10659. # "\216\257\245\340\240\346\250\256\255\255\240\357 \341\250\341\342\245\254\240 \255\245 \255\240\251\244\245\255\240" nn=0x10F for russian version
  10660. >>>>(0x3C.b+0x0FF) string Invalid\ partition\ table english
  10661. >>>>(0x3C.b+0x0FF) string Ung\201ltige\ Partitionstabelle german
  10662. >>>>(0x3C.b+0x0FF) string Table\ de\ partition\ erron\202e french
  10663. >>>>(0x3C.b+0x0FF) string \215\245\257\340\240\242\250\253\354\255\240\357\ \342\240\241\253\250\346\240 russian
  10664. >>>>0x3C ubyte x at offset 0x%x+0xFF
  10665. >>>>(0x3C.b+0x0FF) string >\0 "%s"
  10666. # "Error loading operating system" nn=0x127 for english version
  10667. # "Fehler beim Laden des Betriebssystems" nn=0x12b for german version
  10668. # "Erreur lors du chargement du syst\212me d'exploitation" nn=0x12a for french version
  10669. # "\216\350\250\241\252\240 \257\340\250 \247\240\243\340\343\247\252\245 \256\257\245\340\240\346\250\256\255\255\256\251 \341\250\341\342\245\254\353" nn=0x12d for russian version
  10670. >>>>0xBD ubyte x at offset 0x1%x
  10671. >>>>(0xBD.b+0x100) string >\0 "%s"
  10672. # "Missing operating system" nn=0x146 for english version
  10673. # "Betriebssystem fehlt" nn=0x151 for german version
  10674. # "Syst\212me d'exploitation manquant" nn=0x15e for french version
  10675. # "\216\257\245\340\240\346\250\256\255\255\240\357 \341\250\341\342\245\254\240 \255\245 \255\240\251\244\245\255\240" nn=0x156 for russian version
  10676. >>>>0xA9 ubyte x at offset 0x1%x
  10677. >>>>(0xA9.b+0x100) string >\0 "%s"
  10678. # https://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm
  10679. # assembler instructions: rep;movsb;retf;mov BP,07be;mov cl,04
  10680. >>>24 ubequad 0xf3a4cbbdbe07b104 XP
  10681. # where xxyyzz are lower bits from offsets of error messages varying for different languages
  10682. >>>>0x1B4 ubelong&0x00FFFFFF 0x002c4463 english
  10683. >>>>0x1B4 ubelong&0x00FFFFFF 0x002c486e german
  10684. # "Invalid partition table" xx=0x12C for english version
  10685. # "Ung\201ltige Partitionstabelle" xx=0x12C for german version
  10686. >>>>0x1b5 ubyte >0 at offset 0x1%x
  10687. >>>>(0x1b5.b+0x100) string >\0 "%s"
  10688. # "Error loading operating system" yy=0x144 for english version
  10689. # "Fehler beim Laden des Betriebssystems" yy=0x148 for german version
  10690. >>>>0x1b6 ubyte >0 at offset 0x1%x
  10691. >>>>(0x1b6.b+0x100) string >\0 "%s"
  10692. # "Missing operating system" zz=0x163 for english version
  10693. # "Betriebssystem nicht vorhanden" zz=0x16e for german version
  10694. >>>>0x1b7 ubyte >0 at offset 0x1%x
  10695. >>>>(0x1b7.b+0x100) string >\0 "%s"
  10696. # Microsoft Windows Vista or 7
  10697. # assembler instructions: ..;mov ds,ax;mov si,7c00;mov di,..00
  10698. >>8 ubequad 0xc08ed8be007cbf00
  10699. # Microsoft Windows Vista (https://thestarman.pcministry.com/asm/mbr/VistaMBR.htm)
  10700. # assembler instructions: jnz 0729;cmp ebx,"TCPA"
  10701. >>>0xEC ubequad 0x753b6681fb544350 Vista
  10702. # where xxyyzz are lower bits from offsets of error messages varying for different languages
  10703. >>>>0x1B4 ubelong&0x00FFFFFF 0x00627a99 english
  10704. #>>>>0x1B4 ubelong&0x00FFFFFF ? german
  10705. # "Invalid partition table" xx=0x162 for english version
  10706. # "Ung\201ltige Partitionstabelle" xx=0x1?? for german version
  10707. >>>>0x1b5 ubyte >0 at offset 0x1%x
  10708. >>>>(0x1b5.b+0x100) string >\0 "%s"
  10709. # "Error loading operating system" yy=0x17a for english version
  10710. # "Fehler beim Laden des Betriebssystems" yy= 0x1?? for german version
  10711. >>>>0x1b6 ubyte >0 at offset 0x1%x
  10712. >>>>(0x1b6.b+0x100) string >\0 "%s"
  10713. # "Missing operating system" zz=0x199 for english version
  10714. # "Betriebssystem nicht vorhanden" zz=0x1?? for german version
  10715. >>>>0x1b7 ubyte >0 at offset 0x1%x
  10716. >>>>(0x1b7.b+0x100) string >\0 "%s"
  10717. # Microsoft Windows 7 (https://thestarman.pcministry.com/asm/mbr/W7MBR.htm)
  10718. # assembler instructions: cmp ebx,"TCPA";cmp
  10719. >>>0xEC ubequad 0x6681fb5443504175 Windows 7
  10720. # where xxyyzz are lower bits from offsets of error messages varying for different languages
  10721. >>>>0x1B4 ubelong&0x00FFFFFF 0x00637b9a english
  10722. #>>>>0x1B4 ubelong&0x00FFFFFF ? german
  10723. # "Invalid partition table" xx=0x163 for english version
  10724. # "Ung\201ltige Partitionstabelle" xx=0x1?? for german version
  10725. >>>>0x1b5 ubyte >0 at offset 0x1%x
  10726. >>>>(0x1b5.b+0x100) string >\0 "%s"
  10727. # "Error loading operating system" yy=0x17b for english version
  10728. # "Fehler beim Laden des Betriebssystems" yy=0x1?? for german version
  10729. >>>>0x1b6 ubyte >0 at offset 0x1%x
  10730. >>>>(0x1b6.b+0x100) string >\0 "%s"
  10731. # "Missing operating system" zz=0x19a for english version
  10732. # "Betriebssystem nicht vorhanden" zz=0x1?? for german version
  10733. >>>>0x1b7 ubyte >0 at offset 0x1%x
  10734. >>>>(0x1b7.b+0x100) string >\0 "%s"
  10735. # https://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm#DiskSigs
  10736. # https://en.wikipedia.org/wiki/MBR_disk_signature#ID
  10737. >>0x1b8 ulelong >0 \b, disk signature 0x%-.4x
  10738. # driveID/timestamp for Win 95B,98,98SE and ME. See https://thestarman.pcministry.com/asm/mbr/mystery.htm
  10739. >>0xDA uleshort 0
  10740. >>>0xDC ulelong >0 \b, created
  10741. # physical drive number (0x80-0xFF) when the Windows wrote that byte to the drive
  10742. >>>>0xDC ubyte x with driveID 0x%x
  10743. # hours, minutes and seconds
  10744. >>>>0xDf ubyte x at %x
  10745. >>>>0xDe ubyte x \b:%x
  10746. >>>>0xDd ubyte x \b:%x
  10747. # special case for Microsoft MS-DOS 3.21 spanish
  10748. # assembler instructions: cli;mov $0x30,%ax;mov %ax,%ss;mov
  10749. >0 ubequad 0xfab830008ed0bc00
  10750. # assembler instructions: $0x1f00,%sp;mov $0x80cb,%di;add %cl,(%bx,%si);in (%dx),%ax;mov
  10751. >>8 ubequad 0x1fbfcb800008ed8 MS-MBR,D0S version 3.21 spanish
  10752. # Microsoft MBR IPL end
  10753. # dr-dos with some upper-, lowercase variants
  10754. >0x9D string Invalid\ partition\ table$
  10755. >>181 string No\ Operating\ System$
  10756. >>>201 string Operating\ System\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
  10757. >0x9D string Invalid\ partition\ table$
  10758. >>181 string No\ operating\ system$
  10759. >>>201 string Operating\ system\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
  10760. >342 string Invalid\ partition\ table$
  10761. >>366 string No\ operating\ system$
  10762. >>>386 string Operating\ system\ load\ error$ \b, DR-DOS MBR, version 7.01 to 7.03
  10763. >295 string NEWLDR\0
  10764. >>302 string Bad\ PT\ $
  10765. >>>310 string No\ OS\ $
  10766. >>>>317 string OS\ load\ err$
  10767. >>>>>329 string Moved\ or\ missing\ IBMBIO.LDR\n\r
  10768. >>>>>>358 string Press\ any\ key\ to\ continue.\n\r$
  10769. >>>>>>>387 string Copyright\ (c)\ 1984,1998
  10770. >>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR)
  10771. #
  10772. # tests for different MS-DOS Master Boot Records (MBR) moved and merged
  10773. #
  10774. #>0x145 string Default:\ F \b, FREE-DOS MBR
  10775. #>0x14B string Default:\ F \b, FREE-DOS 1.0 MBR
  10776. >0x145 search/7 Default:\ F \b, FREE-DOS MBR
  10777. #>>313 string F0\ .\ .\ .
  10778. #>>>322 string disk\ 1
  10779. #>>>>382 string FAT3
  10780. >64 string no\ active\ partition\ found
  10781. >>96 string read\ error\ while\ reading\ drive \b, FREE-DOS Beta 0.9 MBR
  10782. # Ranish Partition Manager http://www.ranish.com/part/
  10783. >387 search/4 \0\ Error!\r
  10784. >>378 search/7 Virus!
  10785. >>>397 search/4 Booting\040
  10786. >>>>408 search/4 HD1/\0 \b, Ranish MBR (
  10787. >>>>>416 string Writing\ changes... \b2.37
  10788. >>>>>>438 ubyte x \b,0x%x dots
  10789. >>>>>>440 ubyte >0 \b,virus check
  10790. >>>>>>441 ubyte >0 \b,partition %c
  10791. #2.38,2.42,2.44
  10792. >>>>>416 string !Writing\ changes... \b
  10793. >>>>>>418 ubyte 1 \bvirus check,
  10794. >>>>>>419 ubyte x \b0x%x seconds
  10795. >>>>>>420 ubyte&0x0F >0 \b,partition
  10796. >>>>>>>420 ubyte&0x0F <5 \b %x
  10797. >>>>>>>420 ubyte&0x0F 0Xf \b ask
  10798. >>>>>420 ubyte x \b)
  10799. #
  10800. # SYSLINUX MBR moved
  10801. # https://www.acronis.de/
  10802. >362 string MBR\ Error\ \0\r
  10803. >>376 string ress\ any\ key\ to\040
  10804. >>>392 string boot\ from\ floppy...\0 \b, Acronis MBR
  10805. # added by Joerg Jenderek
  10806. # https://www.visopsys.org/
  10807. # https://partitionlogic.org.uk/
  10808. >309 string No\ bootable\ partition\ found\r
  10809. >>339 string I/O\ Error\ reading\ boot\ sector\r \b, Visopsys MBR
  10810. >349 string No\ bootable\ partition\ found\r
  10811. >>379 string I/O\ Error\ reading\ boot\ sector\r \b, simple Visopsys MBR
  10812. # bootloader, bootmanager
  10813. >0x40 string SBML
  10814. # label with 11 characters of FAT 12 bit filesystem
  10815. >>43 string SMART\ BTMGR
  10816. >>>430 string SBMK\ Bad!\r \b, Smart Boot Manager
  10817. # OEM-ID not always "SBM"
  10818. #>>>>3 strings SBM
  10819. >>>>6 string >\0 \b, version %s
  10820. >382 string XOSLLOADXCF \b, eXtended Operating System Loader
  10821. >6 string LILO \b, LInux i386 boot LOader
  10822. >>120 string LILO \b, version 22.3.4 SuSe
  10823. >>172 string LILO \b, version 22.5.8 Debian
  10824. # updated by Joerg Jenderek at Oct 2008
  10825. # variables according to grub-0.97/stage1/stage1.S or
  10826. # https://www.gnu.org/software/grub/manual/grub.html#Embedded-data
  10827. # usual values are marked with comments to get only information of strange GRUB loaders
  10828. >342 search/60 \0Geom\0
  10829. #>0 ulelong x %x=0x009048EB , 0x2a9048EB 0
  10830. >>0x41 ubyte <2
  10831. >>>0x3E ubyte >2 \b; GRand Unified Bootloader
  10832. # 0x3 for 0.5.95,0.93,0.94,0.96 0x4 for 1.90
  10833. >>>>0x3E ubyte x \b, stage1 version 0x%x
  10834. #If it is 0xFF, use a drive passed by BIOS
  10835. >>>>0x40 ubyte <0xFF \b, boot drive 0x%x
  10836. # in most case 0,1,0x2e for GRUB 0.5.95
  10837. >>>>0x41 ubyte >0 \b, LBA flag 0x%x
  10838. >>>>0x42 uleshort <0x8000 \b, stage2 address 0x%x
  10839. #>>>>0x42 uleshort =0x8000 \b, stage2 address 0x%x (usual)
  10840. >>>>0x42 uleshort >0x8000 \b, stage2 address 0x%x
  10841. #>>>>0x44 ulelong =1 \b, 1st sector stage2 0x%x (default)
  10842. >>>>0x44 ulelong >1 \b, 1st sector stage2 0x%x
  10843. >>>>0x48 uleshort <0x800 \b, stage2 segment 0x%x
  10844. #>>>>0x48 uleshort =0x800 \b, stage2 segment 0x%x (usual)
  10845. >>>>0x48 uleshort >0x800 \b, stage2 segment 0x%x
  10846. >>>>402 string Geom\0Hard\ Disk\0Read\0\ Error\0
  10847. >>>>>394 string stage1 \b, GRUB version 0.5.95
  10848. >>>>382 string Geom\0Hard\ Disk\0Read\0\ Error\0
  10849. >>>>>376 string GRUB\ \0 \b, GRUB version 0.93 or 1.94
  10850. >>>>383 string Geom\0Hard\ Disk\0Read\0\ Error\0
  10851. >>>>>377 string GRUB\ \0 \b, GRUB version 0.94
  10852. >>>>385 string Geom\0Hard\ Disk\0Read\0\ Error\0
  10853. >>>>>379 string GRUB\ \0 \b, GRUB version 0.95 or 0.96
  10854. >>>>391 string Geom\0Hard\ Disk\0Read\0\ Error\0
  10855. >>>>>385 string GRUB\ \0 \b, GRUB version 0.97
  10856. # unknown version
  10857. >>>343 string Geom\0Read\0\ Error\0
  10858. >>>>321 string Loading\ stage1.5 \b, GRUB version x.y
  10859. >>>380 string Geom\0Hard\ Disk\0Read\0\ Error\0
  10860. >>>>374 string GRUB\ \0 \b, GRUB version n.m
  10861. # SYSLINUX bootloader moved
  10862. >395 string chksum\0\ ERROR!\0 \b, Gujin bootloader
  10863. # http://www.bcdwb.de/bcdw/index_e.htm
  10864. >3 string BCDL
  10865. >>498 string BCDL\ \ \ \ BIN \b, Bootable CD Loader (1.50Z)
  10866. # mbr partition table entries updated by Joerg Jenderek at Sep 2013
  10867. # skip Norton Utilities disc image data
  10868. >3 string !IHISK
  10869. # skip Linux style boot sector starting with assembler instructions mov 0x7c0,ax;
  10870. >>0 belong !0xb8c0078e
  10871. # not Linux kernel
  10872. >>>514 string !HdrS
  10873. # not BeOS
  10874. >>>>422 string !Be\ Boot\ Loader
  10875. # jump over BPB instruction implies DOS bootsector or AdvanceMAME mbr
  10876. >>>>>0 ubelong&0xFD000000 =0xE9000000
  10877. # AdvanceMAME mbr
  10878. >>>>>>(1.b+2) ubequad 0xfa31c08ed88ec08e
  10879. >>>>>>>446 use partition-table
  10880. # mbr, Norton Utilities disc image data, or 2nd,etc. sector of x86 bootloader
  10881. >>>>>0 ubelong&0xFD000000 !0xE9000000
  10882. # skip FSInfosector
  10883. >>>>>>0 string !RRaA
  10884. # skip 3rd sector of MS x86 bootloader with assembler instructions cli;MOVZX EAX,BYTE PTR [BP+10];MOV ECX,
  10885. # https://thestarman.pcministry.com/asm/mbr/MSWIN41.htm
  10886. >>>>>>>0 ubequad !0xfa660fb64610668b
  10887. # skip 13rd sector of MS x86 bootloader
  10888. >>>>>>>>0 ubequad !0x660fb64610668b4e
  10889. # skip sector starting with DOS new line
  10890. >>>>>>>>>0 string !\r\n
  10891. # allowed active flag 0,80h-FFh
  10892. >>>>>>>>>>446 ubyte 0
  10893. >>>>>>>>>>>446 use partition-table
  10894. >>>>>>>>>>446 ubyte >0x7F
  10895. >>>>>>>>>>>446 use partition-table
  10896. # TODO: test for extended bootrecord (ebr) moved and merged with mbr partition table entries
  10897. # mbr partition table entries end
  10898. # https://www.acronis.de/
  10899. #FAT label=ACRONIS\ SZ
  10900. #OEM-ID=BOOTWIZ0
  10901. >442 string Non-system\ disk,\040
  10902. >>459 string press\ any\ key...\x7\0 \b, Acronis Startup Recovery Loader
  10903. # updated by Joerg Jenderek at Nov 2012, Sep 2013
  10904. # DOS names like F11.SYS or BOOTWIZ.SYS are 8 right space padded bytes+3 bytes
  10905. # display 1 space
  10906. >>>447 ubyte x \b
  10907. >>>477 use DOS-filename
  10908. #
  10909. >185 string FDBOOT\ Version\040
  10910. >>204 string \rNo\ Systemdisk.\040
  10911. >>>220 string Booting\ from\ harddisk.\n\r
  10912. >>>245 string Cannot\ load\ from\ harddisk.\n\r
  10913. >>>>273 string Insert\ Systemdisk\040
  10914. >>>>>291 string and\ press\ any\ key.\n\r \b, FDBOOT harddisk Bootloader
  10915. >>>>>>200 string >\0 \b, version %-3s
  10916. >242 string Bootsector\ from\ C.H.\ Hochst\204
  10917. # http://freecode.com/projects/dosfstools dosfstools-n.m/src/mkdosfs.c
  10918. # updated by Joerg Jenderek at Nov 2012. Use search directive with offset instead of string
  10919. # skip name "C.H. Hochstaetter" partly because it is sometimes written without umlaut
  10920. >242 search/127 Bootsector\ from\ C.H.\ Hochst
  10921. >>278 search/127 No\ Systemdisk.\ Booting\ from\ harddisk
  10922. # followed by variants with point,CR-NL or NL-CR
  10923. >>>208 search/261 Cannot\ load\ from\ harddisk.
  10924. # followed by variants CR-NL or NL-CR
  10925. >>>>236 search/235 Insert\ Systemdisk\ and\ press\ any\ key.
  10926. # followed by variants with point,CR-NL or NL-CR
  10927. >>>>>180 search/96 Disk\ formatted\ with\ WinImage\ \b, WinImage harddisk Bootloader
  10928. # followed by string like "6.50 (c) 1993-2004 Gilles Vollant"
  10929. >>>>>>&0 string x \b, version %-4.4s
  10930. >(1.b+2) ubyte 0xe
  10931. >>(1.b+3) ubyte 0x1f
  10932. >>>(1.b+4) ubyte 0xbe
  10933. # message offset found at (1.b+5) is 0x77 for FAT32 or 0x5b for others
  10934. >>>>(1.b+5) ubyte&0xd3 0x53
  10935. >>>>>(1.b+6) ubyte 0x7c
  10936. # assembler instructions: lodsb;and al,al;jz 0xb;push si;mov ah,
  10937. >>>>>>(1.b+7) ubyte 0xac
  10938. >>>>>>>(1.b+8) ubyte 0x22
  10939. >>>>>>>>(1.b+9) ubyte 0xc0
  10940. >>>>>>>>>(1.b+10) ubyte 0x74
  10941. >>>>>>>>>>(1.b+11) ubyte 0x0b
  10942. >>>>>>>>>>>(1.b+12) ubyte 0x56
  10943. >>>>>>>>>>>>(1.b+13) ubyte 0xb4 \b, mkdosfs boot message display
  10944. # FAT1X version
  10945. >>>>>>>>>>>>>(1.b+5) ubyte 0x5b
  10946. >>>>>>>>>>>>>>0x5b string >\0 "%-s"
  10947. # FAT32 version
  10948. >>>>>>>>>>>>>(1.b+5) ubyte 0x77
  10949. >>>>>>>>>>>>>>0x77 string >\0 "%-s"
  10950. >214 string Please\ try\ to\ install\ FreeDOS\ \b, DOS Emulator boot message display
  10951. #>>244 string from\ dosemu-freedos-*-bin.tgz\r
  10952. #>>>170 string Sorry,\ could\ not\ load\ an\040
  10953. #>>>>195 string operating\ system.\r\n
  10954. #
  10955. >103 string This\ is\ not\ a\ bootable\ disk.\040
  10956. >>132 string Please\ insert\ a\ bootable\040
  10957. >>>157 string floppy\ and\r\n
  10958. >>>>169 string press\ any\ key\ to\ try\ again...\r \b, FREE-DOS message display
  10959. #
  10960. >66 string Solaris\ Boot\ Sector
  10961. >>99 string Incomplete\ MDBoot\ load.
  10962. >>>89 string Version \b, Sun Solaris Bootloader
  10963. >>>>97 byte x version %c
  10964. #
  10965. >408 string OS/2\ !!\ SYS01475\r\0
  10966. >>429 string OS/2\ !!\ SYS02025\r\0
  10967. >>>450 string OS/2\ !!\ SYS02027\r\0
  10968. >>>469 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp bootloader
  10969. #
  10970. >409 string OS/2\ !!\ SYS01475\r\0
  10971. >>430 string OS/2\ !!\ SYS02025\r\0
  10972. >>>451 string OS/2\ !!\ SYS02027\r\0
  10973. >>>470 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp Bootloader
  10974. >112 string This\ disk\ is\ not\ bootable\r
  10975. >>142 string If\ you\ wish\ to\ make\ it\ bootable
  10976. >>>176 string run\ the\ DOS\ program\ SYS\040
  10977. >>>200 string after\ the\r
  10978. >>>>216 string system\ has\ been\ loaded\r\n
  10979. >>>>>242 string Please\ insert\ a\ DOS\ diskette\040
  10980. >>>>>271 string into\r\n\ the\ drive\ and\040
  10981. >>>>>>292 string strike\ any\ key...\0 \b, IBM OS/2 Warp message display
  10982. # XP
  10983. >430 string NTLDR\ is\ missing\xFF\r\n
  10984. >>449 string Disk\ error\xFF\r\n
  10985. >>>462 string Press\ any\ key\ to\ restart\r \b, Microsoft Windows XP Bootloader
  10986. # DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
  10987. >>>>417 ubyte&0xDF >0
  10988. >>>>>417 string x %-.5s
  10989. >>>>>>422 ubyte&0xDF >0
  10990. >>>>>>>422 string x \b%-.3s
  10991. >>>>>425 ubyte&0xDF >0
  10992. >>>>>>425 string >\ \b.%-.3s
  10993. #
  10994. >>>>371 ubyte >0x20
  10995. >>>>>368 ubyte&0xDF >0
  10996. >>>>>>368 string x %-.5s
  10997. >>>>>>>373 ubyte&0xDF >0
  10998. >>>>>>>>373 string x \b%-.3s
  10999. >>>>>>376 ubyte&0xDF >0
  11000. >>>>>>>376 string x \b.%-.3s
  11001. #
  11002. >430 string NTLDR\ nicht\ gefunden\xFF\r\n
  11003. >>453 string Datentr\204gerfehler\xFF\r\n
  11004. >>>473 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (german)
  11005. >>>>417 ubyte&0xDF >0
  11006. >>>>>417 string x %-.5s
  11007. >>>>>>422 ubyte&0xDF >0
  11008. >>>>>>>422 string x \b%-.3s
  11009. >>>>>425 ubyte&0xDF >0
  11010. >>>>>>425 string >\ \b.%-.3s
  11011. # offset variant
  11012. >>>>379 string \0
  11013. >>>>>368 ubyte&0xDF >0
  11014. >>>>>>368 string x %-.5s
  11015. >>>>>>>373 ubyte&0xDF >0
  11016. >>>>>>>>373 string x \b%-.3s
  11017. #
  11018. >430 string NTLDR\ fehlt\xFF\r\n
  11019. >>444 string Datentr\204gerfehler\xFF\r\n
  11020. >>>464 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (2.german)
  11021. >>>>417 ubyte&0xDF >0
  11022. >>>>>417 string x %-.5s
  11023. >>>>>>422 ubyte&0xDF >0
  11024. >>>>>>>422 string x \b%-.3s
  11025. >>>>>425 ubyte&0xDF >0
  11026. >>>>>>425 string >\ \b.%-.3s
  11027. # variant
  11028. >>>>371 ubyte >0x20
  11029. >>>>>368 ubyte&0xDF >0
  11030. >>>>>>368 string x %-.5s
  11031. >>>>>>>373 ubyte&0xDF >0
  11032. >>>>>>>>373 string x \b%-.3s
  11033. >>>>>>376 ubyte&0xDF >0
  11034. >>>>>>>376 string x \b.%-.3s
  11035. #
  11036. >430 string NTLDR\ fehlt\xFF\r\n
  11037. >>444 string Medienfehler\xFF\r\n
  11038. >>>459 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (3.german)
  11039. >>>>371 ubyte >0x20
  11040. >>>>>368 ubyte&0xDF >0
  11041. >>>>>>368 string x %-.5s
  11042. >>>>>>>373 ubyte&0xDF >0
  11043. >>>>>>>>373 string x \b%-.3s
  11044. >>>>>>376 ubyte&0xDF >0
  11045. >>>>>>>376 string x \b.%-.3s
  11046. # variant
  11047. >>>>417 ubyte&0xDF >0
  11048. >>>>>417 string x %-.5s
  11049. >>>>>>422 ubyte&0xDF >0
  11050. >>>>>>>422 string x \b%-.3s
  11051. >>>>>425 ubyte&0xDF >0
  11052. >>>>>>425 string >\ \b.%-.3s
  11053. #
  11054. >430 string Datentr\204ger\ entfernen\xFF\r\n
  11055. >>454 string Medienfehler\xFF\r\n
  11056. >>>469 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (4.german)
  11057. >>>>379 string \0
  11058. >>>>>368 ubyte&0xDF >0
  11059. >>>>>>368 string x %-.5s
  11060. >>>>>>>373 ubyte&0xDF >0
  11061. >>>>>>>>373 string x \b%-.3s
  11062. >>>>>>376 ubyte&0xDF >0
  11063. >>>>>>>376 string x \b.%-.3s
  11064. # variant
  11065. >>>>417 ubyte&0xDF >0
  11066. >>>>>417 string x %-.5s
  11067. >>>>>>422 ubyte&0xDF >0
  11068. >>>>>>>422 string x \b%-.3s
  11069. >>>>>425 ubyte&0xDF >0
  11070. >>>>>>425 string >\ \b.%-.3s
  11071. #
  11072. #>3 string NTFS\ \ \ \040
  11073. >389 string Fehler\ beim\ Lesen\040
  11074. >>407 string des\ Datentr\204gers
  11075. >>>426 string NTLDR\ fehlt
  11076. >>>>440 string NTLDR\ ist\ komprimiert
  11077. >>>>>464 string Neustart\ mit\ Strg+Alt+Entf\r \b, Microsoft Windows XP Bootloader NTFS (german)
  11078. #>3 string NTFS\ \ \ \040
  11079. >313 string A\ disk\ read\ error\ occurred.\r
  11080. >>345 string A\ kernel\ file\ is\ missing\040
  11081. >>>370 string from\ the\ disk.\r
  11082. >>>>484 string NTLDR\ is\ compressed
  11083. >>>>>429 string Insert\ a\ system\ diskette\040
  11084. >>>>>>454 string and\ restart\r\nthe\ system.\r \b, Microsoft Windows XP Bootloader NTFS
  11085. # DOS loader variants different languages,offsets
  11086. >472 ubyte&0xDF >0
  11087. >>389 string Invalid\ system\ disk\xFF\r\n
  11088. >>>411 string Disk\ I/O\ error
  11089. >>>>428 string Replace\ the\ disk,\ and\040
  11090. >>>>>455 string press\ any\ key \b, Microsoft Windows 98 Bootloader
  11091. #IO.SYS
  11092. >>>>>>472 ubyte&0xDF >0
  11093. >>>>>>>472 string x \b %-.2s
  11094. >>>>>>>>474 ubyte&0xDF >0
  11095. >>>>>>>>>474 string x \b%-.5s
  11096. >>>>>>>>>>479 ubyte&0xDF >0
  11097. >>>>>>>>>>>479 string x \b%-.1s
  11098. >>>>>>>480 ubyte&0xDF >0
  11099. >>>>>>>>480 string x \b.%-.3s
  11100. #MSDOS.SYS
  11101. >>>>>>>483 ubyte&0xDF >0 \b+
  11102. >>>>>>>>483 string x \b%-.5s
  11103. >>>>>>>>>488 ubyte&0xDF >0
  11104. >>>>>>>>>>488 string x \b%-.3s
  11105. >>>>>>>>491 ubyte&0xDF >0
  11106. >>>>>>>>>491 string x \b.%-.3s
  11107. #
  11108. >>390 string Invalid\ system\ disk\xFF\r\n
  11109. >>>412 string Disk\ I/O\ error\xFF\r\n
  11110. >>>>429 string Replace\ the\ disk,\ and\040
  11111. >>>>>451 string then\ press\ any\ key\r \b, Microsoft Windows 98 Bootloader
  11112. >>388 string Ungueltiges\ System\ \xFF\r\n
  11113. >>>410 string E/A-Fehler\ \ \ \ \xFF\r\n
  11114. >>>>427 string Datentraeger\ wechseln\ und\040
  11115. >>>>>453 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (german)
  11116. #WINBOOT.SYS only not spaces (0xDF)
  11117. >>>>>>497 ubyte&0xDF >0
  11118. >>>>>>>497 string x %-.5s
  11119. >>>>>>>>502 ubyte&0xDF >0
  11120. >>>>>>>>>502 string x \b%-.1s
  11121. >>>>>>>>>>503 ubyte&0xDF >0
  11122. >>>>>>>>>>>503 string x \b%-.1s
  11123. >>>>>>>>>>>>504 ubyte&0xDF >0
  11124. >>>>>>>>>>>>>504 string x \b%-.1s
  11125. >>>>>>505 ubyte&0xDF >0
  11126. >>>>>>>505 string x \b.%-.3s
  11127. #IO.SYS
  11128. >>>>>>472 ubyte&0xDF >0 or
  11129. >>>>>>>472 string x \b %-.2s
  11130. >>>>>>>>474 ubyte&0xDF >0
  11131. >>>>>>>>>474 string x \b%-.5s
  11132. >>>>>>>>>>479 ubyte&0xDF >0
  11133. >>>>>>>>>>>479 string x \b%-.1s
  11134. >>>>>>>480 ubyte&0xDF >0
  11135. >>>>>>>>480 string x \b.%-.3s
  11136. #MSDOS.SYS
  11137. >>>>>>>483 ubyte&0xDF >0 \b+
  11138. >>>>>>>>483 string x \b%-.5s
  11139. >>>>>>>>>488 ubyte&0xDF >0
  11140. >>>>>>>>>>488 string x \b%-.3s
  11141. >>>>>>>>491 ubyte&0xDF >0
  11142. >>>>>>>>>491 string x \b.%-.3s
  11143. #
  11144. >>390 string Ungueltiges\ System\ \xFF\r\n
  11145. >>>412 string E/A-Fehler\ \ \ \ \xFF\r\n
  11146. >>>>429 string Datentraeger\ wechseln\ und\040
  11147. >>>>>455 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (German)
  11148. #WINBOOT.SYS only not spaces (0xDF)
  11149. >>>>>>497 ubyte&0xDF >0
  11150. >>>>>>>497 string x %-.7s
  11151. >>>>>>>>504 ubyte&0xDF >0
  11152. >>>>>>>>>504 string x \b%-.1s
  11153. >>>>>>505 ubyte&0xDF >0
  11154. >>>>>>>505 string x \b.%-.3s
  11155. #IO.SYS
  11156. >>>>>>472 ubyte&0xDF >0 or
  11157. >>>>>>>472 string x \b %-.2s
  11158. >>>>>>>>474 ubyte&0xDF >0
  11159. >>>>>>>>>474 string x \b%-.6s
  11160. >>>>>>>480 ubyte&0xDF >0
  11161. >>>>>>>>480 string x \b.%-.3s
  11162. #MSDOS.SYS
  11163. >>>>>>>483 ubyte&0xDF >0 \b+
  11164. >>>>>>>>483 string x \b%-.5s
  11165. >>>>>>>>>488 ubyte&0xDF >0
  11166. >>>>>>>>>>488 string x \b%-.3s
  11167. >>>>>>>>491 ubyte&0xDF >0
  11168. >>>>>>>>>491 string x \b.%-.3s
  11169. #
  11170. >>389 string Ungueltiges\ System\ \xFF\r\n
  11171. >>>411 string E/A-Fehler\ \ \ \ \xFF\r\n
  11172. >>>>428 string Datentraeger\ wechseln\ und\040
  11173. >>>>>454 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
  11174. # DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
  11175. >>>>>>472 string x %-.2s
  11176. >>>>>>>474 ubyte&0xDF >0
  11177. >>>>>>>>474 string x \b%-.5s
  11178. >>>>>>>>479 ubyte&0xDF >0
  11179. >>>>>>>>>479 string x \b%-.1s
  11180. >>>>>>480 ubyte&0xDF >0
  11181. >>>>>>>480 string x \b.%-.3s
  11182. >>>>>>483 ubyte&0xDF >0 \b+
  11183. >>>>>>>483 string x \b%-.5s
  11184. >>>>>>>488 ubyte&0xDF >0
  11185. >>>>>>>>488 string x \b%-.2s
  11186. >>>>>>>>490 ubyte&0xDF >0
  11187. >>>>>>>>>490 string x \b%-.1s
  11188. >>>>>>>491 ubyte&0xDF >0
  11189. >>>>>>>>491 string x \b.%-.3s
  11190. >479 ubyte&0xDF >0
  11191. >>416 string Kein\ System\ oder\040
  11192. >>>433 string Laufwerksfehler
  11193. >>>>450 string Wechseln\ und\ Taste\ dr\201cken \b, Microsoft DOS Bootloader (german)
  11194. #IO.SYS
  11195. >>>>>479 string x \b %-.2s
  11196. >>>>>>481 ubyte&0xDF >0
  11197. >>>>>>>481 string x \b%-.6s
  11198. >>>>>487 ubyte&0xDF >0
  11199. >>>>>>487 string x \b.%-.3s
  11200. #MSDOS.SYS
  11201. >>>>>>490 ubyte&0xDF >0 \b+
  11202. >>>>>>>490 string x \b%-.5s
  11203. >>>>>>>>495 ubyte&0xDF >0
  11204. >>>>>>>>>495 string x \b%-.3s
  11205. >>>>>>>498 ubyte&0xDF >0
  11206. >>>>>>>>498 string x \b.%-.3s
  11207. #
  11208. >376 search/41 Non-System\ disk\ or\040
  11209. >>395 search/41 disk\ error\r
  11210. >>>407 search/41 Replace\ and\040
  11211. >>>>419 search/41 press\ \b,
  11212. >>>>419 search/41 strike\ \b, old
  11213. >>>>426 search/41 any\ key\ when\ ready\r MS or PC-DOS bootloader
  11214. #449 Disk\ Boot\ failure\r MS 3.21
  11215. #466 Boot\ Failure\r MS 3.30
  11216. >>>>>468 search/18 \0
  11217. #IO.SYS,IBMBIO.COM
  11218. >>>>>>&0 string x \b %-.2s
  11219. >>>>>>>&-20 ubyte&0xDF >0
  11220. >>>>>>>>&-1 string x \b%-.4s
  11221. >>>>>>>>>&-16 ubyte&0xDF >0
  11222. >>>>>>>>>>&-1 string x \b%-.2s
  11223. >>>>>>&8 ubyte&0xDF >0 \b.
  11224. >>>>>>>&-1 string x \b%-.3s
  11225. #MSDOS.SYS,IBMDOS.COM
  11226. >>>>>>&11 ubyte&0xDF >0 \b+
  11227. >>>>>>>&-1 string x \b%-.5s
  11228. >>>>>>>>&-6 ubyte&0xDF >0
  11229. >>>>>>>>>&-1 string x \b%-.1s
  11230. >>>>>>>>>>&-5 ubyte&0xDF >0
  11231. >>>>>>>>>>>&-1 string x \b%-.2s
  11232. >>>>>>>&7 ubyte&0xDF >0 \b.
  11233. >>>>>>>>&-1 string x \b%-.3s
  11234. >441 string Cannot\ load\ from\ harddisk.\n\r
  11235. >>469 string Insert\ Systemdisk\040
  11236. >>>487 string and\ press\ any\ key.\n\r \b, MS (2.11) DOS bootloader
  11237. #>43 string \224R-LOADER\ \ SYS =label
  11238. >54 string SYS
  11239. >>324 string VASKK
  11240. >>>495 string NEWLDR\0 \b, DR-DOS Bootloader (LOADER.SYS)
  11241. #
  11242. >98 string Press\ a\ key\ to\ retry\0\r
  11243. >>120 string Cannot\ find\ file\ \0\r
  11244. >>>139 string Disk\ read\ error\0\r
  11245. >>>>156 string Loading\ ...\0 \b, DR-DOS (3.41) Bootloader
  11246. #DRBIOS.SYS
  11247. >>>>>44 ubyte&0xDF >0
  11248. >>>>>>44 string x \b %-.6s
  11249. >>>>>>>50 ubyte&0xDF >0
  11250. >>>>>>>>50 string x \b%-.2s
  11251. >>>>>>52 ubyte&0xDF >0
  11252. >>>>>>>52 string x \b.%-.3s
  11253. #
  11254. >70 string IBMBIO\ \ COM
  11255. >>472 string Cannot\ load\ DOS!\040
  11256. >>>489 string Any\ key\ to\ retry \b, DR-DOS Bootloader
  11257. >>471 string Cannot\ load\ DOS\040
  11258. >>487 string press\ key\ to\ retry \b, Open-DOS Bootloader
  11259. #??
  11260. >444 string KERNEL\ \ SYS
  11261. >>314 string BOOT\ error! \b, FREE-DOS Bootloader
  11262. >499 string KERNEL\ \ SYS
  11263. >>305 string BOOT\ err!\0 \b, Free-DOS Bootloader
  11264. >449 string KERNEL\ \ SYS
  11265. >>319 string BOOT\ error! \b, FREE-DOS 0.5 Bootloader
  11266. #
  11267. >449 string Loading\ FreeDOS
  11268. >>0x1AF ulelong >0 \b, FREE-DOS 0.95,1.0 Bootloader
  11269. >>>497 ubyte&0xDF >0
  11270. >>>>497 string x \b %-.6s
  11271. >>>>>503 ubyte&0xDF >0
  11272. >>>>>>503 string x \b%-.1s
  11273. >>>>>>>504 ubyte&0xDF >0
  11274. >>>>>>>>504 string x \b%-.1s
  11275. >>>>505 ubyte&0xDF >0
  11276. >>>>>505 string x \b.%-.3s
  11277. #
  11278. >331 string Error!.0 \b, FREE-DOS 1.0 bootloader
  11279. #
  11280. >125 string Loading\ FreeDOS...\r
  11281. >>311 string BOOT\ error!\r \b, FREE-DOS bootloader
  11282. >>>441 ubyte&0xDF >0
  11283. >>>>441 string x \b %-.6s
  11284. >>>>>447 ubyte&0xDF >0
  11285. >>>>>>447 string x \b%-.1s
  11286. >>>>>>>448 ubyte&0xDF >0
  11287. >>>>>>>>448 string x \b%-.1s
  11288. >>>>449 ubyte&0xDF >0
  11289. >>>>>449 string x \b.%-.3s
  11290. >124 string FreeDOS\0
  11291. >>331 string \ err\0 \b, FREE-DOS BETa 0.9 Bootloader
  11292. # DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
  11293. >>>497 ubyte&0xDF >0
  11294. >>>>497 string x \b %-.6s
  11295. >>>>>503 ubyte&0xDF >0
  11296. >>>>>>503 string x \b%-.1s
  11297. >>>>>>>504 ubyte&0xDF >0
  11298. >>>>>>>>504 string x \b%-.1s
  11299. >>>>505 ubyte&0xDF >0
  11300. >>>>>505 string x \b.%-.3s
  11301. >>333 string \ err\0 \b, FREE-DOS BEta 0.9 Bootloader
  11302. >>>497 ubyte&0xDF >0
  11303. >>>>497 string x \b %-.6s
  11304. >>>>>503 ubyte&0xDF >0
  11305. >>>>>>503 string x \b%-.1s
  11306. >>>>>>>504 ubyte&0xDF >0
  11307. >>>>>>>>504 string x \b%-.1s
  11308. >>>>505 ubyte&0xDF >0
  11309. >>>>>505 string x \b.%-.3s
  11310. >>334 string \ err\0 \b, FREE-DOS Beta 0.9 Bootloader
  11311. >>>497 ubyte&0xDF >0
  11312. >>>>497 string x \b %-.6s
  11313. >>>>>503 ubyte&0xDF >0
  11314. >>>>>>503 string x \b%-.1s
  11315. >>>>>>>504 ubyte&0xDF >0
  11316. >>>>>>>>504 string x \b%-.1s
  11317. >>>>505 ubyte&0xDF >0
  11318. >>>>>505 string x \b.%-.3s
  11319. >336 string Error!\040
  11320. >>343 string Hit\ a\ key\ to\ reboot. \b, FREE-DOS Beta 0.9sr1 Bootloader
  11321. >>>497 ubyte&0xDF >0
  11322. >>>>497 string x \b %-.6s
  11323. >>>>>503 ubyte&0xDF >0
  11324. >>>>>>503 string x \b%-.1s
  11325. >>>>>>>504 ubyte&0xDF >0
  11326. >>>>>>>>504 string x \b%-.1s
  11327. >>>>505 ubyte&0xDF >0
  11328. >>>>>505 string x \b.%-.3s
  11329. # added by Joerg Jenderek
  11330. # https://www.visopsys.org/
  11331. # https://partitionlogic.org.uk/
  11332. # OEM-ID=Visopsys
  11333. >478 ulelong 0
  11334. >>(1.b+326) string I/O\ Error\ reading\040
  11335. >>>(1.b+344) string Visopsys\ loader\r
  11336. >>>>(1.b+361) string Press\ any\ key\ to\ continue.\r \b, Visopsys loader
  11337. # http://alexfru.chat.ru/epm.html#bootprog
  11338. >494 ubyte >0x4D
  11339. >>495 string >E
  11340. >>>495 string <S
  11341. #OEM-ID is not reliable
  11342. >>>>3 string BootProg
  11343. # It just looks for a program file name at the root directory
  11344. # and loads corresponding file with following execution.
  11345. # DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
  11346. >>>>499 ubyte&0xDF >0 \b, COM/EXE Bootloader
  11347. >>>>>499 use DOS-filename
  11348. #If the boot sector fails to read any other sector,
  11349. #it prints a very short message ("RE") to the screen and hangs the computer.
  11350. #If the boot sector fails to find needed program in the root directory,
  11351. #it also hangs with another message ("NF").
  11352. >>>>>492 string RENF \b, FAT (12 bit)
  11353. >>>>>495 string RENF \b, FAT (16 bit)
  11354. #If the boot sector fails to read any other sector,
  11355. #it prints a very short message ("RE") to the screen and hangs the computer.
  11356. # x86 bootloader end
  11357. # added by Joerg Jenderek at Feb 2013 according to https://thestarman.pcministry.com/asm/mbr/MSWIN41.htm#FSINFO
  11358. # and https://en.wikipedia.org/wiki/File_Allocation_Table#FS_Information_Sector
  11359. >0 string RRaA
  11360. >>0x1E4 string rrAa \b, FSInfosector
  11361. #>>0x1FC uleshort =0 SHOULD BE ZERO
  11362. >>>0x1E8 ulelong <0xffffffff \b, %u free clusters
  11363. >>>0x1EC ulelong <0xffffffff \b, last allocated cluster %u
  11364. # updated by Joerg Jenderek at Sep 2007
  11365. >3 ubyte 0
  11366. #no active flag
  11367. >>446 ubyte 0
  11368. # partition 1 not empty
  11369. >>>450 ubyte >0
  11370. # partitions 3,4 empty
  11371. >>>>482 ubyte 0
  11372. >>>>>498 ubyte 0
  11373. # partition 2 ID=0,5,15
  11374. >>>>>>466 ubyte <0x10
  11375. >>>>>>>466 ubyte 0x05 \b, extended partition table
  11376. >>>>>>>466 ubyte 0x0F \b, extended partition table (LBA)
  11377. >>>>>>>466 ubyte 0x0 \b, extended partition table (last)
  11378. # DOS x86 sector separated and moved from "DOS/MBR boot sector" by Joerg Jenderek at May 2011
  11379. >0x200 lelong 0x82564557 \b, BSD disklabel
  11380. # by Joerg Jenderek at Apr 2013
  11381. # Print the DOS filenames from directory entry form with 8 right space padded bytes + 3 bytes for extension
  11382. # like IO.SYS. MSDOS.SYS , KERNEL.SYS , DRBIO.SYS
  11383. 0 name DOS-filename
  11384. # space=0x20 (00100000b) means empty
  11385. >0 ubyte&0xDF >0
  11386. >>0 ubyte x \b%c
  11387. >>>1 ubyte&0xDF >0
  11388. >>>>1 ubyte x \b%c
  11389. >>>>>2 ubyte&0xDF >0
  11390. >>>>>>2 ubyte x \b%c
  11391. >>>>>>>3 ubyte&0xDF >0
  11392. >>>>>>>>3 ubyte x \b%c
  11393. >>>>>>>>>4 ubyte&0xDF >0
  11394. >>>>>>>>>>4 ubyte x \b%c
  11395. >>>>>>>>>>>5 ubyte&0xDF >0
  11396. >>>>>>>>>>>>5 ubyte x \b%c
  11397. >>>>>>>>>>>>>6 ubyte&0xDF >0
  11398. >>>>>>>>>>>>>>6 ubyte x \b%c
  11399. >>>>>>>>>>>>>>>7 ubyte&0xDF >0
  11400. >>>>>>>>>>>>>>>>7 ubyte x \b%c
  11401. # DOS filename extension
  11402. >>8 ubyte&0xDF >0 \b.
  11403. >>>8 ubyte x \b%c
  11404. >>>>9 ubyte&0xDF >0
  11405. >>>>>9 ubyte x \b%c
  11406. >>>>>>10 ubyte&0xDF >0
  11407. >>>>>>>10 ubyte x \b%c
  11408. # Print 2 following DOS filenames from directory entry form
  11409. # like IO.SYS+MSDOS.SYS or ibmbio.com+ibmdos.com
  11410. 0 name 2xDOS-filename
  11411. # display 1 space
  11412. >0 ubyte x \b
  11413. >0 use DOS-filename
  11414. >11 ubyte x \b+
  11415. >11 use DOS-filename
  11416. # https://en.wikipedia.org/wiki/Master_boot_record#PTE
  11417. # display standard partition table
  11418. 0 name partition-table
  11419. #>0 ubyte x PARTITION-TABLE
  11420. # test and display 1st til 4th partition table entry
  11421. >0 use partition-entry-test
  11422. >16 use partition-entry-test
  11423. >32 use partition-entry-test
  11424. >48 use partition-entry-test
  11425. # test for entry of partition table
  11426. 0 name partition-entry-test
  11427. # partition type ID > 0
  11428. >4 ubyte >0
  11429. # active flag 0
  11430. >>0 ubyte 0
  11431. >>>0 use partition-entry
  11432. # active flag 0x80, 0x81, ...
  11433. >>0 ubyte >0x7F
  11434. >>>0 use partition-entry
  11435. # Print entry of partition table
  11436. 0 name partition-entry
  11437. # partition type ID > 0
  11438. >4 ubyte >0 \b; partition
  11439. >>64 leshort 0xAA55 1
  11440. >>48 leshort 0xAA55 2
  11441. >>32 leshort 0xAA55 3
  11442. >>16 leshort 0xAA55 4
  11443. >>4 ubyte x : ID=0x%x
  11444. >>0 ubyte&0x80 0x80 \b, active
  11445. >>0 ubyte >0x80 0x%x
  11446. >>1 ubyte x \b, start-CHS (
  11447. >>1 use partition-chs
  11448. >>5 ubyte x \b), end-CHS (
  11449. >>5 use partition-chs
  11450. >>8 ulelong x \b), startsector %u
  11451. >>12 ulelong x \b, %u sectors
  11452. # Print cylinder,head,sector (CHS) of partition entry
  11453. 0 name partition-chs
  11454. # cylinder
  11455. >1 ubyte x \b0x
  11456. >1 ubyte&0xC0 0x40 \b1
  11457. >1 ubyte&0xC0 0x80 \b2
  11458. >1 ubyte&0xC0 0xC0 \b3
  11459. >2 ubyte x \b%x
  11460. # head
  11461. >0 ubyte x \b,%u
  11462. # sector
  11463. >1 ubyte&0x3F x \b,%u
  11464. # FATX
  11465. 0 string FATX FATX filesystem data
  11466. # romfs filesystems - Juan Cespedes <cespedes@debian.org>
  11467. 0 string -rom1fs- romfs filesystem, version 1
  11468. >8 belong x %d bytes,
  11469. >16 string x named %s.
  11470. # netboot image - Juan Cespedes <cespedes@debian.org>
  11471. 0 lelong 0x1b031336L Netboot image,
  11472. >4 lelong&0xFFFFFF00 0
  11473. >>4 lelong&0x100 0x000 mode 2
  11474. >>4 lelong&0x100 0x100 mode 3
  11475. >4 lelong&0xFFFFFF00 !0 unknown mode
  11476. 0x18b string OS/2 OS/2 Boot Manager
  11477. # updated by Joerg Jenderek at Oct 2008 and Sep 2012
  11478. # https://syslinux.zytor.com/iso.php
  11479. # tested with versions 1.47,1.48,1.49,1.50,1.62,1.76,2.00,2.10;3.00,3.11,3.31,;3.70,3.71,3.73,3.75,3.80,3.82,3.84,3.86,4.01,4.03 and 4.05
  11480. # assembler instructions: cli;jmp 0:7Cyy (yy=0x40,0x5e,0x6c,0x6e,0x77);nop;nop
  11481. 0 ulequad&0x909000007cc0eafa 0x909000007c40eafa
  11482. >631 search/689 ISOLINUX\ isolinux Loader
  11483. >>&0 string x (version %-4.4s)
  11484. # https://syslinux.zytor.com/pxe.php
  11485. # assembler instructions: jmp 7C05
  11486. 0 ulelong 0x007c05ea pxelinux loader (version 2.13 or older)
  11487. # assembler instructions: pushfd;pushad
  11488. 0 ulelong 0x60669c66 pxelinux loader
  11489. # assembler instructions: jmp 05
  11490. 0 ulelong 0xc00005ea pxelinux loader (version 3.70 or newer)
  11491. # https://syslinux.zytor.com/wiki/index.php/SYSLINUX
  11492. 0 string LDLINUX\ SYS\ SYSLINUX loader
  11493. >12 string x (older version %-4.4s)
  11494. 0 string \r\nSYSLINUX\ SYSLINUX loader
  11495. >11 string x (version %-4.4s)
  11496. # syslinux updated and separated from "DOS/MBR boot sector" by Joerg Jenderek at Sep 2012
  11497. # assembler instructions: jmp yy (yy=0x3c,0x58);nop;"SYSLINUX"
  11498. 0 ulelong&0x80909bEB 0x009018EB
  11499. # OEM-ID not always "SYSLINUX"
  11500. >434 search/47 Boot\ failed
  11501. # followed by \r\n\0 or :\
  11502. >>482 search/132 \0LDLINUX\ SYS Syslinux bootloader (version 2.13 or older)
  11503. >>1 ubyte 0x58 Syslinux bootloader (version 3.0-3.9)
  11504. >459 search/30 Boot\ error\r\n\0
  11505. >>1 ubyte 0x58 Syslinux bootloader (version 3.10 or newer)
  11506. # SYSLINUX MBR updated and separated from "DOS/MBR boot sector" by Joerg Jenderek at Sep 2012
  11507. # assembler instructions: mov di,0600h;mov cx,0100h
  11508. 16 search/4 \xbf\x00\x06\xb9\x00\x01
  11509. # to display SYSLINUX MBR (36) before old DOS/MBR boot sector one with partition table (strength=50+21)
  11510. !:strength +36
  11511. >94 search/249 Missing\ operating\ system
  11512. # followed by \r for versions older 3.35 , .\r for versions newer 3.52 and point for other
  11513. # skip Ranish MBR
  11514. >>408 search/4 HD1/\0
  11515. >>408 default x
  11516. >>>250 search/118 \0Operating\ system\ load SYSLINUX MBR
  11517. # followed by "ing " or space
  11518. >>>>292 search/98 error
  11519. >>>>>&0 string \r (version 3.35 or older)
  11520. >>>>>&0 string .\r (version 3.52 or newer)
  11521. >>>>>&0 default x (version 3.36-3.51 )
  11522. >368 search/106 \0Disk\ error\ on\ boot\r\n SYSLINUX GPT-MBR
  11523. >>156 search/10 \0Boot\ partition\ not\ found\r\n
  11524. >>>270 search/10 \0OS\ not\ bootable\r\n (version 3.86 or older)
  11525. >>174 search/10 \0Missing\ OS\r\n
  11526. >>>189 search/10 \0Multiple\ active\ partitions\r\n (version 4.00 or newer)
  11527. # SYSLINUX END
  11528. # NetBSD mbr variants (master-boot-code version 1.22) added by Joerg Jenderek at Nov 2012
  11529. # assembler instructions: xor ax,ax;mov ax,ss;mov sp,0x7c00;mov ax,
  11530. 0 ubequad 0x31c08ed0bc007c8e
  11531. # mbr_bootsel magic before partition table not reliable with small ipl fragments
  11532. #>444 uleshort 0xb5e1
  11533. >0004 uleshort x
  11534. # ERRorTeXT
  11535. >>181 search/166 Error\ \0\r\n NetBSD mbr
  11536. # NT Drive Serial Number https://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm#DS
  11537. >>>0x1B8 ubelong >0 \b,Serial 0x%-.8x
  11538. # BOOTSEL definitions contains assembler instructions: int 0x13;pop dx;push dx;push dx
  11539. >>>0xbb search/71 \xcd\x13\x5a\x52\x52 \b,bootselector
  11540. # BOOT_EXTENDED definitions contains assembler instructions:
  11541. # xchg ecx,edx;addl ecx,edx;movw lba_info,si;movb 0x42,ah;pop dx;push dx;int 0x13
  11542. >>>0x96 search/1 \x66\x87\xca\x66\x01\xca\x66\x89\x16\x3a\x07\xbe\x32\x07\xb4\x42\x5a\x52\xcd\x13 \b,boot extended
  11543. # COM_PORT_VAL definitions contains assembler instructions: outb al,dx;add 5,dl;inb %dx;test 0x40,al
  11544. >>>0x130 search/55 \xee\x80\xc2\x05\xec\xa8\x40 \b,serial IO
  11545. # not TERSE_ERROR
  11546. >>>196 search/106 No\ active\ partition\0
  11547. >>>>&0 string Disk\ read\ error\0
  11548. >>>>>&0 string No\ operating\ system\0 \b,verbose
  11549. # not NO_CHS definitions contains assembler instructions: pop dx;push dx;movb $8,ah;int0x13
  11550. >>>0x7d search/7 \x5a\x52\xb4\x08\xcd\x13 \b,CHS
  11551. # not NO_LBA_CHECK definitions contains assembler instructions: movw 0x55aa,bx;movb 0x41,ah;pop dx;push dx;int 0x13
  11552. >>>0xa4 search/84 \xbb\xaa\x55\xb4\x41\x5a\x52\xcd\x13 \b,LBA-check
  11553. # assembler instructions: movw nametab,bx
  11554. >>>0x26 search/21 \xBB\x94\x07
  11555. # not NO_BANNER definitions contains assembler instructions: mov banner,si;call message_crlf
  11556. >>>>&-9 ubequad&0xBE00f0E800febb94 0xBE0000E80000bb94
  11557. >>>>>181 search/166 Error\ \0
  11558. # "a: disk" , "Fn: diskn" or "NetBSD MBR boot"
  11559. >>>>>>&3 string x \b,"%s"
  11560. >>>446 use partition-table
  11561. # Andrea Mazzoleni AdvanceCD mbr loader of http://advancemame.sourceforge.net/boot-readme.html
  11562. # added by Joerg Jenderek at Nov 2012 for versions 1.3 - 1.4
  11563. # assembler instructions: jmp short 0x58;nop;ASCII
  11564. 0 ubequad&0xeb58908000000000 0xeb58900000000000
  11565. # assembler instructions: cli;xor ax,ax;mov ds,ax;mov es,ax;mov ss,
  11566. >(1.b+2) ubequad 0xfa31c08ed88ec08e
  11567. # Error messages at end of code
  11568. >>376 string No\ operating\ system\r\n\0
  11569. >>>398 string Disk\ error\r\n\0FDD\0HDD\0
  11570. >>>>419 string \ EBIOS\r\n\0 AdvanceMAME mbr
  11571. # Neil Turton mbr loader variant of https://www.chiark.greenend.org.uk/~neilt/mbr/
  11572. # added by Joerg Jenderek at Mar 2011 for versions 1.0.0 - 1.1.11
  11573. # for 1st version assembler instructions: cld;xor ax,ax;mov DS,ax;MOV ES,AX;mov SI,
  11574. # or cld;xor ax,ax;mov SS,ax;XOR SP,SP;mov DS,
  11575. 0 ulequad&0xcE1b40D48EC031FC 0x8E0000D08EC031FC
  11576. # pointer to the data starting with Neil Turton signature string
  11577. >(0x1BC.s) string NDTmbr
  11578. >>&-14 string 1234F\0 Turton mbr (
  11579. # parameters also viewed by install-mbr --list
  11580. >>>(0x1BC.s+7) ubyte x \b%u<=
  11581. >>>(0x1BC.s+9) ubyte x \bVersion<=%u
  11582. #>>>(0x1BC.s+8) ubyte x asm_flag_%x
  11583. >>>(0x1BC.s+8) ubyte&1 1 \b,Y2K-Fix
  11584. # variant used by testdisk of https://www.cgsecurity.org/wiki/Menu_MBRCode
  11585. >>>(0x1BC.s+8) ubyte&2 2 \b,TestDisk
  11586. #0x1~1,..,0x8~4,0x10~F,0x80~A enabled
  11587. #>>>(0x1BC.s+10) ubyte x \b,flags 0x%x
  11588. #0x0~1,0x1~2,...,0x3~4,0x4~F,0x7~D default boot
  11589. #>>>(0x1BC.s+11) ubyte x \b,cfg_def 0x%x
  11590. # for older versions
  11591. >>>(0x1BC.s+9) ubyte <2
  11592. #>>>>(0x1BC.s+12) ubyte 18 \b,%hhu/18 seconds
  11593. >>>>(0x1BC.s+12) ubyte !18 \b,%u/18 seconds
  11594. # floppy A: or B:
  11595. >>>>(0x1BC.s+13) ubyte <2 \b,floppy 0x%x
  11596. >>>>(0x1BC.s+13) ubyte >1
  11597. # 1st hard disc
  11598. #>>>>>(0x1BC.s+13) ubyte 0x80 \b,drive 0x%x
  11599. # not 1st hard disc
  11600. >>>>>(0x1BC.s+13) ubyte !0x80 \b,drive 0x%x
  11601. # for version >= 2 maximal timeout can be 65534
  11602. >>>(0x1BC.s+9) ubyte >1
  11603. #>>>>(0x1BC.s+12) uleshort 18 \b,%u/18 seconds
  11604. >>>>(0x1BC.s+12) uleshort !18 \b,%u/18 seconds
  11605. # floppy A: or B:
  11606. >>>>(0x1BC.s+14) ubyte <2 \b,floppy 0x%x
  11607. >>>>(0x1BC.s+14) ubyte >1
  11608. # 1st hard disc
  11609. #>>>>>(0x1BC.s+14) ubyte 0x80 \b,drive 0x%x
  11610. # not 1st hard disc
  11611. >>>>>(0x1BC.s+14) ubyte !0x80 \b,drive 0x%x
  11612. >>>0 ubyte x \b)
  11613. # added by Joerg Jenderek
  11614. # In the second sector (+0x200) are variables according to grub-0.97/stage2/asm.S or
  11615. # grub-1.94/kern/i386/pc/startup.S
  11616. # https://www.gnu.org/software/grub/manual/grub.html#Embedded-data
  11617. # usual values are marked with comments to get only information of strange GRUB loaders
  11618. 0x200 uleshort 0x70EA
  11619. # found only version 3.{1,2}
  11620. >0x206 ubeshort >0x0300
  11621. # GRUB version (0.5.)95,0.93,0.94,0.96,0.97 > "00"
  11622. >>0x212 ubyte >0x29
  11623. >>>0x213 ubyte >0x29
  11624. # not iso9660_stage1_5
  11625. #>>>0 ulelong&0x00BE5652 0x00BE5652
  11626. >>>>0x213 ubyte >0x29 GRand Unified Bootloader
  11627. # config_file for stage1_5 is 0xffffffff + default "/boot/grub/stage2"
  11628. >>>>0x217 ubyte 0xFF stage1_5
  11629. >>>>0x217 ubyte <0xFF stage2
  11630. >>>>0x206 ubyte x \b version %u
  11631. >>>>0x207 ubyte x \b.%u
  11632. # module_size for 1.94
  11633. >>>>0x208 ulelong <0xffffff \b, installed partition %u
  11634. #>>>>0x208 ulelong =0xffffff \b, %lu (default)
  11635. >>>>0x208 ulelong >0xffffff \b, installed partition %u
  11636. # GRUB 0.5.95 unofficial
  11637. >>>>0x20C ulelong&0x2E300000 0x2E300000
  11638. # 0=stage2 1=ffs 2=e2fs 3=fat 4=minix 5=reiserfs
  11639. >>>>>0x20C ubyte x \b, identifier 0x%x
  11640. #>>>>>0x20D ubyte =0 \b, LBA flag 0x%x (default)
  11641. >>>>>0x20D ubyte >0 \b, LBA flag 0x%x
  11642. # GRUB version as string
  11643. >>>>>0x20E string >\0 \b, GRUB version %-s
  11644. # for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
  11645. >>>>>>0x215 ulong 0xffffffff
  11646. >>>>>>>0x219 string >\0 \b, configuration file %-s
  11647. >>>>>>0x215 ulong !0xffffffff
  11648. >>>>>>>0x215 string >\0 \b, configuration file %-s
  11649. # newer GRUB versions
  11650. >>>>0x20C ulelong&0x2E300000 !0x2E300000
  11651. ##>>>>>0x20C ulelong =0 \b, saved entry %d (usual)
  11652. >>>>>0x20C ulelong >0 \b, saved entry %d
  11653. # for 1.94 contains kernel image size
  11654. # for 0.93,0.94,0.96,0.97
  11655. # 0=stage2 1=ffs 2=e2fs 3=fat 4=minix 5=reiserfs 6=vstafs 7=jfs 8=xfs 9=iso9660 a=ufs2
  11656. >>>>>0x210 ubyte x \b, identifier 0x%x
  11657. # The flag for LBA forcing is in most cases 0
  11658. #>>>>>0x211 ubyte =0 \b, LBA flag 0x%x (default)
  11659. >>>>>0x211 ubyte >0 \b, LBA flag 0x%x
  11660. # GRUB version as string
  11661. >>>>>0x212 string >\0 \b, GRUB version %-s
  11662. # for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
  11663. >>>>>0x217 ulong 0xffffffff
  11664. >>>>>>0x21b string >\0 \b, configuration file %-s
  11665. >>>>>0x217 ulong !0xffffffff
  11666. >>>>>>0x217 string >\0 \b, configuration file %-s
  11667. # DOS x86 sector updated and separated from "DOS/MBR boot sector" by Joerg Jenderek at May 2011
  11668. # JuMP short bootcodeoffset NOP assembler instructions will usually be EB xx 90
  11669. # over BIOS parameter block (BPB)
  11670. # https://thestarman.pcministry.com/asm/2bytejumps.htm#FWD
  11671. # older drives may use Near JuMP instruction E9 xx xx
  11672. # minimal short forward jump found 0x29 for bootloaders or 0x0
  11673. # maximal short forward jump is 0x7f
  11674. # OEM-ID is empty or contain readable bytes
  11675. 0 ulelong&0x804000E9 0x000000E9
  11676. !:strength +60
  11677. # mtools-3.9.8/msdos.h
  11678. # usual values are marked with comments to get only information of strange FAT systems
  11679. # valid sectorsize must be a power of 2 from 32 to 32768
  11680. >11 uleshort&0x001f 0
  11681. >>11 uleshort <32769
  11682. >>>11 uleshort >31
  11683. >>>>21 ubyte&0xf0 0xF0
  11684. >>>>>0 ubyte 0xEB DOS/MBR boot sector
  11685. >>>>>>1 ubyte x \b, code offset 0x%x+2
  11686. >>>>>0 ubyte 0xE9
  11687. >>>>>>1 uleshort x \b, code offset 0x%x+3
  11688. >>>>>3 string >\0 \b, OEM-ID "%-.8s"
  11689. #http://mirror.href.com/thestarman/asm/debug/debug2.htm#IHC
  11690. >>>>>>8 string IHC \b cached by Windows 9M
  11691. >>>>>11 uleshort >512 \b, Bytes/sector %u
  11692. #>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual)
  11693. >>>>>11 uleshort <512 \b, Bytes/sector %u
  11694. >>>>>13 ubyte >1 \b, sectors/cluster %u
  11695. #>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies)
  11696. # for lazy FAT32 implementation like Transcend digital photo frame PF830
  11697. >>>>>82 string/c fat32
  11698. >>>>>>14 uleshort !32 \b, reserved sectors %u
  11699. #>>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32)
  11700. >>>>>82 string/c !fat32
  11701. >>>>>>14 uleshort >1 \b, reserved sectors %u
  11702. #>>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16)
  11703. #>>>>>>14 uleshort 0 \b, reserved sectors %u (usual NTFS)
  11704. >>>>>16 ubyte >2 \b, FATs %u
  11705. #>>>>>16 ubyte =2 \b, FATs %u (usual)
  11706. >>>>>16 ubyte =1 \b, FAT %u
  11707. >>>>>16 ubyte >0
  11708. >>>>>17 uleshort >0 \b, root entries %u
  11709. #>>>>>17 uleshort =0 \b, root entries %hu=0 (usual Fat32)
  11710. >>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB)
  11711. #>>>>>19 uleshort =0 \b, sectors %hu=0 (usual Fat32)
  11712. >>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x
  11713. #>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy)
  11714. >>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x
  11715. >>>>>22 uleshort >0 \b, sectors/FAT %u
  11716. #>>>>>22 uleshort =0 \b, sectors/FAT %hu=0 (usual Fat32)
  11717. >>>>>24 uleshort x \b, sectors/track %u
  11718. >>>>>26 ubyte >2 \b, heads %u
  11719. #>>>>>26 ubyte =2 \b, heads %u (usual floppy)
  11720. >>>>>26 ubyte =1 \b, heads %u
  11721. # valid only for sector sizes with more then 32 Bytes
  11722. >>>>>11 uleshort >32
  11723. # https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#Extended_BIOS_Parameter_Block
  11724. # skip for values 2,2Ah,70h,73h,DFh
  11725. # and continue for extended boot signature values 0,28h,29h,80h
  11726. >>>>>>38 ubyte&0x56 =0
  11727. >>>>>>>28 ulelong >0 \b, hidden sectors %u
  11728. #>>>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy)
  11729. >>>>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB)
  11730. #>>>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB)
  11731. # FAT<32 bit specific
  11732. >>>>>>>82 string/c !fat32
  11733. #>>>>>>>>36 ubyte 0x80 \b, physical drive 0x%x=0x80 (usual harddisk)
  11734. #>>>>>>>>36 ubyte 0 \b, physical drive 0x%x=0 (usual floppy)
  11735. >>>>>>>>36 ubyte !0x80
  11736. >>>>>>>>>36 ubyte !0 \b, physical drive 0x%x
  11737. # VGA-copy CRC or
  11738. # in Windows NT bit 0 is a dirty flag to request chkdsk at boot time. bit 1 requests surface scan too
  11739. >>>>>>>>37 ubyte >0 \b, reserved 0x%x
  11740. #>>>>>>>>37 ubyte =0 \b, reserved 0x%x
  11741. # extended boot signature value is 0x80 for NTFS, 0x28 or 0x29 for others
  11742. >>>>>>>>38 ubyte !0x29 \b, dos < 4.0 BootSector (0x%x)
  11743. >>>>>>>>38 ubyte&0xFE =0x28
  11744. >>>>>>>>>39 ulelong x \b, serial number 0x%x
  11745. >>>>>>>>38 ubyte =0x29
  11746. >>>>>>>>>43 string <NO\ NAME \b, label: "%11.11s"
  11747. >>>>>>>>>43 string >NO\ NAME \b, label: "%11.11s"
  11748. >>>>>>>>>43 string =NO\ NAME \b, unlabeled
  11749. # there exist some old floppies without word FAT at offset 54
  11750. # a word like "FATnm " is only a hint for a FAT size on nm-bits
  11751. # Normally the number of clusters is calculated by the values of BPP.
  11752. # if it is small enough FAT is 12 bit, if it is too big enough FAT is 32 bit,
  11753. # otherwise FAT is 16 bit.
  11754. # http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/determining-fat-widths.html
  11755. >>>>>82 string/c !fat32
  11756. >>>>>>54 string FAT12 \b, FAT (12 bit)
  11757. >>>>>>54 string FAT16 \b, FAT (16 bit)
  11758. >>>>>>54 default x
  11759. # determinate FAT bit size by media descriptor
  11760. # small floppies implies FAT12
  11761. >>>>>>>21 ubyte <0xF0 \b, FAT (12 bit by descriptor)
  11762. # with media descriptor F0h floppy or maybe superfloppy with FAT16
  11763. >>>>>>>21 ubyte =0xF0
  11764. # superfloppy (many sectors) implies FAT16
  11765. >>>>>>>>32 ulelong >0xFFFF \b, FAT (16 bit by descriptor+sectors)
  11766. # no superfloppy with media descriptor F0h implies FAT12
  11767. >>>>>>>>32 default x \b, FAT (12 bit by descriptor+sectors)
  11768. # with media descriptor F8h floppy or hard disc with FAT12 or FAT16
  11769. >>>>>>>21 ubyte =0xF8
  11770. # 360 KiB with media descriptor F8h, 9 sectors per track ,single sided floppy implies FAT12
  11771. >>>>>>>>19 ubequad 0xd002f80300090001 \b, FAT (12 bit by descriptor+geometry)
  11772. # hard disc with FAT12 or FAT16
  11773. >>>>>>>>19 default x \b, FAT (1Y bit by descriptor)
  11774. # with media descriptor FAh floppy, RAM disc with FAT12 or FAT16 or Tandy hard disc
  11775. >>>>>>>21 ubyte =0xFA
  11776. # 320 KiB with media descriptor FAh, 8 sectors per track ,single sided floppy implies FAT12
  11777. >>>>>>>>19 ubequad 0x8002fa0200080001 \b, FAT (12 bit by descriptor+geometry)
  11778. # RAM disc with FAT12 or FAT16 or Tandy hard disc
  11779. >>>>>>>>19 default x \b, FAT (1Y bit by descriptor)
  11780. # others are floppy
  11781. >>>>>>>21 default x \b, FAT (12 bit by descriptor)
  11782. # FAT32 bit specific
  11783. >>>>>82 string/c fat32 \b, FAT (32 bit)
  11784. >>>>>>36 ulelong x \b, sectors/FAT %u
  11785. # https://technet.microsoft.com/en-us/library/cc977221.aspx
  11786. >>>>>>40 uleshort >0 \b, extension flags 0x%x
  11787. #>>>>>>40 uleshort =0 \b, extension flags %hu
  11788. >>>>>>42 uleshort >0 \b, fsVersion %u
  11789. #>>>>>>42 uleshort =0 \b, fsVersion %u (usual)
  11790. >>>>>>44 ulelong >2 \b, rootdir cluster %u
  11791. #>>>>>>44 ulelong =2 \b, rootdir cluster %u
  11792. #>>>>>>44 ulelong =1 \b, rootdir cluster %u
  11793. >>>>>>48 uleshort >1 \b, infoSector %u
  11794. #>>>>>>48 uleshort =1 \b, infoSector %u (usual)
  11795. >>>>>>48 uleshort <1 \b, infoSector %u
  11796. # 0 or 0xFFFF instead of usual 6 means no backup sector
  11797. >>>>>>50 uleshort =0xFFFF \b, no Backup boot sector
  11798. >>>>>>50 uleshort =0 \b, no Backup boot sector
  11799. #>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual)
  11800. >>>>>>50 default x
  11801. >>>>>>>50 uleshort x \b, Backup boot sector %u
  11802. # corrected by Joerg Jenderek at Feb 2011 according to https://thestarman.pcministry.com/asm/mbr/MSWIN41.htm#FSINFO
  11803. >>>>>>52 ulelong >0 \b, reserved1 0x%x
  11804. >>>>>>56 ulelong >0 \b, reserved2 0x%x
  11805. >>>>>>60 ulelong >0 \b, reserved3 0x%x
  11806. # same structure as FAT1X
  11807. #>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk)
  11808. #>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
  11809. >>>>>>64 ubyte !0x80
  11810. >>>>>>>64 ubyte >0 \b, physical drive 0x%x
  11811. # in Windows NT bit 0 is a dirty flag to request chkdsk at boot time. bit 1 requests surface scan too
  11812. >>>>>>65 ubyte >0 \b, reserved 0x%x
  11813. >>>>>>66 ubyte !0x29 \b, dos < 4.0 BootSector (0x%x)
  11814. >>>>>>66 ubyte =0x29
  11815. >>>>>>>67 ulelong x \b, serial number 0x%x
  11816. >>>>>>>71 string <NO\ NAME \b, label: "%11.11s"
  11817. >>>>>>>71 string >NO\ NAME \b, label: "%11.11s"
  11818. >>>>>>>71 string =NO\ NAME \b, unlabeled
  11819. # additional tests for floppy image added by Joerg Jenderek
  11820. # no fixed disk
  11821. >>>>>21 ubyte !0xF8
  11822. # floppy media with 12 bit FAT
  11823. >>>>>>54 string !FAT16
  11824. # test for FAT after bootsector
  11825. >>>>>>>(11.s) ulelong&0x00ffffF0 0x00ffffF0 \b, followed by FAT
  11826. # floppy image
  11827. !:mime application/x-ima
  11828. # NTFS specific added by Joerg Jenderek at Mar 2011 according to https://thestarman.pcministry.com/asm/mbr/NTFSBR.htm
  11829. # and http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/bios-parameter-block.html
  11830. # 0 FATs
  11831. >>>>>16 ubyte =0
  11832. # 0 root entries
  11833. >>>>>>17 uleshort =0
  11834. # 0 DOS sectors
  11835. >>>>>>>19 uleshort =0
  11836. # 0 sectors/FAT
  11837. # dos < 4.0 BootSector value found is 0x80
  11838. #38 ubyte =0x80 \b, dos < 4.0 BootSector (0x%x)
  11839. >>>>>>>>22 uleshort =0 \b; NTFS
  11840. >>>>>>>>>24 uleshort >0 \b, sectors/track %u
  11841. >>>>>>>>>36 ulelong !0x800080 \b, physical drive 0x%x
  11842. >>>>>>>>>40 ulequad >0 \b, sectors %lld
  11843. >>>>>>>>>48 ulequad >0 \b, $MFT start cluster %lld
  11844. >>>>>>>>>56 ulequad >0 \b, $MFTMirror start cluster %lld
  11845. # Values 0 to 127 represent MFT record sizes of 0 to 127 clusters.
  11846. # Values 128 to 255 represent MFT record sizes of 2^(256-N) bytes.
  11847. >>>>>>>>>64 lelong <256
  11848. >>>>>>>>>>64 lelong <128 \b, clusters/RecordSegment %d
  11849. >>>>>>>>>>64 ubyte >127 \b, bytes/RecordSegment 2^(-1*%i)
  11850. # Values 0 to 127 represent index block sizes of 0 to 127 clusters.
  11851. # Values 128 to 255 represent index block sizes of 2^(256-N) byte
  11852. >>>>>>>>>68 ulelong <256
  11853. >>>>>>>>>>68 ulelong <128 \b, clusters/index block %d
  11854. #>>>>>>>>>>68 ulelong >127 \b, bytes/index block 2^(256-%d)
  11855. >>>>>>>>>>68 ubyte >127 \b, bytes/index block 2^(-1*%i)
  11856. >>>>>>>>>72 ulequad x \b, serial number 0%llx
  11857. >>>>>>>>>80 ulelong >0 \b, checksum 0x%x
  11858. #>>>>>>>>>80 ulelong =0 \b, checksum 0x%x=0 (usual)
  11859. # unicode loadername size jump
  11860. >>>>>>>>>(0x200.s*2) ubyte x
  11861. # in next sector loadername terminated by unicode CTRL-D and $
  11862. >>>>>>>>>>&0x1FF ulequad&0x0000FFffFFffFF00 0x0000002400040000 \b; contains
  11863. # if 2nd NTFS sectors is found then assume whole filesystem
  11864. #!:mime application/x-raw-disk-image
  11865. !:ext img/bin/ntfs
  11866. >>>>>>>>>>>0x200 use ntfs-sector2
  11867. # For 2nd NTFS sector added by Joerg Jenderek at Jan 2013, Mar 2019
  11868. # https://thestarman.pcministry.com/asm/mbr/NTFSbrHexEd.htm
  11869. # unused assembler instructions short JMP y2;NOP;NOP
  11870. 0x056 ulelong&0xFFFF0FFF 0x909002EB NTFS
  11871. #!:mime application/octet-stream
  11872. !:ext bin
  11873. >0 use ntfs-sector2
  11874. # https://memory.dataram.com/products-and-services/software/ramdisk
  11875. # assembler instructions JMP C000;NOP
  11876. 0x056 ulelong 0x9000c0e9 NTFS
  11877. #!:mime application/octet-stream
  11878. !:ext bin
  11879. >0 use ntfs-sector2
  11880. # check for characteristics of second NTFS sector and then display loader name
  11881. 0 name ntfs-sector2
  11882. # number of utf16 characters of loadername
  11883. >0 uleshort <8
  11884. # unused assembler instructions JMP y2;NOP;NOP or JMP C000;NOP
  11885. >>0x056 ulelong&0xFF0000FD 0x900000E9
  11886. # loadernames are NTLDR,CMLDR,PELDR,$LDR$ or BOOTMGR
  11887. >>>0x002 lestring16 x bootstrap %-5.5s
  11888. # check for 7 character length of loader name like BOOTMGR
  11889. >>>0 uleshort 7
  11890. >>>>0x0c lestring16 x \b%-2.2s
  11891. ### DOS,NTFS boot sectors end
  11892. # ntfsclone-image is a special save format for NTFS volumes,
  11893. # created and restored by the ntfsclone program
  11894. 0 string \0ntfsclone-image ntfsclone image,
  11895. >0x10 byte x version %d.
  11896. >0x11 byte x \b%d,
  11897. >0x12 lelong x cluster size %d,
  11898. >0x16 lequad x device size %lld,
  11899. >0x1e lequad x %lld total clusters,
  11900. >0x26 lequad x %lld clusters in use
  11901. 9564 lelong 0x00011954 Unix Fast File system [v1] (little-endian),
  11902. >8404 string x last mounted on %s,
  11903. #>9504 ledate x last checked at %s,
  11904. >8224 ledate x last written at %s,
  11905. >8401 byte x clean flag %d,
  11906. >8228 lelong x number of blocks %d,
  11907. >8232 lelong x number of data blocks %d,
  11908. >8236 lelong x number of cylinder groups %d,
  11909. >8240 lelong x block size %d,
  11910. >8244 lelong x fragment size %d,
  11911. >8252 lelong x minimum percentage of free blocks %d,
  11912. >8256 lelong x rotational delay %dms,
  11913. >8260 lelong x disk rotational speed %drps,
  11914. >8320 lelong 0 TIME optimization
  11915. >8320 lelong 1 SPACE optimization
  11916. 42332 lelong 0x19540119 Unix Fast File system [v2] (little-endian)
  11917. >&-1164 string x last mounted on %s,
  11918. >&-696 string >\0 volume name %s,
  11919. >&-304 leqldate x last written at %s,
  11920. >&-1167 byte x clean flag %d,
  11921. >&-1168 byte x readonly flag %d,
  11922. >&-296 lequad x number of blocks %lld,
  11923. >&-288 lequad x number of data blocks %lld,
  11924. >&-1332 lelong x number of cylinder groups %d,
  11925. >&-1328 lelong x block size %d,
  11926. >&-1324 lelong x fragment size %d,
  11927. >&-180 lelong x average file size %d,
  11928. >&-176 lelong x average number of files in dir %d,
  11929. >&-272 lequad x pending blocks to free %lld,
  11930. >&-264 lelong x pending inodes to free %d,
  11931. >&-664 lequad x system-wide uuid %0llx,
  11932. >&-1316 lelong x minimum percentage of free blocks %d,
  11933. >&-1248 lelong 0 TIME optimization
  11934. >&-1248 lelong 1 SPACE optimization
  11935. 66908 lelong 0x19540119 Unix Fast File system [v2] (little-endian)
  11936. >&-1164 string x last mounted on %s,
  11937. >&-696 string >\0 volume name %s,
  11938. >&-304 leqldate x last written at %s,
  11939. >&-1167 byte x clean flag %d,
  11940. >&-1168 byte x readonly flag %d,
  11941. >&-296 lequad x number of blocks %lld,
  11942. >&-288 lequad x number of data blocks %lld,
  11943. >&-1332 lelong x number of cylinder groups %d,
  11944. >&-1328 lelong x block size %d,
  11945. >&-1324 lelong x fragment size %d,
  11946. >&-180 lelong x average file size %d,
  11947. >&-176 lelong x average number of files in dir %d,
  11948. >&-272 lequad x pending blocks to free %lld,
  11949. >&-264 lelong x pending inodes to free %d,
  11950. >&-664 lequad x system-wide uuid %0llx,
  11951. >&-1316 lelong x minimum percentage of free blocks %d,
  11952. >&-1248 lelong 0 TIME optimization
  11953. >&-1248 lelong 1 SPACE optimization
  11954. 9564 belong 0x00011954 Unix Fast File system [v1] (big-endian),
  11955. >7168 belong 0x4c41424c Apple UFS Volume
  11956. >>7186 string x named %s,
  11957. >>7176 belong x volume label version %d,
  11958. >>7180 bedate x created on %s,
  11959. >8404 string x last mounted on %s,
  11960. #>9504 bedate x last checked at %s,
  11961. >8224 bedate x last written at %s,
  11962. >8401 byte x clean flag %d,
  11963. >8228 belong x number of blocks %d,
  11964. >8232 belong x number of data blocks %d,
  11965. >8236 belong x number of cylinder groups %d,
  11966. >8240 belong x block size %d,
  11967. >8244 belong x fragment size %d,
  11968. >8252 belong x minimum percentage of free blocks %d,
  11969. >8256 belong x rotational delay %dms,
  11970. >8260 belong x disk rotational speed %drps,
  11971. >8320 belong 0 TIME optimization
  11972. >8320 belong 1 SPACE optimization
  11973. 42332 belong 0x19540119 Unix Fast File system [v2] (big-endian)
  11974. >&-1164 string x last mounted on %s,
  11975. >&-696 string >\0 volume name %s,
  11976. >&-304 beqldate x last written at %s,
  11977. >&-1167 byte x clean flag %d,
  11978. >&-1168 byte x readonly flag %d,
  11979. >&-296 bequad x number of blocks %lld,
  11980. >&-288 bequad x number of data blocks %lld,
  11981. >&-1332 belong x number of cylinder groups %d,
  11982. >&-1328 belong x block size %d,
  11983. >&-1324 belong x fragment size %d,
  11984. >&-180 belong x average file size %d,
  11985. >&-176 belong x average number of files in dir %d,
  11986. >&-272 bequad x pending blocks to free %lld,
  11987. >&-264 belong x pending inodes to free %d,
  11988. >&-664 bequad x system-wide uuid %0llx,
  11989. >&-1316 belong x minimum percentage of free blocks %d,
  11990. >&-1248 belong 0 TIME optimization
  11991. >&-1248 belong 1 SPACE optimization
  11992. 66908 belong 0x19540119 Unix Fast File system [v2] (big-endian)
  11993. >&-1164 string x last mounted on %s,
  11994. >&-696 string >\0 volume name %s,
  11995. >&-304 beqldate x last written at %s,
  11996. >&-1167 byte x clean flag %d,
  11997. >&-1168 byte x readonly flag %d,
  11998. >&-296 bequad x number of blocks %lld,
  11999. >&-288 bequad x number of data blocks %lld,
  12000. >&-1332 belong x number of cylinder groups %d,
  12001. >&-1328 belong x block size %d,
  12002. >&-1324 belong x fragment size %d,
  12003. >&-180 belong x average file size %d,
  12004. >&-176 belong x average number of files in dir %d,
  12005. >&-272 bequad x pending blocks to free %lld,
  12006. >&-264 belong x pending inodes to free %d,
  12007. >&-664 bequad x system-wide uuid %0llx,
  12008. >&-1316 belong x minimum percentage of free blocks %d,
  12009. >&-1248 belong 0 TIME optimization
  12010. >&-1248 belong 1 SPACE optimization
  12011. 0 ulequad 0xc8414d4dc5523031 HAMMER filesystem (little-endian),
  12012. >0x90 lelong+1 x volume %d
  12013. >0x94 lelong x (of %d),
  12014. >0x50 string x name %s,
  12015. >0x98 ulelong x version %u,
  12016. >0xa0 ulelong x flags 0x%x
  12017. # ext2/ext3 filesystems - Andreas Dilger <adilger@dilger.ca>
  12018. # ext4 filesystem - Eric Sandeen <sandeen@sandeen.net>
  12019. # volume label and UUID Russell Coker
  12020. # https://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
  12021. 0x438 leshort 0xEF53 Linux
  12022. >0x44c lelong x rev %d
  12023. >0x43e leshort x \b.%d
  12024. # No journal? ext2
  12025. >0x45c lelong ^0x0000004 ext2 filesystem data
  12026. >>0x43a leshort ^0x0000001 (mounted or unclean)
  12027. # Has a journal? ext3 or ext4
  12028. >0x45c lelong &0x0000004
  12029. # and small INCOMPAT?
  12030. >>0x460 lelong <0x0000040
  12031. # and small RO_COMPAT?
  12032. >>>0x464 lelong <0x0000008 ext3 filesystem data
  12033. # else large RO_COMPAT?
  12034. >>>0x464 lelong >0x0000007 ext4 filesystem data
  12035. # else large INCOMPAT?
  12036. >>0x460 lelong >0x000003f ext4 filesystem data
  12037. >0x468 belong x \b, UUID=%08x
  12038. >0x46c beshort x \b-%04x
  12039. >0x46e beshort x \b-%04x
  12040. >0x470 beshort x \b-%04x
  12041. >0x472 belong x \b-%08x
  12042. >0x476 beshort x \b%04x
  12043. >0x478 string >0 \b, volume name "%s"
  12044. # General flags for any ext* fs
  12045. >0x460 lelong &0x0000004 (needs journal recovery)
  12046. >0x43a leshort &0x0000002 (errors)
  12047. # INCOMPAT flags
  12048. >0x460 lelong &0x0000001 (compressed)
  12049. #>0x460 lelong &0x0000002 (filetype)
  12050. #>0x460 lelong &0x0000010 (meta bg)
  12051. >0x460 lelong &0x0000040 (extents)
  12052. >0x460 lelong &0x0000080 (64bit)
  12053. #>0x460 lelong &0x0000100 (mmp)
  12054. #>0x460 lelong &0x0000200 (flex bg)
  12055. # RO_INCOMPAT flags
  12056. #>0x464 lelong &0x0000001 (sparse super)
  12057. >0x464 lelong &0x0000002 (large files)
  12058. >0x464 lelong &0x0000008 (huge files)
  12059. #>0x464 lelong &0x0000010 (gdt checksum)
  12060. #>0x464 lelong &0x0000020 (many subdirs)
  12061. #>0x463 lelong &0x0000040 (extra isize)
  12062. # f2fs filesystem - Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
  12063. 0x400 lelong 0xF2F52010 F2FS filesystem
  12064. >0x46c belong x \b, UUID=%08x
  12065. >0x470 beshort x \b-%04x
  12066. >0x472 beshort x \b-%04x
  12067. >0x474 beshort x \b-%04x
  12068. >0x476 belong x \b-%08x
  12069. >0x47a beshort x \b%04x
  12070. >0x147c lestring16 x \b, volume name "%s"
  12071. # Minix filesystems - Juan Cespedes <cespedes@debian.org>
  12072. 0x410 leshort 0x137f
  12073. !:strength / 2
  12074. >0x402 beshort < 100
  12075. >0x402 beshort > -1 Minix filesystem, V1, 14 char names, %d zones
  12076. >0x1e string minix \b, bootable
  12077. 0x410 beshort 0x137f
  12078. !:strength / 2
  12079. >0x402 beshort < 100
  12080. >0x402 beshort > -1 Minix filesystem, V1 (big endian), %d zones
  12081. >0x1e string minix \b, bootable
  12082. 0x410 leshort 0x138f
  12083. !:strength / 2
  12084. >0x402 beshort < 100
  12085. >0x402 beshort > -1 Minix filesystem, V1, 30 char names, %d zones
  12086. >0x1e string minix \b, bootable
  12087. 0x410 beshort 0x138f
  12088. !:strength / 2
  12089. >0x402 beshort < 100
  12090. >0x402 beshort > -1 Minix filesystem, V1, 30 char names (big endian), %d zones
  12091. >0x1e string minix \b, bootable
  12092. # Weak Magic: this is $x
  12093. #0x410 leshort 0x2468
  12094. #>0x402 beshort < 100
  12095. #>>0x402 beshort > -1 Minix filesystem, V2, 14 char names
  12096. #>0x1e string minix \b, bootable
  12097. #0x410 beshort 0x2468
  12098. #>0x402 beshort < 100
  12099. #>0x402 beshort > -1 Minix filesystem, V2 (big endian)
  12100. #>0x1e string minix \b, bootable
  12101. #0x410 leshort 0x2478
  12102. #>0x402 beshort < 100
  12103. #>0x402 beshort > -1 Minix filesystem, V2, 30 char names
  12104. #>0x1e string minix \b, bootable
  12105. #0x410 leshort 0x2478
  12106. #>0x402 beshort < 100
  12107. #>0x402 beshort > -1 Minix filesystem, V2, 30 char names
  12108. #>0x1e string minix \b, bootable
  12109. #0x410 beshort 0x2478
  12110. #>0x402 beshort !0 Minix filesystem, V2, 30 char names (big endian)
  12111. #>0x1e string minix \b, bootable
  12112. # Weak Magic! this is MD
  12113. #0x418 leshort 0x4d5a
  12114. #>0x402 beshort <100
  12115. #>>0x402 beshort > -1 Minix filesystem, V3, 60 char names
  12116. # SGI disk labels - Nathan Scott <nathans@debian.org>
  12117. 0 belong 0x0BE5A941 SGI disk label (volume header)
  12118. # SGI XFS filesystem - Nathan Scott <nathans@debian.org>
  12119. 0 belong 0x58465342 SGI XFS filesystem data
  12120. >0x4 belong x (blksz %d,
  12121. >0x68 beshort x inosz %d,
  12122. >0x64 beshort ^0x2004 v1 dirs)
  12123. >0x64 beshort &0x2004 v2 dirs)
  12124. ############################################################################
  12125. # Minix-ST kernel floppy
  12126. 0x800 belong 0x46fc2700 Atari-ST Minix kernel image
  12127. # https://en.wikipedia.org/wiki/BIOS_parameter_block
  12128. # floppies with valid BPB and any instruction at beginning
  12129. >19 string \240\005\371\005\0\011\0\2\0 \b, 720k floppy
  12130. >19 string \320\002\370\005\0\011\0\1\0 \b, 360k floppy
  12131. ############################################################################
  12132. # Hmmm, is this a better way of detecting _standard_ floppy images ?
  12133. 19 string \320\002\360\003\0\011\0\1\0 DOS floppy 360k
  12134. >0x1FE leshort 0xAA55 \b, DOS/MBR hard disk boot sector
  12135. 19 string \240\005\371\003\0\011\0\2\0 DOS floppy 720k
  12136. >0x1FE leshort 0xAA55 \b, DOS/MBR hard disk boot sector
  12137. 19 string \100\013\360\011\0\022\0\2\0 DOS floppy 1440k
  12138. >0x1FE leshort 0xAA55 \b, DOS/MBR hard disk boot sector
  12139. 19 string \240\005\371\005\0\011\0\2\0 DOS floppy 720k, IBM
  12140. >0x1FE leshort 0xAA55 \b, DOS/MBR hard disk boot sector
  12141. 19 string \100\013\371\005\0\011\0\2\0 DOS floppy 1440k, mkdosfs
  12142. >0x1FE leshort 0xAA55 \b, DOS/MBR hard disk boot sector
  12143. 19 string \320\002\370\005\0\011\0\1\0 Atari-ST floppy 360k
  12144. 19 string \240\005\371\005\0\011\0\2\0 Atari-ST floppy 720k
  12145. # | | | | |
  12146. # | | | | heads
  12147. # | | | sectors/track
  12148. # | | sectors/FAT
  12149. # | media descriptor
  12150. # BPB: sectors
  12151. # Valid media descriptor bytes for MS-DOS:
  12152. #
  12153. # Byte Capacity Media Size and Type
  12154. # -------------------------------------------------
  12155. #
  12156. # F0 2.88 MB 3.5-inch, 2-sided, 36-sector
  12157. # F0 1.44 MB 3.5-inch, 2-sided, 18-sector
  12158. # F9 720K 3.5-inch, 2-sided, 9-sector
  12159. # F9 1.2 MB 5.25-inch, 2-sided, 15-sector
  12160. # FD 360K 5.25-inch, 2-sided, 9-sector
  12161. # FF 320K 5.25-inch, 2-sided, 8-sector
  12162. # FC 180K 5.25-inch, 1-sided, 9-sector
  12163. # FE 160K 5.25-inch, 1-sided, 8-sector
  12164. # FE 250K 8-inch, 1-sided, single-density
  12165. # FD 500K 8-inch, 2-sided, single-density
  12166. # FE 1.2 MB 8-inch, 2-sided, double-density
  12167. # F8 ----- Fixed disk
  12168. #
  12169. # FC xxxK Apricot 70x1x9 boot disk.
  12170. #
  12171. # Originally a bitmap:
  12172. # xxxxxxx0 Not two sided
  12173. # xxxxxxx1 Double sided
  12174. # xxxxxx0x Not 8 SPT
  12175. # xxxxxx1x 8 SPT
  12176. # xxxxx0xx Not Removable drive
  12177. # xxxxx1xx Removable drive
  12178. # 11111xxx Must be one.
  12179. #
  12180. # But now it's rather random:
  12181. # 111111xx Low density disk
  12182. # 00 SS, Not 8 SPT
  12183. # 01 DS, Not 8 SPT
  12184. # 10 SS, 8 SPT
  12185. # 11 DS, 8 SPT
  12186. #
  12187. # 11111001 Double density 3 1/2 floppy disk, high density 5 1/4
  12188. # 11110000 High density 3 1/2 floppy disk
  12189. # 11111000 Hard disk any format
  12190. #
  12191. # all FAT12 (strength=70) floppies with sectorsize 512 added by Joerg Jenderek at Jun 2013
  12192. # https://en.wikipedia.org/wiki/File_Allocation_Table#Exceptions
  12193. # Too Weak.
  12194. #512 ubelong&0xE0ffff00 0xE0ffff00
  12195. # without valid Media descriptor in place of BPB, cases with are done at other places
  12196. #>21 ubyte <0xE5 floppy with old FAT filesystem
  12197. # but valid Media descriptor at begin of FAT
  12198. #>>512 ubyte =0xed 720k
  12199. #>>512 ubyte =0xf0 1440k
  12200. #>>512 ubyte =0xf8 720k
  12201. #>>512 ubyte =0xf9 1220k
  12202. #>>512 ubyte =0xfa 320k
  12203. #>>512 ubyte =0xfb 640k
  12204. #>>512 ubyte =0xfc 180k
  12205. # look like an old DOS directory entry
  12206. #>>>0xA0E ubequad 0
  12207. #>>>>0xA00 ubequad !0
  12208. #!:mime application/x-ima
  12209. #>>512 ubyte =0xfd
  12210. # look for 2nd FAT at different location to distinguish between 360k and 500k
  12211. #>>>0x600 ubelong&0xE0ffff00 0xE0ffff00 360k
  12212. #>>>0x500 ubelong&0xE0ffff00 0xE0ffff00 500k
  12213. #>>>0xA0E ubequad 0
  12214. #!:mime application/x-ima
  12215. #>>512 ubyte =0xfe
  12216. #>>>0x400 ubelong&0xE0ffff00 0xE0ffff00 160k
  12217. #>>>>0x60E ubequad 0
  12218. #>>>>>0x600 ubequad !0
  12219. #!:mime application/x-ima
  12220. #>>>0xC00 ubelong&0xE0ffff00 0xE0ffff00 1200k
  12221. #>>512 ubyte =0xff 320k
  12222. #>>>0x60E ubequad 0
  12223. #>>>>0x600 ubequad !0
  12224. #!:mime application/x-ima
  12225. #>>512 ubyte x \b, Media descriptor 0x%x
  12226. # without x86 jump instruction
  12227. #>>0 ulelong&0x804000E9 !0x000000E9
  12228. # assembler instructions: CLI;MOV SP,1E7;MOV AX;07c0;MOV
  12229. #>>>0 ubequad 0xfabce701b8c0078e \b, MS-DOS 1.12 bootloader
  12230. # IOSYS.COM+MSDOS.COM
  12231. #>>>>0xc4 use 2xDOS-filename
  12232. #>>0 ulelong&0x804000E9 =0x000000E9
  12233. # only x86 short jump instruction found
  12234. #>>>0 ubyte =0xEB
  12235. #>>>>1 ubyte x \b, code offset 0x%x+2
  12236. # https://thestarman.pcministry.com/DOS/ibm100/Boot.htm
  12237. # assembler instructions: CLI;MOV AX,CS;MOV DS,AX;MOV DX,0
  12238. #>>>>(1.b+2) ubequad 0xfa8cc88ed8ba0000 \b, PC-DOS 1.0 bootloader
  12239. # ibmbio.com+ibmdos.com
  12240. #>>>>>0x176 use DOS-filename
  12241. #>>>>>0x181 ubyte x \b+
  12242. #>>>>>0x182 use DOS-filename
  12243. # https://thestarman.pcministry.com/DOS/ibm110/Boot.htm
  12244. # assembler instructions: CLI;MOV AX,CS;MOV DS,AX;XOR DX,DX;MOV
  12245. #>>>>(1.b+2) ubequad 0xfa8cc88ed833d28e \b, PC-DOS 1.1 bootloader
  12246. # ibmbio.com+ibmdos.com
  12247. #>>>>>0x18b use DOS-filename
  12248. #>>>>>0x196 ubyte x \b+
  12249. #>>>>>0x197 use DOS-filename
  12250. # https://en.wikipedia.org/wiki/Zenith_Data_Systems
  12251. # assembler instructions: MOV BX,07c0;MOV SS,BX;MOV SP,01c6
  12252. #>>>>(1.b+2) ubequad 0xbbc0078ed3bcc601 \b, Zenith Data Systems MS-DOS 1.25 bootloader
  12253. # IO.SYS+MSDOS.SYS
  12254. #>>>>>0x20 use 2xDOS-filename
  12255. # https://en.wikipedia.org/wiki/Corona_Data_Systems
  12256. # assembler instructions: MOV AX,CS;MOV DS,AX;CLI;MOV SS,AX;
  12257. #>>>>(1.b+2) ubequad 0x8cc88ed8fa8ed0bc \b, MS-DOS 1.25 bootloader
  12258. # IO.SYS+MSDOS.SYS
  12259. #>>>>>0x69 use 2xDOS-filename
  12260. # assembler instructions: CLI;PUSH CS;POP SS;MOV SP,7c00;
  12261. #>>>>(1.b+2) ubequad 0xfa0e17bc007cb860 \b, MS-DOS 2.11 bootloader
  12262. # defect IO.SYS+MSDOS.SYS ?
  12263. #>>>>>0x162 use 2xDOS-filename
  12264. 0 name cdrom
  12265. >38913 string !NSR0 ISO 9660 CD-ROM filesystem data
  12266. !:mime application/x-iso9660-image
  12267. !:ext iso/iso9660
  12268. >38913 string NSR0 UDF filesystem data
  12269. !:mime application/x-iso9660-image
  12270. !:ext iso/udf
  12271. >>38917 string 1 (version 1.0)
  12272. >>38917 string 2 (version 1.5)
  12273. >>38917 string 3 (version 2.0)
  12274. >>38917 byte >0x33 (unknown version, ID 0x%X)
  12275. >>38917 byte <0x31 (unknown version, ID 0x%X)
  12276. # The next line is not necessary because the MBR staff is done looking for boot signature
  12277. >0x1FE leshort 0xAA55 (DOS/MBR boot sector)
  12278. # "application id" which appears to be used as a volume label
  12279. >32808 string/T >\0 '%.32s'
  12280. >34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable)
  12281. 37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
  12282. !:mime application/x-iso9660-image
  12283. 32777 string CDROM High Sierra CD-ROM filesystem data
  12284. # "application id" which appears to be used as a volume label
  12285. >32816 string/T >\0 '%.32s'
  12286. # CDROM Filesystems
  12287. # https://en.wikipedia.org/wiki/ISO_9660
  12288. # Modified for UDF by gerardo.cacciari@gmail.com
  12289. 32769 string CD001
  12290. # mime line at that position does not work
  12291. # to display CD-ROM (70=81-11) after MBR (113=40+72+1), partition-table (71=50+21) and before Apple Driver Map (51)
  12292. #!:strength -11
  12293. # to display CD-ROM (114=81+33) before MBR (113=40+72+1), partition-table (71=50+21) and Apple Driver Map (51)
  12294. !:strength +35
  12295. >0 use cdrom
  12296. # URL: https://en.wikipedia.org/wiki/NRG_(file_format)
  12297. # Reference: https://dl.opendesktop.org/api/files/download/id/1460731811/
  12298. # 11577-mount-iso-0.9.5.tar.bz2/mount-iso-0.9.5/install.sh
  12299. # From: Joerg Jenderek
  12300. # Note: Only for nero disc with once (DAO) type after 300 KB header
  12301. 339969 string CD001 Nero CD image at 0x4B000
  12302. !:mime application/x-nrg
  12303. !:ext nrg
  12304. >307200 use cdrom
  12305. # .cso files
  12306. # Reference: https://pismotec.com/ciso/ciso.h
  12307. # NOTE: There are two other formats with the same magic but
  12308. # completely incompatible specifications:
  12309. # - GameCube/Wii CISO: https://github.com/dolphin-emu/dolphin/blob/master/Source/Core/DiscIO/CISOBlob.h
  12310. # - PSP CISO: https://github.com/jamie/ciso/blob/master/ciso.h
  12311. 0 string CISO
  12312. # Other fields are used to determine what type of CISO this is:
  12313. # - 0x04 == 0x00200000: GameCube/Wii CISO (block_size)
  12314. # - 0x10 == 0x00000800: PSP CISO (ISO-9660 sector size)
  12315. # - 0x10 == 0x00004000: For >2GB files using maxcso...
  12316. # https://github.com/unknownbrackets/maxcso/issues/26
  12317. # - None of the above: Compact ISO.
  12318. >4 lelong !0
  12319. >>4 lelong !0x200000
  12320. >>>16 lelong !0x800
  12321. >>>>16 lelong !0x4000 Compressed ISO CD image
  12322. # cramfs filesystem - russell@coker.com.au
  12323. 0 lelong 0x28cd3d45 Linux Compressed ROM File System data, little endian
  12324. >4 lelong x size %u
  12325. >8 lelong &1 version #2
  12326. >8 lelong &2 sorted_dirs
  12327. >8 lelong &4 hole_support
  12328. >32 lelong x CRC 0x%x,
  12329. >36 lelong x edition %u,
  12330. >40 lelong x %u blocks,
  12331. >44 lelong x %u files
  12332. 0 belong 0x28cd3d45 Linux Compressed ROM File System data, big endian
  12333. >4 belong x size %u
  12334. >8 belong &1 version #2
  12335. >8 belong &2 sorted_dirs
  12336. >8 belong &4 hole_support
  12337. >32 belong x CRC 0x%x,
  12338. >36 belong x edition %u,
  12339. >40 belong x %u blocks,
  12340. >44 belong x %u files
  12341. # reiserfs - russell@coker.com.au
  12342. 0x10034 string ReIsErFs ReiserFS V3.5
  12343. 0x10034 string ReIsEr2Fs ReiserFS V3.6
  12344. 0x10034 string ReIsEr3Fs ReiserFS V3.6.19
  12345. >0x1002c leshort x block size %d
  12346. >0x10032 leshort &2 (mounted or unclean)
  12347. >0x10000 lelong x num blocks %d
  12348. >0x10040 lelong 1 tea hash
  12349. >0x10040 lelong 2 yura hash
  12350. >0x10040 lelong 3 r5 hash
  12351. # EST flat binary format (which isn't, but anyway)
  12352. # From: Mark Brown <broonie@sirena.org.uk>
  12353. 0 string ESTFBINR EST flat binary
  12354. # Aculab VoIP firmware
  12355. # From: Mark Brown <broonie@sirena.org.uk>
  12356. 0 string VoIP\ Startup\ and Aculab VoIP firmware
  12357. >35 string x format %s
  12358. # From: Mark Brown <broonie@sirena.org.uk> [old]
  12359. # From: Behan Webster <behanw@websterwood.com>
  12360. 0 belong 0x27051956 u-boot legacy uImage,
  12361. >32 string x %s,
  12362. >28 byte 0 Invalid os/
  12363. >28 byte 1 OpenBSD/
  12364. >28 byte 2 NetBSD/
  12365. >28 byte 3 FreeBSD/
  12366. >28 byte 4 4.4BSD/
  12367. >28 byte 5 Linux/
  12368. >28 byte 6 SVR4/
  12369. >28 byte 7 Esix/
  12370. >28 byte 8 Solaris/
  12371. >28 byte 9 Irix/
  12372. >28 byte 10 SCO/
  12373. >28 byte 11 Dell/
  12374. >28 byte 12 NCR/
  12375. >28 byte 13 LynxOS/
  12376. >28 byte 14 VxWorks/
  12377. >28 byte 15 pSOS/
  12378. >28 byte 16 QNX/
  12379. >28 byte 17 Firmware/
  12380. >28 byte 18 RTEMS/
  12381. >28 byte 19 ARTOS/
  12382. >28 byte 20 Unity OS/
  12383. >28 byte 21 INTEGRITY/
  12384. >29 byte 0 \bInvalid CPU,
  12385. >29 byte 1 \bAlpha,
  12386. >29 byte 2 \bARM,
  12387. >29 byte 3 \bIntel x86,
  12388. >29 byte 4 \bIA64,
  12389. >29 byte 5 \bMIPS,
  12390. >29 byte 6 \bMIPS 64-bit,
  12391. >29 byte 7 \bPowerPC,
  12392. >29 byte 8 \bIBM S390,
  12393. >29 byte 9 \bSuperH,
  12394. >29 byte 10 \bSparc,
  12395. >29 byte 11 \bSparc 64-bit,
  12396. >29 byte 12 \bM68K,
  12397. >29 byte 13 \bNios-32,
  12398. >29 byte 14 \bMicroBlaze,
  12399. >29 byte 15 \bNios-II,
  12400. >29 byte 16 \bBlackfin,
  12401. >29 byte 17 \bAVR32,
  12402. >29 byte 18 \bSTMicroelectronics ST200,
  12403. >29 byte 19 \bSandbox architecture,
  12404. >29 byte 20 \bANDES Technology NDS32,
  12405. >29 byte 21 \bOpenRISC 1000,
  12406. >29 byte 22 \bARM 64-bit,
  12407. >29 byte 23 \bDesignWare ARC,
  12408. >29 byte 24 \bx86_64,
  12409. >29 byte 25 \bXtensa,
  12410. >29 byte 26 \bRISC-V,
  12411. >30 byte 0 Invalid Image
  12412. >30 byte 1 Standalone Program
  12413. >30 byte 2 OS Kernel Image
  12414. >30 byte 3 RAMDisk Image
  12415. >30 byte 4 Multi-File Image
  12416. >30 byte 5 Firmware Image
  12417. >30 byte 6 Script File
  12418. >30 byte 7 Filesystem Image (any type)
  12419. >30 byte 8 Binary Flat Device Tree BLOB
  12420. >31 byte 0 (Not compressed),
  12421. >31 byte 1 (gzip),
  12422. >31 byte 2 (bzip2),
  12423. >31 byte 3 (lzma),
  12424. >12 belong x %d bytes,
  12425. >8 bedate x %s,
  12426. >16 belong x Load Address: 0x%08X,
  12427. >20 belong x Entry Point: 0x%08X,
  12428. >4 belong x Header CRC: 0x%08X,
  12429. >24 belong x Data CRC: 0x%08X
  12430. # JFFS2 file system
  12431. 0 leshort 0x1984 Linux old jffs2 filesystem data little endian
  12432. 0 beshort 0x1984 Linux old jffs2 filesystem data big endian
  12433. 0 leshort 0x1985 Linux jffs2 filesystem data little endian
  12434. 0 beshort 0x1985 Linux jffs2 filesystem data big endian
  12435. # Squashfs
  12436. 0 name squashfs
  12437. >28 beshort x version %d.
  12438. >30 beshort x \b%d,
  12439. >20 beshort 0 uncompressed,
  12440. >20 beshort 1 zlib
  12441. >20 beshort 2 lzma
  12442. >20 beshort 3 lzo
  12443. >20 beshort 4 xz
  12444. >20 beshort 5 lz4
  12445. >20 beshort 6 zstd
  12446. >20 beshort >0 compressed,
  12447. >28 beshort <3
  12448. >>8 belong x %d bytes,
  12449. >28 beshort >2
  12450. >>28 beshort <4
  12451. >>>63 bequad x %lld bytes,
  12452. >>28 beshort >3
  12453. >>>40 bequad x %lld bytes,
  12454. #>>67 belong x %d bytes,
  12455. >4 belong x %d inodes,
  12456. >28 beshort <2
  12457. >>32 beshort x blocksize: %d bytes,
  12458. >28 beshort >1
  12459. >>28 beshort <4
  12460. >>>51 belong x blocksize: %d bytes,
  12461. >>28 beshort >3
  12462. >>>12 belong x blocksize: %d bytes,
  12463. >28 beshort <4
  12464. >>39 bedate x created: %s
  12465. >28 beshort >3
  12466. >>8 bedate x created: %s
  12467. 0 string sqsh Squashfs filesystem, big endian,
  12468. >0 use squashfs
  12469. 0 string hsqs Squashfs filesystem, little endian,
  12470. >0 use \^squashfs
  12471. # AFS Dump Magic
  12472. # From: Ty Sarna <tsarna@sarna.org>
  12473. 0 string \x01\xb3\xa1\x13\x22 AFS Dump
  12474. >&0 belong x (v%d)
  12475. >>&0 byte 0x76
  12476. >>>&0 belong x Vol %d,
  12477. >>>>&0 byte 0x6e
  12478. >>>>>&0 string x %s
  12479. >>>>>>&1 byte 0x74
  12480. >>>>>>>&0 beshort 2
  12481. >>>>>>>>&4 bedate x on: %s
  12482. >>>>>>>>&0 bedate =0 full dump
  12483. >>>>>>>>&0 bedate !0 incremental since: %s
  12484. #----------------------------------------------------------
  12485. #delta ISO Daniel Novotny (dnovotny@redhat.com)
  12486. 0 string DISO Delta ISO data
  12487. !:strength +50
  12488. >4 belong x version %d
  12489. # VMS backup savesets - gerardo.cacciari@gmail.com
  12490. #
  12491. 4 string \x01\x00\x01\x00\x01\x00
  12492. >(0.s+16) string \x01\x01
  12493. >>&(&0.b+8) byte 0x42 OpenVMS backup saveset data
  12494. >>>40 lelong x (block size %d,
  12495. >>>49 string >\0 original name '%s',
  12496. >>>2 short 1024 VAX generated)
  12497. >>>2 short 2048 AXP generated)
  12498. >>>2 short 4096 I64 generated)
  12499. # Summary: Oracle Clustered Filesystem
  12500. # Created by: Aaron Botsis <redhat@digitalmafia.org>
  12501. 8 string OracleCFS Oracle Clustered Filesystem,
  12502. >4 long x rev %d
  12503. >0 long x \b.%d,
  12504. >560 string x label: %.64s,
  12505. >136 string x mountpoint: %.128s
  12506. # Summary: Oracle ASM tagged volume
  12507. # Created by: Aaron Botsis <redhat@digitalmafia.org>
  12508. 32 string ORCLDISK Oracle ASM Volume,
  12509. >40 string x Disk Name: %0.12s
  12510. 32 string ORCLCLRD Oracle ASM Volume (cleared),
  12511. >40 string x Disk Name: %0.12s
  12512. # Oracle Clustered Filesystem - Aaron Botsis <redhat@digitalmafia.org>
  12513. 8 string OracleCFS Oracle Clustered Filesystem,
  12514. >4 long x rev %d
  12515. >0 long x \b.%d,
  12516. >560 string x label: %.64s,
  12517. >136 string x mountpoint: %.128s
  12518. # Oracle ASM tagged volume - Aaron Botsis <redhat@digitalmafia.org>
  12519. 32 string ORCLDISK Oracle ASM Volume,
  12520. >40 string x Disk Name: %0.12s
  12521. 32 string ORCLCLRD Oracle ASM Volume (cleared),
  12522. >40 string x Disk Name: %0.12s
  12523. # Compaq/HP RILOE floppy image
  12524. # From: Dirk Jagdmann <doj@cubic.org>
  12525. 0 string CPQRFBLO Compaq/HP RILOE floppy image
  12526. #------------------------------------------------------------------------------
  12527. # Files-11 On-Disk Structure (File system for various RSX-11 and VMS flavours).
  12528. # These bits come from LBN 1 (home block) of ODS-1, ODS-2 and ODS-5 volumes,
  12529. # which is mapped to VBN 2 of [000000]INDEXF.SYS;1 - gerardo.cacciari@gmail.com
  12530. #
  12531. 1008 string DECFILE11 Files-11 On-Disk Structure
  12532. >525 byte x (ODS-%d);
  12533. >1017 string A RSX-11, VAX/VMS or OpenVMS VAX file system;
  12534. >1017 string B
  12535. >>525 byte 2 VAX/VMS or OpenVMS file system;
  12536. >>525 byte 5 OpenVMS Alpha or Itanium file system;
  12537. >984 string x volume label is '%-12.12s'
  12538. # From: Thomas Klausner <wiz@NetBSD.org>
  12539. # https://filext.com/file-extension/DAA
  12540. # describes the daa file format. The magic would be:
  12541. 0 string DAA\x0\x0\x0\x0\x0 PowerISO Direct-Access-Archive
  12542. # From Albert Cahalan <acahalan@gmail.com>
  12543. # really le32 operation,destination,payloadsize (but quite predictable)
  12544. # 01 00 00 00 00 00 00 c0 00 02 00 00
  12545. 0 string \1\0\0\0\0\0\0\300\0\2\0\0 Marvell Libertas firmware
  12546. # From Eric Sandeen
  12547. # GFS2
  12548. 0x10000 belong 0x01161970
  12549. >0x10018 belong 0x0000051d GFS1 Filesystem
  12550. >>0x10024 belong x (blocksize %d,
  12551. >>0x10060 string >\0 lockproto %s)
  12552. >0x10018 belong 0x00000709 GFS2 Filesystem
  12553. >>0x10024 belong x (blocksize %d,
  12554. >>0x10060 string >\0 lockproto %s)
  12555. # Russell Coker <russell@coker.com.au>
  12556. 0x10040 string _BHRfS_M BTRFS Filesystem
  12557. >0x1012b string >\0 label "%s",
  12558. >0x10090 lelong x sectorsize %d,
  12559. >0x10094 lelong x nodesize %d,
  12560. >0x10098 lelong x leafsize %d,
  12561. >0x10020 belong x UUID=%08x-
  12562. >0x10024 beshort x \b%04x-
  12563. >0x10026 beshort x \b%04x-
  12564. >0x10028 beshort x \b%04x-
  12565. >0x1002a beshort x \b%04x
  12566. >0x1002c belong x \b%08x,
  12567. >0x10078 lequad x %lld/
  12568. >0x10070 lequad x \b%lld bytes used,
  12569. >0x10088 lequad x %lld devices
  12570. # dvdisaster's .ecc
  12571. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  12572. 0 string *dvdisaster* dvdisaster error correction file
  12573. # xfs metadump image
  12574. # mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog
  12575. # but can we do the << ? For now it's always 512 (0x200) anyway.
  12576. 0 string XFSM
  12577. >0x200 string XFSB XFS filesystem metadump image
  12578. # Type: CROM filesystem
  12579. # From: Werner Fink <werner@suse.de>
  12580. 0 string CROMFS CROMFS
  12581. >6 string >\0 \b version %2.2s,
  12582. >8 ulequad >0 \b block data at %lld,
  12583. >16 ulequad >0 \b fblock table at %lld,
  12584. >24 ulequad >0 \b inode table at %lld,
  12585. >32 ulequad >0 \b root at %lld,
  12586. >40 ulelong >0 \b fblock size = %d,
  12587. >44 ulelong >0 \b block size = %d,
  12588. >48 ulequad >0 \b bytes = %lld
  12589. # Type: xfs metadump image
  12590. # From: Daniel Novotny <dnovotny@redhat.com>
  12591. # mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog
  12592. # but can we do the << ? For now it's always 512 (0x200) anyway.
  12593. 0 string XFSM
  12594. >0x200 string XFSB XFS filesystem metadump image
  12595. # Type: delta ISO
  12596. # From: Daniel Novotny <dnovotny@redhat.com>
  12597. 0 string DISO Delta ISO data,
  12598. >4 belong x version %d
  12599. # JFS2 (Journaling File System) image. (Old JFS1 has superblock at 0x1000.)
  12600. # See linux/fs/jfs/jfs_superblock.h for layout; see jfs_filsys.h for flags.
  12601. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  12602. 0x8000 string JFS1
  12603. # Because it's text-only magic, check a binary value (version) to be sure.
  12604. # Should always be 2, but mkfs.jfs writes it as 1. Needs to be 2 or 1 to be
  12605. # mountable.
  12606. >&0 lelong <3 JFS2 filesystem image
  12607. # Label is followed by a UUID; we have to limit string length to avoid
  12608. # appending the UUID in the case of a 16-byte label.
  12609. >>&144 regex [\x20-\x7E]{1,16} (label "%s")
  12610. >>&0 lequad x \b, %lld blocks
  12611. >>&8 lelong x \b, blocksize %d
  12612. >>&32 lelong&0x00000006 >0 (dirty)
  12613. >>&36 lelong >0 (compressed)
  12614. # LFS
  12615. 0 lelong 0x070162 LFS filesystem image
  12616. >4 lelong 1 version 1,
  12617. >>8 lelong x \b blocks %u,
  12618. >>12 lelong x \b blocks per segment %u,
  12619. >4 lelong 2 version 2,
  12620. >>8 lelong x \b fragments %u,
  12621. >>12 lelong x \b bytes per segment %u,
  12622. >16 lelong x \b disk blocks %u,
  12623. >20 lelong x \b block size %u,
  12624. >24 lelong x \b fragment size %u,
  12625. >28 lelong x \b fragments per block %u,
  12626. >32 lelong x \b start for free list %u,
  12627. >36 lelong x \b number of free blocks %d,
  12628. >40 lelong x \b number of files %u,
  12629. >44 lelong x \b blocks available for writing %d,
  12630. >48 lelong x \b inodes in cache %d,
  12631. >52 lelong x \b inode file disk address 0x%x,
  12632. >56 lelong x \b inode file inode number %u,
  12633. >60 lelong x \b address of last segment written 0x%x,
  12634. >64 lelong x \b address of next segment to write 0x%x,
  12635. >68 lelong x \b address of current segment written 0x%x
  12636. 0 string td\000 floppy image data (TeleDisk, compressed)
  12637. 0 string TD\000 floppy image data (TeleDisk)
  12638. 0 string CQ\024 floppy image data (CopyQM,
  12639. >16 leshort x %d sectors,
  12640. >18 leshort x %d heads.)
  12641. 0 string ACT\020Apricot\020disk\020image\032\004 floppy image data (ApriDisk)
  12642. 0 beshort 0xAA58 floppy image data (IBM SaveDskF, old)
  12643. 0 beshort 0xAA59 floppy image data (IBM SaveDskF)
  12644. 0 beshort 0xAA5A floppy image data (IBM SaveDskF, compressed)
  12645. 0 string \074CPM_Disk\076 disk image data (YAZE)
  12646. # ReFS
  12647. # Richard W.M. Jones <rjones@redhat.com>
  12648. 0 string \0\0\0ReFS\0 ReFS filesystem image
  12649. # EFW encase image file format:
  12650. # Gregoire Passault
  12651. # http://www.forensicswiki.org/wiki/Encase_image_file_format
  12652. 0 string EVF\x09\x0d\x0a\xff\x00 EWF/Expert Witness/EnCase image file format
  12653. # UBIfs
  12654. # Linux kernel sources: fs/ubifs/ubifs-media.h
  12655. 0 lelong 0x06101831
  12656. >0x16 leshort 0 UBIfs image
  12657. >0x08 lequad x \b, sequence number %llu
  12658. >0x10 leshort x \b, length %u
  12659. >0x04 lelong x \b, CRC 0x%08x
  12660. 0 lelong 0x23494255
  12661. >0x04 leshort <2
  12662. >0x05 string \0\0\0
  12663. >0x1c string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
  12664. >0x04 leshort x UBI image, version %u
  12665. # NEC PC-88 2D disk image
  12666. # From Fabio R. Schmidlin <sd-snatcher@users.sourceforge.net>
  12667. 0x20 ulelong&0xFFFFFEFF 0x2A0
  12668. >0x10 string \0\0\0\0\0\0\0\0\0\0
  12669. >>0x280 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
  12670. >>>0x1A ubyte&0xEF 0
  12671. >>>>0x1B ubyte&0x8F 0
  12672. >>>>>0x1B ubyte&70 <0x40
  12673. >>>>>>0x1C ulelong >0x21
  12674. >>>>>>>0 regex [[:print:]]* NEC PC-88 disk image, name=%s
  12675. >>>>>>>>0x1B ubyte 0 \b, media=2D
  12676. >>>>>>>>0x1B ubyte 0x10 \b, media=2DD
  12677. >>>>>>>>0x1B ubyte 0x20 \b, media=2HD
  12678. >>>>>>>>0x1B ubyte 0x30 \b, media=1D
  12679. >>>>>>>>0x1B ubyte 0x40 \b, media=1DD
  12680. >>>>>>>>0x1A ubyte 0x10 \b, write-protected
  12681. # HDD Raw Copy Tool disk image, file extension: .imgc
  12682. # From Benjamin Vanheuverzwijn <bvanheu@gmail.com>
  12683. 0 pstring HDD\ Raw\ Copy\ Tool %s
  12684. >0x100 pstring x %s
  12685. >0x200 pstring x - HD model: %s
  12686. #>0x300 pstring x unknown %s
  12687. >0x400 pstring x serial: %s
  12688. #>0x500 pstring x unknown: %s
  12689. !:ext imgc
  12690. # http://martin.hinner.info/fs/bfs/bfs-structure.html
  12691. 0 lelong 0x1BADFACE SCO UnixWare BFS filesystem
  12692. # https://arstechnica.com/information-technology/2018/07/the-beos-filesystem/
  12693. 32 lelong 0x42465331 BE/OS BFS1 filesystem
  12694. >36 lelong x \b, byte order %d
  12695. >40 lelong x \b, block size %d
  12696. >44 lelong x \b, block shift %d
  12697. >48 lequad x \b, total blocks %lld
  12698. >56 lequad x \b, used blocks %lld
  12699. 0 name next
  12700. >0 lelong x \b, size %d
  12701. >4 string x \b, label %s
  12702. # https://opensource.apple.com/source/IOStorageFamily/IOStorageFamily-44.3\
  12703. # /IONeXTPartitionScheme.h
  12704. 0 string NeXT NeXT version 1 disklabel
  12705. >12 use next
  12706. 0 string dlV1 NeXT version 2 disklabel
  12707. >12 use next
  12708. 0 string dlV2 NeXT version 3 disklabel
  12709. >12 use next
  12710. #------------------------------------------------------------------------------
  12711. # $File: finger,v 1.3 2019/04/19 00:42:27 christos Exp $
  12712. # fingerprint: file(1) magic for fingerprint data
  12713. # XPM bitmaps)
  12714. #
  12715. # https://cgit.freedesktop.org/libfprint/libfprint/tree/libfprint/data.c
  12716. 0 string FP1 libfprint fingerprint data V1
  12717. >3 beshort x \b, driver_id %x
  12718. >5 belong x \b, devtype %x
  12719. 0 string FP2 libfprint fingerprint data V2
  12720. >3 beshort x \b, driver_id %x
  12721. >5 belong x \b, devtype %x
  12722. #------------------------------------------------------------------------------
  12723. # $File: flash,v 1.15 2019/04/19 00:42:27 christos Exp $
  12724. # flash: file(1) magic for Macromedia Flash file format
  12725. #
  12726. # See
  12727. #
  12728. # https://www.macromedia.com/software/flash/open/
  12729. # https://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/\
  12730. # en/devnet/swf/pdf/swf-file-format-spec.pdf page 27
  12731. #
  12732. 0 name swf-details
  12733. >0 string F
  12734. >>8 byte&0xfd 0x08 Macromedia Flash data
  12735. !:mime application/x-shockwave-flash
  12736. >>>3 byte x \b, version %d
  12737. >>8 byte&0xfe 0x10 Macromedia Flash data
  12738. !:mime application/x-shockwave-flash
  12739. >>>3 byte x \b, version %d
  12740. >>8 byte 0x18 Macromedia Flash data
  12741. !:mime application/x-shockwave-flash
  12742. >>>3 byte x \b, version %d
  12743. >>8 beshort&0xff87 0x2000 Macromedia Flash data
  12744. !:mime application/x-shockwave-flash
  12745. >>>3 byte x \b, version %d
  12746. >>8 beshort&0xffe0 0x3000 Macromedia Flash data
  12747. !:mime application/x-shockwave-flash
  12748. >>>3 byte x \b, version %d
  12749. >>8 byte&0x7 0
  12750. >>>8 ubyte >0x2f
  12751. >>>>9 ubyte <0x20 Macromedia Flash data
  12752. !:mime application/x-shockwave-flash
  12753. >>>>>3 byte x \b, version %d
  12754. >0 string C
  12755. >>8 byte 0x78 Macromedia Flash data (compressed)
  12756. !:mime application/x-shockwave-flash
  12757. >>>3 byte x \b, version %d
  12758. >0 string Z
  12759. >>8 byte 0x5d Macromedia Flash data (lzma compressed)
  12760. !:mime application/x-shockwave-flash
  12761. >>>3 byte x \b, version %d
  12762. 1 string WS
  12763. >4 ulelong >14
  12764. >>3 ubyte !0
  12765. >>>0 use swf-details
  12766. # From: Cal Peake <cp@absolutedigital.net>
  12767. 0 string FLV\x01 Macromedia Flash Video
  12768. !:mime video/x-flv
  12769. #
  12770. # Yosu Gomez
  12771. 0 string AGD2\xbe\xb8\xbb\xcd\x00 Macromedia Freehand 7 Document
  12772. 0 string AGD3\xbe\xb8\xbb\xcc\x00 Macromedia Freehand 8 Document
  12773. # From Dave Wilson
  12774. 0 string AGD4\xbe\xb8\xbb\xcb\x00 Macromedia Freehand 9 Document
  12775. #------------------------------------------------------------------------------
  12776. # $File: flif,v 1.1 2015/11/23 22:04:36 christos Exp $
  12777. # flif: Magic data for file(1) command.
  12778. # FLIF (Free Lossless Image Format)
  12779. 0 string FLIF FLIF
  12780. >4 string <H image data
  12781. >>6 beshort x \b, %u
  12782. >>8 beshort x \bx%u
  12783. >>5 string 1 \b, 8-bit/color,
  12784. >>5 string 2 \b, 16-bit/color,
  12785. >>4 string 1 \b, grayscale, non-interlaced
  12786. >>4 string 3 \b, RGB, non-interlaced
  12787. >>4 string 4 \b, RGBA, non-interlaced
  12788. >>4 string A \b, grayscale
  12789. >>4 string C \b, RGB, interlaced
  12790. >>4 string D \b, RGBA, interlaced
  12791. >4 string >H \b, animation data
  12792. >>5 ubyte <255 \b, %i frames
  12793. >>>7 beshort x \b, %u
  12794. >>>9 beshort x \bx%u
  12795. >>>6 string =1 \b, 8-bit/color
  12796. >>>6 string =2 \b, 16-bit/color
  12797. >>5 ubyte 0xFF
  12798. >>>6 beshort x \b, %i frames,
  12799. >>>9 beshort x \b, %u
  12800. >>>11 beshort x \bx%u
  12801. >>>8 string =1 \b, 8-bit/color
  12802. >>>8 string =2 \b, 16-bit/color
  12803. >>4 string =Q \b, grayscale, non-interlaced
  12804. >>4 string =S \b, RGB, non-interlaced
  12805. >>4 string =T \b, RGBA, non-interlaced
  12806. >>4 string =a \b, grayscale
  12807. >>4 string =c \b, RGB, interlaced
  12808. >>4 string =d \b, RGBA, interlaced
  12809. #------------------------------------------------------------------------------
  12810. # $File: fonts,v 1.45 2021/01/03 21:00:11 christos Exp $
  12811. # fonts: file(1) magic for font data
  12812. #
  12813. 0 search/1 FONT ASCII vfont text
  12814. 0 short 0436 Berkeley vfont data
  12815. 0 short 017001 byte-swapped Berkeley vfont data
  12816. # PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com
  12817. 0 string %!PS-AdobeFont-1. PostScript Type 1 font text
  12818. >20 string >\0 (%s)
  12819. 6 string %!PS-AdobeFont-1. PostScript Type 1 font program data
  12820. >26 string >\0 (%s)
  12821. 0 string %!FontType1 PostScript Type 1 font program data
  12822. 6 string %!FontType1 PostScript Type 1 font program data
  12823. 0 string %!PS-Adobe-3.0\ Resource-Font PostScript Type 1 font text
  12824. # Summary: PostScript Type 1 Printer Font Metrics
  12825. # URL: https://en.wikipedia.org/wiki/PostScript_fonts
  12826. # Reference: https://partners.adobe.com/public/developer/en/font/5178.PFM.pdf
  12827. # Modified by: Joerg Jenderek
  12828. # Note: moved from ./msdos magic
  12829. # dfVersion 256=0100h
  12830. 0 uleshort 0x0100
  12831. # GRR: line above is too general as it catches also TrueType font,
  12832. # raw G3 data FAX, WhatsApp encrypted and Panorama database
  12833. # dfType 129=0081h
  12834. >66 uleshort 0x0081
  12835. # dfVertRes 300=012Ch not needed as additional test
  12836. #>>70 uleshort 0x012c
  12837. # dfHorizRes 300=012Ch
  12838. #>>>72 uleshort 0x012c
  12839. # dfDriverInfo points to postscript information section
  12840. >>(101.l) string/c Postscript Printer Font Metrics
  12841. # above labeled "PFM data" by ./msdos (version 5.28) or "Adobe Printer Font Metrics" by TrID
  12842. !:mime application/x-font-pfm
  12843. # AppleShare Print Server
  12844. #!:apple ASPS????
  12845. !:ext pfm
  12846. # dfCopyright 60 byte null padded Copyright string. uncomment it to get old looking
  12847. #>>>6 string >\060 - %-.60s
  12848. # dfDriverInfo
  12849. >>>139 ulelong >0
  12850. # often abbreviated and same as filename
  12851. >>>>(139.l) string x %s
  12852. # dfSize
  12853. >>>2 ulelong x \b, %d bytes
  12854. # dfFace 210=D2h 9Eh
  12855. >>>105 ulelong >0
  12856. # Windows font name
  12857. >>>>(105.l) string x \b, %s
  12858. # dfItalic
  12859. >>>80 ubyte 1 italic
  12860. # dfUnderline
  12861. >>>81 ubyte 1 underline
  12862. # dfStrikeOut
  12863. >>>82 ubyte 1 strikeout
  12864. # dfWeight 400=0x0190 300=0x012c 500=0x01f4 600=0x0258 700=0x02bc
  12865. >>>83 uleshort >699 bold
  12866. # dfPitchAndFamily 16 17 48 49 64 65
  12867. >>>90 ubyte 16 serif
  12868. >>>90 ubyte 17 serif proportional
  12869. #>>>90 ubyte 48 other
  12870. >>>90 ubyte 49 proportional
  12871. >>>90 ubyte 64 script
  12872. >>>90 ubyte 65 script proportional
  12873. # X11 font files in SNF (Server Natural Format) format
  12874. # updated by Joerg Jenderek at Feb 2013
  12875. # http://computer-programming-forum.com/51-perl/8f22fb96d2e34bab.htm
  12876. 0 belong 00000004 X11 SNF font data, MSB first
  12877. #>104 belong 00000004 X11 SNF font data, MSB first
  12878. !:mime application/x-font-sfn
  12879. # GRR: line below too general as it catches also Xbase index file t3-CHAR.NDX
  12880. 0 lelong 00000004
  12881. >104 lelong 00000004 X11 SNF font data, LSB first
  12882. !:mime application/x-font-sfn
  12883. # X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  12884. 0 search/1 STARTFONT\ X11 BDF font text
  12885. # From: Joerg Jenderek
  12886. # URL: https://grub.gibibit.com/New_font_format
  12887. # Reference: util/grub-mkfont.c
  12888. # include/grub/fontformat.h
  12889. # FONT_FORMAT_SECTION_NAMES_FILE
  12890. 0 string FILE
  12891. # FONT_FORMAT_PFF2_MAGIC
  12892. >8 string PFF2
  12893. # leng 4 only at the moment
  12894. >>4 ubelong 4
  12895. # FONT_FORMAT_SECTION_NAMES_FONT_NAME
  12896. >>>12 string NAME GRUB2 font
  12897. !:mime application/x-font-pf2
  12898. !:ext pf2
  12899. # length of font_name
  12900. >>>>16 ubelong >0
  12901. # font_name
  12902. >>>>>20 string >\0 "%-s"
  12903. # X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com)
  12904. # PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
  12905. 0 string \001fcp X11 Portable Compiled Font data,
  12906. >12 lelong ^0x08 bit: LSB,
  12907. >12 lelong &0x08 bit: MSB,
  12908. >12 lelong ^0x04 byte: LSB first
  12909. >12 lelong &0x04 byte: MSB first
  12910. 0 string D1.0\015 X11 Speedo font data
  12911. #------------------------------------------------------------------------------
  12912. # FIGlet fonts and controlfiles
  12913. # From figmagic supplied with Figlet version 2.2
  12914. # "David E. O'Brien" <obrien@FreeBSD.ORG>
  12915. 0 string flf FIGlet font
  12916. >3 string >2a version %-2.2s
  12917. 0 string flc FIGlet controlfile
  12918. >3 string >2a version %-2.2s
  12919. # libGrx graphics lib fonts, from Albert Cahalan (acahalan@cs.uml.edu)
  12920. # Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
  12921. 0 belong 0x14025919 libGrx font data,
  12922. >8 leshort x %dx
  12923. >10 leshort x \b%d
  12924. >40 string x %s
  12925. # Misc. DOS VGA fonts, from Albert Cahalan (acahalan@cs.uml.edu)
  12926. # Update: Joerg Jenderek
  12927. # URL: http://fileformats.archiveteam.org/wiki/CPI
  12928. # Reference: http://www.delorie.com/djgpp/doc/rbinter/it/58/17.html
  12929. 0 belong 0xff464f4e DOS code page font data collection
  12930. !:mime font/x-dos-cpi
  12931. !:ext cpi
  12932. 0 string \x7fDRFONT DR-DOS code page font data collection
  12933. !:mime font/x-drdos-cpi
  12934. !:ext cpi
  12935. 7 belong 0x00454741 DOS code page font data
  12936. 7 belong 0x00564944 DOS code page font data (from Linux?)
  12937. 4098 string DOSFONT DOSFONT2 encrypted font data
  12938. # From: Joerg Jenderek
  12939. # URL: http://fileformats.archiveteam.org/wiki/GEM_bitmap_font
  12940. # Reference: http://cd.textfiles.com/ataricompendium/BOOK/HTML/APPENDC.HTM#cnt
  12941. #
  12942. # usual case with lightening mask and skewing mask 5555h~UU
  12943. #62 ulelong 0x55555555
  12944. # skip cl8m8ocofedso.testfile by looking for face size lower/equal 72
  12945. #>2 uleshort <73
  12946. #>>0 use gdos-font
  12947. # BOX18.GFT COWBOY30.GFT ROYALK30.GFT
  12948. #62 ulelong 0
  12949. # skip ISO 9660 CD-ROM ./filesystem by looking for low positive face size
  12950. #>2 uleshort >2
  12951. # skip DOS 2.0 backup id file ./msdos by looking for face size lower/equal 72
  12952. #>>2 uleshort <73
  12953. # skip MS oem.hlp, some Windows ICO ./msdos by looking for valid long name like WYE
  12954. #>>>4 ulelong >0x001F1f1F
  12955. # skip Microsoft WinWord 2.0 ./msdos by looking for positive offset to font data
  12956. #>>>>76 ulelong >83
  12957. #>>>>>0 use gdos-font
  12958. 0 name gdos-font
  12959. >0 uleshort x GEM GDOS font
  12960. !:mime application/x-font-gdos
  12961. # also .eps found like AA070GEP.EPS AI360GEP.EPS
  12962. !:ext fnt/gtf
  12963. # font name like Big&Tall, Celtic #s, Courier, University Bold, WYE
  12964. >4 string x %.32s
  12965. # face size in points 3-72 SLSS03CG.FNT H1CELT72.FNT
  12966. >2 uleshort x %u
  12967. # face ID (must be unique)
  12968. >0 uleshort x \b, ID 0x%4.4x
  12969. # lowest character index in face (4 but usually 32 for disk-loaded fonts)
  12970. #>36 uleshort !32 \b, unusual character index %u
  12971. # width of the widest character like 0 8 10 12 16 24 32
  12972. #>50 uleshort x \b, %u char width
  12973. # width of the widest character cell like 8 11 12 14 15 16 33 67
  12974. #>52 uleshort x \b, %u cell width
  12975. # thickening size in pixel like 0 1 2 3 4 5 6 7 8
  12976. #>58 uleshort x \b, %u thick
  12977. # lightening mask to eliminate pixels, usually 5555h
  12978. >62 uleshort !0x5555 \b, lightening mask 0x%x
  12979. # skewing mask to determine when to perform additional rotation when skewing, usually 5555h
  12980. >64 uleshort !0x5555 \b, skewing mask 0x%x
  12981. # offset to optional horizontal offset table 0 58h~88 5eh 252h
  12982. #>68 ulelong x \b, 0x%x horizontal table offset
  12983. # offset of character offset table 54h for many *.GFT 55h 58h 5Eh 120h 1D4h 202h 220h
  12984. #>72 ulelong x \b, 0x%x coffset
  12985. # offset to font data like 116h 118h 158 20Ah 20Eh
  12986. >76 ulelong x \b, 0x%x foffset
  12987. # form width in bytes like 58 67 156 190 227 317 345
  12988. #>80 uleshort x \b, %u fwidth
  12989. # form height in bytes like 4 8 11 17 26 56 70 90 120 146 150
  12990. #>82 uleshort x \b, %u fheight
  12991. # pointer to the next font like 0 10000h 20000h 30000h 40000h 60000h 80000h E0000h D0000h
  12992. #>84 ulelong x \b, 0x%x noffset
  12993. # downloadable fonts for browser (prints type) anthon@mnt.org
  12994. # https://tools.ietf.org/html/rfc3073
  12995. 0 string PFR1 Portable Font Resource font data (new)
  12996. >102 string >0 \b: %s
  12997. 0 string PFR0 Portable Font Resource font data (old)
  12998. >4 beshort >0 version %d
  12999. # True Type fonts
  13000. # Modified by: Joerg Jenderek
  13001. # URL: https://en.wikipedia.org/wiki/TrueType
  13002. # Reference: https://developer.apple.com/fonts/TrueType-Reference-Manual/
  13003. #
  13004. # sfnt version "typ1" used by some Apple, but no example found
  13005. 0 string typ1
  13006. >0 use sfnt-font
  13007. >0 use sfnt-names
  13008. # sfnt version "true" used by some Apple
  13009. 0 string true
  13010. >0 use sfnt-font
  13011. >0 use sfnt-names
  13012. # GRR: below test is too general
  13013. # sfnt version often 0x00010000
  13014. 0 string \000\001\000\000
  13015. >0 use sfnt-font
  13016. >0 use sfnt-names
  13017. # validate and display sfnt font data like number of tables
  13018. 0 name sfnt-font
  13019. # file 5.30 version assumes 00FFh as maximal number of tables
  13020. #>4 ubeshort <0x0100
  13021. # maximal 27 tables found like in Skia.ttf
  13022. # 46 different table names mentioned on Apple specification
  13023. # skip 1st sequence of DOS 2 backup with path separator (\~92 or /~47) misinterpreted as table number
  13024. >4 ubeshort <47
  13025. # skip bad examples with garbage table names like in a5.show HYPERC MAC
  13026. # tag names consist of up to four characters padded with spaces at end like
  13027. # BASE DSIG OS/2 Zapf acnt glyf cvt vmtx xref ...
  13028. >>12 regex/4l \^[A-Za-z][A-Za-z][A-Za-z/][A-Za-z2\ ]
  13029. #>>>0 ubelong x \b, sfnt version 0x%x
  13030. >>>0 ubelong !0x4f54544f TrueType
  13031. !:mime font/sfnt
  13032. !:apple ????tfil
  13033. # .ttf for TrueType font
  13034. # EUDC.tte created by privat character editor %WINDIR%\system32\eudcedit.exe
  13035. !:ext ttf/tte
  13036. # sfnt version 4F54544Fh~OTTO
  13037. >>>0 ubelong =0x4f54544f OpenType
  13038. !:mime font/otf
  13039. !:apple ????OTTO
  13040. !:ext otf
  13041. >>>0 ubelong x Font data
  13042. # DSIG=44454947h table name implies a digitally signed font
  13043. # search range = number of tables * 16 =< maximal number of tables * 16 = 27 * 16 = 432
  13044. >>>12 search/432 DSIG \b, digitally signed
  13045. >>>4 ubeshort x \b, %d tables
  13046. # minimal 9 tables found like in NISC18030.ttf
  13047. #>>>4 ubeshort <10 TMIN
  13048. #>>>4 ubeshort >24 TBIG
  13049. # table directory entries
  13050. >>>12 string x \b, 1st "%4.4s"
  13051. # search and display 1st name in sfnt font which is often copyright text
  13052. # does not work inside font collections
  13053. 0 name sfnt-names
  13054. # search for naming table
  13055. >12 search/432/s name
  13056. # biggest offset 0x0100bd28 like Windows10 Fonts\simsunb.ttf
  13057. #>>>>&8 ubelong >0x0100bd27 BIGGEST OFFSET
  13058. >>&8 ubelong >0x00100000
  13059. # offset of name table
  13060. >>>&-4 ubelong x \b, name offset 0x%x
  13061. # GRR: pointer to name table only works if offset ~< FILE_BYTES_MAX = 100000h defined in src\file.h
  13062. >>&8 ubelong <0x00100000
  13063. >>>&-16 ubelong x
  13064. # name table
  13065. >>>>(&8.L) ubequad x
  13066. # invalid format selector
  13067. #>>>>>&-8 ubeshort !0 \b, invalid selector %x
  13068. # minimal 3 name records found like in c:\Program Files (x86)\Tesseract-OCR\tessdata\pdf.ttf
  13069. # maximal 1227 name records found like in Apple Chancery.ttf
  13070. #>>>>>&-6 ubeshort <0x4 mincount
  13071. #>>>>>&-6 ubeshort >130 maxcount
  13072. >>>>>&-6 ubeshort x \b, %d names
  13073. # offset to start of string storage from start of table
  13074. #>>>>>&-4 ubeshort x \b, record offset %d
  13075. # 1st name record
  13076. # string offset from start of storage area
  13077. #>>>>>&8 ubeshort x \b, string offset %d
  13078. # string length
  13079. #>>>>>&6 ubeshort x \b, string length %d
  13080. # minimal name string 7 like in c:\Program Files (x86)\Kodi\addons\webinterface.default\lib\video-js\font\VideoJS.ttf
  13081. # also found 0 like in SWZCONLN.TTF
  13082. #>>>>>&6 ubeshort <8 MIN STRING
  13083. # maximal name string 806 like in c:\Windows\Fonts\palabi.ttf
  13084. #>>>>>&6 ubeshort >805 MAX STRING
  13085. # platform identifier: 0~Apple Unicode, 1~Macintosh, 3~Microsoft
  13086. #>>>>>&-2 ubeshort >3 BAD PLATFORM
  13087. >>>>>&-2 ubeshort 0 \b, Unicode
  13088. >>>>>&-2 ubeshort 1 \b, Macintosh
  13089. >>>>>&-2 ubeshort 3 \b, Microsoft
  13090. # languageID (0~english Macintosh, 0409h~english Microsoft, ...)
  13091. >>>>>&2 ubeshort >0 \b, language 0x%x
  13092. # name identifiers
  13093. # often 0~copyright, 1~font, 2~font subfamily, 5~version, 13~license, 19~sample, ...
  13094. >>>>>&4 ubeshort >0 \b, type %d string
  13095. # platform specific encoding:
  13096. # 0~undefined character set, 1~UGL set with Unicode, 3~Unicode 2.0 BMP only, 4~Unicode 2.0
  13097. #>>>>>&0 ubeshort x \b, %d encoding
  13098. >>>>>&0 ubeshort 0
  13099. # handle only name string offset 0 because do not know how to add 2 relative offsets
  13100. >>>>>>&6 ubeshort 0
  13101. >>>>>>>&(&-14.S-18) ubyte !0
  13102. # GRR: instead 806 only first MAXstring = 96 characters are displayed as defined in src\file.h
  13103. # often copyright string that starts like \251 2006 The Monotype Corporation
  13104. >>>>>>>>&-1 string x \b, %-11.96s
  13105. # test for unicode string
  13106. >>>>>>>&(&-14.S-18) ubyte 0
  13107. >>>>>>>>&0 lestring16 x \b, %-11.96s
  13108. # unicode encoding
  13109. >>>>>&0 ubeshort >0
  13110. >>>>>>&6 ubeshort 0
  13111. >>>>>>>&(&-14.S-17) lestring16 x \b, %-11.96s
  13112. 0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
  13113. 0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
  13114. # TrueType/OpenType font collections (.ttc)
  13115. # URL: https://en.wikipedia.org/wiki/OpenType
  13116. # https://www.microsoft.com/typography/otspec/otff.htm
  13117. # Modified by: Joerg Jenderek
  13118. # Note: container for TrueType, OpenType font
  13119. 0 string ttcf
  13120. # skip ASCII text
  13121. >4 ubyte 0
  13122. # sfnt version often 0x00010000 of 1st table is TrueType
  13123. >>(12.L) ubelong !0x4f54544f TrueType
  13124. !:mime font/ttf
  13125. !:apple ????tfil
  13126. !:ext ttc
  13127. # sfnt version 4F54544Fh~OTTO of 1st table is OpenType font
  13128. >>(12.L) ubelong =0x4f54544f OpenType
  13129. !:mime font/otf
  13130. !:apple ????OTTO
  13131. # no example found for otc
  13132. !:ext ttc/otc
  13133. >>4 ubyte x font collection data
  13134. #!:mime font/collection
  13135. # TCC version
  13136. >>4 belong 0x00010000 \b, 1.0
  13137. >>4 belong 0x00020000 \b, 2.0
  13138. >>8 ubelong >0 \b, %d fonts
  13139. # array offset size = fonts * offsetsize = fonts * 4
  13140. >>(8.L*4) ubequad x
  13141. # 0x44454947 = 'DSIG'
  13142. >>>&4 belong 0x44534947 \b, digitally signed
  13143. # offset to 1st font
  13144. >>12 ubelong x \b, at 0x%x
  13145. # point to 1st font that starts with sfnt version
  13146. >>(12.L) use sfnt-font
  13147. # Opentype font data from Avi Bercovich
  13148. 0 string OTTO OpenType font data
  13149. !:mime application/vnd.ms-opentype
  13150. # From: Alex Myczko <alex@aiei.ch>
  13151. 0 string SplineFontDB: Spline Font Database
  13152. !:mime application/vnd.font-fontforge-sfd
  13153. >14 string x version %s
  13154. # EOT
  13155. 0x40 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
  13156. >0x22 string LP Embedded OpenType (EOT)
  13157. # workaround until there's lepstring16
  13158. # >>0x52 lepstring16/h >\0 \b, %s family
  13159. >>0x52 short !0
  13160. >>>0x54 lestring16 x \b, %s family
  13161. !:mime application/vnd.ms-fontobject
  13162. # Web Open Font Format (.woff)
  13163. 0 name woff
  13164. >4 belong 0x00010000 \b, TrueType
  13165. >4 belong 0x4F54544F \b, CFF
  13166. >4 belong 0x74727565 \b, TrueType
  13167. >4 default x
  13168. >>4 belong x \b, flavor %d
  13169. >8 belong x \b, length %d
  13170. #>12 beshort x \b, numTables %d
  13171. #>14 beshort x \b, reserved %d
  13172. #>16 belong x \b, totalSfntSize %d
  13173. # https://www.w3.org/TR/WOFF/
  13174. 0 string wOFF Web Open Font Format
  13175. !:mime font/woff
  13176. >0 use woff
  13177. >20 beshort x \b, version %d
  13178. >22 beshort x \b.%d
  13179. # https://www.w3.org/TR/WOFF2/
  13180. 0 string wOF2 Web Open Font Format (Version 2)
  13181. !:mime font/woff2
  13182. >0 use woff
  13183. #>20 belong x \b, totalCompressedSize %d
  13184. >24 beshort x \b, version %d
  13185. >26 beshort x \b.%d
  13186. #------------------------------------------------------------------------------
  13187. # $File: forth,v 1.3 2020/12/12 20:01:47 christos Exp $
  13188. # forth: file(1) magic for various Forth environments
  13189. # From: Lubomir Rintel <lkundrak@v3.sk>
  13190. #
  13191. # Has a FORTH stack diagram and something that looks very much like a FORTH
  13192. # multi-line word definition. Probably a FORTH source.
  13193. 0 regex \[[:space:]]\\(([[:space:]].*)?\ --\ (.*[[:space:]])?\\)
  13194. >0 regex \^:\[[:space:]]
  13195. >>0 regex \^;$ FORTH program
  13196. !:mime text/x-forth
  13197. # Inline word definition complete with a stack diagram
  13198. 0 regex \^:[[:space:]].*[[:space:]]\\(([[:space:]].*)?\ --\ (.*[[:space:]])?\\)[[:space:]].*[[:space:]];$ FORTH program
  13199. !:mime text/x-forth
  13200. # Various dictionary images used by OpenFirware FORTH environment
  13201. 0 lelong 0xe1a00000
  13202. >8 lelong 0xe1a00000
  13203. # skip raspberry pi kernel image kernel7.img by checking for positive text length
  13204. >>24 lelong >0 ARM OpenFirmware FORTH Dictionary,
  13205. >>>24 lelong x Text length: %d bytes,
  13206. >>>28 lelong x Data length: %d bytes,
  13207. >>>32 lelong x Text Relocation Table length: %d bytes,
  13208. >>>36 lelong x Data Relocation Table length: %d bytes,
  13209. >>>40 lelong x Entry Point: 0x%08X,
  13210. >>>44 lelong x BSS length: %d bytes
  13211. 0 string MP
  13212. >28 lelong 1 x86 OpenFirmware FORTH Dictionary,
  13213. >>4 leshort x %d blocks
  13214. >>2 leshort x + %d bytes,
  13215. >>6 leshort x %d relocations,
  13216. >>8 leshort x Header length: %d paragraphs,
  13217. >>10 leshort x Data Size: %d
  13218. >>12 leshort x - %d 4K pages,
  13219. >>14 lelong x Initial Stack Pointer: 0x%08X,
  13220. >>20 lelong x Entry Point: 0x%08X,
  13221. >>24 lelong x First Relocation Item: %d,
  13222. >>26 lelong x Overlay Number: %d,
  13223. >>18 leshort x Checksum: 0x%08X
  13224. 0 belong 0x48000020 PowerPC OpenFirmware FORTH Dictionary,
  13225. >4 belong x Text length: %d bytes,
  13226. >8 belong x Data length: %d bytes,
  13227. >12 belong x BSS length: %d bytes,
  13228. >16 belong x Symbol Table length: %d bytes,
  13229. >20 belong x Entry Point: 0x%08X,
  13230. >24 belong x Text Relocation Table length: %d bytes,
  13231. >28 belong x Data Relocation Table length: %d bytes
  13232. 0 lelong 0x10000007 MIPS OpenFirmware FORTH Dictionary,
  13233. >4 lelong x Text length: %d bytes,
  13234. >8 lelong x Data length: %d bytes,
  13235. >12 lelong x BSS length: %d bytes,
  13236. >16 lelong x Symbol Table length: %d bytes,
  13237. >20 lelong x Entry Point: 0x%08X,
  13238. >24 lelong x Text Relocation Table length: %d bytes,
  13239. >28 lelong x Data Relocation Table length: %d bytes
  13240. # Dictionary images used by minimal C FORTH environments, any platform,
  13241. # using native byte order.
  13242. # Weak.
  13243. #0 short 0x5820 cForth 16-bit Dictionary,
  13244. #>2 short x Serial: 0x%08X,
  13245. #>4 short x Dictionary Start: 0x%08X,
  13246. #>6 short x Dictionary Size: %d bytes,
  13247. #>8 short x User Area Start: 0x%08X,
  13248. #>10 short x User Area Size: %d bytes,
  13249. #>12 short x Entry Point: 0x%08X
  13250. 0 long 0x581120 cForth 32-bit Dictionary,
  13251. >4 long x Serial: 0x%08X,
  13252. >8 long x Dictionary Start: 0x%08X,
  13253. >12 long x Dictionary Size: %d bytes,
  13254. >16 long x User Area Start: 0x%08X,
  13255. >20 long x User Area Size: %d bytes,
  13256. >24 long x Entry Point: 0x%08X
  13257. #------------------------------------------------------------------------------
  13258. # $File: fortran,v 1.10 2015/11/05 18:47:16 christos Exp $
  13259. # FORTRAN source
  13260. # Check that the first 100 lines start with C or whitespace first.
  13261. 0 regex/100l !\^[^Cc\ \t].*$
  13262. >0 regex/100l \^[Cc][\ \t] FORTRAN program text
  13263. !:mime text/x-fortran
  13264. !:strength - 5
  13265. #------------------------------------------------------------------------------
  13266. # $File: frame,v 1.14 2019/11/25 00:31:30 christos Exp $
  13267. # frame: file(1) magic for FrameMaker files
  13268. #
  13269. # This stuff came on a FrameMaker demo tape, most of which is
  13270. # copyright, but this file is "published" as witness the following:
  13271. #
  13272. # Note that this is the Framemaker Maker Interchange Format, not the
  13273. # Normal format which would be application/vnd.framemaker.
  13274. #
  13275. 0 string \<MakerFile FrameMaker document
  13276. !:mime application/x-mif
  13277. >11 string 5.5 (5.5
  13278. >11 string 5.0 (5.0
  13279. >11 string 4.0 (4.0
  13280. >11 string 3.0 (3.0
  13281. >11 string 2.0 (2.0
  13282. >11 string 1.0 (1.0
  13283. >14 byte x %c)
  13284. # URL: http://fileformats.archiveteam.org/wiki/Maker_Interchange_Format
  13285. # Reference: https://help.adobe.com/en_US/framemaker/mifreference/mifref.pdf
  13286. # Update: Joerg Jenderek 2019 Nov
  13287. 0 string \<MIFFile FrameMaker MIF (ASCII) file
  13288. # https://www.iana.org/assignments/media-types/application/vnd.mif
  13289. !:mime application/vnd.mif
  13290. # mif most but also find bookTOC.framemif
  13291. !:ext mif/framemif
  13292. # followed by space~20h
  13293. #>8 ubyte 0x20 \b, space before version
  13294. # 3 characters of version number of the MIF language like 1.0, 2.0 ... 2015 ...
  13295. >9 string x (%.3s
  13296. # if not greater sign then display 4th character of version
  13297. >12 ubyte =0x3e \b)
  13298. >12 ubyte !0x3e \b%c)
  13299. # comment starting with # shows the name+version number of generating program
  13300. >13 search/3 #
  13301. >>&0 string x "%s"
  13302. 0 search/1 \<MakerDictionary FrameMaker Dictionary text
  13303. !:mime application/x-mif
  13304. >17 string 3.0 (3.0)
  13305. >17 string 2.0 (2.0)
  13306. >17 string 1.0 (1.x)
  13307. 0 string \<MakerScreenFont FrameMaker Font file
  13308. !:mime application/x-mif
  13309. >17 string 1.01 (%s)
  13310. 0 string \<MML FrameMaker MML file
  13311. !:mime application/x-mif
  13312. 0 string \<BookFile FrameMaker Book file
  13313. !:mime application/x-mif
  13314. >10 string 3.0 (3.0
  13315. >10 string 2.0 (2.0
  13316. >10 string 1.0 (1.0
  13317. >13 byte x %c)
  13318. # XXX - this book entry should be verified, if you find one, uncomment this
  13319. #0 string \<Book\040 FrameMaker Book (ASCII) file
  13320. #!:mime application/x-mif
  13321. #>6 string 3.0 (3.0)
  13322. #>6 string 2.0 (2.0)
  13323. #>6 string 1.0 (1.0)
  13324. 0 string \<Maker\040Intermediate\040Print\040File FrameMaker IPL file
  13325. !:mime application/x-mif
  13326. #------------------------------------------------------------------------------
  13327. # $File: freebsd,v 1.7 2009/09/19 16:28:09 christos Exp $
  13328. # freebsd: file(1) magic for FreeBSD objects
  13329. #
  13330. # All new-style FreeBSD magic numbers are in host byte order (i.e.,
  13331. # little-endian on x86).
  13332. #
  13333. # XXX - this comes from the file "freebsd" in a recent FreeBSD version of
  13334. # "file"; it, and the NetBSD stuff in "netbsd", appear to use different
  13335. # schemes for distinguishing between executable images, shared libraries,
  13336. # and object files.
  13337. #
  13338. # FreeBSD says:
  13339. #
  13340. # Regardless of whether it's pure, demand-paged, or none of the
  13341. # above:
  13342. #
  13343. # if the entry point is < 4096, then it's a shared library if
  13344. # the "has run-time loader information" bit is set, and is
  13345. # position-independent if the "is position-independent" bit
  13346. # is set;
  13347. #
  13348. # if the entry point is >= 4096 (or >4095, same thing), then it's
  13349. # an executable, and is dynamically-linked if the "has run-time
  13350. # loader information" bit is set.
  13351. #
  13352. # On x86, NetBSD says:
  13353. #
  13354. # If it's neither pure nor demand-paged:
  13355. #
  13356. # if it has the "has run-time loader information" bit set, it's
  13357. # a dynamically-linked executable;
  13358. #
  13359. # if it doesn't have that bit set, then:
  13360. #
  13361. # if it has the "is position-independent" bit set, it's
  13362. # position-independent;
  13363. #
  13364. # if the entry point is non-zero, it's an executable, otherwise
  13365. # it's an object file.
  13366. #
  13367. # If it's pure:
  13368. #
  13369. # if it has the "has run-time loader information" bit set, it's
  13370. # a dynamically-linked executable, otherwise it's just an
  13371. # executable.
  13372. #
  13373. # If it's demand-paged:
  13374. #
  13375. # if it has the "has run-time loader information" bit set,
  13376. # then:
  13377. #
  13378. # if the entry point is < 4096, it's a shared library;
  13379. #
  13380. # if the entry point is = 4096 or > 4096 (i.e., >= 4096),
  13381. # it's a dynamically-linked executable);
  13382. #
  13383. # if it doesn't have the "has run-time loader information" bit
  13384. # set, then it's just an executable.
  13385. #
  13386. # (On non-x86, NetBSD does much the same thing, except that it uses
  13387. # 8192 on 68K - except for "68k4k", which is presumably "68K with 4K
  13388. # pages - SPARC, and MIPS, presumably because Sun-3's and Sun-4's
  13389. # had 8K pages; dunno about MIPS.)
  13390. #
  13391. # I suspect the two will differ only in perverse and uninteresting cases
  13392. # ("shared" libraries that aren't demand-paged and whose pages probably
  13393. # won't actually be shared, executables with entry points <4096).
  13394. #
  13395. # I leave it to those more familiar with FreeBSD and NetBSD to figure out
  13396. # what the right answer is (although using ">4095", FreeBSD-style, is
  13397. # probably better than separately checking for "=4096" and ">4096",
  13398. # NetBSD-style). (The old "netbsd" file analyzed FreeBSD demand paged
  13399. # executables using the NetBSD technique.)
  13400. #
  13401. 0 lelong&0377777777 041400407 FreeBSD/i386
  13402. >20 lelong <4096
  13403. >>3 byte&0xC0 &0x80 shared library
  13404. >>3 byte&0xC0 0x40 PIC object
  13405. >>3 byte&0xC0 0x00 object
  13406. >20 lelong >4095
  13407. >>3 byte&0x80 0x80 dynamically linked executable
  13408. >>3 byte&0x80 0x00 executable
  13409. >16 lelong >0 not stripped
  13410. 0 lelong&0377777777 041400410 FreeBSD/i386 pure
  13411. >20 lelong <4096
  13412. >>3 byte&0xC0 &0x80 shared library
  13413. >>3 byte&0xC0 0x40 PIC object
  13414. >>3 byte&0xC0 0x00 object
  13415. >20 lelong >4095
  13416. >>3 byte&0x80 0x80 dynamically linked executable
  13417. >>3 byte&0x80 0x00 executable
  13418. >16 lelong >0 not stripped
  13419. 0 lelong&0377777777 041400413 FreeBSD/i386 demand paged
  13420. >20 lelong <4096
  13421. >>3 byte&0xC0 &0x80 shared library
  13422. >>3 byte&0xC0 0x40 PIC object
  13423. >>3 byte&0xC0 0x00 object
  13424. >20 lelong >4095
  13425. >>3 byte&0x80 0x80 dynamically linked executable
  13426. >>3 byte&0x80 0x00 executable
  13427. >16 lelong >0 not stripped
  13428. 0 lelong&0377777777 041400314 FreeBSD/i386 compact demand paged
  13429. >20 lelong <4096
  13430. >>3 byte&0xC0 &0x80 shared library
  13431. >>3 byte&0xC0 0x40 PIC object
  13432. >>3 byte&0xC0 0x00 object
  13433. >20 lelong >4095
  13434. >>3 byte&0x80 0x80 dynamically linked executable
  13435. >>3 byte&0x80 0x00 executable
  13436. >16 lelong >0 not stripped
  13437. # XXX gross hack to identify core files
  13438. # cores start with a struct tss; we take advantage of the following:
  13439. # byte 7: highest byte of the kernel stack pointer, always 0xfe
  13440. # 8/9: kernel (ring 0) ss value, always 0x0010
  13441. # 10 - 27: ring 1 and 2 ss/esp, unused, thus always 0
  13442. # 28: low order byte of the current PTD entry, always 0 since the
  13443. # PTD is page-aligned
  13444. #
  13445. 7 string \357\020\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 FreeBSD/i386 a.out core file
  13446. >1039 string >\0 from '%s'
  13447. # /var/run/ld.so.hints
  13448. # What are you laughing about?
  13449. 0 lelong 011421044151 ld.so hints file (Little Endian
  13450. >4 lelong >0 \b, version %d)
  13451. >4 belong <1 \b)
  13452. 0 belong 011421044151 ld.so hints file (Big Endian
  13453. >4 belong >0 \b, version %d)
  13454. >4 belong <1 \b)
  13455. #
  13456. # Files generated by FreeBSD scrshot(1)/vidcontrol(1) utilities
  13457. #
  13458. 0 string SCRSHOT_ scrshot(1) screenshot,
  13459. >8 byte x version %d,
  13460. >9 byte 2 %d bytes in header,
  13461. >>10 byte x %d chars wide by
  13462. >>11 byte x %d chars high
  13463. #------------------------------------------------------------------------------
  13464. # $File: fsav,v 1.21 2021/02/23 00:51:10 christos Exp $
  13465. # fsav: file(1) magic for datafellows fsav virus definition files
  13466. # Anthon van der Neut (anthon@mnt.org)
  13467. # ftp://ftp.f-prot.com/pub/{macrdef2.zip,nomacro.def}
  13468. 0 beshort 0x1575 fsav macro virus signatures
  13469. >8 leshort >0 (%d-
  13470. >11 byte >0 \b%02d-
  13471. >10 byte >0 \b%02d)
  13472. # ftp://ftp.f-prot.com/pub/sign.zip
  13473. #10 ubyte <12
  13474. #>9 ubyte <32
  13475. #>>8 ubyte 0x0a
  13476. #>>>12 ubyte 0x07
  13477. #>>>>11 uleshort >0 fsav DOS/Windows virus signatures (%d-
  13478. #>>>>10 byte 0 \b01-
  13479. #>>>>10 byte 1 \b02-
  13480. #>>>>10 byte 2 \b03-
  13481. #>>>>10 byte 3 \b04-
  13482. #>>>>10 byte 4 \b05-
  13483. #>>>>10 byte 5 \b06-
  13484. #>>>>10 byte 6 \b07-
  13485. #>>>>10 byte 7 \b08-
  13486. #>>>>10 byte 8 \b09-
  13487. #>>>>10 byte 9 \b10-
  13488. #>>>>10 byte 10 \b11-
  13489. #>>>>10 byte 11 \b12-
  13490. #>>>>9 ubyte >0 \b%02d)
  13491. # ftp://ftp.f-prot.com/pub/sign2.zip
  13492. #0 ubyte 0x62
  13493. #>1 ubyte 0xF5
  13494. #>>2 ubyte 0x1
  13495. #>>>3 ubyte 0x1
  13496. #>>>>4 ubyte 0x0e
  13497. #>>>>>13 ubyte >0 fsav virus signatures
  13498. #>>>>>>11 ubyte x size 0x%02x
  13499. #>>>>>>12 ubyte x \b%02x
  13500. #>>>>>>13 ubyte x \b%02x bytes
  13501. # Joerg Jenderek: joerg dot jenderek at web dot de
  13502. # clamav-0.100.2\docs\html\node60.html
  13503. # https://github.com/vrtadmin/clamav-faq/raw/master/manual/clamdoc.pdf
  13504. # ClamAV virus database files start with a 512 bytes colon separated header
  13505. # ClamAV-VDB:buildDate:version:signaturesNumbers:functionalityLevelRequired:MD5:Signature:builder:buildTime
  13506. # + gzipped (optional) tarball files
  13507. # output can often be verified by `sigtool --info=FILE`
  13508. 0 string ClamAV-VDB: Clam AntiVirus
  13509. # padding spaces implies database
  13510. >511 ubyte =0x20 database
  13511. !:mime application/x-clamav-database
  13512. # empty build time
  13513. >>10 string =:: (unsigned)
  13514. # sigtool(1) man page
  13515. !:ext cud
  13516. # display some text to avoid error like:
  13517. # Magdir/fsav, 78: Warning: Current entry does not yet have a description for adding a EXTENSION type
  13518. # file: could not find any valid magic files! (No error)
  13519. >>10 default x (with buildtime)
  13520. #>>10 default x
  13521. # clamtmp is used for temporarily database like update process
  13522. # for pure tar database only cld extension found
  13523. !:ext cld/cvd/clamtmp/cud
  13524. >511 default x file
  13525. !:mime application/x-clamav
  13526. !:ext info
  13527. >11 string >\0
  13528. # buildDate empty or like "22 Mar 2017 12-57 -0400"; verified by `sigtool -i FILE`
  13529. >>11 regex \^[^:]{0,23} \b, %s
  13530. # version like 25170
  13531. >>>&1 regex \^[^:]{1,6} \b, version %s
  13532. # signaturesNumbers like 4566249
  13533. >>>>&1 regex \^[^:]{1,10} \b, %s signatures
  13534. # functionalityLevelRequired like 60
  13535. >>>>>&1 regex \^[^:]{1,4} \b, level %s
  13536. # X for nothing or MD5
  13537. #>>>>>>&1 regex \^[^:]{1,32} \b, MD5 "%s"
  13538. >>>>>>&1 regex \^[^:]{1,32}
  13539. # X for nothing or digital signature starting like AIzk/LYbX
  13540. #>>>>>>>&1 regex \^[^:]{1,255} \b, signature "%s"
  13541. >>>>>>>&1 regex \^[^:]{1,255}
  13542. # builder like neo
  13543. >>>>>>>>&1 regex \^[^:]{1,32} \b, builder %s
  13544. # buildTime like 1506611558
  13545. #>>>>>>>>>&1 regex \^[^:]{1,10} \b, %s
  13546. >>>>>>>>>&1 regex \^[^:]{1,10}
  13547. # padding with spaces
  13548. #>>>>>>>>>>&1 ubequad x \b, padding 0x%16.16llx
  13549. >510 ubyte =0x20
  13550. # inspect real database content
  13551. #>>512 ubeshort x \b, database MAGIC 0x%x
  13552. # ./archive handle pure tar archives
  13553. >>1012 quad =0 \b, with
  13554. >>>512 use tar-file
  13555. # not pure tar
  13556. >>1012 quad !0
  13557. # one space at the end of text and then handles gzipped archives by ./compress
  13558. >>>512 string \037\213 \b, with
  13559. >>>>512 indirect x
  13560. # Type: Grisoft AVG AntiVirus
  13561. # From: David Newgas <david@newgas.net>
  13562. 0 string AVG7_ANTIVIRUS_VAULT_FILE AVG 7 Antivirus vault file data
  13563. 0 string X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR
  13564. >33 string -STANDARD-ANTIVIRUS-TEST-FILE!$H+H* EICAR virus test files
  13565. # From: Joerg Jenderek
  13566. # URL: https://www.avira.com/
  13567. # Note: found in directory %ProgramData%\Avira\Antivirus\INFECTED (Windows)
  13568. # tested with version 15.0.43.23 at November 2019
  13569. 0 string AntiVir\ Qua Avira AntiVir quarantined
  13570. !:mime application/x-avira-qua
  13571. #!:mime application/octet-stream
  13572. !:ext qua
  13573. >156 string SUSPICIOUS_FILE
  13574. # file path of suspicious file
  13575. >>220 lestring16 x %s
  13576. >156 string !SUSPICIOUS_FILE
  13577. # file path of virus file
  13578. >>228 lestring16 x %s
  13579. # quarantined date
  13580. >60 ldate x at %s
  13581. # virus/danger name
  13582. >156 string !SUSPICIOUS_FILE
  13583. >>156 string x \b, category "%s"
  13584. #------------------------------------------------------------------------------
  13585. # $File: fusecompress,v 1.2 2011/08/08 09:05:55 christos Exp $
  13586. # fusecompress: file(1) magic for fusecompress
  13587. 0 string \037\135\211 FuseCompress(ed) data
  13588. >3 byte 0x00 (none format)
  13589. >3 byte 0x01 (bz2 format)
  13590. >3 byte 0x02 (gz format)
  13591. >3 byte 0x03 (lzo format)
  13592. >3 byte 0x04 (xor format)
  13593. >3 byte >0x04 (unknown format)
  13594. >4 long x uncompressed size: %d
  13595. #------------------------------------------------------------------------------
  13596. # $File: games,v 1.22 2021/02/23 00:51:10 christos Exp $
  13597. # games: file(1) for games
  13598. # Fabio Bonelli <fabiobonelli@libero.it>
  13599. # Quake II - III data files
  13600. 0 string IDP2 Quake II 3D Model file,
  13601. >20 long x %u skin(s),
  13602. >8 long x (%u x
  13603. >12 long x %u),
  13604. >40 long x %u frame(s),
  13605. >16 long x Frame size %u bytes,
  13606. >24 long x %u vertices/frame,
  13607. >28 long x %u texture coordinates,
  13608. >32 long x %u triangles/frame
  13609. 0 string IBSP Quake
  13610. >4 long 0x26 II Map file (BSP)
  13611. >4 long 0x2E III Map file (BSP)
  13612. 0 string IDS2 Quake II SP2 sprite file
  13613. #---------------------------------------------------------------------------
  13614. # Doom and Quake
  13615. # submitted by Nicolas Patrois
  13616. 0 string \xcb\x1dBoom\xe6\xff\x03\x01 Boom or linuxdoom demo
  13617. # some doom lmp files don't match, I've got one beginning with \x6d\x02\x01\x01
  13618. 24 string LxD\ 203 Linuxdoom save
  13619. >0 string x , name=%s
  13620. >44 string x , world=%s
  13621. # Quake
  13622. # Update: Joerg Jenderek
  13623. # URL: http://fileformats.archiveteam.org/wiki/PAK
  13624. # reference: https://quakewiki.org/wiki/.pak
  13625. # GRR: line below is too general as it matches also Acorn PackDir compressed Archive
  13626. # and Git pack ./revision
  13627. 0 string PACK
  13628. # real Quake examples like pak0.pak have only some hundreds like 150 files
  13629. # So test for few files
  13630. >8 ulelong <0x01000000
  13631. # in file version 5.32 test for null terminator is only true for
  13632. # offset ~< FILE_BYTES_MAX = 1 MB defined in ../../src/file.h
  13633. # look for null terminator of 1st entry name
  13634. >>(4.l+55) ubyte 0 Quake I or II world or extension
  13635. !:mime application/x-dzip
  13636. !:ext pak
  13637. #>>>8 ulelong x \b, table size %u
  13638. # dividing this by entry size (64) gives number of files
  13639. >>>8 ulelong/64 x \b, %u files
  13640. # offset to the beginning of the file table
  13641. >>>4 ulelong x \b, offset 0x%x
  13642. # 1st file entry
  13643. >>>(4.l) use pak-entry
  13644. # 2nd file entry
  13645. #>>>4 ulelong+64 x \b, offset 0x%x
  13646. #>>>(4.l+64) use pak-entry
  13647. #
  13648. # display file table entry of Quake PAK archive
  13649. 0 name pak-entry
  13650. # normally entry start after header which implies offset 12 or higher
  13651. >56 ulelong >11
  13652. # the offset from the beginning of pak to beginning of this entry file contents
  13653. >>56 ulelong x at 0x%x
  13654. # the size of file for this entry
  13655. >>60 ulelong x %u bytes
  13656. # 56 byte null-terminated entry name string includes path like maps/e1m1.bsp
  13657. >>0 string x '%-.56s'
  13658. # inspect entry content by jumping to entry offset
  13659. >>(56) indirect x \b:
  13660. #0 string -1\x0a Quake I demo
  13661. #>30 string x version %.4s
  13662. #>61 string x level %s
  13663. #0 string 5\x0a Quake I save
  13664. # The levels
  13665. # Quake 1
  13666. 0 string 5\x0aIntroduction Quake I save: start Introduction
  13667. 0 string 5\x0athe_Slipgate_Complex Quake I save: e1m1 The slipgate complex
  13668. 0 string 5\x0aCastle_of_the_Damned Quake I save: e1m2 Castle of the damned
  13669. 0 string 5\x0athe_Necropolis Quake I save: e1m3 The necropolis
  13670. 0 string 5\x0athe_Grisly_Grotto Quake I save: e1m4 The grisly grotto
  13671. 0 string 5\x0aZiggurat_Vertigo Quake I save: e1m8 Ziggurat vertigo (secret)
  13672. 0 string 5\x0aGloom_Keep Quake I save: e1m5 Gloom keep
  13673. 0 string 5\x0aThe_Door_To_Chthon Quake I save: e1m6 The door to Chthon
  13674. 0 string 5\x0aThe_House_of_Chthon Quake I save: e1m7 The house of Chthon
  13675. 0 string 5\x0athe_Installation Quake I save: e2m1 The installation
  13676. 0 string 5\x0athe_Ogre_Citadel Quake I save: e2m2 The ogre citadel
  13677. 0 string 5\x0athe_Crypt_of_Decay Quake I save: e2m3 The crypt of decay (dopefish lives!)
  13678. 0 string 5\x0aUnderearth Quake I save: e2m7 Underearth (secret)
  13679. 0 string 5\x0athe_Ebon_Fortress Quake I save: e2m4 The ebon fortress
  13680. 0 string 5\x0athe_Wizard's_Manse Quake I save: e2m5 The wizard's manse
  13681. 0 string 5\x0athe_Dismal_Oubliette Quake I save: e2m6 The dismal oubliette
  13682. 0 string 5\x0aTermination_Central Quake I save: e3m1 Termination central
  13683. 0 string 5\x0aVaults_of_Zin Quake I save: e3m2 Vaults of Zin
  13684. 0 string 5\x0athe_Tomb_of_Terror Quake I save: e3m3 The tomb of terror
  13685. 0 string 5\x0aSatan's_Dark_Delight Quake I save: e3m4 Satan's dark delight
  13686. 0 string 5\x0athe_Haunted_Halls Quake I save: e3m7 The haunted halls (secret)
  13687. 0 string 5\x0aWind_Tunnels Quake I save: e3m5 Wind tunnels
  13688. 0 string 5\x0aChambers_of_Torment Quake I save: e3m6 Chambers of torment
  13689. 0 string 5\x0athe_Sewage_System Quake I save: e4m1 The sewage system
  13690. 0 string 5\x0aThe_Tower_of_Despair Quake I save: e4m2 The tower of despair
  13691. 0 string 5\x0aThe_Elder_God_Shrine Quake I save: e4m3 The elder god shrine
  13692. 0 string 5\x0athe_Palace_of_Hate Quake I save: e4m4 The palace of hate
  13693. 0 string 5\x0aHell's_Atrium Quake I save: e4m5 Hell's atrium
  13694. 0 string 5\x0athe_Nameless_City Quake I save: e4m8 The nameless city (secret)
  13695. 0 string 5\x0aThe_Pain_Maze Quake I save: e4m6 The pain maze
  13696. 0 string 5\x0aAzure_Agony Quake I save: e4m7 Azure agony
  13697. 0 string 5\x0aShub-Niggurath's_Pit Quake I save: end Shub-Niggurath's pit
  13698. # Quake DeathMatch levels
  13699. 0 string 5\x0aPlace_of_Two_Deaths Quake I save: dm1 Place of two deaths
  13700. 0 string 5\x0aClaustrophobopolis Quake I save: dm2 Claustrophobopolis
  13701. 0 string 5\x0aThe_Abandoned_Base Quake I save: dm3 The abandoned base
  13702. 0 string 5\x0aThe_Bad_Place Quake I save: dm4 The bad place
  13703. 0 string 5\x0aThe_Cistern Quake I save: dm5 The cistern
  13704. 0 string 5\x0aThe_Dark_Zone Quake I save: dm6 The dark zone
  13705. # Scourge of Armagon
  13706. 0 string 5\x0aCommand_HQ Quake I save: start Command HQ
  13707. 0 string 5\x0aThe_Pumping_Station Quake I save: hip1m1 The pumping station
  13708. 0 string 5\x0aStorage_Facility Quake I save: hip1m2 Storage facility
  13709. 0 string 5\x0aMilitary_Complex Quake I save: hip1m5 Military complex (secret)
  13710. 0 string 5\x0athe_Lost_Mine Quake I save: hip1m3 The lost mine
  13711. 0 string 5\x0aResearch_Facility Quake I save: hip1m4 Research facility
  13712. 0 string 5\x0aAncient_Realms Quake I save: hip2m1 Ancient realms
  13713. 0 string 5\x0aThe_Gremlin's_Domain Quake I save: hip2m6 The gremlin's domain (secret)
  13714. 0 string 5\x0aThe_Black_Cathedral Quake I save: hip2m2 The black cathedral
  13715. 0 string 5\x0aThe_Catacombs Quake I save: hip2m3 The catacombs
  13716. 0 string 5\x0athe_Crypt__ Quake I save: hip2m4 The crypt
  13717. 0 string 5\x0aMortum's_Keep Quake I save: hip2m5 Mortum's keep
  13718. 0 string 5\x0aTur_Torment Quake I save: hip3m1 Tur torment
  13719. 0 string 5\x0aPandemonium Quake I save: hip3m2 Pandemonium
  13720. 0 string 5\x0aLimbo Quake I save: hip3m3 Limbo
  13721. 0 string 5\x0athe_Edge_of_Oblivion Quake I save: hipdm1 The edge of oblivion (secret)
  13722. 0 string 5\x0aThe_Gauntlet Quake I save: hip3m4 The gauntlet
  13723. 0 string 5\x0aArmagon's_Lair Quake I save: hipend Armagon's lair
  13724. # Malice
  13725. 0 string 5\x0aThe_Academy Quake I save: start The academy
  13726. 0 string 5\x0aThe_Lab Quake I save: d1 The lab
  13727. 0 string 5\x0aArea_33 Quake I save: d1b Area 33
  13728. 0 string 5\x0aSECRET_MISSIONS Quake I save: d3b Secret missions
  13729. 0 string 5\x0aThe_Hospital Quake I save: d10 The hospital (secret)
  13730. 0 string 5\x0aThe_Genetics_Lab Quake I save: d11 The genetics lab (secret)
  13731. 0 string 5\x0aBACK_2_MALICE Quake I save: d4b Back to Malice
  13732. 0 string 5\x0aArea44 Quake I save: d1c Area 44
  13733. 0 string 5\x0aTakahiro_Towers Quake I save: d2 Takahiro towers
  13734. 0 string 5\x0aA_Rat's_Life Quake I save: d3 A rat's life
  13735. 0 string 5\x0aInto_The_Flood Quake I save: d4 Into the flood
  13736. 0 string 5\x0aThe_Flood Quake I save: d5 The flood
  13737. 0 string 5\x0aNuclear_Plant Quake I save: d6 Nuclear plant
  13738. 0 string 5\x0aThe_Incinerator_Plant Quake I save: d7 The incinerator plant
  13739. 0 string 5\x0aThe_Foundry Quake I save: d7b The foundry
  13740. 0 string 5\x0aThe_Underwater_Base Quake I save: d8 The underwater base
  13741. 0 string 5\x0aTakahiro_Base Quake I save: d9 Takahiro base
  13742. 0 string 5\x0aTakahiro_Laboratories Quake I save: d12 Takahiro laboratories
  13743. 0 string 5\x0aStayin'_Alive Quake I save: d13 Stayin' alive
  13744. 0 string 5\x0aB.O.S.S._HQ Quake I save: d14 B.O.S.S. HQ
  13745. 0 string 5\x0aSHOWDOWN! Quake I save: d15 Showdown!
  13746. # Malice DeathMatch levels
  13747. 0 string 5\x0aThe_Seventh_Precinct Quake I save: ddm1 The seventh precinct
  13748. 0 string 5\x0aSub_Station Quake I save: ddm2 Sub station
  13749. 0 string 5\x0aCrazy_Eights! Quake I save: ddm3 Crazy eights!
  13750. 0 string 5\x0aEast_Side_Invertationa Quake I save: ddm4 East side invertationa
  13751. 0 string 5\x0aSlaughterhouse Quake I save: ddm5 Slaughterhouse
  13752. 0 string 5\x0aDOMINO Quake I save: ddm6 Domino
  13753. 0 string 5\x0aSANDRA'S_LADDER Quake I save: ddm7 Sandra's ladder
  13754. 0 string MComprHD MAME CHD compressed hard disk image,
  13755. >12 belong x version %u
  13756. # doom - submitted by Jon Dowland
  13757. 0 string =IWAD doom main IWAD data
  13758. >4 lelong x containing %d lumps
  13759. 0 string =PWAD doom patch PWAD data
  13760. >4 lelong x containing %d lumps
  13761. # Build engine group files (Duke Nukem, Shadow Warrior, ...)
  13762. # Extension: .grp
  13763. # Created by: "Ganael Laplanche" <ganael.laplanche@martymac.org>
  13764. 0 string KenSilverman Build engine group file
  13765. >12 lelong x containing %d files
  13766. # Summary: Warcraft 3 save
  13767. # Extension: .w3g
  13768. # Created by: "Nelson A. de Oliveira" <naoliv@gmail.com>
  13769. 0 string Warcraft\ III\ recorded\ game %s
  13770. # Summary: Warcraft 3 map
  13771. # Extension: .w3m
  13772. # Created by: "Nelson A. de Oliveira" <naoliv@gmail.com>
  13773. 0 string HM3W Warcraft III map file
  13774. # Summary: SGF Smart Game Format
  13775. # Extension: .sgf
  13776. # Reference: https://www.red-bean.com/sgf/
  13777. # Created by: Eduardo Sabbatella <eduardo_sabbatella@yahoo.com.ar>
  13778. # Modified by (1): Abel Cheung (regex, more game format)
  13779. # FIXME: Some games don't have GM (game type)
  13780. 0 regex \\(;.*GM\\[[0-9]{1,2}\\] Smart Game Format
  13781. >2 search/0x200/b GM[
  13782. >>&0 string 1] (Go)
  13783. >>&0 string 2] (Othello)
  13784. >>&0 string 3] (chess)
  13785. >>&0 string 4] (Gomoku+Renju)
  13786. >>&0 string 5] (Nine Men's Morris)
  13787. >>&0 string 6] (Backgammon)
  13788. >>&0 string 7] (Chinese chess)
  13789. >>&0 string 8] (Shogi)
  13790. >>&0 string 9] (Lines of Action)
  13791. >>&0 string 10] (Ataxx)
  13792. >>&0 string 11] (Hex)
  13793. >>&0 string 12] (Jungle)
  13794. >>&0 string 13] (Neutron)
  13795. >>&0 string 14] (Philosopher's Football)
  13796. >>&0 string 15] (Quadrature)
  13797. >>&0 string 16] (Trax)
  13798. >>&0 string 17] (Tantrix)
  13799. >>&0 string 18] (Amazons)
  13800. >>&0 string 19] (Octi)
  13801. >>&0 string 20] (Gess)
  13802. >>&0 string 21] (Twixt)
  13803. >>&0 string 22] (Zertz)
  13804. >>&0 string 23] (Plateau)
  13805. >>&0 string 24] (Yinsh)
  13806. >>&0 string 25] (Punct)
  13807. >>&0 string 26] (Gobblet)
  13808. >>&0 string 27] (hive)
  13809. >>&0 string 28] (Exxit)
  13810. >>&0 string 29] (Hnefatal)
  13811. >>&0 string 30] (Kuba)
  13812. >>&0 string 31] (Tripples)
  13813. >>&0 string 32] (Chase)
  13814. >>&0 string 33] (Tumbling Down)
  13815. >>&0 string 34] (Sahara)
  13816. >>&0 string 35] (Byte)
  13817. >>&0 string 36] (Focus)
  13818. >>&0 string 37] (Dvonn)
  13819. >>&0 string 38] (Tamsk)
  13820. >>&0 string 39] (Gipf)
  13821. >>&0 string 40] (Kropki)
  13822. ##############################################
  13823. # NetImmerse/Gamebryo game engine entries
  13824. # Summary: Gamebryo game engine file
  13825. # Extension: .nif, .kf
  13826. # Created by: Abel Cheung <abelcheung@gmail.com>
  13827. 0 string Gamebryo\ File\ Format,\ Version\ Gamebryo game engine file
  13828. >&0 regex [0-9a-z.]+ \b, version %s
  13829. # Summary: Gamebryo game engine file
  13830. # Extension: .kfm
  13831. # Created by: Abel Cheung <abelcheung@gmail.com>
  13832. 0 string ;Gamebryo\ KFM\ File\ Version\ Gamebryo game engine animation File
  13833. >&0 regex [0-9a-z.]+ \b, version %s
  13834. # Summary: NetImmerse game engine file
  13835. # Extension .nif
  13836. # Created by: Abel Cheung <abelcheung@gmail.com>
  13837. 0 string NetImmerse\ File\ Format,\ Version
  13838. >&0 string n\ NetImmerse game engine file
  13839. >>&0 regex [0-9a-z.]+ \b, version %s
  13840. # Type: SGF Smart Game Format
  13841. # URL: https://www.red-bean.com/sgf/
  13842. # From: Eduardo Sabbatella <eduardo_sabbatella@yahoo.com.ar>
  13843. 2 regex/c \\(;.*GM\\[[0-9]{1,2}\\] Smart Game Format
  13844. >2 regex/c GM\\[1\\] - Go Game
  13845. >2 regex/c GM\\[6\\] - BackGammon Game
  13846. >2 regex/c GM\\[11\\] - Hex Game
  13847. >2 regex/c GM\\[18\\] - Amazons Game
  13848. >2 regex/c GM\\[19\\] - Octi Game
  13849. >2 regex/c GM\\[20\\] - Gess Game
  13850. >2 regex/c GM\\[21\\] - twix Game
  13851. # Epic Games/Unreal Engine Package
  13852. #
  13853. 0 lelong 0x9E2A83C1 Unreal Engine Package,
  13854. >4 leshort x version: %i
  13855. >12 lelong !0 \b, names: %i
  13856. >28 lelong !0 \b, imports: %i
  13857. >20 lelong !0 \b, exports: %i
  13858. 0 string ESVG
  13859. >4 lelong 0x00160000
  13860. >10 string TOC\020 Empire Deluxe for DOS saved game
  13861. # Sid Meier's Civilization V/VI
  13862. # From: Benjamin Lowry <ben@ben.gmbh>
  13863. 0 string CIV5
  13864. >4 byte 0x08 Sid Meier's Civilization V saved game,
  13865. >>12 regex [0-9a-z.]+ saved by game version %s
  13866. >4 byte 0x01 Sid Meier's Civilization V replay data,
  13867. >>12 regex [0-9a-z.]+ saved by game version %s
  13868. 0 string CIV6 Sid Meier's Civilization VI saved game
  13869. # https://syzygy-tables.info/
  13870. # From Michel Van den Bergh
  13871. 0 string \327f\f\245 Syzygy DTZ tablebase
  13872. !:mime application/syzygy
  13873. 0 string q\350#] Syzygy WDL tablebase
  13874. !:mime application/syzygy
  13875. #------------------------------------------------------------------------------
  13876. # $File: gcc,v 1.5 2016/07/01 23:31:13 christos Exp $
  13877. # gcc: file(1) magic for GCC special files
  13878. #
  13879. 0 string gpch GCC precompiled header
  13880. # The version field is annoying. It's 3 characters, not zero-terminated.
  13881. >5 byte x (version %c
  13882. >6 byte x \b%c
  13883. >7 byte x \b%c)
  13884. # 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
  13885. >4 byte 67 for C
  13886. >4 byte 111 for Objective-C
  13887. >4 byte 43 for C++
  13888. >4 byte 79 for Objective-C++
  13889. #------------------------------------------------------------------------------
  13890. # $File: gconv
  13891. # gconv: file(1) magic for iconv/gconv module configuration cache
  13892. #
  13893. # Magic number defined in glibc/iconv/iconvconfig.h as GCONVCACHE_MAGIC
  13894. #
  13895. # From: Marek Cermak <macermak@redhat.com>
  13896. #
  13897. 0 lelong 0x20010324 gconv module configuration cache data
  13898. #------------------------------------------------------------------------------
  13899. # $File: geo,v 1.7 2019/04/19 00:42:27 christos Exp $
  13900. # Geo- files from Kurt Schwehr <schwehr@ccom.unh.edu>
  13901. ######################################################################
  13902. #
  13903. # Acoustic Doppler Current Profilers (ADCP)
  13904. #
  13905. ######################################################################
  13906. 0 beshort 0x7f7f RDI Acoustic Doppler Current Profiler (ADCP)
  13907. ######################################################################
  13908. #
  13909. # Metadata
  13910. #
  13911. ######################################################################
  13912. 0 string Identification_Information FGDC ASCII metadata
  13913. ######################################################################
  13914. #
  13915. # Seimsic / Subbottom
  13916. #
  13917. ######################################################################
  13918. # Knudsen subbottom chirp profiler - Binary File Format: B9
  13919. # KEB D409-03167 V1.75 Huffman
  13920. 0 string KEB\ Knudsen seismic KEL binary (KEB) -
  13921. >4 regex [-A-Z0-9]* Software: %s
  13922. >>&1 regex V[0-9]*\.[0-9]* version %s
  13923. ######################################################################
  13924. #
  13925. # LIDAR - Laser altimetry or bathy
  13926. #
  13927. ######################################################################
  13928. # Caris LIDAR format for LADS comes as two parts... ascii location file and binary waveform data
  13929. 0 string HCA LADS Caris Ascii Format (CAF) bathymetric lidar
  13930. >4 regex [0-9]*\.[0-9]* version %s
  13931. 0 string HCB LADS Caris Binary Format (CBF) bathymetric lidar waveform data
  13932. >3 byte x version %d .
  13933. >4 byte x %d
  13934. ######################################################################
  13935. #
  13936. # MULTIBEAM SONARS https://www.ldeo.columbia.edu/res/pi/MB-System/formatdoc/
  13937. #
  13938. ######################################################################
  13939. # GeoAcoustics - GeoSwath Plus
  13940. 4 beshort 0x2002 GeoSwath RDF
  13941. 0 string Start:- GeoSwatch auf text file
  13942. # Seabeam 2100
  13943. # mbsystem code mb41
  13944. 0 string SB2100 SeaBeam 2100 multibeam sonar
  13945. 0 string SB2100DR SeaBeam 2100 DR multibeam sonar
  13946. 0 string SB2100PR SeaBeam 2100 PR multibeam sonar
  13947. # This corresponds to MB-System format 94, L-3/ELAC/SeaBeam XSE vendor
  13948. # format. It is the format of our upgraded SeaBeam 2112 on R/V KNORR.
  13949. 0 string $HSF XSE multibeam
  13950. # mb121 https://www.saic.com/maritime/gsf/
  13951. 8 string GSF-v SAIC generic sensor format (GSF) sonar data,
  13952. >&0 regex [0-9]*\.[0-9]* version %s
  13953. # MGD77 - https://www.ngdc.noaa.gov/mgg/dat/geodas/docs/mgd77.htm
  13954. # mb161
  13955. 9 string MGD77 MGD77 Header, Marine Geophysical Data Exchange Format
  13956. # MBSystem processing caches the mbinfo output
  13957. 1 string Swath\ Data\ File: mbsystem info cache
  13958. # Caris John Hughes Clark format
  13959. 0 string HDCS Caris multibeam sonar related data
  13960. 1 string Start/Stop\ parameter\ header: Caris ASCII project summary
  13961. ######################################################################
  13962. #
  13963. # Visualization and 3D modeling
  13964. #
  13965. ######################################################################
  13966. # IVS - IVS3d.com Tagged Data Represetation
  13967. 0 string %%\ TDR\ 2.0 IVS Fledermaus TDR file
  13968. # http://www.ecma-international.org/publications/standards/Ecma-363.htm
  13969. # 3D in PDFs
  13970. 0 string U3D ECMA-363, Universal 3D
  13971. ######################################################################
  13972. #
  13973. # Support files
  13974. #
  13975. ######################################################################
  13976. # https://midas.psi.ch/elog/
  13977. 0 string $@MID@$ elog journal entry
  13978. # Geospatial Designs https://www.geospatialdesigns.com/surfer6_format.htm
  13979. 0 string DSBB Surfer 6 binary grid file
  13980. >4 leshort x \b, %d
  13981. >6 leshort x \bx%d
  13982. >8 ledouble x \b, minx=%g
  13983. >16 ledouble x \b, maxx=%g
  13984. >24 ledouble x \b, miny=%g
  13985. >32 ledouble x \b, maxy=%g
  13986. >40 ledouble x \b, minz=%g
  13987. >48 ledouble x \b, maxz=%g
  13988. # magic for LAS format files
  13989. # alex myczko <alex@aiei.ch>
  13990. # https://www.asprs.org/wp-content/uploads/2010/12/LAS_1_3_r11.pdf
  13991. 0 string LASF LIDAR point data records
  13992. >24 byte >0 \b, version %u
  13993. >25 byte >0 \b.%u
  13994. >26 string >\0 \b, SYSID %s
  13995. >58 string >\0 \b, Generating Software %s
  13996. # magic for PCD format files
  13997. # alex myczko <alex@aiei.ch>
  13998. # http://pointclouds.org/documentation/tutorials/pcd_file_format.php
  13999. 0 string #\ .PCD Point Cloud Data
  14000. #------------------------------------------------------------------------------
  14001. # $File: geos,v 1.4 2009/09/19 16:28:09 christos Exp $
  14002. # GEOS files (Vidar Madsen, vidar@gimp.org)
  14003. # semi-commonly used in embedded and handheld systems.
  14004. 0 belong 0xc745c153 GEOS
  14005. >40 byte 1 executable
  14006. >40 byte 2 VMFile
  14007. >40 byte 3 binary
  14008. >40 byte 4 directory label
  14009. >40 byte <1 unknown
  14010. >40 byte >4 unknown
  14011. >4 string >\0 \b, name "%s"
  14012. #>44 short x \b, version %d
  14013. #>46 short x \b.%d
  14014. #>48 short x \b, rev %d
  14015. #>50 short x \b.%d
  14016. #>52 short x \b, proto %d
  14017. #>54 short x \br%d
  14018. #>168 string >\0 \b, copyright "%s"
  14019. #------------------------------------------------------------------------------
  14020. # $File: gimp,v 1.10 2019/10/15 18:19:40 christos Exp $
  14021. # GIMP Gradient: file(1) magic for the GIMP's gradient data files (.ggr)
  14022. # by Federico Mena <federico@nuclecu.unam.mx>
  14023. 0 string/t GIMP\ Gradient GIMP gradient data
  14024. #!:mime text/plain
  14025. !:mime text/x-gimp-ggr
  14026. !:ext ggr
  14027. # GIMP palette (.gpl)
  14028. # From: Markus Heidelberg <markus.heidelberg@web.de>
  14029. 0 string/t GIMP\ Palette GIMP palette data
  14030. # URL: https://docs.gimp.org/en/gimp-concepts-palettes.html
  14031. # Reference: http://fileformats.archiveteam.org/wiki/GIMP_Palette
  14032. #!:mime text/plain
  14033. !:mime text/x-gimp-gpl
  14034. !:ext gpl
  14035. #------------------------------------------------------------------------------
  14036. # XCF: file(1) magic for the XCF image format used in the GIMP (.xcf) developed
  14037. # by Spencer Kimball and Peter Mattis
  14038. # ('Bucky' LaDieu, nega@vt.edu)
  14039. # URL: https://en.wikipedia.org/wiki/XCF_(file_format)
  14040. # Reference: https://gitlab.gnome.org/GNOME/gimp/blob/master/devel-docs/xcf.txt
  14041. 0 string gimp\ xcf GIMP XCF image data,
  14042. !:mime image/x-xcf
  14043. !:ext xcf
  14044. >9 string file version 0,
  14045. >9 string v version
  14046. >>10 string >\0 %s,
  14047. >14 belong x %u x
  14048. >18 belong x %u,
  14049. >22 belong 0 RGB Color
  14050. >22 belong 1 Greyscale
  14051. >22 belong 2 Indexed Color
  14052. >22 belong >2 Unknown Image Type.
  14053. #------------------------------------------------------------------------------
  14054. # XCF: file(1) magic for the patterns used in the GIMP (.pat), developed
  14055. # by Spencer Kimball and Peter Mattis
  14056. # ('Bucky' LaDieu, nega@vt.edu)
  14057. # Reference: http://fileformats.archiveteam.org/wiki/GIMP_Pattern
  14058. 20 string GPAT GIMP pattern data,
  14059. >24 string x %s
  14060. !:mime image/x-gimp-pat
  14061. !:ext pat
  14062. #------------------------------------------------------------------------------
  14063. # XCF: file(1) magic for the brushes used in the GIMP (.gbr), developed
  14064. # by Spencer Kimball and Peter Mattis
  14065. # ('Bucky' LaDieu, nega@vt.edu)
  14066. 20 string GIMP GIMP brush data
  14067. # Reference: http://fileformats.archiveteam.org/wiki/GIMP_Brush
  14068. !:mime image/x-gimp-gbr
  14069. # some sources also list gpb
  14070. !:ext gbr
  14071. # From: Joerg Jenderek
  14072. # URL: https://docs.gimp.org/en/gimp-using-animated-brushes.html
  14073. # Reference: http://fileformats.archiveteam.org/wiki/GIMP_Animated_Brush
  14074. # share\gimp\2.0\brushes\Legacy\confetti.gih
  14075. 0 search/21/b \040ncells: GIMP animated brush data
  14076. !:mime image/x-gimp-gih
  14077. !:ext gih
  14078. # GIMP Curves File
  14079. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  14080. 0 string #\040GIMP\040Curves\040File GIMP curve file
  14081. #!:mime text/plain
  14082. !:mime text/x-gimp-curve
  14083. !:ext /txt
  14084. #------------------------------------------------------------------------------
  14085. # $File: git,v 1.2 2020/08/09 16:57:15 christos Exp $
  14086. # git: file(1) magic for Git objects
  14087. 0 string blob\040
  14088. >5 regex [0-9a-f]+ Git blob %s
  14089. 0 string tree\040
  14090. >5 regex [0-9a-f]+ Git tree %s
  14091. 0 string commit\040
  14092. >7 regex [0-9a-f]+ Git commit %s
  14093. #------------------------------------------------------------------------------
  14094. # $File: glibc,v 1.1 2018/10/11 15:35:43 christos Exp $
  14095. # glibc locale files
  14096. #
  14097. # https://sourceware.org/git/?p=glibc.git;f=locale/localeinfo.h;h=68822a63#l32
  14098. 0 belong 0x20070920 glibc locale file LC_CTYPE
  14099. 0 belong 0x14110320 glibc locale file LC_NUMERIC
  14100. 0 belong 0x17110320 glibc locale file LC_TIME
  14101. 0 belong 0x17100520 glibc locale file LC_COLLATE
  14102. 0 belong 0x11110320 glibc locale file LC_MONETARY
  14103. 0 belong 0x10110320 glibc locale file LC_MESSAGES
  14104. 0 belong 0x13110320 glibc locale file LC_ALL
  14105. 0 belong 0x12110320 glibc locale file LC_PAPER
  14106. 0 belong 0x1d110320 glibc locale file LC_NAME
  14107. 0 belong 0x1c110320 glibc locale file LC_ADDRESS
  14108. 0 belong 0x1f110320 glibc locale file LC_TELEPHONE
  14109. 0 belong 0x1e110320 glibc locale file LC_MEASUREMENT
  14110. 0 belong 0x19110320 glibc locale file LC_IDENTIFICATION
  14111. #------------------------------------------------------------------------------
  14112. # $File: gnome,v 1.7 2020/06/23 16:17:08 christos Exp $
  14113. # GNOME related files
  14114. # Contributed by Josh Triplett
  14115. # FIXME: Could be simplified if pstring supported two-byte counts
  14116. 0 string GnomeKeyring\n\r\0\n GNOME keyring
  14117. >&0 ubyte 0 \b, major version 0
  14118. >>&0 ubyte 0 \b, minor version 0
  14119. >>>&0 ubyte 0 \b, crypto type 0 (AES)
  14120. >>>&0 ubyte >0 \b, crypto type %u (unknown)
  14121. >>>&1 ubyte 0 \b, hash type 0 (MD5)
  14122. >>>&1 ubyte >0 \b, hash type %u (unknown)
  14123. >>>&2 ubelong 0xFFFFFFFF \b, name NULL
  14124. >>>&2 ubelong !0xFFFFFFFF
  14125. >>>>&-4 ubelong >255 \b, name too long for file's pstring type
  14126. >>>>&-4 ubelong <256
  14127. >>>>>&-1 pstring x \b, name "%s"
  14128. >>>>>>&0 ubeqdate x \b, last modified %s
  14129. >>>>>>&8 ubeqdate x \b, created %s
  14130. >>>>>>&16 ubelong &1
  14131. >>>>>>>&0 ubelong x \b, locked if idle for %u seconds
  14132. >>>>>>&16 ubelong ^1 \b, not locked if idle
  14133. >>>>>>&24 ubelong x \b, hash iterations %u
  14134. >>>>>>&28 ubequad x \b, salt %llu
  14135. >>>>>>&52 ubelong x \b, %u item(s)
  14136. # From: Alex Beregszaszi <alex@fsn.hu>
  14137. 4 string gtktalog GNOME Catalogue (gtktalog)
  14138. >13 string >\0 version %s
  14139. # Summary: GStreamer binary registry
  14140. # Extension: .bin
  14141. # Submitted by: Josh Triplett <josh@joshtriplett.org>
  14142. 0 belong 0xc0def00d GStreamer binary registry
  14143. >4 string x \b, version %s
  14144. # GVariant Database file
  14145. # By Elan Ruusamae <glen@delfi.ee>
  14146. # https://github.com/GNOME/gvdb/blob/master/gvdb-format.h
  14147. # It's always "GVariant", it's byte swapped on incompatible archs
  14148. # See https://github.com/GNOME/gvdb/blob/master/gvdb-builder.c
  14149. # file_builder_serialise()
  14150. # https://developer.gnome.org/glib/2.34/glib-GVariant.html#GVariant
  14151. 0 string GVariant GVariant Database file,
  14152. # version is never filled. probably future extension
  14153. >8 lelong x version %d
  14154. # not sure are these usable, so commented out
  14155. #>>16 lelong x start %d,
  14156. #>>>20 lelong x end %d
  14157. # G-IR database made by gobject-introspect toolset,
  14158. # https://live.gnome.org/GObjectIntrospection
  14159. 0 string GOBJ\nMETADATA\r\n\032 G-IR binary database
  14160. >16 byte x \b, v%d
  14161. >17 byte x \b.%d
  14162. >20 short x \b, %d entries
  14163. >22 short x \b/%d local
  14164. #------------------------------------------------------------------------------
  14165. # $File: gnu,v 1.23 2021/02/23 00:51:10 christos Exp $
  14166. # gnu: file(1) magic for various GNU tools
  14167. #
  14168. # GNU nlsutils message catalog file format
  14169. #
  14170. # GNU message catalog (.mo and .gmo files)
  14171. # Update: Joerg Jenderek
  14172. # URL: https://www.gnu.org/software/gettext/manual/html_node/MO-Files.html
  14173. # Reference: ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.8.tar.gz/
  14174. # gettext-0.19.8.1/gettext-runtime/intl/gmo.h
  14175. # Note: maybe call it like "GNU translation gettext machine object"
  14176. 0 string \336\22\4\225 GNU message catalog (little endian),
  14177. #0 ulelong 0x950412DE GNU-format message catalog data
  14178. # TODO: write lines in such a way that code can also be called for big endian variant
  14179. #>0 use gettext-object
  14180. #0 name gettext-object
  14181. >4 ulelong x revision
  14182. !:mime application/x-gettext-translation
  14183. # mo extension is also used for Easeus Partition Master PE32 executable module
  14184. # like ConvertFatToNTFS.mo
  14185. !:ext gmo/mo
  14186. # only found three revision combinations 0.0 0.1 1.1 as unsigned 32-bit
  14187. # major revision
  14188. >4 ulelong/0xFFff x %u.
  14189. # minor revision
  14190. >4 ulelong&0x0000FFff x \b%u
  14191. >>8 ulelong x \b, %u message
  14192. # plural s
  14193. >>8 ulelong >1 \bs
  14194. # size of hashing table
  14195. #>20 ulelong x \b, %u hash
  14196. #>20 ulelong >1 \bes
  14197. #>24 ulelong x at 0x%x
  14198. # for revision x.0 offset of table with originals is 1Ch if directly after header
  14199. >4 ulelong&0x0000FFff =0
  14200. >>12 ulelong !0x1C \b, at 0x%x string table
  14201. # but for x.1 table offset i found is 30h. That means directly after bigger header
  14202. >4 ulelong&0x0000FFff >0
  14203. >>12 ulelong !0x30 \b, at 0x%x string table
  14204. # The following variables are only used in .mo files with minor revision >= 1
  14205. # number of system dependent segments
  14206. #>>28 ulelong x \b, %u segment
  14207. #>>28 ulelong >1 \bs
  14208. # offset of table describing system dependent segments
  14209. #>>32 ulelong x at 0x%x
  14210. # number of system dependent strings pairs
  14211. >>36 ulelong x \b, %u sysdep message
  14212. >>36 ulelong >1 \bs
  14213. # offset of table with start offsets of original sysdep strings
  14214. #>>40 ulelong x \b, at 0x%x sysdep strings
  14215. # offset of table with start offsets of translated sysdep strings
  14216. #>>44 ulelong x \b, at 0x%x sysdep translations
  14217. # >>(44.l) ulelong x 0x%x chars
  14218. # >>>&0 ulelong x at 0x%x
  14219. # >>>>(&-4) string x "%s"
  14220. # string table after big header
  14221. #>>48 ubequad x \b, string table 0x%llx
  14222. #
  14223. # 0th string length seems to be always 0
  14224. #>(12.l) ulelong x \b, %u chars
  14225. #>>&0 ulelong x at 0x%x
  14226. # if 1st string length positive inspect offset and string
  14227. #>(12.l+8) ulelong >0 \b, %u chars
  14228. #>>&0 ulelong x at 0x%x
  14229. # if 2nd string length positive inspect offset and string
  14230. # >(12.l+16) ulelong >0 \b, %u chars
  14231. # >>&0 ulelong x at 0x%x
  14232. # skip newline byte
  14233. #>>>(&-4) ubyte =0x0A
  14234. #>>>>&0 string x "%s"
  14235. #>>>(&-4) ubyte !0x0A
  14236. #>>>>&-1 string x '%s'
  14237. # offset of table with translation strings
  14238. #>16 ulelong x \b, at 0x%x translation table
  14239. # check translation 0 length and offset
  14240. >(16.l) ulelong >0
  14241. >>&0 ulelong x
  14242. # translation 0 seems to be often Project-Id with name and version
  14243. >>>(&-4) string x \b, %s
  14244. # trans. 1 with bytes >= 1 unlike icoutils-0.31.0\po\en@boldquot.gmo with 1 NL
  14245. >(16.l+8) ulelong >1
  14246. >>&0 ulelong x
  14247. >>>(&-4) ubyte !0x0A
  14248. >>>>&-1 string x '%s'
  14249. # 1 New Line like in tar-1.29\po\de.gmo
  14250. >>>(&-4) ubyte =0x0A
  14251. >>>>&0 ubyte !0x0A
  14252. >>>>>&-1 string x '%s'
  14253. # 2nd New Line like in parted-3.1\po\de.gmo
  14254. >>>>&0 ubyte =0x0A
  14255. >>>>>&0 string x '%s'
  14256. 0 string \225\4\22\336 GNU message catalog (big endian),
  14257. #0 ubelong 0x950412DE GNU-format message catalog data
  14258. !:mime application/x-gettext-translation
  14259. !:ext gmo/mo
  14260. # TODO: for big endian use same code as for little endian
  14261. #>0 use \^gettext-object
  14262. # DEBUG code
  14263. #>16 ubelong x \b, at 0x%x translation table
  14264. #>(16.L) ubelong x 0x%x chars
  14265. #>>&0 ubelong x at 0x%x
  14266. # unexpected value HERE!
  14267. #>>>(&-4) ubequad x 0x%llx
  14268. #
  14269. >4 beshort x revision %d.
  14270. >6 beshort >0 \b%d,
  14271. >>8 belong x %d messages,
  14272. >>36 belong x %d sysdep messages
  14273. >6 beshort =0 \b%d,
  14274. >>8 belong x %d messages
  14275. # GnuPG
  14276. # The format is very similar to pgp
  14277. 0 string \001gpg GPG key trust database
  14278. >4 byte x version %d
  14279. # Note: magic.mime had 0x8501 for the next line instead of 0x8502
  14280. 0 beshort 0x8502 GPG encrypted data
  14281. !:mime text/PGP # encoding: data
  14282. # Update: Joerg Jenderek
  14283. # Note: PGP and GPG use same data structure.
  14284. # So recognition is now done by ./pgp with start test for byte 0x99
  14285. # This magic is not particularly good, as the keyrings don't have true
  14286. # magic. Nevertheless, it covers many keyrings.
  14287. # 0 ubeshort-0x9901 <2
  14288. # >3 byte 4
  14289. # >>4 bedate x GPG key public ring, created %s
  14290. # !:mime application/x-gnupg-keyring
  14291. # Symmetric encryption
  14292. 0 leshort 0x0d8c
  14293. >4 leshort 0x0203
  14294. >>2 leshort 0x0204 GPG symmetrically encrypted data (3DES cipher)
  14295. >>2 leshort 0x0304 GPG symmetrically encrypted data (CAST5 cipher)
  14296. >>2 leshort 0x0404 GPG symmetrically encrypted data (BLOWFISH cipher)
  14297. >>2 leshort 0x0704 GPG symmetrically encrypted data (AES cipher)
  14298. >>2 leshort 0x0804 GPG symmetrically encrypted data (AES192 cipher)
  14299. >>2 leshort 0x0904 GPG symmetrically encrypted data (AES256 cipher)
  14300. >>2 leshort 0x0a04 GPG symmetrically encrypted data (TWOFISH cipher)
  14301. >>2 leshort 0x0b04 GPG symmetrically encrypted data (CAMELLIA128 cipher)
  14302. >>2 leshort 0x0c04 GPG symmetrically encrypted data (CAMELLIA192 cipher)
  14303. >>2 leshort 0x0d04 GPG symmetrically encrypted data (CAMELLIA256 cipher)
  14304. # GnuPG Keybox file
  14305. # <https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=kbx/keybox-blob.c;hb=HEAD>
  14306. # From: Philipp Hahn <hahn@univention.de>
  14307. 0 belong 32
  14308. >4 byte 1
  14309. >>8 string KBXf GPG keybox database
  14310. >>>5 byte 1 version %d
  14311. >>>16 bedate x \b, created-at %s
  14312. >>>20 bedate x \b, last-maintained %s
  14313. # From: James Youngman <jay@gnu.org>
  14314. # gnu find magic
  14315. 0 string \0LOCATE GNU findutils locate database data
  14316. >7 string >\0 \b, format %s
  14317. >7 string 02 \b (frcode)
  14318. # Files produced by GNU gettext
  14319. # gettext message catalogue
  14320. 0 search/1024 \nmsgid
  14321. >&0 search/1024 \nmsgstr GNU gettext message catalogue text
  14322. !:strength +100
  14323. !:mime text/x-po
  14324. #------------------------------------------------------------------------------
  14325. # $File: gnumeric,v 1.4 2009/09/19 16:28:09 christos Exp $
  14326. # gnumeric: file(1) magic for Gnumeric spreadsheet
  14327. # This entry is only semi-helpful, as Gnumeric compresses its files, so
  14328. # they will ordinarily reported as "compressed", but at least -z helps
  14329. 39 string =<gmr:Workbook Gnumeric spreadsheet
  14330. !:mime application/x-gnumeric
  14331. #------------------------------------------------------------------------------
  14332. # $File: gpt,v 1.5 2020/12/12 20:01:47 christos Exp $
  14333. #
  14334. # GPT Partition table patterns.
  14335. # Author: Rogier Goossens (goossens.rogier@gmail.com)
  14336. # Note that a GPT-formatted disk must contain an MBR as well.
  14337. #
  14338. # The initial segment (up to >>>>>>>>422) was copied from the X86
  14339. # partition table code (aka MBR).
  14340. # This is kept separate, so that MBR partitions are not reported as well.
  14341. # (use -k if you do want them as well)
  14342. # First, detect the MBR partition table
  14343. # If more than one GPT protective MBR partition exists, don't print anything
  14344. # (the other MBR detection code will then just print the MBR partition table)
  14345. 0x1FE leshort 0xAA55
  14346. >3 string !MS
  14347. >>3 string !SYSLINUX
  14348. >>>3 string !MTOOL
  14349. >>>>3 string !NEWLDR
  14350. >>>>>5 string !DOS
  14351. # not FAT (32 bit)
  14352. >>>>>>82 string !FAT32
  14353. #not Linux kernel
  14354. >>>>>>>514 string !HdrS
  14355. #not BeOS
  14356. >>>>>>>>422 string !Be\ Boot\ Loader
  14357. # GPT with protective MBR entry in partition 1 (only)
  14358. >>>>>>>>>450 ubyte 0xee
  14359. >>>>>>>>>>466 ubyte !0xee
  14360. >>>>>>>>>>>482 ubyte !0xee
  14361. >>>>>>>>>>>>498 ubyte !0xee
  14362. #>>>>>>>>>>>>>446 use gpt-mbr-partition
  14363. >>>>>>>>>>>>>(454.l*8192) string EFI\ PART GPT partition table
  14364. >>>>>>>>>>>>>>0 use gpt-mbr-type
  14365. >>>>>>>>>>>>>>&-8 use gpt-table
  14366. >>>>>>>>>>>>>>0 ubyte x of 8192 bytes
  14367. >>>>>>>>>>>>>(454.l*8192) string !EFI\ PART
  14368. >>>>>>>>>>>>>>(454.l*4096) string EFI\ PART GPT partition table
  14369. >>>>>>>>>>>>>>>0 use gpt-mbr-type
  14370. >>>>>>>>>>>>>>>&-8 use gpt-table
  14371. >>>>>>>>>>>>>>>0 ubyte x of 4096 bytes
  14372. >>>>>>>>>>>>>>(454.l*4096) string !EFI\ PART
  14373. >>>>>>>>>>>>>>>(454.l*2048) string EFI\ PART GPT partition table
  14374. >>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14375. >>>>>>>>>>>>>>>>&-8 use gpt-table
  14376. >>>>>>>>>>>>>>>>0 ubyte x of 2048 bytes
  14377. >>>>>>>>>>>>>>>(454.l*2048) string !EFI\ PART
  14378. >>>>>>>>>>>>>>>>(454.l*1024) string EFI\ PART GPT partition table
  14379. >>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14380. >>>>>>>>>>>>>>>>>&-8 use gpt-table
  14381. >>>>>>>>>>>>>>>>>0 ubyte x of 1024 bytes
  14382. >>>>>>>>>>>>>>>>(454.l*1024) string !EFI\ PART
  14383. >>>>>>>>>>>>>>>>>(454.l*512) string EFI\ PART GPT partition table
  14384. >>>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14385. >>>>>>>>>>>>>>>>>>&-8 use gpt-table
  14386. >>>>>>>>>>>>>>>>>>0 ubyte x of 512 bytes
  14387. # GPT with protective MBR entry in partition 2 (only)
  14388. >>>>>>>>>450 ubyte !0xee
  14389. >>>>>>>>>>466 ubyte 0xee
  14390. >>>>>>>>>>>482 ubyte !0xee
  14391. >>>>>>>>>>>>498 ubyte !0xee
  14392. #>>>>>>>>>>>>>462 use gpt-mbr-partition
  14393. >>>>>>>>>>>>>(470.l*8192) string EFI\ PART GPT partition table
  14394. >>>>>>>>>>>>>>0 use gpt-mbr-type
  14395. >>>>>>>>>>>>>>&-8 use gpt-table
  14396. >>>>>>>>>>>>>>0 ubyte x of 8192 bytes
  14397. >>>>>>>>>>>>>(470.l*8192) string !EFI\ PART
  14398. >>>>>>>>>>>>>>(470.l*4096) string EFI\ PART GPT partition table
  14399. >>>>>>>>>>>>>>>0 use gpt-mbr-type
  14400. >>>>>>>>>>>>>>>&-8 use gpt-table
  14401. >>>>>>>>>>>>>>>0 ubyte x of 4096 bytes
  14402. >>>>>>>>>>>>>>(470.l*4096) string !EFI\ PART
  14403. >>>>>>>>>>>>>>>(470.l*2048) string EFI\ PART GPT partition table
  14404. >>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14405. >>>>>>>>>>>>>>>>&-8 use gpt-table
  14406. >>>>>>>>>>>>>>>>0 ubyte x of 2048 bytes
  14407. >>>>>>>>>>>>>>>(470.l*2048) string !EFI\ PART
  14408. >>>>>>>>>>>>>>>>(470.l*1024) string EFI\ PART GPT partition table
  14409. >>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14410. >>>>>>>>>>>>>>>>>&-8 use gpt-table
  14411. >>>>>>>>>>>>>>>>>0 ubyte x of 1024 bytes
  14412. >>>>>>>>>>>>>>>>(470.l*1024) string !EFI\ PART
  14413. >>>>>>>>>>>>>>>>>(470.l*512) string EFI\ PART GPT partition table
  14414. >>>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14415. >>>>>>>>>>>>>>>>>>&-8 use gpt-table
  14416. >>>>>>>>>>>>>>>>>>0 ubyte x of 512 bytes
  14417. # GPT with protective MBR entry in partition 3 (only)
  14418. >>>>>>>>>450 ubyte !0xee
  14419. >>>>>>>>>>466 ubyte !0xee
  14420. >>>>>>>>>>>482 ubyte 0xee
  14421. >>>>>>>>>>>>498 ubyte !0xee
  14422. #>>>>>>>>>>>>>478 use gpt-mbr-partition
  14423. >>>>>>>>>>>>>(486.l*8192) string EFI\ PART GPT partition table
  14424. >>>>>>>>>>>>>>0 use gpt-mbr-type
  14425. >>>>>>>>>>>>>>&-8 use gpt-table
  14426. >>>>>>>>>>>>>>0 ubyte x of 8192 bytes
  14427. >>>>>>>>>>>>>(486.l*8192) string !EFI\ PART
  14428. >>>>>>>>>>>>>>(486.l*4096) string EFI\ PART GPT partition table
  14429. >>>>>>>>>>>>>>>0 use gpt-mbr-type
  14430. >>>>>>>>>>>>>>>&-8 use gpt-table
  14431. >>>>>>>>>>>>>>>0 ubyte x of 4096 bytes
  14432. >>>>>>>>>>>>>>(486.l*4096) string !EFI\ PART
  14433. >>>>>>>>>>>>>>>(486.l*2048) string EFI\ PART GPT partition table
  14434. >>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14435. >>>>>>>>>>>>>>>>&-8 use gpt-table
  14436. >>>>>>>>>>>>>>>>0 ubyte x of 2048 bytes
  14437. >>>>>>>>>>>>>>>(486.l*2048) string !EFI\ PART
  14438. >>>>>>>>>>>>>>>>(486.l*1024) string EFI\ PART GPT partition table
  14439. >>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14440. >>>>>>>>>>>>>>>>>&-8 use gpt-table
  14441. >>>>>>>>>>>>>>>>>0 ubyte x of 1024 bytes
  14442. >>>>>>>>>>>>>>>>(486.l*1024) string !EFI\ PART
  14443. >>>>>>>>>>>>>>>>>(486.l*512) string EFI\ PART GPT partition table
  14444. >>>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14445. >>>>>>>>>>>>>>>>>>&-8 use gpt-table
  14446. >>>>>>>>>>>>>>>>>>0 ubyte x of 512 bytes
  14447. # GPT with protective MBR entry in partition 4 (only)
  14448. >>>>>>>>>450 ubyte !0xee
  14449. >>>>>>>>>>466 ubyte !0xee
  14450. >>>>>>>>>>>482 ubyte !0xee
  14451. >>>>>>>>>>>>498 ubyte 0xee
  14452. #>>>>>>>>>>>>>494 use gpt-mbr-partition
  14453. >>>>>>>>>>>>>(502.l*8192) string EFI\ PART GPT partition table
  14454. >>>>>>>>>>>>>>0 use gpt-mbr-type
  14455. >>>>>>>>>>>>>>&-8 use gpt-table
  14456. >>>>>>>>>>>>>>0 ubyte x of 8192 bytes
  14457. >>>>>>>>>>>>>(502.l*8192) string !EFI\ PART
  14458. >>>>>>>>>>>>>>(502.l*4096) string EFI\ PART GPT partition table
  14459. >>>>>>>>>>>>>>>0 use gpt-mbr-type
  14460. >>>>>>>>>>>>>>>&-8 use gpt-table
  14461. >>>>>>>>>>>>>>>0 ubyte x of 4096 bytes
  14462. >>>>>>>>>>>>>>(502.l*4096) string !EFI\ PART
  14463. >>>>>>>>>>>>>>>(502.l*2048) string EFI\ PART GPT partition table
  14464. >>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14465. >>>>>>>>>>>>>>>>&-8 use gpt-table
  14466. >>>>>>>>>>>>>>>>0 ubyte x of 2048 bytes
  14467. >>>>>>>>>>>>>>>(502.l*2048) string !EFI\ PART
  14468. >>>>>>>>>>>>>>>>(502.l*1024) string EFI\ PART GPT partition table
  14469. >>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14470. >>>>>>>>>>>>>>>>>&-8 use gpt-table
  14471. >>>>>>>>>>>>>>>>>0 ubyte x of 1024 bytes
  14472. >>>>>>>>>>>>>>>>(502.l*1024) string !EFI\ PART
  14473. >>>>>>>>>>>>>>>>>(502.l*512) string EFI\ PART GPT partition table
  14474. >>>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  14475. >>>>>>>>>>>>>>>>>>&-8 use gpt-table
  14476. >>>>>>>>>>>>>>>>>>0 ubyte x of 512 bytes
  14477. # The following code does GPT detection and processing, including
  14478. # sector size detection.
  14479. # It has to be duplicated above because the top-level pattern
  14480. # (i.e. not called using 'use') must print *something* for file
  14481. # to count it as a match. Text only printed in named patterns is
  14482. # not counted, and causes file to continue, and try and match
  14483. # other patterns.
  14484. #
  14485. # Unfortunately, when assuming sector sizes >=16k, if the sector size
  14486. # happens to be 512 instead, we may find confusing data after the GPT
  14487. # table... If the GPT table has less than 128 entries, this may even
  14488. # happen for assumed sector sizes as small as 4k
  14489. # This could be solved by checking for the presence of the backup GPT
  14490. # header as well, but that makes the logic extremely complex
  14491. ##0 name gpt-mbr-partition
  14492. ##>(8.l*8192) string EFI\ PART
  14493. ##>>(8.l*8192) use gpt-mbr-type
  14494. ##>>&-8 use gpt-table
  14495. ##>>0 ubyte x of 8192 bytes
  14496. ##>(8.l*8192) string !EFI\ PART
  14497. ##>>(8.l*4096) string EFI\ PART GPT partition table
  14498. ##>>>0 use gpt-mbr-type
  14499. ##>>>&-8 use gpt-table
  14500. ##>>>0 ubyte x of 4096 bytes
  14501. ##>>(8.l*4096) string !EFI\ PART
  14502. ##>>>(8.l*2048) string EFI\ PART GPT partition table
  14503. ##>>>>0 use gpt-mbr-type
  14504. ##>>>>&-8 use gpt-table
  14505. ##>>>>0 ubyte x of 2048 bytes
  14506. ##>>>(8.l*2048) string !EFI\ PART
  14507. ##>>>>(8.l*1024) string EFI\ PART GPT partition table
  14508. ##>>>>>0 use gpt-mbr-type
  14509. ##>>>>>&-8 use gpt-table
  14510. ##>>>>>0 ubyte x of 1024 bytes
  14511. ##>>>>(8.l*1024) string !EFI\ PART
  14512. ##>>>>>(8.l*512) string EFI\ PART GPT partition table
  14513. ##>>>>>>0 use gpt-mbr-type
  14514. ##>>>>>>&-8 use gpt-table
  14515. ##>>>>>>0 ubyte x of 512 bytes
  14516. # Print details of MBR type for a GPT-disk
  14517. # Calling code ensures that there is only one 0xee partition.
  14518. 0 name gpt-mbr-type
  14519. # GPT with protective MBR entry in partition 1
  14520. >450 ubyte 0xee
  14521. >>454 ulelong 1
  14522. >>>462 string !\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \b (with hybrid MBR)
  14523. >>454 ulelong !1 \b (nonstandard: not at LBA 1)
  14524. # GPT with protective MBR entry in partition 2
  14525. >466 ubyte 0xee
  14526. >>470 ulelong 1
  14527. >>>478 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
  14528. >>>>446 string !\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \b (with hybrid MBR)
  14529. >>>478 string !\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \b (with hybrid MBR)
  14530. >>470 ulelong !1 \b (nonstandard: not at LBA 1)
  14531. # GPT with protective MBR entry in partition 3
  14532. >482 ubyte 0xee
  14533. >>486 ulelong 1
  14534. >>>494 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
  14535. >>>>446 string !\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \b (with hybrid MBR)
  14536. >>>494 string !\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \b (with hybrid MBR)
  14537. >>486 ulelong !1 \b (nonstandard: not at LBA 1)
  14538. # GPT with protective MBR entry in partition 4
  14539. >498 ubyte 0xee
  14540. >>502 ulelong 1
  14541. >>>446 string !\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \b (with hybrid MBR)
  14542. >>502 ulelong !1 \b (nonstandard: not at LBA 1)
  14543. # Print the information from a GPT partition table structure
  14544. 0 name gpt-table
  14545. >10 uleshort x \b, version %u
  14546. >8 uleshort x \b.%u
  14547. >56 ulelong x \b, GUID: %08x
  14548. >60 uleshort x \b-%04x
  14549. >62 uleshort x \b-%04x
  14550. >64 ubeshort x \b-%04x
  14551. >66 ubeshort x \b-%04x
  14552. >68 ubelong x \b%08x
  14553. #>80 uleshort x \b, %d partition entries
  14554. >32 ulequad+1 x \b, disk size: %lld sectors
  14555. # In case a GPT data-structure is at LBA 0, report it as well
  14556. # This covers systems which are not GPT-aware, and which show
  14557. # and allow access to the protective partition. This code will
  14558. # detect the contents of such a partition.
  14559. 0 string EFI\ PART GPT data structure (nonstandard: at LBA 0)
  14560. >0 use gpt-table
  14561. >0 ubyte x (sector size unknown)
  14562. #------------------------------------------------------------------------------
  14563. # $File: gpu,v 1.2 2017/03/23 22:11:53 christos Exp $
  14564. # gpu: file(1) magic for GPU input files
  14565. # Standard Portable Intermediate Representation (SPIR)
  14566. # Documentation: https://www.khronos.org/spir
  14567. # Typical file extension: .spv
  14568. 0 belong 0x07230203 Khronos SPIR-V binary, big-endian
  14569. >4 belong x \b, version 0x%08x
  14570. >8 belong x \b, generator 0x%08x
  14571. 0 lelong 0x07230203 Khronos SPIR-V binary, little-endian
  14572. >4 lelong x \b, version 0x%08x
  14573. >8 lelong x \b, generator 0x%08x
  14574. # Vulkan Trace file
  14575. # Documentation:
  14576. # https://github.com/LunarG/VulkanTools/blob/master/vktrace/vktrace_common/\
  14577. # vktrace_trace_packet_identifiers.h
  14578. # Typical file extension: .vktrace
  14579. 8 lequad 0xABADD068ADEAFD0C Vulkan trace file, little-endian
  14580. >0 leshort x \b, version %d
  14581. 8 bequad 0xABADD068ADEAFD0C Vulkan trace file, big-endian
  14582. >0 beshort x \b, version %d
  14583. #------------------------------------------------------------------------------
  14584. # $File: grace,v 1.4 2009/09/19 16:28:09 christos Exp $
  14585. # ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
  14586. #
  14587. # ACE/gr binary
  14588. 0 string \000\000\0001\000\000\0000\000\000\0000\000\000\0002\000\000\0000\000\000\0000\000\000\0003 old ACE/gr binary file
  14589. >39 byte >0 - version %c
  14590. # ACE/gr ascii
  14591. 0 string #\ xvgr\ parameter\ file ACE/gr ascii file
  14592. 0 string #\ xmgr\ parameter\ file ACE/gr ascii file
  14593. 0 string #\ ACE/gr\ parameter\ file ACE/gr ascii file
  14594. # Grace projects
  14595. 0 string #\ Grace\ project\ file Grace project file
  14596. >23 string @version\ (version
  14597. >>32 byte >0 %c
  14598. >>33 string >\0 \b.%.2s
  14599. >>35 string >\0 \b.%.2s)
  14600. # ACE/gr fit description files
  14601. 0 string #\ ACE/gr\ fit\ description\ ACE/gr fit description file
  14602. # end of ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
  14603. #------------------------------------------------------------------------------
  14604. # $File: graphviz,v 1.9 2019/04/30 04:01:40 christos Exp $
  14605. # graphviz: file(1) magic for https://www.graphviz.org/
  14606. # FIXME: These patterns match too generally. For example, the first
  14607. # line matches a LaTeX file containing the word "graph" (with a {
  14608. # following later) and the second line matches this file.
  14609. #0 regex/100l [\r\n\t\ ]*graph[\r\n\t\ ]+.*\\{ graphviz graph text
  14610. #!:mime text/vnd.graphviz
  14611. #0 regex/100l [\r\n\t\ ]*digraph[\r\n\t\ ]+.*\\{ graphviz digraph text
  14612. #!:mime text/vnd.graphviz
  14613. #------------------------------------------------------------------------------
  14614. # $File: gringotts,v 1.6 2017/03/17 21:35:28 christos Exp $
  14615. # gringotts: file(1) magic for Gringotts
  14616. # http://devel.pluto.linux.it/projects/Gringotts/
  14617. # author: Germano Rizzo <mano@pluto.linux.it>
  14618. #GRG3????Y
  14619. 0 string GRG Gringotts data file
  14620. #file format 1
  14621. >3 string 1 v.1, MCRYPT S2K, SERPENT crypt, SHA-256 hash, ZLib lvl.9
  14622. #file format 2
  14623. >3 string 2 v.2, MCRYPT S2K,
  14624. >>8 byte&0x70 0x00 RIJNDAEL-128 crypt,
  14625. >>8 byte&0x70 0x10 SERPENT crypt,
  14626. >>8 byte&0x70 0x20 TWOFISH crypt,
  14627. >>8 byte&0x70 0x30 CAST-256 crypt,
  14628. >>8 byte&0x70 0x40 SAFER+ crypt,
  14629. >>8 byte&0x70 0x50 LOKI97 crypt,
  14630. >>8 byte&0x70 0x60 3DES crypt,
  14631. >>8 byte&0x70 0x70 RIJNDAEL-256 crypt,
  14632. >>8 byte&0x08 0x00 SHA1 hash,
  14633. >>8 byte&0x08 0x08 RIPEMD-160 hash,
  14634. >>8 byte&0x04 0x00 ZLib
  14635. >>8 byte&0x04 0x04 BZip2
  14636. >>8 byte&0x03 0x00 lvl.0
  14637. >>8 byte&0x03 0x01 lvl.3
  14638. >>8 byte&0x03 0x02 lvl.6
  14639. >>8 byte&0x03 0x03 lvl.9
  14640. #file format 3
  14641. >3 string 3 v.3, OpenPGP S2K,
  14642. >>8 byte&0x70 0x00 RIJNDAEL-128 crypt,
  14643. >>8 byte&0x70 0x10 SERPENT crypt,
  14644. >>8 byte&0x70 0x20 TWOFISH crypt,
  14645. >>8 byte&0x70 0x30 CAST-256 crypt,
  14646. >>8 byte&0x70 0x40 SAFER+ crypt,
  14647. >>8 byte&0x70 0x50 LOKI97 crypt,
  14648. >>8 byte&0x70 0x60 3DES crypt,
  14649. >>8 byte&0x70 0x70 RIJNDAEL-256 crypt,
  14650. >>8 byte&0x08 0x00 SHA1 hash,
  14651. >>8 byte&0x08 0x08 RIPEMD-160 hash,
  14652. >>8 byte&0x04 0x00 ZLib
  14653. >>8 byte&0x04 0x04 BZip2
  14654. >>8 byte&0x03 0x00 lvl.0
  14655. >>8 byte&0x03 0x01 lvl.3
  14656. >>8 byte&0x03 0x02 lvl.6
  14657. >>8 byte&0x03 0x03 lvl.9
  14658. #file format >3
  14659. >3 string >3 v.%.1s (unknown details)
  14660. #------------------------------------------------------------------------------
  14661. # $File: guile,v 1.2 2019/04/19 00:42:27 christos Exp $
  14662. # Guile file magic from <dalepsmith@gmail.com>
  14663. # https://www.gnu.org/s/guile/
  14664. # https://git.savannah.gnu.org/gitweb/?p=guile.git;f=libguile/_scm.h;hb=HEAD#l250
  14665. 0 string GOOF---- Guile Object
  14666. >8 string LE \b, little endian
  14667. >8 string BE \b, big endian
  14668. >11 string 4 \b, 32bit
  14669. >11 string 8 \b, 64bit
  14670. >13 regex .\.. \b, bytecode v%s
  14671. #------------------------------------------------------------------------------
  14672. # $File: hardware,v 1.1 2018/08/02 06:32:52 christos Exp $
  14673. # hardware magic
  14674. # EDID
  14675. # https://en.wikipedia.org/wiki/Extended_Display_Identification_Data
  14676. 0 string \x00\xFF\xFF\xFF\xFF\xFF\xFF\x00
  14677. >19 byte x
  14678. >>18 byte x EDID data, version %u.
  14679. >>19 byte x \b%u
  14680. #>>17 ubyte+1990 <255 \b, manufactured %u
  14681. #------------------------------------------------------------------------------
  14682. # $File: hitachi-sh,v 1.10 2020/12/12 20:01:47 christos Exp $
  14683. # hitach-sh: file(1) magic for Hitachi Super-H
  14684. #
  14685. # Super-H COFF
  14686. #
  14687. # updated by Joerg Jenderek at Oct 2015
  14688. # https://en.wikipedia.org/wiki/COFF
  14689. # https://de.wikipedia.org/wiki/Common_Object_File_Format
  14690. # http://www.delorie.com/djgpp/doc/coff/filhdr.html
  14691. # below test line conflicts with 2nd NTFS filesystem sector
  14692. # 2nd NTFS filesystem sector often starts with 0x05004e00 for unicode string 5 NTLDR
  14693. # and Portable Gaming Notation Compressed format (*.WID http://pgn.freeservers.com/)
  14694. 0 beshort 0x0500
  14695. # test for unused flag bits (0x8000,0x0800,0x0400,0x0200,x0080) in f_flags
  14696. >18 ubeshort&0x8E80 0
  14697. # use big endian variant of subroutine to display name+variables+flags
  14698. # for common object formatted files
  14699. >>0 use \^display-coff
  14700. !:strength -10
  14701. 0 leshort 0x0550
  14702. # test for unused flag bits in f_flags
  14703. >18 uleshort&0x8E80 0
  14704. # use little endian variant of subroutine to
  14705. # display name+variables+flags for common object formatted files
  14706. >>0 use display-coff
  14707. !:strength -10
  14708. #------------------------------------------------------------------------------
  14709. # $File: hp,v 1.25 2019/01/13 00:32:38 christos Exp $
  14710. # hp: file(1) magic for Hewlett Packard machines (see also "printer")
  14711. #
  14712. # XXX - somebody should figure out whether any byte order needs to be
  14713. # applied to the "TML" stuff; I'm assuming the Apollo stuff is
  14714. # big-endian as it was mostly 68K-based.
  14715. #
  14716. # I think the 500 series was the old stack-based machines, running a
  14717. # UNIX environment atop the "SUN kernel"; dunno whether it was
  14718. # big-endian or little-endian.
  14719. #
  14720. # Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based;
  14721. # hp300 are 68020+68881 based; hp400 are also 68k. The following basic
  14722. # HP magic is useful for reference, but using "long" magic is a better
  14723. # practice in order to avoid collisions.
  14724. #
  14725. # Guy Harris (guy@netapp.com): some additions to this list came from
  14726. # HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
  14727. # 1.2, and 2.0). The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
  14728. # "/etc/magic", though, except for the "archive file relocatable library"
  14729. # stuff, and the 68030 and 68040 stuff isn't there at all - are they not
  14730. # used in executables, or have they just not yet updated "/etc/magic"
  14731. # completely?
  14732. #
  14733. # 0 beshort 200 hp200 (68010) BSD binary
  14734. # 0 beshort 300 hp300 (68020+68881) BSD binary
  14735. # 0 beshort 0x20c hp200/300 HP-UX binary
  14736. # 0 beshort 0x20d hp400 (68030) HP-UX binary
  14737. # 0 beshort 0x20e hp400 (68040?) HP-UX binary
  14738. # 0 beshort 0x20b PA-RISC1.0 HP-UX binary
  14739. # 0 beshort 0x210 PA-RISC1.1 HP-UX binary
  14740. # 0 beshort 0x211 PA-RISC1.2 HP-UX binary
  14741. # 0 beshort 0x214 PA-RISC2.0 HP-UX binary
  14742. #
  14743. # The "misc" stuff needs a byte order; the archives look suspiciously
  14744. # like the old 177545 archives (0xff65 = 0177545).
  14745. #
  14746. #### Old Apollo stuff
  14747. 0 beshort 0627 Apollo m68k COFF executable
  14748. >18 beshort ^040000 not stripped
  14749. >22 beshort >0 - version %d
  14750. 0 beshort 0624 apollo a88k COFF executable
  14751. >18 beshort ^040000 not stripped
  14752. >22 beshort >0 - version %d
  14753. 0 long 01203604016 TML 0123 byte-order format
  14754. 0 long 01702407010 TML 1032 byte-order format
  14755. 0 long 01003405017 TML 2301 byte-order format
  14756. 0 long 01602007412 TML 3210 byte-order format
  14757. #### PA-RISC 1.1
  14758. 0 belong 0x02100106 PA-RISC1.1 relocatable object
  14759. 0 belong 0x02100107 PA-RISC1.1 executable
  14760. >168 belong &0x00000004 dynamically linked
  14761. >(144) belong 0x054ef630 dynamically linked
  14762. >96 belong >0 - not stripped
  14763. 0 belong 0x02100108 PA-RISC1.1 shared executable
  14764. >168 belong&0x4 0x4 dynamically linked
  14765. >(144) belong 0x054ef630 dynamically linked
  14766. >96 belong >0 - not stripped
  14767. 0 belong 0x0210010b PA-RISC1.1 demand-load executable
  14768. >168 belong&0x4 0x4 dynamically linked
  14769. >(144) belong 0x054ef630 dynamically linked
  14770. >96 belong >0 - not stripped
  14771. 0 belong 0x0210010e PA-RISC1.1 shared library
  14772. >96 belong >0 - not stripped
  14773. 0 belong 0x0210010d PA-RISC1.1 dynamic load library
  14774. >96 belong >0 - not stripped
  14775. #### PA-RISC 2.0
  14776. 0 belong 0x02140106 PA-RISC2.0 relocatable object
  14777. 0 belong 0x02140107 PA-RISC2.0 executable
  14778. >168 belong &0x00000004 dynamically linked
  14779. >(144) belong 0x054ef630 dynamically linked
  14780. >96 belong >0 - not stripped
  14781. 0 belong 0x02140108 PA-RISC2.0 shared executable
  14782. >168 belong &0x00000004 dynamically linked
  14783. >(144) belong 0x054ef630 dynamically linked
  14784. >96 belong >0 - not stripped
  14785. 0 belong 0x0214010b PA-RISC2.0 demand-load executable
  14786. >168 belong &0x00000004 dynamically linked
  14787. >(144) belong 0x054ef630 dynamically linked
  14788. >96 belong >0 - not stripped
  14789. 0 belong 0x0214010e PA-RISC2.0 shared library
  14790. >96 belong >0 - not stripped
  14791. 0 belong 0x0214010d PA-RISC2.0 dynamic load library
  14792. >96 belong >0 - not stripped
  14793. #### 800
  14794. 0 belong 0x020b0106 PA-RISC1.0 relocatable object
  14795. 0 belong 0x020b0107 PA-RISC1.0 executable
  14796. >168 belong&0x4 0x4 dynamically linked
  14797. >(144) belong 0x054ef630 dynamically linked
  14798. >96 belong >0 - not stripped
  14799. 0 belong 0x020b0108 PA-RISC1.0 shared executable
  14800. >168 belong&0x4 0x4 dynamically linked
  14801. >(144) belong 0x054ef630 dynamically linked
  14802. >96 belong >0 - not stripped
  14803. 0 belong 0x020b010b PA-RISC1.0 demand-load executable
  14804. >168 belong&0x4 0x4 dynamically linked
  14805. >(144) belong 0x054ef630 dynamically linked
  14806. >96 belong >0 - not stripped
  14807. 0 belong 0x020b010e PA-RISC1.0 shared library
  14808. >96 belong >0 - not stripped
  14809. 0 belong 0x020b010d PA-RISC1.0 dynamic load library
  14810. >96 belong >0 - not stripped
  14811. #### 500
  14812. 0 long 0x02080106 HP s500 relocatable executable
  14813. >16 long >0 - version %d
  14814. 0 long 0x02080107 HP s500 executable
  14815. >16 long >0 - version %d
  14816. 0 long 0x02080108 HP s500 pure executable
  14817. >16 long >0 - version %d
  14818. #### 200
  14819. 0 belong 0x020c0108 HP s200 pure executable
  14820. >4 beshort >0 - version %d
  14821. >8 belong &0x80000000 save fp regs
  14822. >8 belong &0x40000000 dynamically linked
  14823. >8 belong &0x20000000 debuggable
  14824. >36 belong >0 not stripped
  14825. 0 belong 0x020c0107 HP s200 executable
  14826. >4 beshort >0 - version %d
  14827. >8 belong &0x80000000 save fp regs
  14828. >8 belong &0x40000000 dynamically linked
  14829. >8 belong &0x20000000 debuggable
  14830. >36 belong >0 not stripped
  14831. 0 belong 0x020c010b HP s200 demand-load executable
  14832. >4 beshort >0 - version %d
  14833. >8 belong &0x80000000 save fp regs
  14834. >8 belong &0x40000000 dynamically linked
  14835. >8 belong &0x20000000 debuggable
  14836. >36 belong >0 not stripped
  14837. 0 belong 0x020c0106 HP s200 relocatable executable
  14838. >4 beshort >0 - version %d
  14839. >6 beshort >0 - highwater %d
  14840. >8 belong &0x80000000 save fp regs
  14841. >8 belong &0x20000000 debuggable
  14842. >8 belong &0x10000000 PIC
  14843. 0 belong 0x020a0108 HP s200 (2.x release) pure executable
  14844. >4 beshort >0 - version %d
  14845. >36 belong >0 not stripped
  14846. 0 belong 0x020a0107 HP s200 (2.x release) executable
  14847. >4 beshort >0 - version %d
  14848. >36 belong >0 not stripped
  14849. 0 belong 0x020c010e HP s200 shared library
  14850. >4 beshort >0 - version %d
  14851. >6 beshort >0 - highwater %d
  14852. >36 belong >0 not stripped
  14853. 0 belong 0x020c010d HP s200 dynamic load library
  14854. >4 beshort >0 - version %d
  14855. >6 beshort >0 - highwater %d
  14856. >36 belong >0 not stripped
  14857. #### MISC
  14858. 0 long 0x0000ff65 HP old archive
  14859. 0 long 0x020aff65 HP s200 old archive
  14860. 0 long 0x020cff65 HP s200 old archive
  14861. 0 long 0x0208ff65 HP s500 old archive
  14862. 0 long 0x015821a6 HP core file
  14863. 0 long 0x4da7eee8 HP-WINDOWS font
  14864. >8 byte >0 - version %d
  14865. 0 string Bitmapfile HP Bitmapfile
  14866. 0 string IMGfile CIS compimg HP Bitmapfile
  14867. # XXX - see "lif"
  14868. #0 short 0x8000 lif file
  14869. 0 long 0x020c010c compiled Lisp
  14870. 0 string msgcat01 HP NLS message catalog,
  14871. >8 long >0 %d messages
  14872. # Summary: HP-48/49 calculator
  14873. # Created by: phk@data.fls.dk
  14874. # Modified by (1): AMAKAWA Shuhei <sa264@cam.ac.uk>
  14875. # Modified by (2): Samuel Thibault <samuel.thibault@ens-lyon.org> (HP49 support)
  14876. 0 string HPHP HP
  14877. >4 string 48 48 binary
  14878. >4 string 49 49 binary
  14879. >7 byte >64 - Rev %c
  14880. >8 leshort 0x2911 (ADR)
  14881. >8 leshort 0x2933 (REAL)
  14882. >8 leshort 0x2955 (LREAL)
  14883. >8 leshort 0x2977 (COMPLX)
  14884. >8 leshort 0x299d (LCOMPLX)
  14885. >8 leshort 0x29bf (CHAR)
  14886. >8 leshort 0x29e8 (ARRAY)
  14887. >8 leshort 0x2a0a (LNKARRAY)
  14888. >8 leshort 0x2a2c (STRING)
  14889. >8 leshort 0x2a4e (HXS)
  14890. >8 leshort 0x2a74 (LIST)
  14891. >8 leshort 0x2a96 (DIR)
  14892. >8 leshort 0x2ab8 (ALG)
  14893. >8 leshort 0x2ada (UNIT)
  14894. >8 leshort 0x2afc (TAGGED)
  14895. >8 leshort 0x2b1e (GROB)
  14896. >8 leshort 0x2b40 (LIB)
  14897. >8 leshort 0x2b62 (BACKUP)
  14898. >8 leshort 0x2b88 (LIBDATA)
  14899. >8 leshort 0x2d9d (PROG)
  14900. >8 leshort 0x2dcc (CODE)
  14901. >8 leshort 0x2e48 (GNAME)
  14902. >8 leshort 0x2e6d (LNAME)
  14903. >8 leshort 0x2e92 (XLIB)
  14904. 0 string %%HP: HP text
  14905. >6 string T(0) - T(0)
  14906. >6 string T(1) - T(1)
  14907. >6 string T(2) - T(2)
  14908. >6 string T(3) - T(3)
  14909. >10 string A(D) A(D)
  14910. >10 string A(R) A(R)
  14911. >10 string A(G) A(G)
  14912. >14 string F(.) F(.);
  14913. >14 string F(,) F(,);
  14914. # Summary: HP-38/39 calculator
  14915. # Created by: Samuel Thibault <samuel.thibault@ens-lyon.org>
  14916. 0 string HP3
  14917. >3 string 8 HP 38
  14918. >3 string 9 HP 39
  14919. >4 string Bin binary
  14920. >4 string Asc ASCII
  14921. >7 string A (Directory List)
  14922. >7 string B (Zaplet)
  14923. >7 string C (Note)
  14924. >7 string D (Program)
  14925. >7 string E (Variable)
  14926. >7 string F (List)
  14927. >7 string G (Matrix)
  14928. >7 string H (Library)
  14929. >7 string I (Target List)
  14930. >7 string J (ASCII Vector specification)
  14931. >7 string K (wildcard)
  14932. # Summary: HP-38/39 calculator
  14933. # Created by: Samuel Thibault <samuel.thibault@ens-lyon.org>
  14934. 0 string HP3
  14935. >3 string 8 HP 38
  14936. >3 string 9 HP 39
  14937. >4 string Bin binary
  14938. >4 string Asc ASCII
  14939. >7 string A (Directory List)
  14940. >7 string B (Zaplet)
  14941. >7 string C (Note)
  14942. >7 string D (Program)
  14943. >7 string E (Variable)
  14944. >7 string F (List)
  14945. >7 string G (Matrix)
  14946. >7 string H (Library)
  14947. >7 string I (Target List)
  14948. >7 string J (ASCII Vector specification)
  14949. >7 string K (wildcard)
  14950. # hpBSD magic numbers
  14951. 0 beshort 200 hp200 (68010) BSD
  14952. >2 beshort 0407 impure binary
  14953. >2 beshort 0410 read-only binary
  14954. >2 beshort 0413 demand paged binary
  14955. 0 beshort 300 hp300 (68020+68881) BSD
  14956. >2 beshort 0407 impure binary
  14957. >2 beshort 0410 read-only binary
  14958. >2 beshort 0413 demand paged binary
  14959. #
  14960. # From David Gero <dgero@nortelnetworks.com>
  14961. # HP-UX 10.20 core file format from /usr/include/sys/core.h
  14962. # Unfortunately, HP-UX uses corehead blocks without specifying the order
  14963. # There are four we care about:
  14964. # CORE_KERNEL, which starts with the string "HP-UX"
  14965. # CORE_EXEC, which contains the name of the command
  14966. # CORE_PROC, which contains the signal number that caused the core dump
  14967. # CORE_FORMAT, which contains the version of the core file format (== 1)
  14968. # The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
  14969. # but we include all 6 variations of the order of the first 3, and
  14970. # assume that PROC will always be last
  14971. # Order 1: KERNEL, EXEC, FORMAT, PROC
  14972. 0x10 string HP-UX
  14973. >0 belong 2
  14974. >>0xC belong 0x3C
  14975. >>>0x4C belong 0x100
  14976. >>>>0x58 belong 0x44
  14977. >>>>>0xA0 belong 1
  14978. >>>>>>0xAC belong 4
  14979. >>>>>>>0xB0 belong 1
  14980. >>>>>>>>0xB4 belong 4 core file
  14981. >>>>>>>>>0x90 string >\0 from '%s'
  14982. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  14983. >>>>>>>>>0xC4 belong 4 - received SIGILL
  14984. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  14985. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  14986. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  14987. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  14988. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  14989. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  14990. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  14991. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  14992. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  14993. # Order 2: KERNEL, FORMAT, EXEC, PROC
  14994. >>>0x4C belong 1
  14995. >>>>0x58 belong 4
  14996. >>>>>0x5C belong 1
  14997. >>>>>>0x60 belong 0x100
  14998. >>>>>>>0x6C belong 0x44
  14999. >>>>>>>>0xB4 belong 4 core file
  15000. >>>>>>>>>0xA4 string >\0 from '%s'
  15001. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  15002. >>>>>>>>>0xC4 belong 4 - received SIGILL
  15003. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  15004. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  15005. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  15006. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  15007. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  15008. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  15009. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  15010. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  15011. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  15012. # Order 3: FORMAT, KERNEL, EXEC, PROC
  15013. 0x24 string HP-UX
  15014. >0 belong 1
  15015. >>0xC belong 4
  15016. >>>0x10 belong 1
  15017. >>>>0x14 belong 2
  15018. >>>>>0x20 belong 0x3C
  15019. >>>>>>0x60 belong 0x100
  15020. >>>>>>>0x6C belong 0x44
  15021. >>>>>>>>0xB4 belong 4 core file
  15022. >>>>>>>>>0xA4 string >\0 from '%s'
  15023. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  15024. >>>>>>>>>0xC4 belong 4 - received SIGILL
  15025. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  15026. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  15027. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  15028. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  15029. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  15030. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  15031. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  15032. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  15033. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  15034. # Order 4: EXEC, KERNEL, FORMAT, PROC
  15035. 0x64 string HP-UX
  15036. >0 belong 0x100
  15037. >>0xC belong 0x44
  15038. >>>0x54 belong 2
  15039. >>>>0x60 belong 0x3C
  15040. >>>>>0xA0 belong 1
  15041. >>>>>>0xAC belong 4
  15042. >>>>>>>0xB0 belong 1
  15043. >>>>>>>>0xB4 belong 4 core file
  15044. >>>>>>>>>0x44 string >\0 from '%s'
  15045. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  15046. >>>>>>>>>0xC4 belong 4 - received SIGILL
  15047. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  15048. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  15049. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  15050. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  15051. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  15052. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  15053. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  15054. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  15055. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  15056. # Order 5: FORMAT, EXEC, KERNEL, PROC
  15057. 0x78 string HP-UX
  15058. >0 belong 1
  15059. >>0xC belong 4
  15060. >>>0x10 belong 1
  15061. >>>>0x14 belong 0x100
  15062. >>>>>0x20 belong 0x44
  15063. >>>>>>0x68 belong 2
  15064. >>>>>>>0x74 belong 0x3C
  15065. >>>>>>>>0xB4 belong 4 core file
  15066. >>>>>>>>>0x58 string >\0 from '%s'
  15067. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  15068. >>>>>>>>>0xC4 belong 4 - received SIGILL
  15069. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  15070. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  15071. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  15072. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  15073. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  15074. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  15075. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  15076. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  15077. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  15078. # Order 6: EXEC, FORMAT, KERNEL, PROC
  15079. >0 belong 0x100
  15080. >>0xC belong 0x44
  15081. >>>0x54 belong 1
  15082. >>>>0x60 belong 4
  15083. >>>>>0x64 belong 1
  15084. >>>>>>0x68 belong 2
  15085. >>>>>>>0x74 belong 0x2C
  15086. >>>>>>>>0xB4 belong 4 core file
  15087. >>>>>>>>>0x44 string >\0 from '%s'
  15088. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  15089. >>>>>>>>>0xC4 belong 4 - received SIGILL
  15090. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  15091. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  15092. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  15093. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  15094. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  15095. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  15096. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  15097. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  15098. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  15099. #------------------------------------------------------------------------------
  15100. # $File: human68k,v 1.5 2009/09/19 16:28:09 christos Exp $
  15101. # human68k: file(1) magic for Human68k (X680x0 DOS) binary formats
  15102. # Magic too short!
  15103. #0 string HU Human68k
  15104. #>68 string LZX LZX compressed
  15105. #>>72 string >\0 (version %s)
  15106. #>(8.L+74) string LZX LZX compressed
  15107. #>>(8.L+78) string >\0 (version %s)
  15108. #>60 belong >0 binded
  15109. #>(8.L+66) string #HUPAIR hupair
  15110. #>0 string HU X executable
  15111. #>(8.L+74) string #LIBCV1 - linked PD LIBC ver 1
  15112. #>4 belong >0 - base address 0x%x
  15113. #>28 belong >0 not stripped
  15114. #>32 belong >0 with debug information
  15115. #0 beshort 0x601a Human68k Z executable
  15116. #0 beshort 0x6000 Human68k object file
  15117. #0 belong 0xd1000000 Human68k ar binary archive
  15118. #0 belong 0xd1010000 Human68k ar ascii archive
  15119. #0 beshort 0x0068 Human68k lib archive
  15120. #4 string LZX Human68k LZX compressed
  15121. #>8 string >\0 (version %s)
  15122. #>4 string LZX R executable
  15123. #2 string #HUPAIR Human68k hupair R executable
  15124. #------------------------------------------------------------------------------
  15125. # $File: ibm370,v 1.11 2021/03/14 16:51:45 christos Exp $
  15126. # ibm370: file(1) magic for IBM 370 and compatibles.
  15127. #
  15128. # "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
  15129. # What the heck *is* "USS/370"?
  15130. # AIX 4.1's "/etc/magic" has
  15131. #
  15132. # 0 short 0535 370 sysV executable
  15133. # >12 long >0 not stripped
  15134. # >22 short >0 - version %d
  15135. # >30 long >0 - 5.2 format
  15136. # 0 short 0530 370 sysV pure executable
  15137. # >12 long >0 not stripped
  15138. # >22 short >0 - version %d
  15139. # >30 long >0 - 5.2 format
  15140. #
  15141. # instead of the "USS/370" versions of the same magic numbers.
  15142. #
  15143. 0 beshort 0537 370 XA sysV executable
  15144. >12 belong >0 not stripped
  15145. >22 beshort >0 - version %d
  15146. >30 belong >0 - 5.2 format
  15147. 0 beshort 0532 370 XA sysV pure executable
  15148. >12 belong >0 not stripped
  15149. >22 beshort >0 - version %d
  15150. >30 belong >0 - 5.2 format
  15151. 0 beshort 054001 370 sysV pure executable
  15152. >12 belong >0 not stripped
  15153. 0 beshort 055001 370 XA sysV pure executable
  15154. >12 belong >0 not stripped
  15155. 0 beshort 056401 370 sysV executable
  15156. >12 belong >0 not stripped
  15157. 0 beshort 057401 370 XA sysV executable
  15158. >12 belong >0 not stripped
  15159. 0 beshort 0531 SVR2 executable (Amdahl-UTS)
  15160. >12 belong >0 not stripped
  15161. >24 belong >0 - version %d
  15162. 0 beshort 0534 SVR2 pure executable (Amdahl-UTS)
  15163. >12 belong >0 not stripped
  15164. >24 belong >0 - version %d
  15165. 0 beshort 0530 SVR2 pure executable (USS/370)
  15166. >12 belong >0 not stripped
  15167. >24 belong >0 - version %d
  15168. 0 beshort 0535 SVR2 executable (USS/370)
  15169. >12 belong >0 not stripped
  15170. >24 belong >0 - version %d
  15171. # NETDATA (https://en.wikipedia.org/wiki/NETDATA)
  15172. # -\INMR01 In EBCDIC
  15173. 0 string \x60\xe0\xc9\xd5\xd4\xd9\xf0\xf1 IBM NETDATA file
  15174. #------------------------------------------------------------------------------
  15175. # $File: ibm6000,v 1.14 2019/03/07 17:21:54 christos Exp $
  15176. # ibm6000: file(1) magic for RS/6000 and the RT PC.
  15177. #
  15178. 0 beshort 0x01df executable (RISC System/6000 V3.1) or obj module
  15179. >12 belong >0 not stripped
  15180. # Breaks sun4 statically linked execs.
  15181. #0 beshort 0x0103 executable (RT Version 2) or obj module
  15182. #>2 byte 0x50 pure
  15183. #>28 belong >0 not stripped
  15184. #>6 beshort >0 - version %ld
  15185. 0 beshort 0x0104 shared library
  15186. 0 beshort 0x0105 ctab data
  15187. 0 beshort 0xfe04 structured file
  15188. 0 string 0xabcdef AIX message catalog
  15189. 0 belong 0x000001f9 AIX compiled message catalog
  15190. 0 string \<aiaff> archive
  15191. 0 string \<bigaf> archive (big format)
  15192. 0 belong 0x09006bea AIX backup/restore format file
  15193. 0 belong 0x09006fea AIX backup/restore format file
  15194. 0 beshort 0x01f7 64-bit XCOFF executable or object module
  15195. >20 belong 0 not stripped
  15196. # GRR: this test is still too general as it catches also many FATs of DOS filesystems
  15197. 4 belong &0x0feeddb0
  15198. # real core dump could not be 32-bit and 64-bit together
  15199. >7 byte&0x03 !3 AIX core file
  15200. >>1 byte &0x01 fulldump
  15201. >>7 byte &0x01 32-bit
  15202. >>>0x6e0 string >\0 \b, %s
  15203. >>7 byte &0x02 64-bit
  15204. >>>0x524 string >\0 \b, %s
  15205. #------------------------------------------------------------------------------
  15206. # $File: icc,v 1.6 2019/11/15 21:03:14 christos Exp $
  15207. # icc: file(1) magic for International Color Consortium file formats
  15208. #
  15209. # Color profiles as per the ICC's "Image technology colour management -
  15210. # Architecture, profile format, and data structure" specification.
  15211. # See
  15212. #
  15213. # http://www.color.org/specification/ICC1v43_2010-12.pdf
  15214. #
  15215. # for Specification ICC.1:2010 (Profile version 4.3.0.0).
  15216. # URL: http://fileformats.archiveteam.org/wiki/ICC_profile
  15217. # Reference: http://www.color.org/iccmax/ICC.2-2016-7.pdf
  15218. # Update: Joerg Jenderek
  15219. #
  15220. # Bytes 36 to 39 contain a generic profile file signature of "acsp";
  15221. # bytes 40 to 43 "may be used to identify the primary platform/operating
  15222. # system framework for which the profile was created".
  15223. #
  15224. # check and display ICC/ICM color profile
  15225. 0 name color-profile
  15226. >36 string acsp
  15227. # skip ASCII like Cognacspirit.txt by month <= 12
  15228. >>26 ubeshort <13
  15229. # platform/operating system. Only 5 mentioned
  15230. #
  15231. # This appears to be what's used for Apple ColorSync profiles.
  15232. # Instead of adding that, Apple just changed the generic "acsp" entry
  15233. # to be for "ColorSync ICC Color Profile" rather than "Kodak Color
  15234. # Management System, ICC Profile".
  15235. # Yes, it's "APPL", not "AAPL"; see the spec.
  15236. >>>40 string APPL ColorSync
  15237. # Microsoft ICM color profile
  15238. >>>40 string MSFT Microsoft
  15239. # Yes, that's a blank after "SGI".
  15240. >>>40 string SGI\ SGI
  15241. # XXX - is this what's used for the Sun KCMS or not? The standard file
  15242. # uses just "acsp" for that, but Apple's file uses it for "ColorSync",
  15243. # and there *is* an identified "primary platform" value of SUNW.
  15244. >>>40 string SUNW Sun KCMS
  15245. # 5th platform
  15246. >>>40 string TGNT Taligent
  15247. # remaining "l" "e" of "color profile" printed later to avoid error
  15248. >>>40 string x color profi
  15249. #>>>40 string x (%.4s)
  15250. !:mime application/vnd.iccprofile
  15251. # for "ICM" extension only versions 2.x and for Kodak "CC" 2.0 is found
  15252. >>>8 ubyte =2
  15253. # do not use empty message text to avoid error like
  15254. # icc, 82: Warning: Current entry does not yet have a description for adding a EXTENSION type
  15255. # file.exe: could not find any valid magic files!
  15256. >>>>9 ubyte !0 \ble
  15257. !:ext icc/icm
  15258. # minor version
  15259. >>>>9 ubyte =0 \bl
  15260. # Kodak colour management system
  15261. >>>>>4 string =KCMS \be
  15262. !:ext icc/icm/cc
  15263. >>>>>4 string !KCMS \be
  15264. !:ext icc/icm
  15265. >>>8 ubyte !2 \ble
  15266. !:ext icc
  15267. # Profile version major.4bit-minor.sub1.sub2 like 4.3.0.0 (04300000h)
  15268. >>>8 ubyte x %u
  15269. >>>9 ubyte/16 x \b.%u
  15270. # reserved and shall be null but 205.205 in umx1220u.icm
  15271. >>>10 ubyte >0 \b.%u
  15272. >>>>11 ubyte >0 \b.%u
  15273. # preferred colour management module like appl CCMS KCMS Lino UCCM "Win " "FF "
  15274. # skip space like in brmsl08f.icm and null like in brmsl09f.icm, brmsl07f.icm
  15275. >>>4 string >\ \b, type %.2s
  15276. >>>>6 string >\ \b%.1s
  15277. >>>>>7 string >\ \b%.1s
  15278. # colour space "XYZ " "Lab " "RGB " CMYK GRAY ...
  15279. >>>16 string x \b, %.3s
  15280. >>>19 string >\ \b%.1s
  15281. # Profile Connection Space (PCS) field usually "XYZ " or "Lab " but sometimes
  15282. # null or CMYK like in ISOcoated_v2_to_PSOcoated_v3_DeviceLink.icc
  15283. >>>20 string >\0 \b/%.3s
  15284. >>>>23 string >\ \b%.1s
  15285. # eleven device classes
  15286. >>>12 string x \b-%.4s device
  15287. # skip 00001964h in hpf69000.icc or 0h in XRDC50Q.ICM or " ROT" in brmsl05f.icm
  15288. >>>52 string >\040
  15289. # skip "none" model like in "Trinitron Compatible 9300K G2.2.icm"
  15290. >>>>52 ubelong !0x6e6f6e65
  15291. # device manufacturer field like "HP " "IBM " EPSO
  15292. >>>>>48 string x \b, %.2s
  15293. >>>>>50 string >\ \b%.1s
  15294. >>>>>51 string >\ \b%.1s
  15295. # model like "ADI " "A265" and skip 20000404h in IS330.icm for RICOH RUSSIAN-SC
  15296. >>>>>52 string >\ \ \b/%.3s
  15297. >>>>>>55 string >\ \b%.1s
  15298. >>>>>52 string x model
  15299. # creator (often same as manufacture) like HP SONY XROX or null like in A925A.icm
  15300. >>>80 string >\0 by %.2s
  15301. >>>>82 string >\ \b%.1s
  15302. >>>>>83 string >\ \b%.1s
  15303. # profile size
  15304. >>>0 ubelong x \b, %u bytes
  15305. # skip invalid date 0 like in linearSRGB.icc
  15306. >>>24 ubequad !0
  15307. # datetime dd-mm-yyyy hh:mm:ss
  15308. >>>>28 ubeshort x \b, %u
  15309. # month <= 12
  15310. >>>>26 ubeshort x \b-%u
  15311. # year
  15312. >>>>24 ubeshort x \b-%u
  15313. # do not display midnight time like in CNHP8308.ICC
  15314. >>>>30 ubequad&0xFFffFFffFFff0000 !0
  15315. # hour <= 24
  15316. >>>>>30 ubeshort x %u
  15317. # minutes <= 59
  15318. >>>>>32 ubeshort x \b:%.2u
  15319. # seconds <= 59
  15320. >>>>>34 ubeshort x \b:%.2u
  15321. # vendor specific flags like 2 in HPCLJ5.ICM
  15322. >>>44 ubeshort >0 \b, 0x%x vendor flags
  15323. # profile flags bits 0-2 of least 16 used by ICC
  15324. #>>>44 ubelong >0 \b, 0x%x flags
  15325. # icEmbeddedProfileTrue
  15326. >>>44 ubelong &1 \b, embedded
  15327. # icEmbeddedProfileFalse
  15328. #>>>44 ubelong ^1 \b, not embedded
  15329. # icUseWithEmbeddedDataOnly
  15330. >>>44 ubelong &2 \b, dependently
  15331. # icUseAnywhere
  15332. #>>>44 ubelong ^2 \b, independently
  15333. >>>44 ubelong &4 \b, MCS
  15334. #>>>44 ubelong ^4 \b, no MCS
  15335. # vendor specific device attributes 1~srgb.icc
  15336. # E000D00h~CNB7QEDA.ICM C000A00h~CNB5FCAA.ICM 01040401h~CNB25PE3.ICM
  15337. >>>56 ubelong >0 \b, 0x%x vendor attribute
  15338. # ICC device attributes bits 0-7 used
  15339. #>>>60 ubelong x \b, 0x%x attribute
  15340. # http://www.color.org/icc34.h
  15341. >>>60 ubelong &0x01 \b, transparent
  15342. #>>>60 ubelong ^0x01 \b, reflective
  15343. >>>60 ubelong &0x02 \b, matte
  15344. #>>>60 ubelong ^0x02 \b, glossy
  15345. >>>60 ubelong &0x04 \b, negative
  15346. #>>>60 ubelong ^0x04 \b, positive
  15347. >>>60 ubelong &0x08 \b, black&white
  15348. #>>>60 ubelong ^0x08 \b, colour
  15349. >>>60 ubelong &0x10 \b, non-paper
  15350. #>>>60 ubelong ^0x10 \b, paper
  15351. >>>60 ubelong &0x20 \b, non-textured
  15352. #>>>60 ubelong ^0x20 \b, textured
  15353. >>>60 ubelong &0x40 \b, non-isotropic
  15354. #>>>60 ubelong ^0x40 \b, isotropic
  15355. >>>60 ubelong &0x80 \b, self-luminous
  15356. #>>>60 ubelong ^0x80 \b, non-self-luminous
  15357. # rendering intent 0-3 but 7AEA5027h in EE051__1.ICM 6CB1BCh in EE061__1.ICM
  15358. >>>64 ubelong >3 \b, 0x%x rendering intent
  15359. #>>>64 ubelong =0 \b, perceptual
  15360. >>>64 ubelong =1 \b, relative colorimetric
  15361. >>>64 ubelong =2 \b, saturation
  15362. >>>64 ubelong =3 \b, absolute colorimetric
  15363. # PCS illuminant (3*s15Fixed16Numbers) often 0000f6d6 00010000 0000d32d
  15364. >>>71 ubequad !0xd6000100000000d3 \b, PCS
  15365. # usually X~0.9642*65536=63189.8112~63190=F6D5h ; but also found
  15366. # often F6D6 in gt5000r.icm, F6B8 in kodakce.icm, F6CA in RSWOP.icm
  15367. >>>>68 ubelong !0x0000f6d5 X=0x%x
  15368. # usually Y=1.0~00010000h but Y=0 in brmsl07f.icm
  15369. >>>>72 ubelong !0x00010000 Y=0x%x
  15370. # usually Z~0.8249*65536=54060.6464~54061=D32Dh ; but also found
  15371. # D2F7 in hp1200c.icm, often D32C in A925A.icm, D309 in RSWOP.icm , D2F8 in kodak_dc.icm
  15372. >>>>76 ubelong !0x0000d32d Z=0x%x
  15373. # Profile ID. MD5 fingerprinting method as defined in Internet RFC 1321.
  15374. >>>84 ubequad >0 \b, 0x%llx MD5
  15375. # reserved in older versions should be zero but also found CDCDCDCDCDCDCDCD
  15376. #>>100 ubequad x \b 0x%llx reserved
  15377. # tag table
  15378. # 6 <= tags count <= 43
  15379. #>>>128 ubelong >43 \b, %u tags
  15380. >>>128 ubelong x
  15381. # shall contain the profileDescriptionTag "desc" , copyrightTag "cprt"
  15382. # search range = tags count * 12 -8=< maximal tag count * 12 -8= 43 * 12 -8= 508
  15383. >>>>132 search/508 cprt
  15384. # but no copyright tag in linearSRGB.icc
  15385. # beneath /System/Library/Frameworks/WebKit.framework/
  15386. # Versions/A/Frameworks/WebCore.framework/Versions/A/Resources
  15387. >>>>132 default x \b, no copyright tag
  15388. # 1st tag
  15389. #>>>132 string x \b, 1st tag %.4s
  15390. #>>>136 ubelong x 0x%x offset
  15391. #>>>140 ubelong x 0x%x len
  15392. # 2nd tag,...
  15393. # look also for profileDescriptionTag "desc"
  15394. >>>132 search/508 desc
  15395. # look further for TextDescriptionType "desc" signature
  15396. >>>>(&0.L) string =desc
  15397. >>>>>&4 pstring/l x "%s"
  15398. # look alternative for multiLocalizedUnicodeType "mluc" signature like in VideoPAL.icc
  15399. >>>>(&0.L) string =mluc
  15400. >>>>>&(&8.L) ubequad x
  15401. >>>>>>&4 bestring16 x '%s'
  15402. # Any other profile.
  15403. # XXX - should we use "acsp\0\0\0\0" for "no primary platform" profiles,
  15404. # and use "acsp" for everything else and dump the "primary platform"
  15405. # string in those cases?
  15406. 36 string acsp
  15407. >0 use color-profile
  15408. #------------------------------------------------------------------------------
  15409. # $File: iff,v 1.17 2021/02/23 01:07:32 christos Exp $
  15410. # iff: file(1) magic for Interchange File Format (see also "audio" & "images")
  15411. #
  15412. # Daniel Quinlan (quinlan@yggdrasil.com) -- IFF was designed by Electronic
  15413. # Arts for file interchange. It has also been used by Apple, SGI, and
  15414. # especially Commodore-Amiga.
  15415. #
  15416. # IFF files begin with an 8 byte FORM header, followed by a 4 character
  15417. # FORM type, which is followed by the first chunk in the FORM.
  15418. 0 string FORM IFF data
  15419. #>4 belong x \b, FORM is %d bytes long
  15420. # audio formats
  15421. >8 string AIFF \b, AIFF audio
  15422. !:mime audio/x-aiff
  15423. >8 string AIFC \b, AIFF-C compressed audio
  15424. !:mime audio/x-aiff
  15425. >8 string 8SVX \b, 8SVX 8-bit sampled sound voice
  15426. !:mime audio/x-aiff
  15427. >8 string 16SV \b, 16SV 16-bit sampled sound voice
  15428. >8 string SAMP \b, SAMP sampled audio
  15429. >8 string MAUD \b, MAUD MacroSystem audio
  15430. >8 string SMUS \b, SMUS simple music
  15431. >8 string CMUS \b, CMUS complex music
  15432. # image formats
  15433. >8 string ILBMBMHD \b, ILBM interleaved image
  15434. >>20 beshort x \b, %d x
  15435. >>22 beshort x %d
  15436. >8 string RGBN \b, RGBN 12-bit RGB image
  15437. >8 string RGB8 \b, RGB8 24-bit RGB image
  15438. >8 string DEEP \b, DEEP TVPaint/XiPaint image
  15439. >8 string DR2D \b, DR2D 2-D object
  15440. >8 string TDDD \b, TDDD 3-D rendering
  15441. >8 string LWOB \b, LWOB 3-D object
  15442. >8 string LWO2 \b, LWO2 3-D object, v2
  15443. >8 string LWLO \b, LWLO 3-D layered object
  15444. >8 string REAL \b, REAL Real3D rendering
  15445. >8 string MC4D \b, MC4D MaxonCinema4D rendering
  15446. >8 string ANIM \b, ANIM animation
  15447. >8 string YAFA \b, YAFA animation
  15448. >8 string SSA\ \b, SSA super smooth animation
  15449. >8 string FANT \b, Fantavision animation
  15450. >8 string ACBM \b, ACBM continuous image
  15451. >8 string FAXX \b, FAXX fax image
  15452. >8 string STFX \b, ST-Fax image
  15453. # other formats
  15454. >8 string FTXT \b, FTXT formatted text
  15455. >8 string CTLG \b, CTLG message catalog
  15456. >8 string PREF \b, PREF preferences
  15457. >8 string DTYP \b, DTYP datatype description
  15458. >8 string PTCH \b, PTCH binary patch
  15459. >8 string AMFF \b, AMFF AmigaMetaFile format
  15460. >8 string WZRD \b, WZRD StormWIZARD resource
  15461. >8 string DOC\040 \b, DOC desktop publishing document
  15462. >8 string SWRT \b, SWRT Final Copy/Writer document
  15463. >8 string WORD \b, ProWrite document
  15464. >8 string WTXT \b, WTXT Wordworth document
  15465. >8 string WOWO \b, WOWO Wordworth document
  15466. >8 string WVQA \b, Westwood Studios VQA Multimedia,
  15467. >>24 leshort x %d video frames,
  15468. >>26 leshort x %d x
  15469. >>28 leshort x %d
  15470. >8 string MOVE \b, Wing Commander III Video
  15471. >>12 string _PC_ \b, PC version
  15472. >>12 string 3DO_ \b, 3DO version
  15473. # These go at the end of the iff rules
  15474. #
  15475. # David Griffith <dave@661.org>
  15476. # I don't see why these might collide with anything else.
  15477. #
  15478. # Interactive Fiction related formats
  15479. #
  15480. >8 string IFRS \b, Blorb Interactive Fiction
  15481. >>24 string Exec with executable chunk
  15482. >8 string IFZS \b, Z-machine or Glulx saved game file (Quetzal)
  15483. !:mime application/x-blorb
  15484. #------------------------------------------------------------------------------
  15485. # $File: images,v 1.194 2021/02/09 22:59:38 christos Exp $
  15486. # images: file(1) magic for image formats (see also "iff", and "c-lang" for
  15487. # XPM bitmaps)
  15488. #
  15489. # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  15490. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  15491. # merging several one- and two-line files into here.
  15492. #
  15493. # little magic: PCX (first byte is 0x0a)
  15494. # Targa - matches `povray', `ppmtotga' and `xv' outputs
  15495. # by Philippe De Muyter <phdm@macqel.be>
  15496. # URL: http://justsolve.archiveteam.org/wiki/TGA
  15497. # Reference: http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf
  15498. # Update: Joerg Jenderek
  15499. # at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11
  15500. # ,32 or 33 (both not observed)
  15501. # at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise
  15502. # or theoretically 2-128 reserved for use by Truevision or 128-255 may be used for developer applications
  15503. # at 3, leshort Index is 0 for povray, ppmtotga and xv outputs
  15504. # `xv' recognizes only a subset of the following (RGB with pixelsize = 24)
  15505. # `tgatoppm' recognizes a superset (Index may be anything)
  15506. #
  15507. # test of Color Map Type 0~no 1~color map
  15508. # and Image Type 1 2 3 9 10 11 32 33
  15509. # and Color Map Entry Size 0 15 16 24 32
  15510. 0 ubequad&0x00FeC400000000C0 0
  15511. # Conflict with MPEG sequences.
  15512. !:strength -40
  15513. # Prevent conflicts with CRI ADX.
  15514. #>(2.S-2) belong !0x28632943
  15515. # above line does not work for rgb32_top_left_rle.tga
  15516. # skip some MPEG sequence *.vob and some CRI ADX audio with improbable interleave bits
  15517. >17 ubyte&0xC0 !0xC0
  15518. # skip more garbage like *.iso by looking for positive image type
  15519. >>2 ubyte >0
  15520. # skip some compiled terminfo like xterm+tmux by looking for image type less equal 33
  15521. >>>2 ubyte <34
  15522. # skip some MPEG sequence *.vob HV001T01.EVO winnicki.mpg with unacceptable alpha channel depth 11
  15523. >>>>17 ubyte&0x0F !11
  15524. # skip arches.3200 , Finder.Root , Slp.1 by looking for low pixel depth 1 8 15 16 24 32
  15525. >>>>>16 ubyte 1
  15526. >>>>>>0 use tga-image
  15527. >>>>>16 ubyte 8
  15528. >>>>>>0 use tga-image
  15529. >>>>>16 ubyte 15
  15530. >>>>>>0 use tga-image
  15531. >>>>>16 ubyte 16
  15532. >>>>>>0 use tga-image
  15533. >>>>>16 ubyte 24
  15534. >>>>>>0 use tga-image
  15535. >>>>>16 ubyte 32
  15536. >>>>>>0 use tga-image
  15537. # display tga bitmap image information
  15538. 0 name tga-image
  15539. >2 ubyte <34 Targa image data
  15540. !:mime image/x-tga
  15541. !:apple ????TPIC
  15542. # normal extension .tga but some Truevision products used others:
  15543. # tpic (Apple),icb (Image Capture Board),vda (Video Display Adapter),vst (NuVista),win (UNSURE about that)
  15544. !:ext tga/tpic/icb/vda/vst
  15545. # image type 1 2 3 9 10 11 32 33
  15546. >2 ubyte&0xF7 1 - Map
  15547. >2 ubyte&0xF7 2 - RGB
  15548. # alpha channel
  15549. >>17 ubyte&0x0F >0 \bA
  15550. >2 ubyte&0xF7 3 - Mono
  15551. # type not found, but by http://www.fileformat.info/format/tga/corion.htm
  15552. # Compressed color-mapped data, using Huffman, Delta, and runlength encoding
  15553. >2 ubyte 32 - Color
  15554. # Compressed color-mapped data, using Huffman, Delta, and RLE. 4-pass quadtree- type process
  15555. >2 ubyte 33 - Color
  15556. # Color Map Type 0~no 1~color map
  15557. >1 ubyte 1 (
  15558. # first color map entry, 0 normal
  15559. >>3 uleshort >0 \b%d-
  15560. # color map length 0 2 1dh 3bh d9h 100h
  15561. >>5 uleshort x \b%d)
  15562. # 8~run length encoding bit
  15563. >2 ubyte&0x08 8 - RLE
  15564. # gimp can create big pictures!
  15565. >12 uleshort >0 %d x
  15566. >12 uleshort =0 65536 x
  15567. # image height. 0 interpreted as 65536
  15568. >14 uleshort >0 %d
  15569. >14 uleshort =0 65536
  15570. # Image Pixel depth 1 8 15 16 24 32
  15571. >16 ubyte x x %d
  15572. # X origin of image. 0 normal
  15573. >8 uleshort >0 +%d
  15574. # Y origin of image. 0 normal; positive for top
  15575. >10 uleshort >0 +%d
  15576. # Image descriptor: bits 3-0 give the alpha channel depth, bits 5-4 give direction
  15577. # alpha depth like: 1 8
  15578. >17 ubyte&0x0F >0 - %d-bit alpha
  15579. # bits 5-4 give direction. normal bottom left
  15580. >17 ubyte &0x20 - top
  15581. #>17 ubyte ^0x20 - bottom
  15582. >17 ubyte &0x10 - right
  15583. #>17 ubyte ^0x10 - left
  15584. # some info say other bits 6-7 should be zero
  15585. # but data storage interleave by http://www.fileformat.info/format/tga/corion.htm
  15586. # 00 - no interleave;01 - even/odd interleave; 10 - four way interleave; 11 - reserved
  15587. #>17 ubyte&0xC0 0x00 - no interleave
  15588. >17 ubyte&0xC0 0x40 - interleave
  15589. >17 ubyte&0xC0 0x80 - four way interleave
  15590. >17 ubyte&0xC0 0xC0 - reserved
  15591. # positive length implies identification field
  15592. >0 ubyte >0
  15593. >>18 string x "%s"
  15594. # last 18 bytes of newer tga file footer signature
  15595. >18 search/4261301/s TRUEVISION-XFILE.\0
  15596. # extension area offset if not 0
  15597. >>&-8 ulelong >0
  15598. # length of the extension area. normal 495 for version 2.0
  15599. >>>(&-4.l) uleshort 0x01EF
  15600. # AuthorName[41]
  15601. >>>>&0 string >\0 - author "%-.40s"
  15602. # Comment[324]=4 * 80 null terminated
  15603. >>>>&41 string >\0 - comment "%-.80s"
  15604. # date
  15605. >>>>&365 ubequad&0xffffFFFFffff0000 !0
  15606. # Day
  15607. >>>>>&-6 uleshort x %d
  15608. # Month
  15609. >>>>>&-8 uleshort x \b-%d
  15610. # Year
  15611. >>>>>&-4 uleshort x \b-%d
  15612. # time
  15613. >>>>&371 ubequad&0xffffFFFFffff0000 !0
  15614. # hour
  15615. >>>>>&-8 uleshort x %d
  15616. # minutes
  15617. >>>>>&-6 uleshort x \b:%.2d
  15618. # second
  15619. >>>>>&-4 uleshort x \b:%.2d
  15620. # JobName[41]
  15621. >>>>&377 string >\0 - job "%-.40s"
  15622. # JobHour Jobminute Jobsecond
  15623. >>>>&418 ubequad&0xffffFFFFffff0000 !0
  15624. >>>>>&-8 uleshort x %d
  15625. >>>>>&-6 uleshort x \b:%.2d
  15626. >>>>>&-4 uleshort x \b:%.2d
  15627. # SoftwareId[41]
  15628. >>>>&424 string >\0 - %-.40s
  15629. # SoftwareVersionNumber
  15630. >>>>&424 ubyte >0
  15631. >>>>>&40 uleshort/100 x %d
  15632. >>>>>&40 uleshort%100 x \b.%d
  15633. # VersionLetter
  15634. >>>>>&42 ubyte >0x20 \b%c
  15635. # KeyColor
  15636. >>>>&468 ulelong >0 - keycolor 0x%8.8x
  15637. # Denominator of Pixel ratio. 0~no pixel aspect
  15638. >>>>&474 uleshort >0
  15639. # Numerator
  15640. >>>>>&-4 uleshort >0 - aspect %d
  15641. >>>>>&-2 uleshort x \b/%d
  15642. # Denominator of Gamma ratio. 0~no Gamma value
  15643. >>>>&478 uleshort >0
  15644. # Numerator
  15645. >>>>>&-4 uleshort >0 - gamma %d
  15646. >>>>>&-2 uleshort x \b/%d
  15647. # ColorOffset
  15648. #>>>>&480 ulelong x - col offset 0x%8.8x
  15649. # StampOffset
  15650. #>>>>&484 ulelong x - stamp offset 0x%8.8x
  15651. # ScanOffset
  15652. #>>>>&488 ulelong x - scan offset 0x%8.8x
  15653. # AttributesType
  15654. #>>>>&492 ubyte x - Attributes 0x%x
  15655. ## EndOfTGA
  15656. # PBMPLUS images
  15657. # URL: https://en.wikipedia.org/wiki/Netpbm
  15658. # The next byte following the magic is always whitespace.
  15659. # adding 65 to strength so that Netpbm images comes before "x86 boot sector" or
  15660. # "DOS/MBR boot sector" identified by ./filesystems is probably not needed
  15661. # because files are different
  15662. 0 name netpbm
  15663. >3 regex/s =[0-9]{1,50}\ [0-9]{1,50} Netpbm image data
  15664. >>&0 regex =[0-9]{1,50} \b, size = %s x
  15665. >>>&0 regex =[0-9]{1,50} \b %s
  15666. 0 search/1 P1
  15667. # test for whitespace after 2 byte magic
  15668. >2 regex/2 [\040\t\f\r\n]
  15669. # skip DROID x-fmt-164-signature-id-583.pbm with ten 0 digits
  15670. >>3 string !000000000
  15671. >>>0 use netpbm
  15672. >>>0 string x \b, bitmap
  15673. #!:strength + 65
  15674. !:mime image/x-portable-bitmap
  15675. !:ext pbm
  15676. # check for character # starting a comment line
  15677. >>>3 ubyte =0x23
  15678. >>>>4 string x %s
  15679. 0 search/1 P2
  15680. >0 regex/4 P2[\040\t\f\r\n]
  15681. >>0 use netpbm
  15682. >>0 string x \b, greymap
  15683. #!:strength + 65
  15684. # american spelling gray
  15685. !:mime image/x-portable-graymap
  15686. !:ext pgm
  15687. 0 search/1 P3
  15688. >0 regex/4 P3[\040\t\f\r\n]
  15689. >>0 use netpbm
  15690. >>0 string x \b, pixmap
  15691. #!:strength + 65
  15692. !:mime image/x-portable-pixmap
  15693. !:ext ppm
  15694. 0 string P4
  15695. >0 regex/4 P4[\040\t\f\r\n]
  15696. >>0 use netpbm
  15697. >>0 string x \b, rawbits, bitmap
  15698. #!:strength + 65
  15699. !:mime image/x-portable-bitmap
  15700. !:ext pbm
  15701. 0 string P5
  15702. >0 regex/4 P5[\040\t\f\r\n]
  15703. >>0 use netpbm
  15704. >>0 string x \b, rawbits, greymap
  15705. #!:strength + 65
  15706. !:mime image/x-portable-greymap
  15707. !:ext pgm
  15708. 0 string P6
  15709. >0 regex/4 P6[\040\t\f\r\n]
  15710. >>0 use netpbm
  15711. >>0 string x \b, rawbits, pixmap
  15712. #!:strength + 65
  15713. !:mime image/x-portable-pixmap
  15714. !:ext ppm/pnm
  15715. # URL: https://en.wikipedia.org/wiki/Netpbm#PAM_graphics_format
  15716. # Reference: http://fileformats.archiveteam.org/wiki/Portable_Arbitrary_Map
  15717. # Update: Joerg Jenderek
  15718. 0 string P7
  15719. # skip DROID fmt-405-signature-id-589.pam by looking for character like New Line
  15720. >2 ubyte !0xAB
  15721. #>2 ubyte =0x0A
  15722. >>3 search/256/b WIDTH Netpbm PAM image file, size =
  15723. !:mime image/x-portable-arbitrarymap
  15724. !:ext pam
  15725. >>>&1 string x %s
  15726. >>>3 search/256/b HEIGHT x
  15727. >>>>&1 string x %s
  15728. # at offset 2 a New Line character (0xA) should appear
  15729. >>>2 ubyte !0x0A \b, 0x%x at offset 2 instead new line
  15730. # From: bryanh@giraffe-data.com (Bryan Henderson)
  15731. 0 string \117\072 Solitaire Image Recorder format
  15732. >4 string \013 MGI Type 11
  15733. >4 string \021 MGI Type 17
  15734. 0 string .MDA MicroDesign data
  15735. >21 byte 48 version 2
  15736. >21 byte 51 version 3
  15737. 0 string .MDP MicroDesign page data
  15738. >21 byte 48 version 2
  15739. >21 byte 51 version 3
  15740. # NIFF (Navy Interchange File Format, a modification of TIFF) images
  15741. # [GRR: this *must* go before TIFF]
  15742. 0 string IIN1 NIFF image data
  15743. !:mime image/x-niff
  15744. # Canon RAW version 1 (CRW) files are a type of Canon Image File Format
  15745. # (CIFF) file. These are apparently all little-endian.
  15746. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  15747. # URL: https://www.sno.phy.queensu.ca/~phil/exiftool/canon_raw.html
  15748. 0 string II\x1a\0\0\0HEAPCCDR Canon CIFF raw image data
  15749. !:mime image/x-canon-crw
  15750. >16 leshort x \b, version %d.
  15751. >14 leshort x \b%d
  15752. # Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic
  15753. # number. Put this above the TIFF test to make sure we detect them.
  15754. # These are apparently all little-endian.
  15755. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  15756. # URL: https://libopenraw.freedesktop.org/wiki/Canon_CR2
  15757. 0 string II\x2a\0\x10\0\0\0CR Canon CR2 raw image data
  15758. !:mime image/x-canon-cr2
  15759. !:strength +80
  15760. >10 byte x \b, version %d.
  15761. >11 byte x \b%d
  15762. # Fujifilm RAF RAW image files with embedded JPEG data and compressed
  15763. # or uncompressed CFA RAW data. Byte order: Big Endian.
  15764. # URL: https://libopenraw.freedesktop.org/formats/raf/
  15765. 0 string FUJIFILMCCD-RAW Fujifilm RAF raw image data
  15766. !:mime image/x-fuji-raf
  15767. # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  15768. # The second word of TIFF files is the TIFF version number, 42, which has
  15769. # never changed. The TIFF specification recommends testing for it.
  15770. 0 string MM\x00\x2a TIFF image data, big-endian
  15771. !:strength +70
  15772. !:mime image/tiff
  15773. !:ext tif,tiff
  15774. >(4.L) use \^tiff_ifd
  15775. 0 string II\x2a\x00 TIFF image data, little-endian
  15776. !:mime image/tiff
  15777. !:strength +70
  15778. !:ext tif,tiff
  15779. >(4.l) use tiff_ifd
  15780. 0 name tiff_ifd
  15781. >0 leshort x \b, direntries=%d
  15782. >2 use tiff_entry
  15783. 0 name tiff_entry
  15784. # NewSubFileType
  15785. >0 leshort 0xfe
  15786. >>12 use tiff_entry
  15787. >0 leshort 0x100
  15788. >>4 lelong 1
  15789. >>>12 use tiff_entry
  15790. >>>8 leshort x \b, width=%d
  15791. >0 leshort 0x101
  15792. >>4 lelong 1
  15793. >>>8 leshort x \b, height=%d
  15794. >>>12 use tiff_entry
  15795. >0 leshort 0x102
  15796. >>8 leshort x \b, bps=%d
  15797. >>12 use tiff_entry
  15798. >0 leshort 0x103
  15799. >>4 lelong 1 \b, compression=
  15800. >>>8 leshort 1 \bnone
  15801. >>>8 leshort 2 \bhuffman
  15802. >>>8 leshort 3 \bbi-level group 3
  15803. >>>8 leshort 4 \bbi-level group 4
  15804. >>>8 leshort 5 \bLZW
  15805. >>>8 leshort 6 \bJPEG (old)
  15806. >>>8 leshort 7 \bJPEG
  15807. >>>8 leshort 8 \bdeflate
  15808. >>>8 leshort 9 \bJBIG, ITU-T T.85
  15809. >>>8 leshort 0xa \bJBIG, ITU-T T.43
  15810. >>>8 leshort 0x7ffe \bNeXT RLE 2-bit
  15811. >>>8 leshort 0x8005 \bPackBits (Macintosh RLE)
  15812. >>>8 leshort 0x8029 \bThunderscan RLE
  15813. >>>8 leshort 0x807f \bRasterPadding (CT or MP)
  15814. >>>8 leshort 0x8080 \bRLE (Line Work)
  15815. >>>8 leshort 0x8081 \bRLE (High-Res Cont-Tone)
  15816. >>>8 leshort 0x8082 \bRLE (Binary Line Work)
  15817. >>>8 leshort 0x80b2 \bDeflate (PKZIP)
  15818. >>>8 leshort 0x80b3 \bKodak DCS
  15819. >>>8 leshort 0x8765 \bJBIG
  15820. >>>8 leshort 0x8798 \bJPEG2000
  15821. >>>8 leshort 0x8799 \bNikon NEF Compressed
  15822. >>>8 default x
  15823. >>>>8 leshort x \b(unknown 0x%x)
  15824. >>>12 use tiff_entry
  15825. >0 leshort 0x106 \b, PhotometricIntepretation=
  15826. >>8 clear x
  15827. >>8 leshort 0 \bWhiteIsZero
  15828. >>8 leshort 1 \bBlackIsZero
  15829. >>8 leshort 2 \bRGB
  15830. >>8 leshort 3 \bRGB Palette
  15831. >>8 leshort 4 \bTransparency Mask
  15832. >>8 leshort 5 \bCMYK
  15833. >>8 leshort 6 \bYCbCr
  15834. >>8 leshort 8 \bCIELab
  15835. >>8 default x
  15836. >>>8 leshort x \b(unknown=0x%x)
  15837. >>12 use tiff_entry
  15838. # FillOrder
  15839. >0 leshort 0x10a
  15840. >>4 lelong 1
  15841. >>>12 use tiff_entry
  15842. # DocumentName
  15843. >0 leshort 0x10d
  15844. >>(8.l) string x \b, name=%s
  15845. >>>12 use tiff_entry
  15846. # ImageDescription
  15847. >0 leshort 0x10e
  15848. >>(8.l) string x \b, description=%s
  15849. >>>12 use tiff_entry
  15850. # Make
  15851. >0 leshort 0x10f
  15852. >>(8.l) string x \b, manufacturer=%s
  15853. >>>12 use tiff_entry
  15854. # Model
  15855. >0 leshort 0x110
  15856. >>(8.l) string x \b, model=%s
  15857. >>>12 use tiff_entry
  15858. # StripOffsets
  15859. >0 leshort 0x111
  15860. >>12 use tiff_entry
  15861. # Orientation
  15862. >0 leshort 0x112 \b, orientation=
  15863. >>8 leshort 1 \bupper-left
  15864. >>8 leshort 3 \blower-right
  15865. >>8 leshort 6 \bupper-right
  15866. >>8 leshort 8 \blower-left
  15867. >>8 leshort 9 \bundefined
  15868. >>8 default x
  15869. >>>8 leshort x \b[*%d*]
  15870. >>12 use tiff_entry
  15871. # XResolution
  15872. >0 leshort 0x11a
  15873. >>8 lelong x \b, xresolution=%d
  15874. >>12 use tiff_entry
  15875. # YResolution
  15876. >0 leshort 0x11b
  15877. >>8 lelong x \b, yresolution=%d
  15878. >>12 use tiff_entry
  15879. # ResolutionUnit
  15880. >0 leshort 0x128
  15881. >>8 leshort x \b, resolutionunit=%d
  15882. >>12 use tiff_entry
  15883. # Software
  15884. >0 leshort 0x131
  15885. >>(8.l) string x \b, software=%s
  15886. >>12 use tiff_entry
  15887. # Datetime
  15888. >0 leshort 0x132
  15889. >>(8.l) string x \b, datetime=%s
  15890. >>12 use tiff_entry
  15891. # HostComputer
  15892. >0 leshort 0x13c
  15893. >>(8.l) string x \b, hostcomputer=%s
  15894. >>12 use tiff_entry
  15895. # WhitePoint
  15896. >0 leshort 0x13e
  15897. >>12 use tiff_entry
  15898. # PrimaryChromaticities
  15899. >0 leshort 0x13f
  15900. >>12 use tiff_entry
  15901. # YCbCrCoefficients
  15902. >0 leshort 0x211
  15903. >>12 use tiff_entry
  15904. # YCbCrPositioning
  15905. >0 leshort 0x213
  15906. >>12 use tiff_entry
  15907. # ReferenceBlackWhite
  15908. >0 leshort 0x214
  15909. >>12 use tiff_entry
  15910. # Copyright
  15911. >0 leshort 0x8298
  15912. >>(8.l) string x \b, copyright=%s
  15913. >>12 use tiff_entry
  15914. # ExifOffset
  15915. >0 leshort 0x8769
  15916. >>12 use tiff_entry
  15917. # GPS IFD
  15918. >0 leshort 0x8825 \b, GPS-Data
  15919. >>12 use tiff_entry
  15920. #>0 leshort x \b, unknown=0x%x
  15921. #>>12 use tiff_entry
  15922. 0 string MM\x00\x2b Big TIFF image data, big-endian
  15923. !:mime image/tiff
  15924. 0 string II\x2b\x00 Big TIFF image data, little-endian
  15925. !:mime image/tiff
  15926. # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
  15927. # (Greg Roelofs, newt@uchicago.edu)
  15928. # (Albert Cahalan, acahalan@cs.uml.edu)
  15929. #
  15930. # 137 P N G \r \n ^Z \n [4-byte length] I H D R [HEAD data] [HEAD crc] ...
  15931. #
  15932. # IHDR parser
  15933. 0 name png-ihdr
  15934. >0 belong x \b, %d x
  15935. >4 belong x %d,
  15936. >8 byte x %d-bit
  15937. >9 byte 0 grayscale,
  15938. >9 byte 2 \b/color RGB,
  15939. >9 byte 3 colormap,
  15940. >9 byte 4 gray+alpha,
  15941. >9 byte 6 \b/color RGBA,
  15942. #>10 byte 0 deflate/32K,
  15943. >12 byte 0 non-interlaced
  15944. >12 byte 1 interlaced
  15945. # Standard PNG image.
  15946. 0 string \x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0DIHDR PNG image data
  15947. !:mime image/png
  15948. !:ext png
  15949. !:strength +10
  15950. >16 use png-ihdr
  15951. # Apple CgBI PNG image.
  15952. 0 string \x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x04CgBI
  15953. >24 string \x00\x00\x00\x0DIHDR PNG image data (CgBI)
  15954. !:mime image/png
  15955. !:ext png
  15956. !:strength +10
  15957. >>32 use png-ihdr
  15958. # possible GIF replacements; none yet released!
  15959. # (Greg Roelofs, newt@uchicago.edu)
  15960. #
  15961. # GRR 950115: this was mine ("Zip GIF"):
  15962. 0 string GIF94z ZIF image (GIF+deflate alpha)
  15963. !:mime image/x-unknown
  15964. #
  15965. # GRR 950115: this is Jeremy Wohl's Free Graphics Format (better):
  15966. #
  15967. 0 string FGF95a FGF image (GIF+deflate beta)
  15968. !:mime image/x-unknown
  15969. #
  15970. # GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal
  15971. # (best; not yet implemented):
  15972. #
  15973. 0 string PBF PBF image (deflate compression)
  15974. !:mime image/x-unknown
  15975. # GIF
  15976. # Strength set up to beat 0x55AA DOS/MBR signature word lookups (+65)
  15977. 0 string GIF8 GIF image data
  15978. !:strength +80
  15979. !:mime image/gif
  15980. !:apple 8BIMGIFf
  15981. !:ext gif
  15982. >4 string 7a \b, version 8%s,
  15983. >4 string 9a \b, version 8%s,
  15984. >6 leshort >0 %d x
  15985. >8 leshort >0 %d
  15986. #>10 byte &0x80 color mapped,
  15987. #>10 byte&0x07 =0x00 2 colors
  15988. #>10 byte&0x07 =0x01 4 colors
  15989. #>10 byte&0x07 =0x02 8 colors
  15990. #>10 byte&0x07 =0x03 16 colors
  15991. #>10 byte&0x07 =0x04 32 colors
  15992. #>10 byte&0x07 =0x05 64 colors
  15993. #>10 byte&0x07 =0x06 128 colors
  15994. #>10 byte&0x07 =0x07 256 colors
  15995. # ITC (CMU WM) raster files. It is essentially a byte-reversed Sun raster,
  15996. # 1 plane, no encoding.
  15997. 0 string \361\0\100\273 CMU window manager raster image data
  15998. >4 lelong >0 %d x
  15999. >8 lelong >0 %d,
  16000. >12 lelong >0 %d-bit
  16001. # Magick Image File Format
  16002. # URL: https://imagemagick.org/script/miff.php
  16003. # Reference: http://fileformats.archiveteam.org/wiki/MIFF
  16004. # Update: Joerg Jenderek
  16005. # http://www.nationalarchives.gov.uk/pronom/fmt/930
  16006. 0 search/256/bc id=imagemagick
  16007. # skip bad ASCII text by following new line~0x0A or space~0x20 character
  16008. #>&0 ubyte x \b, next character 0x%x
  16009. # called by TriD ImageMagick Machine independent File Format bitmap
  16010. >&0 ubyte&0xD5 0 MIFF image data
  16011. # https://reposcope.com/mimetype/image/miff
  16012. #!:mime image/miff
  16013. !:mime image/x-miff
  16014. !:ext miff/mif
  16015. # examples with standard file(1) magic
  16016. #>>0 string =id=ImageMagick with standard magic
  16017. # examples with unusual file(1) magic like
  16018. >>0 string !id=ImageMagick starting with
  16019. # start with comment (brace) like http://samples.fileformat.info/.../AQUARIUM.MIF
  16020. >>>0 ubyte =0x7b comment
  16021. # skip second character which is often a newline and show comment
  16022. >>>>2 string x "%s"
  16023. # does not start with comment, probably letters with other case like Id=ImageMagick
  16024. # ImageMagick-7.0.9-2/Magick++/demo/smile_anim.miff
  16025. >>>0 ubyte !0x7b
  16026. >>>>0 string >\0 '%-.14s'
  16027. # URL: https://imagemagick.org/
  16028. # Reference: https://imagemagick.org/script/magick-vector-graphics.php
  16029. # From: Joerg Jenderek
  16030. # Note: all white-spaces between commands are ignored
  16031. 0 string push
  16032. # skip some white spaces
  16033. >5 search/3 graphic-context ImageMagick Vector Graphic
  16034. # TODO: look for dangerous commands like CVE-2016-3715
  16035. #!:mime text/plain
  16036. !:mime image/x-mvg
  16037. !:ext mvg
  16038. # Artisan
  16039. 0 long 1123028772 Artisan image data
  16040. >4 long 1 \b, rectangular 24-bit
  16041. >4 long 2 \b, rectangular 8-bit with colormap
  16042. >4 long 3 \b, rectangular 32-bit (24-bit with matte)
  16043. # FIG (Facility for Interactive Generation of figures), an object-based format
  16044. 0 search/1 #FIG FIG image text
  16045. >5 string x \b, version %.3s
  16046. # PHIGS
  16047. 0 string ARF_BEGARF PHIGS clear text archive
  16048. 0 string @(#)SunPHIGS SunPHIGS
  16049. # version number follows, in the form m.n
  16050. >40 string SunBin binary
  16051. >32 string archive archive
  16052. # GKS (Graphics Kernel System)
  16053. 0 string GKSM GKS Metafile
  16054. >24 string SunGKS \b, SunGKS
  16055. # CGM image files
  16056. 0 string BEGMF clear text Computer Graphics Metafile
  16057. # MGR bitmaps (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de)
  16058. 0 string yz MGR bitmap, modern format, 8-bit aligned
  16059. 0 string zz MGR bitmap, old format, 1-bit deep, 16-bit aligned
  16060. 0 string xz MGR bitmap, old format, 1-bit deep, 32-bit aligned
  16061. 0 string yx MGR bitmap, modern format, squeezed
  16062. # Fuzzy Bitmap (FBM) images
  16063. 0 string %bitmap\0 FBM image data
  16064. >30 long 0x31 \b, mono
  16065. >30 long 0x33 \b, color
  16066. # facsimile data
  16067. 1 string PC\ Research,\ Inc group 3 fax data
  16068. >29 byte 0 \b, normal resolution (204x98 DPI)
  16069. >29 byte 1 \b, fine resolution (204x196 DPI)
  16070. # From: Herbert Rosmanith <herp@wildsau.idv.uni.linz.at>
  16071. 0 string Sfff structured fax file
  16072. # From: Joerg Jenderek <joerg.jen.der.ek@gmx.net>
  16073. # most files with the extension .EPA and some with .BMP
  16074. 0 string \x11\x06 Award BIOS Logo, 136 x 84
  16075. !:mime image/x-award-bioslogo
  16076. 0 string \x11\x09 Award BIOS Logo, 136 x 126
  16077. !:mime image/x-award-bioslogo
  16078. #0 string \x07\x1f BIOS Logo corrupted?
  16079. # http://www.blackfiveservices.co.uk/awbmtools.shtml
  16080. # http://biosgfx.narod.ru/v3/
  16081. # http://biosgfx.narod.ru/abr-2/
  16082. 0 string AWBM
  16083. >4 leshort <1981 Award BIOS bitmap
  16084. !:mime image/x-award-bmp
  16085. # image width is a multiple of 4
  16086. >>4 leshort&0x0003 0
  16087. >>>4 leshort x \b, %d
  16088. >>>6 leshort x x %d
  16089. >>4 leshort&0x0003 >0 \b,
  16090. >>>4 leshort&0x0003 =1
  16091. >>>>4 leshort x %d+3
  16092. >>>4 leshort&0x0003 =2
  16093. >>>>4 leshort x %d+2
  16094. >>>4 leshort&0x0003 =3
  16095. >>>>4 leshort x %d+1
  16096. >>>6 leshort x x %d
  16097. # at offset 8 starts imagedata followed by "RGB " marker
  16098. # PC bitmaps (OS/2, Windows BMP files) (Greg Roelofs, newt@uchicago.edu)
  16099. # https://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.\
  16100. # 28bitmap_information_header.29
  16101. # Note: variant starting direct with DIB header see
  16102. # http://fileformats.archiveteam.org/wiki/BMP
  16103. # verified by ImageMagick version 6.8.9-8 command `identify *.dib`
  16104. 0 leshort 40
  16105. # skip bad samples like GAME by looking for valid number of color planes
  16106. >12 uleshort 1 Device independent bitmap graphic
  16107. !:mime image/x-ms-bmp
  16108. !:apple ????BMPp
  16109. !:ext dib
  16110. >>4 lelong x \b, %d x
  16111. >>8 lelong x %d x
  16112. >>14 leshort x %d
  16113. # number of color planes (must be 1)
  16114. #>>12 uleshort >1 \b, %u color planes
  16115. # compression method: 0~no 1~RLE 8-bit/pixel 3~Huffman 1D
  16116. #>>16 ulelong 3 \b, Huffman 1D compression
  16117. >>16 ulelong >0 \b, %u compression
  16118. # image size is the size of raw bitmap; a dummy 0 can be given for BI_RGB bitmaps
  16119. >>20 ulelong x \b, image size %u
  16120. # horizontal and vertical resolution of the image (pixel per metre, signed integer)
  16121. >>24 lelong >0 \b, resolution %d x
  16122. >>>28 lelong x %d px/m
  16123. # number of colors in palette, or 0 to default to 2**n
  16124. #>>32 ulelong >0 \b, %u colors
  16125. # number of important colors used, or 0 when every color is important
  16126. >>36 ulelong >0 \b, %u important colors
  16127. 0 string BM
  16128. >14 leshort 12 PC bitmap, OS/2 1.x format
  16129. !:mime image/x-ms-bmp
  16130. >>18 leshort x \b, %d x
  16131. >>20 leshort x %d
  16132. >14 leshort 64 PC bitmap, OS/2 2.x format
  16133. !:mime image/x-ms-bmp
  16134. !:apple ????BMPp
  16135. !:ext bmp
  16136. # image width and height fields are unsigned integers for OS/2
  16137. >>18 ulelong x \b, %u x
  16138. >>22 ulelong x %u
  16139. # number of bits per pixel (color depth); found 1 4 8
  16140. >>28 uleshort >1 x %u
  16141. # x, y coordinates of the hotspot
  16142. >>6 uleshort >0 \b, hotspot %ux
  16143. >>>8 uleshort x \b%u
  16144. >>26 uleshort >1 \b, %u color planes
  16145. # cbSize; size of file or headers
  16146. >>2 ulelong x \b, cbSize %u
  16147. #>>2 ulelong x \b, cbSize 0x%x
  16148. # offBits; offset to bitmap data like 56h 5Eh 8Eh 43Eh
  16149. >>10 ulelong x \b, bits offset %u
  16150. #>>10 ulelong x \b, bits offset 0x%x
  16151. #>>(10.l) ubequad !0 \b, bits 0x%16.16llx
  16152. # BITMAPV2INFOHEADER adds RGB bit masks
  16153. >14 leshort 52 PC bitmap, Adobe Photoshop
  16154. !:mime image/x-ms-bmp
  16155. !:apple ????BMPp
  16156. !:ext bmp
  16157. >>18 lelong x \b, %d x
  16158. >>22 lelong x %d x
  16159. >>28 leshort x %d
  16160. # BITMAPV3INFOHEADER adds alpha channel bit mask
  16161. >14 leshort 56 PC bitmap, Adobe Photoshop with alpha channel mask
  16162. !:mime image/x-ms-bmp
  16163. !:apple ????BMPp
  16164. !:ext bmp
  16165. >>18 lelong x \b, %d x
  16166. >>22 lelong x %d x
  16167. >>28 leshort x %d
  16168. >14 leshort 40
  16169. # jump 4 bytes before end of file/header to skip fmt-116-signature-id-118.dib
  16170. # broken for large bitmaps
  16171. #>>(2.l-4) ulong x PC bitmap, Windows 3.x format
  16172. >>14 leshort 40 PC bitmap, Windows 3.x format
  16173. !:mime image/x-ms-bmp
  16174. !:apple ????BMPp
  16175. >>>18 lelong x \b, %d x
  16176. >>>22 lelong x %d
  16177. # 320 x 400 https://en.wikipedia.org/wiki/LOGO.SYS
  16178. >>>18 ulequad =0x0000019000000140 x
  16179. !:ext bmp/sys
  16180. >>>18 ulequad !0x0000019000000140
  16181. # compression method 2~RLE 4-bit/pixel implies also extension rle
  16182. >>>>30 ulelong 2 x
  16183. !:ext bmp/rle
  16184. >>>>30 default x x
  16185. !:ext bmp
  16186. # number of bits per pixel (color depth); found 1 2 4 8 16 24 32
  16187. >>>28 leshort x %d
  16188. # x, y coordinates of the hotspot; there is no hotspot in bitmaps, so values 0
  16189. #>>>6 uleshort >0 \b, hotspot %ux
  16190. #>>>>8 uleshort x \b%u
  16191. # number of color planes (must be 1), except badplanes.bmp for testing
  16192. #>>>26 uleshort >1 \b, %u color planes
  16193. # compression method: 0~no 1~RLE 8-bit/pixel 2~RLE 4-bit/pixel 3~Huffman 1D 6~RGBA bit field masks
  16194. #>>>30 ulelong 3 \b, Huffman 1D compression
  16195. >>>30 ulelong >0 \b, %u compression
  16196. # image size is the size of raw bitmap; a dummy 0 can be given for BI_RGB bitmaps
  16197. >>>34 ulelong >0 \b, image size %u
  16198. # horizontal and vertical resolution of the image (pixel per metre, signed integer)
  16199. >>>38 lelong >0 \b, resolution %d x
  16200. >>>>42 lelong x %d px/m
  16201. # number of colors in palette 16 256, or 0 to default to 2**n
  16202. #>>>46 ulelong >0 \b, %u colors
  16203. # number of important colors used, or 0 when every color is important
  16204. >>>50 ulelong >0 \b, %u important colors
  16205. # cbSize; often size of file
  16206. >>>2 ulelong x \b, cbSize %u
  16207. #>>>2 ulelong x \b, cbSize 0x%x
  16208. # offBits; offset to bitmap data like 36h 76h BEh 236h 406h 436h 4E6h
  16209. >>>10 ulelong x \b, bits offset %u
  16210. #>>>10 ulelong x \b, bits offset 0x%x
  16211. #>>>(10.l) ubequad !0 \b, bits 0x%16.16llxd
  16212. >14 leshort 124 PC bitmap, Windows 98/2000 and newer format
  16213. !:mime image/x-ms-bmp
  16214. >>18 lelong x \b, %d x
  16215. >>22 lelong x %d x
  16216. >>28 leshort x %d
  16217. >14 leshort 108 PC bitmap, Windows 95/NT4 and newer format
  16218. !:mime image/x-ms-bmp
  16219. >>18 lelong x \b, %d x
  16220. >>22 lelong x %d x
  16221. >>28 leshort x %d
  16222. >14 leshort 128 PC bitmap, Windows NT/2000 format
  16223. !:mime image/x-ms-bmp
  16224. >>18 lelong x \b, %d x
  16225. >>22 lelong x %d x
  16226. >>28 leshort x %d
  16227. # Update: Joerg Jenderek
  16228. # URL: http://fileformats.archiveteam.org/wiki/OS/2_Icon
  16229. # Reference: http://www.fileformat.info
  16230. # /format/os2bmp/spec/902d5c253f2a43ada39c2b81034f27fd/view.htm
  16231. # Note: verified by command like `deark -l -d3 OS2MEMU.ICO`
  16232. 0 string IC
  16233. # skip Lotus smart icon *.smi by looking for valid hotspot coordinates
  16234. >6 ulelong&0xFF00FF00 =0 OS/2 icon
  16235. # jump 4 bytes before end of header/file and test for accessibility
  16236. #>>(2.l-4) ubelong x End of header is OK!
  16237. !:mime image/x-os2-ico
  16238. !:ext ico
  16239. # cbSize; size of header or file in bytes like 1ah 120h 420h
  16240. >>2 ulelong x \b, cbSize %u
  16241. # xHotspot, yHotspot; coordinates of the hotspot for icons like 16 32
  16242. >>6 uleshort x \b, hotspot %ux
  16243. >>8 uleshort x \b%u
  16244. # offBits; offset in bytes to the beginning of the bit-map pel data like 20h
  16245. >>10 ulelong x \b, bits offset %u
  16246. #>>(10.l) ubequad x \b, bits 0x%16.16llx
  16247. #0 string PI PC pointer image data
  16248. #0 string CI PC color icon data
  16249. 0 string CI
  16250. # test also for valid dib header sizes 12 or 64
  16251. >14 ulelong <65 OS/2
  16252. # test also for valid hotspot coordinates
  16253. #>>6 ulelong&0xFE00FE00 =0 OS/2
  16254. !:mime image/x-os2-ico
  16255. !:ext ico
  16256. >>14 ulelong 12 1.x color icon
  16257. # image width and height fields are unsigned integers for OS/2
  16258. >>>18 uleshort x %u x
  16259. # stored height = 2 * real height
  16260. >>>20 uleshort/2 x %u
  16261. # number of bits per pixel (color depth). Typical 32 24 16 8 4 but only 1 found
  16262. >>>24 uleshort >1 x %u
  16263. # color planes; must be 1
  16264. #>>>22 uleshort >1 \b, %u color planes
  16265. >>14 ulelong 64 2.x color icon
  16266. # image width and height
  16267. >>>18 ulelong x %u x
  16268. # stored height = 2 * real height
  16269. >>>22 ulelong/2 x %u
  16270. # number of bits per pixel (color depth). only 1 found
  16271. >>>28 uleshort >1 x %u
  16272. #>>>26 uleshort >1 \b, %u color planes
  16273. # compression method: 0~no 3~Huffman 1D
  16274. >>>30 ulelong 3 \b, Huffman 1D compression
  16275. #>>>30 ulelong >0 \b, %u compression
  16276. # xHotspot, yHotspot; coordinates of the hotspot like 0 1 16 20 32 33 63 64
  16277. >>6 uleshort x \b, hotspot %ux
  16278. >>8 uleshort x \b%u
  16279. # cbSize; size of header or maybe file in bytes like 1Ah 4Eh 84Eh
  16280. >>2 ulelong x \b, cbSize %u
  16281. #>>2 ulelong x \b, cbSize %x
  16282. # offBits; offset to bitmap data (pixel array) like E4h 3Ah 66h 6Ah 33Ah 4A4h
  16283. >>10 ulelong x \b, bits offset %u
  16284. #>>10 ulelong x \b, bits offset 0x%x
  16285. #>>(10.l) ubequad !0 \b, bits 0x%16.16llx
  16286. # dib header size: 12~Ch~OS/2 1.x 64~40h~OS/2 2.x
  16287. #>>14 ulelong x \b, dib header size %u
  16288. #0 string CP PC color pointer image data
  16289. # URL: http://fileformats.archiveteam.org/wiki/OS/2_Pointer
  16290. # Reference: http://www.fileformat.info/format/os2bmp/egff.htm
  16291. 0 string CP
  16292. # skip many Corel Photo-Paint image "CPT9FILE" by checking for positive bits offset
  16293. >10 ulelong >0
  16294. # skip CPU-Z Report by checking for valid dib header sizes 12 or 64
  16295. >>14 ulelong =12
  16296. >>>0 use os2-ptr
  16297. >>14 ulelong =64
  16298. >>>0 use os2-ptr
  16299. # display information of OS/2 pointer bitmaps
  16300. 0 name os2-ptr
  16301. >14 ulelong x OS/2
  16302. # http://extension.nirsoft.net/PTR
  16303. !:mime image/x-ibm-pointer
  16304. !:ext ptr
  16305. >>14 ulelong 12 1.x color pointer
  16306. # image width and height fields are unsigned integers for OS/2
  16307. >>>18 uleshort x %u x
  16308. # stored height = 2 * real height
  16309. >>>20 uleshort/2 x %u
  16310. # number of bits per pixel (color depth). Typical 32 24 16 8 4 but only 1 found
  16311. >>>24 uleshort >1 x %u
  16312. # color planes; must be 1
  16313. #>>>22 uleshort >1 \b, %u color planes
  16314. >>14 ulelong 64 2.x color pointer
  16315. # image width and height
  16316. >>>18 ulelong x %u x
  16317. # stored height = 2 * real height
  16318. >>>22 ulelong/2 x %u
  16319. # number of bits per pixel (color depth). only 1 found
  16320. >>>28 uleshort >1 x %u
  16321. #>>>26 uleshort >1 \b, %u color planes
  16322. # compression method: 0~no 3~Huffman 1D
  16323. >>>30 ulelong 3 \b, Huffman 1D compression
  16324. #>>>30 ulelong >0 \b, %u compression
  16325. # xHotspot, yHotspot; coordinates of the hotspot like 0 3 4 8 15 16 23 27 31
  16326. >>6 uleshort x \b, hotspot %ux
  16327. >>8 uleshort x \b%u
  16328. # cbSize; size of header or maybe file in bytes like 1Ah 4Eh
  16329. >>2 ulelong x \b, cbSize %u
  16330. #>>2 ulelong x \b, cbSize %x
  16331. # offBits; offset to bitmap data (pixel array) like 6Ah A4h E4h 4A4h
  16332. >>10 ulelong x \b, bits offset %u
  16333. #>>10 ulelong x \b, bits offset 0x%x
  16334. #>>(10.l) ubequad !0 \b, bits 0x%16.16llx
  16335. # dib header size: 12~Ch~OS/2 1.x 64~40h~OS/2 2.x
  16336. #>>14 ulelong x \b, dib header size %u
  16337. # Conflicts with other entries [BABYL]
  16338. # URL: http://fileformats.archiveteam.org/wiki/BMP#OS.2F2_Bitmap_Array
  16339. # Note: container for OS/2 icon "IC", color icon "CI", color pointer "CP" or bitmap "BM"
  16340. #0 string BA PC bitmap array data
  16341. 0 string BA
  16342. # skip old Emacs RMAIL BABYL ./mail.news by checking for low header size
  16343. >2 ulelong <0x004c5942 OS/2 graphic array
  16344. !:mime image/x-os2-graphics
  16345. #!:apple ????BMPf
  16346. # cbSize; size of header like 28h 5Ch
  16347. >>2 ulelong x \b, cbSize %u
  16348. #>>2 ulelong x \b, cbSize 0x%x
  16349. # offNext; offset to data like 0 48h F2h 4Eh 64h C6h D2h D6h DAh E6h EAh 348h
  16350. >>6 ulelong >0 \b, data offset %u
  16351. #>>6 ulelong >0 \b, data offset 0x%x
  16352. #>>(6.l) ubequad !0 \b, data 0x%16.16llx
  16353. # dimensions of the intended device like 640 x 480 for VGA or 1024 x 768
  16354. >>10 uleshort >0 \b, display %u
  16355. >>>12 uleshort >0 x %u
  16356. # usType of first array element
  16357. #>>14 string x \b, usType %2.2s
  16358. # 1 space char after "1st"
  16359. # no *.bga examples found https://www.openwith.org/file-extensions/bga/1342
  16360. >>14 string BM \b; 1st
  16361. !:ext bmp/bga
  16362. >>14 string CI \b; 1st
  16363. !:ext ico
  16364. >>14 string CP \b; 1st
  16365. !:ext ico
  16366. >>14 string IC \b; 1st
  16367. !:ext ico
  16368. # no white-black pointer found
  16369. #>>14 string PT \b; 1st
  16370. #!:ext
  16371. >>14 indirect x
  16372. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  16373. 0 search/1 /*\ XPM\ */ X pixmap image text
  16374. !:mime image/x-xpmi
  16375. # Utah Raster Toolkit RLE images (janl@ifi.uio.no)
  16376. 0 leshort 0xcc52 RLE image data,
  16377. >6 leshort x %d x
  16378. >8 leshort x %d
  16379. >2 leshort >0 \b, lower left corner: %d
  16380. >4 leshort >0 \b, lower right corner: %d
  16381. >10 byte&0x1 =0x1 \b, clear first
  16382. >10 byte&0x2 =0x2 \b, no background
  16383. >10 byte&0x4 =0x4 \b, alpha channel
  16384. >10 byte&0x8 =0x8 \b, comment
  16385. >11 byte >0 \b, %d color channels
  16386. >12 byte >0 \b, %d bits per pixel
  16387. >13 byte >0 \b, %d color map channels
  16388. # image file format (Robert Potter, potter@cs.rochester.edu)
  16389. 0 string Imagefile\ version- iff image data
  16390. # this adds the whole header (inc. version number), informative but longish
  16391. >10 string >\0 %s
  16392. # Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com)
  16393. 0 belong 0x59a66a95 Sun raster image data
  16394. >4 belong >0 \b, %d x
  16395. >8 belong >0 %d,
  16396. >12 belong >0 %d-bit,
  16397. #>16 belong >0 %d bytes long,
  16398. >20 belong 0 old format,
  16399. #>20 belong 1 standard,
  16400. >20 belong 2 compressed,
  16401. >20 belong 3 RGB,
  16402. >20 belong 4 TIFF,
  16403. >20 belong 5 IFF,
  16404. >20 belong 0xffff reserved for testing,
  16405. >24 belong 0 no colormap
  16406. >24 belong 1 RGB colormap
  16407. >24 belong 2 raw colormap
  16408. #>28 belong >0 colormap is %d bytes long
  16409. # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com)
  16410. #
  16411. # See
  16412. # http://reality.sgi.com/grafica/sgiimage.html
  16413. #
  16414. 0 beshort 474 SGI image data
  16415. #>2 byte 0 \b, verbatim
  16416. >2 byte 1 \b, RLE
  16417. #>3 byte 1 \b, normal precision
  16418. >3 byte 2 \b, high precision
  16419. >4 beshort x \b, %d-D
  16420. >6 beshort x \b, %d x
  16421. >8 beshort x %d
  16422. >10 beshort x \b, %d channel
  16423. >10 beshort !1 \bs
  16424. >80 string >0 \b, "%s"
  16425. 0 string IT01 FIT image data
  16426. >4 belong x \b, %d x
  16427. >8 belong x %d x
  16428. >12 belong x %d
  16429. #
  16430. 0 string IT02 FIT image data
  16431. >4 belong x \b, %d x
  16432. >8 belong x %d x
  16433. >12 belong x %d
  16434. #
  16435. 2048 string PCD_IPI Kodak Photo CD image pack file
  16436. >0xe02 byte&0x03 0x00 , landscape mode
  16437. >0xe02 byte&0x03 0x01 , portrait mode
  16438. >0xe02 byte&0x03 0x02 , landscape mode
  16439. >0xe02 byte&0x03 0x03 , portrait mode
  16440. 0 string PCD_OPA Kodak Photo CD overview pack file
  16441. # FITS format. Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>
  16442. # FITS is the Flexible Image Transport System, the de facto standard for
  16443. # data and image transfer, storage, etc., for the astronomical community.
  16444. # (FITS floating point formats are big-endian.)
  16445. 0 string SIMPLE\ \ = FITS image data
  16446. !:mime image/fits
  16447. !:ext fits/fts
  16448. >109 string 8 \b, 8-bit, character or unsigned binary integer
  16449. >108 string 16 \b, 16-bit, two's complement binary integer
  16450. >107 string \ 32 \b, 32-bit, two's complement binary integer
  16451. >107 string -32 \b, 32-bit, floating point, single precision
  16452. >107 string -64 \b, 64-bit, floating point, double precision
  16453. # other images
  16454. 0 string This\ is\ a\ BitMap\ file Lisp Machine bit-array-file
  16455. # From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
  16456. # stuff.
  16457. #
  16458. 0 beshort 0x1010 PEX Binary Archive
  16459. # DICOM medical imaging data
  16460. # URL: https://en.wikipedia.org/wiki/DICOM#Data_format
  16461. # Note: "dcm" is the official file name extension
  16462. # XnView mention also "dc3" and "acr" as file name extension
  16463. 128 string DICM DICOM medical imaging data
  16464. !:mime application/dicom
  16465. !:ext dcm/dicom/dic
  16466. # XWD - X Window Dump file.
  16467. # As described in /usr/X11R6/include/X11/XWDFile.h
  16468. # used by the xwd program.
  16469. # Bradford Castalia, idaeim, 1/01
  16470. # updated by Adam Buchbinder, 2/09
  16471. # The following assumes version 7 of the format; the first long is the length
  16472. # of the header, which is at least 25 4-byte longs, and the one at offset 8
  16473. # is a constant which is always either 1 or 2. Offset 12 is the pixmap depth,
  16474. # which is a maximum of 32.
  16475. 0 belong >100
  16476. >8 belong <3
  16477. >>12 belong <33
  16478. >>>4 belong 7 XWD X Window Dump image data
  16479. !:mime image/x-xwindowdump
  16480. >>>>100 string >\0 \b, "%s"
  16481. >>>>16 belong x \b, %dx
  16482. >>>>20 belong x \b%dx
  16483. >>>>12 belong x \b%d
  16484. # PDS - Planetary Data System
  16485. # These files use Parameter Value Language in the header section.
  16486. # Unfortunately, there is no certain magic, but the following
  16487. # strings have been found to be most likely.
  16488. 0 string NJPL1I00 PDS (JPL) image data
  16489. 2 string NJPL1I PDS (JPL) image data
  16490. 0 string CCSD3ZF PDS (CCSD) image data
  16491. 2 string CCSD3Z PDS (CCSD) image data
  16492. 0 string PDS_ PDS image data
  16493. 0 string LBLSIZE= PDS (VICAR) image data
  16494. # pM8x: ATARI STAD compressed bitmap format
  16495. #
  16496. # from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001
  16497. # p M 8 5/6 xx yy zz data...
  16498. # Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
  16499. # bytes either run horizontally (pM85) or vertically (pM86). yy is the
  16500. # most frequent byte, xx and zz are runlength escape codes, where xx is
  16501. # used for runs of yy.
  16502. #
  16503. 0 string pM85 Atari ST STAD bitmap image data (hor)
  16504. >5 byte 0x00 (white background)
  16505. >5 byte 0xFF (black background)
  16506. 0 string pM86 Atari ST STAD bitmap image data (vert)
  16507. >5 byte 0x00 (white background)
  16508. >5 byte 0xFF (black background)
  16509. # From: Alex Myczko <alex@aiei.ch>
  16510. # https://www.atarimax.com/jindroush.atari.org/afmtatr.html
  16511. 0 leshort 0x0296 Atari ATR image
  16512. # XXX:
  16513. # This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
  16514. # magic.
  16515. # SGI RICE image file <mpruett@sgi.com>
  16516. #0 beshort 0x5249 RICE image
  16517. #>2 beshort x v%d
  16518. #>4 beshort x (%d x
  16519. #>6 beshort x %d)
  16520. #>8 beshort 0 8 bit
  16521. #>8 beshort 1 10 bit
  16522. #>8 beshort 2 12 bit
  16523. #>8 beshort 3 13 bit
  16524. #>10 beshort 0 4:2:2
  16525. #>10 beshort 1 4:2:2:4
  16526. #>10 beshort 2 4:4:4
  16527. #>10 beshort 3 4:4:4:4
  16528. #>12 beshort 1 RGB
  16529. #>12 beshort 2 CCIR601
  16530. #>12 beshort 3 RP175
  16531. #>12 beshort 4 YUV
  16532. # PCX image files
  16533. # From: Dan Fandrich <dan@coneharvesters.com>
  16534. # updated by Joerg Jenderek at Feb 2013 by https://de.wikipedia.org/wiki/PCX
  16535. # https://web.archive.org/web/20100206055706/http://www.qzx.com/pc-gpe/pcx.txt
  16536. # GRR: original test was still too general as it catches xbase examples T5.DBT,T6.DBT with 0xa000000
  16537. # test for bytes 0x0a,version byte (0,2,3,4,5),compression byte flag(0,1), bit depth (>0) of PCX or T5.DBT,T6.DBT
  16538. 0 ubelong&0xffF8fe00 0x0a000000
  16539. # for PCX bit depth > 0
  16540. >3 ubyte >0
  16541. # test for valid versions
  16542. >>1 ubyte <6
  16543. >>>1 ubyte !1 PCX
  16544. !:mime image/x-pcx
  16545. #!:mime image/pcx
  16546. >>>>1 ubyte 0 ver. 2.5 image data
  16547. >>>>1 ubyte 2 ver. 2.8 image data, with palette
  16548. >>>>1 ubyte 3 ver. 2.8 image data, without palette
  16549. >>>>1 ubyte 4 for Windows image data
  16550. >>>>1 ubyte 5 ver. 3.0 image data
  16551. >>>>4 uleshort x bounding box [%d,
  16552. >>>>6 uleshort x %d] -
  16553. >>>>8 uleshort x [%d,
  16554. >>>>10 uleshort x %d],
  16555. >>>>65 ubyte >1 %d planes each of
  16556. >>>>3 ubyte x %d-bit
  16557. >>>>68 byte 1 colour,
  16558. >>>>68 byte 2 grayscale,
  16559. # this should not happen
  16560. >>>>68 default x image,
  16561. >>>>12 leshort >0 %d x
  16562. >>>>>14 uleshort x %d dpi,
  16563. >>>>2 byte 0 uncompressed
  16564. >>>>2 byte 1 RLE compressed
  16565. # Adobe Photoshop
  16566. # From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
  16567. 0 string 8BPS Adobe Photoshop Image
  16568. !:mime image/vnd.adobe.photoshop
  16569. !:ext psd
  16570. >4 beshort 2 (PSB)
  16571. >18 belong x \b, %d x
  16572. >14 belong x %d,
  16573. >24 beshort 0 bitmap
  16574. >24 beshort 1 grayscale
  16575. >>12 beshort 2 with alpha
  16576. >24 beshort 2 indexed
  16577. >24 beshort 3 RGB
  16578. >>12 beshort 4 \bA
  16579. >24 beshort 4 CMYK
  16580. >>12 beshort 5 \bA
  16581. >24 beshort 7 multichannel
  16582. >24 beshort 8 duotone
  16583. >24 beshort 9 lab
  16584. >12 beshort > 1
  16585. >>12 beshort x \b, %dx
  16586. >12 beshort 1 \b,
  16587. >22 beshort x %d-bit channel
  16588. >12 beshort > 1 \bs
  16589. # XV thumbnail indicator (ThMO)
  16590. # URL: https://en.wikipedia.org/wiki/Xv_(software)
  16591. # Reference: http://fileformats.archiveteam.org/wiki/XV_thumbnail
  16592. # Update: Joerg Jenderek
  16593. 0 string P7\ 332 XV thumbnail image data
  16594. #0 string P7\ 332 XV "thumbnail file" (icon) data
  16595. !:mime image/x-xv-thumbnail
  16596. # thumbnail .xvpic/foo.bar for graphic foo.bar
  16597. !:ext p7/gif/tif/xpm/jpg
  16598. # NITF is defined by United States MIL-STD-2500A
  16599. 0 string NITF National Imagery Transmission Format
  16600. >25 string >\0 dated %.14s
  16601. # GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
  16602. # Format variations from: Bernd Nuernberger <bernd.nuernberger@web.de>
  16603. # Update: Joerg Jenderek
  16604. # See http://fileformats.archiveteam.org/wiki/GEM_Raster
  16605. # For variations, also see:
  16606. # https://www.seasip.info/Gem/ff_img.html (Ventura)
  16607. # http://www.atari-wiki.com/?title=IMG_file (XIMG, STTT)
  16608. # http://www.fileformat.info/format/gemraster/spec/index.htm (XIMG, STTT)
  16609. # http://sylvana.net/1stguide/1STGUIDE.ENG (TIMG)
  16610. 0 beshort 0x0001
  16611. # header_size
  16612. >2 beshort 0x0008
  16613. >>0 use gem_info
  16614. >2 beshort 0x0009
  16615. >>0 use gem_info
  16616. # no example for NOSIG
  16617. >2 beshort 24
  16618. >>0 use gem_info
  16619. # no example for HYPERPAINT
  16620. >2 beshort 25
  16621. >>0 use gem_info
  16622. 16 string XIMG\0
  16623. >0 use gem_info
  16624. # no example
  16625. 16 string STTT\0\x10
  16626. >0 use gem_info
  16627. # no example or description
  16628. 16 string TIMG\0
  16629. >0 use gem_info
  16630. 0 name gem_info
  16631. # version is 2 for some XIMG and 1 for all others
  16632. >0 beshort <0x0003 GEM
  16633. # https://www.snowstone.org.uk/riscos/mimeman/mimemap.txt
  16634. !:mime image/x-gem
  16635. # header_size 24 25 27 59 779 words for colored bitmaps
  16636. >>2 beshort >9
  16637. >>>16 string STTT\0\x10 STTT
  16638. >>>16 string TIMG\0 TIMG
  16639. # HYPERPAINT or NOSIG variant
  16640. >>>16 string \0\x80
  16641. >>>>2 beshort =24 NOSIG
  16642. >>>>2 beshort !24 HYPERPAINT
  16643. # NOSIG or XIMG variant
  16644. >>>16 default x
  16645. >>>>16 string !XIMG\0 NOSIG
  16646. >>16 string =XIMG\0 XIMG Image data
  16647. !:ext img/ximg
  16648. # to avoid Warning: Current entry does not yet have a description for adding a EXTENSION type
  16649. >>16 string !XIMG\0 Image data
  16650. !:ext img
  16651. # header_size is 9 for Ventura files and 8 for other GEM Paint files
  16652. >>2 beshort 9 (Ventura)
  16653. #>>2 beshort 8 (Paint)
  16654. >>12 beshort x %d x
  16655. >>14 beshort x %d,
  16656. # 1 4 8
  16657. >>4 beshort x %d planes,
  16658. # in tenths of a millimetre
  16659. >>8 beshort x %d x
  16660. >>10 beshort x %d pixelsize
  16661. # pattern_size 1-8. 2 for GEM Paint
  16662. >>6 beshort !2 \b, pattern size %d
  16663. # GEM Metafile (Wolfram Kleff)
  16664. 0 lelong 0x0018FFFF GEM Metafile data
  16665. >4 leshort x version %d
  16666. #
  16667. # SMJPEG. A custom Motion JPEG format used by Loki Entertainment
  16668. # Software Torbjorn Andersson <d91tan@Update.UU.SE>.
  16669. #
  16670. 0 string \0\nSMJPEG SMJPEG
  16671. >8 belong x %d.x data
  16672. # According to the specification you could find any number of _TXT
  16673. # headers here, but I can't think of any way of handling that. None of
  16674. # the SMJPEG files I tried it on used this feature. Even if such a
  16675. # file is encountered the output should still be reasonable.
  16676. >16 string _SND \b,
  16677. >>24 beshort >0 %d Hz
  16678. >>26 byte 8 8-bit
  16679. >>26 byte 16 16-bit
  16680. >>28 string NONE uncompressed
  16681. # >>28 string APCM ADPCM compressed
  16682. >>27 byte 1 mono
  16683. >>28 byte 2 stereo
  16684. # Help! Isn't there any way to avoid writing this part twice?
  16685. >>32 string _VID \b,
  16686. # >>>48 string JFIF JPEG
  16687. >>>40 belong >0 %d frames
  16688. >>>44 beshort >0 (%d x
  16689. >>>46 beshort >0 %d)
  16690. >16 string _VID \b,
  16691. # >>32 string JFIF JPEG
  16692. >>24 belong >0 %d frames
  16693. >>28 beshort >0 (%d x
  16694. >>30 beshort >0 %d)
  16695. 0 string Paint\ Shop\ Pro\ Image\ File Paint Shop Pro Image File
  16696. # taken from fkiss: (<yav@mte.biglobe.ne.jp> ?)
  16697. 0 string KiSS KISS/GS
  16698. >4 byte 16 color
  16699. >>5 byte x %d bit
  16700. >>8 leshort x %d colors
  16701. >>10 leshort x %d groups
  16702. >4 byte 32 cell
  16703. >>5 byte x %d bit
  16704. >>8 leshort x %d x
  16705. >>10 leshort x %d
  16706. >>12 leshort x +%d
  16707. >>14 leshort x +%d
  16708. # Webshots (www.webshots.com), by John Harrison
  16709. 0 string C\253\221g\230\0\0\0 Webshots Desktop .wbz file
  16710. # Hercules DASD image files
  16711. # From Jan Jaeger <jj@septa.nl>
  16712. 0 string CKD_P370 Hercules CKD DASD image file
  16713. >8 long x \b, %d heads per cylinder
  16714. >12 long x \b, track size %d bytes
  16715. >16 byte x \b, device type 33%2.2X
  16716. 0 string CKD_C370 Hercules compressed CKD DASD image file
  16717. >8 long x \b, %d heads per cylinder
  16718. >12 long x \b, track size %d bytes
  16719. >16 byte x \b, device type 33%2.2X
  16720. 0 string CKD_S370 Hercules CKD DASD shadow file
  16721. >8 long x \b, %d heads per cylinder
  16722. >12 long x \b, track size %d bytes
  16723. >16 byte x \b, device type 33%2.2X
  16724. # Squeak images and programs - etoffi@softhome.net
  16725. 0 string \146\031\0\0 Squeak image data
  16726. 0 search/1 'From\040Squeak Squeak program text
  16727. # partimage: file(1) magic for PartImage files (experimental, incomplete)
  16728. # Author: Hans-Joachim Baader <hjb@pro-linux.de>
  16729. 0 string PaRtImAgE-VoLuMe PartImage
  16730. >0x0020 string 0.6.1 file version %s
  16731. >>0x0060 lelong >-1 volume %d
  16732. #>>0x0064 8 byte identifier
  16733. #>>0x007c reserved
  16734. >>0x0200 string >\0 type %s
  16735. >>0x1400 string >\0 device %s,
  16736. >>0x1600 string >\0 original filename %s,
  16737. # Some fields omitted
  16738. >>0x2744 lelong 0 not compressed
  16739. >>0x2744 lelong 1 gzip compressed
  16740. >>0x2744 lelong 2 bzip2 compressed
  16741. >>0x2744 lelong >2 compressed with unknown algorithm
  16742. >0x0020 string >0.6.1 file version %s
  16743. >0x0020 string <0.6.1 file version %s
  16744. # DCX is multi-page PCX, using a simple header of up to 1024
  16745. # offsets for the respective PCX components.
  16746. # From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
  16747. 0 lelong 987654321 DCX multi-page PCX image data
  16748. # Simon Walton <simonw@matteworld.com>
  16749. # Kodak Cineon format for scanned negatives
  16750. # http://www.kodak.com/US/en/motion/support/dlad/
  16751. 0 lelong 0xd75f2a80 Cineon image data
  16752. >200 belong >0 \b, %d x
  16753. >204 belong >0 %d
  16754. # Bio-Rad .PIC is an image format used by microscope control systems
  16755. # and related image processing software used by biologists.
  16756. # From: Vebjorn Ljosa <vebjorn@ljosa.com>
  16757. # BOOL values are two-byte integers; use them to rule out false positives.
  16758. # https://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
  16759. # Samples: https://www.loci.wisc.edu/software/sample-data
  16760. 14 leshort <2
  16761. >62 leshort <2
  16762. >>54 leshort 12345 Bio-Rad .PIC Image File
  16763. >>>0 leshort >0 %d x
  16764. >>>2 leshort >0 %d,
  16765. >>>4 leshort =1 1 image in file
  16766. >>>4 leshort >1 %d images in file
  16767. # From Jan "Yenya" Kasprzak <kas@fi.muni.cz>
  16768. # The description of *.mrw format can be found at
  16769. # http://www.dalibor.cz/minolta/raw_file_format.htm
  16770. 0 string \000MRM Minolta Dimage camera raw image data
  16771. # Summary: DjVu image / document
  16772. # Extension: .djvu
  16773. # Reference: http://djvu.org/docs/DjVu3Spec.djvu
  16774. # Submitted by: Stephane Loeuillet <stephane.loeuillet@tiscali.fr>
  16775. # Modified by (1): Abel Cheung <abelcheung@gmail.com>
  16776. 0 string AT&TFORM
  16777. >12 string DJVM DjVu multiple page document
  16778. !:mime image/vnd.djvu
  16779. >12 string DJVU DjVu image or single page document
  16780. !:mime image/vnd.djvu
  16781. >12 string DJVI DjVu shared document
  16782. !:mime image/vnd.djvu
  16783. >12 string THUM DjVu page thumbnails
  16784. !:mime image/vnd.djvu
  16785. # Originally by Marc Espie
  16786. # Modified by Robert Minsk <robertminsk at yahoo.com>
  16787. # https://www.openexr.com/openexrfilelayout.pdf
  16788. 0 lelong 20000630 OpenEXR image data,
  16789. !:mime image/x-exr
  16790. >4 lelong&0x000000ff x version %d,
  16791. >4 lelong ^0x00000200 storage: scanline
  16792. >4 lelong &0x00000200 storage: tiled
  16793. >8 search/0x1000 compression\0 \b, compression:
  16794. >>&16 byte 0 none
  16795. >>&16 byte 1 rle
  16796. >>&16 byte 2 zips
  16797. >>&16 byte 3 zip
  16798. >>&16 byte 4 piz
  16799. >>&16 byte 5 pxr24
  16800. >>&16 byte 6 b44
  16801. >>&16 byte 7 b44a
  16802. >>&16 byte 8 dwaa
  16803. >>&16 byte 9 dwab
  16804. >>&16 byte >9 unknown
  16805. >8 search/0x1000 dataWindow\0 \b, dataWindow:
  16806. >>&10 lelong x (%d
  16807. >>&14 lelong x %d)-
  16808. >>&18 lelong x \b(%d
  16809. >>&22 lelong x %d)
  16810. >8 search/0x1000 displayWindow\0 \b, displayWindow:
  16811. >>&10 lelong x (%d
  16812. >>&14 lelong x %d)-
  16813. >>&18 lelong x \b(%d
  16814. >>&22 lelong x %d)
  16815. >8 search/0x1000 lineOrder\0 \b, lineOrder:
  16816. >>&14 byte 0 increasing y
  16817. >>&14 byte 1 decreasing y
  16818. >>&14 byte 2 random y
  16819. >>&14 byte >2 unknown
  16820. # SMPTE Digital Picture Exchange Format, SMPTE DPX
  16821. #
  16822. # ANSI/SMPTE 268M-1994, SMPTE Standard for File Format for Digital
  16823. # Moving-Picture Exchange (DPX), v1.0, 18 February 1994
  16824. # Robert Minsk <robertminsk at yahoo.com>
  16825. # Modified by Harry Mallon <hjmallon at gmail.com>
  16826. 0 string SDPX DPX image data, big-endian,
  16827. !:mime image/x-dpx
  16828. >0 use dpx_info
  16829. 0 string XPDS DPX image data, little-endian,
  16830. !:mime image/x-dpx
  16831. >0 use \^dpx_info
  16832. 0 name dpx_info
  16833. >768 beshort <4
  16834. >>772 belong x %dx
  16835. >>776 belong x \b%d,
  16836. >768 beshort >3
  16837. >>776 belong x %dx
  16838. >>772 belong x \b%d,
  16839. >768 beshort 0 left to right/top to bottom
  16840. >768 beshort 1 right to left/top to bottom
  16841. >768 beshort 2 left to right/bottom to top
  16842. >768 beshort 3 right to left/bottom to top
  16843. >768 beshort 4 top to bottom/left to right
  16844. >768 beshort 5 top to bottom/right to left
  16845. >768 beshort 6 bottom to top/left to right
  16846. >768 beshort 7 bottom to top/right to left
  16847. # From: Tom Hilinski <tom.hilinski@comcast.net>
  16848. # https://www.unidata.ucar.edu/packages/netcdf/
  16849. 0 string CDF\001 NetCDF Data Format data
  16850. # 64-bit offset netcdf Classic https://www.unidata.ucar.edu/software/netcdf/docs/file_format_specifications
  16851. 0 string CDF\002 NetCDF Data Format data (64-bit offset)
  16852. #-----------------------------------------------------------------------
  16853. # Hierarchical Data Format, used to facilitate scientific data exchange
  16854. # specifications at http://hdf.ncsa.uiuc.edu/
  16855. 0 belong 0x0e031301 Hierarchical Data Format (version 4) data
  16856. !:mime application/x-hdf
  16857. 0 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) data
  16858. !:mime application/x-hdf
  16859. 512 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 512 bytes user block
  16860. !:mime application/x-hdf
  16861. 1024 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 1k user block
  16862. !:mime application/x-hdf
  16863. 2048 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 2k user block
  16864. !:mime application/x-hdf
  16865. 4096 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 4k user block
  16866. !:mime application/x-hdf
  16867. # From: Tobias Burnus <burnus@net-b.de>
  16868. # Xara (for a while: Corel Xara) is a graphic package, see
  16869. # http://www.xara.com/ for Windows and as GPL application for Linux
  16870. 0 string XARA\243\243 Xara graphics file
  16871. # From: Joerg Jenderek
  16872. # URL: http://fileformats.archiveteam.org/wiki/Corel_Gallery
  16873. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bmf-corel.trid.xml
  16874. # Note: called "Corel Binary Material Format" by TrID and
  16875. # "Corel Flow" by XnView
  16876. 0 string @CorelBMF\n\rCorel\040Corporation Corel GALLERY Clipart
  16877. !:mime image/x-corel-bmf
  16878. !:ext bmf
  16879. # https://www.cartesianinc.com/Tech/
  16880. # Reference: http://fileformats.archiveteam.org/wiki/Cartesian_Perceptual_Compression
  16881. 0 string CPC\262 Cartesian Perceptual Compression image
  16882. !:mime image/x-cpi
  16883. !:ext cpi/cpc
  16884. # From Albert Cahalan <acahalan@gmail.com>
  16885. # puredigital used it for the CVS disposable camcorder
  16886. #8 lelong 4 ZBM bitmap image data
  16887. #>4 leshort x %u x
  16888. #>6 leshort x %u
  16889. # From Albert Cahalan <acahalan@gmail.com>
  16890. # uncompressed 5:6:5 HighColor image for OLPC XO firmware icons
  16891. 0 string C565 OLPC firmware icon image data
  16892. >4 leshort x %u x
  16893. >6 leshort x %u
  16894. # Applied Images - Image files from Cytovision
  16895. # Gustavo Junior Alves <gjalves@gjalves.com.br>
  16896. 0 string \xce\xda\xde\xfa Cytovision Metaphases file
  16897. 0 string \xed\xad\xef\xac Cytovision Karyotype file
  16898. 0 string \x0b\x00\x03\x00 Cytovision FISH Probe file
  16899. 0 string \xed\xfe\xda\xbe Cytovision FLEX file
  16900. 0 string \xed\xab\xed\xfe Cytovision FLEX file
  16901. 0 string \xad\xfd\xea\xad Cytovision RATS file
  16902. # Wavelet Scalar Quantization format used in gray-scale fingerprint images
  16903. # From Tano M Fotang <mfotang@quanteq.com>
  16904. 0 string \xff\xa0\xff\xa8\x00 Wavelet Scalar Quantization image data
  16905. # Type: PCO B16 image files
  16906. # URL: http://www.pco.de/fileadmin/user_upload/db/download/MA_CWDCOPIE_0412b.pdf
  16907. # From: Florian Philipp <florian.philipp@binarywings.net>
  16908. # Extension: .b16
  16909. # Description: Pixel image format produced by PCO Camware, typically used
  16910. # together with PCO cameras.
  16911. # Note: Different versions exist for e.g. 8 bit and 16 bit images.
  16912. # Documentation is incomplete.
  16913. 0 string/b PCO- PCO B16 image data
  16914. >12 lelong x \b, %dx
  16915. >16 lelong x \b%d
  16916. >20 lelong 0 \b, short header
  16917. >20 lelong -1 \b, extended header
  16918. >>24 lelong 0 \b, grayscale
  16919. >>>36 lelong 0 linear LUT
  16920. >>>36 lelong 1 logarithmic LUT
  16921. >>>28 lelong x [%d
  16922. >>>32 lelong x \b,%d]
  16923. >>24 lelong 1 \b, color
  16924. >>>64 lelong 0 linear LUT
  16925. >>>64 lelong 1 logarithmic LUT
  16926. >>>40 lelong x r[%d
  16927. >>>44 lelong x \b,%d]
  16928. >>>48 lelong x g[%d
  16929. >>>52 lelong x \b,%d]
  16930. >>>56 lelong x b[%d
  16931. >>>60 lelong x \b,%d]
  16932. # Polar Monitor Bitmap (.pmb) used as logo for Polar Electro watches
  16933. # From: Markus Heidelberg <markus.heidelberg at web.de>
  16934. 0 string/t [BitmapInfo2] Polar Monitor Bitmap text
  16935. !:mime image/x-polar-monitor-bitmap
  16936. # From: Rick Richardson <rickrich@gmail.com>
  16937. # updated by: Joerg Jenderek
  16938. # URL: http://techmods.net/nuvi/
  16939. 0 string GARMIN\ BITMAP\ 01 Garmin Bitmap file
  16940. # extension is also used for
  16941. # Sony SRF raw image (image/x-sony-srf)
  16942. # SRF map
  16943. # Terragen Surface Map (https://www.planetside.co.uk/terragen)
  16944. # FileLocator Pro search criteria file (https://www.mythicsoft.com/filelocatorpro)
  16945. !:ext srf
  16946. #!:mime image/x-garmin-srf
  16947. # version 1.00,2.00,2.10,2.40,2.50
  16948. >0x2f string >0 \b, version %4.4s
  16949. # width (2880,2881,3240)
  16950. >0x55 uleshort >0 \b, %dx
  16951. # height (80,90)
  16952. >>0x53 uleshort x \b%d
  16953. # Type: Ulead Photo Explorer5 (.pe5)
  16954. # URL: http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese)
  16955. # From: Simon Horman <horms@debian.org>
  16956. 0 string IIO2H Ulead Photo Explorer5
  16957. # Type: X11 cursor
  16958. # URL: http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup
  16959. # From: Mathias Brodala <info@noctus.net>
  16960. 0 string Xcur X11 cursor
  16961. # Type: Olympus ORF raw images.
  16962. # URL: https://libopenraw.freedesktop.org/wiki/Olympus_ORF
  16963. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  16964. 0 string MMOR Olympus ORF raw image data, big-endian
  16965. !:mime image/x-olympus-orf
  16966. 0 string IIRO Olympus ORF raw image data, little-endian
  16967. !:mime image/x-olympus-orf
  16968. 0 string IIRS Olympus ORF raw image data, little-endian
  16969. !:mime image/x-olympus-orf
  16970. # Type: files used in modern AVCHD camcoders to store clip information
  16971. # Extension: .cpi
  16972. # From: Alexander Danilov <alexander.a.danilov@gmail.com>
  16973. 0 string HDMV0100 AVCHD Clip Information
  16974. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  16975. # URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/
  16976. # Radiance HDR; usually has .pic or .hdr extension.
  16977. 0 string #?RADIANCE\n Radiance HDR image data
  16978. #!mime image/vnd.radiance
  16979. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  16980. # URL: https://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf
  16981. # Used by the pfstools packages. The regex matches for the image size could
  16982. # probably use some work. The MIME type is made up; if there's one in
  16983. # actual common use, it should replace the one below.
  16984. 0 string PFS1\x0a PFS HDR image data
  16985. #!mime image/x-pfs
  16986. >1 regex [0-9]*\ \b, %s
  16987. >>1 regex \ [0-9]{4} \bx%s
  16988. # Type: Foveon X3F
  16989. # URL: https://www.photofo.com/downloads/x3f-raw-format.pdf
  16990. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  16991. # Note that the MIME type isn't defined anywhere that I can find; if
  16992. # there's a canonical type for this format, it should replace this one.
  16993. 0 string FOVb Foveon X3F raw image data
  16994. !:mime image/x-x3f
  16995. >6 leshort x \b, version %d.
  16996. >4 leshort x \b%d
  16997. >28 lelong x \b, %dx
  16998. >32 lelong x \b%d
  16999. # Paint.NET file
  17000. # From Adam Buchbinder <adam.buchbinder@gmail.com>
  17001. 0 string PDN3 Paint.NET image data
  17002. !:mime image/x-paintnet
  17003. # Not really an image.
  17004. # From: "Tano M. Fotang" <mfotang@quanteq.com>
  17005. 0 string \x46\x4d\x52\x00 ISO/IEC 19794-2 Format Minutiae Record (FMR)
  17006. # doc: https://www.shikino.co.jp/eng/products/images/FLOWER.jpg.zip
  17007. # example: https://www.shikino.co.jp/eng/products/images/FLOWER.wdp.zip
  17008. 90 bequad 0x574D50484F544F00 JPEG-XR Image
  17009. >98 byte&0x08 =0x08 \b, hard tiling
  17010. >99 byte&0x80 =0x80 \b, tiling present
  17011. >99 byte&0x40 =0x40 \b, codestream present
  17012. >99 byte&0x38 x \b, spatial xform=
  17013. >99 byte&0x38 0x00 \bTL
  17014. >99 byte&0x38 0x08 \bBL
  17015. >99 byte&0x38 0x10 \bTR
  17016. >99 byte&0x38 0x18 \bBR
  17017. >99 byte&0x38 0x20 \bBT
  17018. >99 byte&0x38 0x28 \bRB
  17019. >99 byte&0x38 0x30 \bLT
  17020. >99 byte&0x38 0x38 \bLB
  17021. >100 byte&0x80 =0x80 \b, short header
  17022. >>102 beshort+1 x \b, %d
  17023. >>104 beshort+1 x \bx%d
  17024. >100 byte&0x80 =0x00 \b, long header
  17025. >>102 belong+1 x \b, %x
  17026. >>106 belong+1 x \bx%x
  17027. >101 beshort&0xf x \b, bitdepth=
  17028. >>101 beshort&0xf 0x0 \b1-WHITE=1
  17029. >>101 beshort&0xf 0x1 \b8
  17030. >>101 beshort&0xf 0x2 \b16
  17031. >>101 beshort&0xf 0x3 \b16-SIGNED
  17032. >>101 beshort&0xf 0x4 \b16-FLOAT
  17033. >>101 beshort&0xf 0x5 \b(reserved 5)
  17034. >>101 beshort&0xf 0x6 \b32-SIGNED
  17035. >>101 beshort&0xf 0x7 \b32-FLOAT
  17036. >>101 beshort&0xf 0x8 \b5
  17037. >>101 beshort&0xf 0x9 \b10
  17038. >>101 beshort&0xf 0xa \b5-6-5
  17039. >>101 beshort&0xf 0xb \b(reserved %d)
  17040. >>101 beshort&0xf 0xc \b(reserved %d)
  17041. >>101 beshort&0xf 0xd \b(reserved %d)
  17042. >>101 beshort&0xf 0xe \b(reserved %d)
  17043. >>101 beshort&0xf 0xf \b1-BLACK=1
  17044. >101 beshort&0xf0 x \b, colorfmt=
  17045. >>101 beshort&0xf0 0x00 \bYONLY
  17046. >>101 beshort&0xf0 0x10 \bYUV240
  17047. >>101 beshort&0xf0 0x20 \bYWV422
  17048. >>101 beshort&0xf0 0x30 \bYWV444
  17049. >>101 beshort&0xf0 0x40 \bCMYK
  17050. >>101 beshort&0xf0 0x50 \bCMYKDIRECT
  17051. >>101 beshort&0xf0 0x60 \bNCOMPONENT
  17052. >>101 beshort&0xf0 0x70 \bRGB
  17053. >>101 beshort&0xf0 0x80 \bRGBE
  17054. >>101 beshort&0xf0 >0x80 \b(reserved 0x%x)
  17055. # From: Johan van der Knijff <johan.vanderknijff@kb.nl>
  17056. #
  17057. # BPG (Better Portable Graphics) format
  17058. # https://bellard.org/bpg/
  17059. # http://fileformats.archiveteam.org/wiki/BPG
  17060. #
  17061. 0 string \x42\x50\x47\xFB BPG (Better Portable Graphics)
  17062. !:mime image/bpg
  17063. # From: Joerg Jenderek
  17064. # URL: https://en.wikipedia.org/wiki/Apple_Icon_Image_format
  17065. 0 string icns Mac OS X icon
  17066. !:mime image/x-icns
  17067. !:apple ????icns
  17068. !:ext icns
  17069. >4 ubelong >0
  17070. # file size
  17071. >>4 ubelong x \b, %d bytes
  17072. # icon type
  17073. >>8 string x \b, "%4.4s" type
  17074. # TIM images
  17075. 0 lelong 0x00000010 TIM image,
  17076. >4 lelong 0x8 4-Bit,
  17077. >4 lelong 0x9 8-Bit,
  17078. >4 lelong 0x2 15-Bit,
  17079. >4 lelong 0x3 24-Bit,
  17080. >4 lelong &8
  17081. >>(8.l+12) leshort x Pixel at (%d,
  17082. >>(8.l+14) leshort x \b%d)
  17083. >>(8.l+16) leshort x Size=%dx
  17084. >>(8.l+18) leshort x \b%d,
  17085. >>4 lelong 0x8 16 CLUT Entries at
  17086. >>4 lelong 0x9 256 CLUT Entries at
  17087. >>12 leshort x (%d,
  17088. >>14 leshort x \b%d)
  17089. >4 lelong ^8
  17090. >>12 leshort x Pixel at (%d,
  17091. >>14 leshort x \b%d)
  17092. >>16 leshort x Size=%dx
  17093. >>18 leshort x \b%d
  17094. # MDEC streams
  17095. 0 lelong 0x80010160 MDEC video stream,
  17096. >16 leshort x %dx
  17097. >18 leshort x \b%d
  17098. #>8 lelong x %d frames
  17099. #>4 leshort x secCount=%d;
  17100. #>6 leshort x nSectors=%d;
  17101. #>12 lelong x frameSize=%d;
  17102. # BS encoded bitstreams
  17103. 2 leshort 0x3800 BS image,
  17104. >6 leshort x Version %d,
  17105. >4 leshort x Quantization %d,
  17106. >0 leshort x (Decompresses to %d words)
  17107. # Type: farbfeld image.
  17108. # Url: http://tools.suckless.org/farbfeld/
  17109. # From: Ian D. Scott <ian@iandouglasscott.com>
  17110. #
  17111. 0 string farbfeld farbfeld image data,
  17112. >8 ubelong x %dx
  17113. >12 ubelong x \b%d
  17114. # Type: Microsoft DirectDraw Surface (common data)
  17115. # URL: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp
  17116. # From: Morten Hustveit <morten@debian.org>
  17117. # Updated by: David Korth <gerbilsoft@gerbilsoft.com>
  17118. 0 name ms-directdraw-surface
  17119. >0x10 ulelong x %u x
  17120. >0x0C ulelong x %u
  17121. # Color depth.
  17122. >0x58 ulelong >0 \b, %u-bit color
  17123. # Determine the pixel format.
  17124. >0x50 ulelong&0x4 4
  17125. # FIXME: Handle DX10 and XBOX formats.
  17126. >>0x54 string x \b, compressed using %.4s
  17127. >0x50 ulelong&0x2 0x2 \b, alpha only
  17128. >0x50 ulelong&0x200 0x200 \b, YUV
  17129. >0x50 ulelong&0x20000 0x20000 \b, luminance
  17130. # RGB pixel format
  17131. >0x50 ulelong&0x40 0x40
  17132. # Determine the RGB format using the color masks.
  17133. # ulequad order: 0xGGGGGGGGRRRRRRRR, 0xAAAAAAAABBBBBBBB
  17134. >>0x58 ulelong 16
  17135. # NOTE: 15-bit color formats usually have 16-bit listed as the color depth.
  17136. >>>0x5C ulequad 0x000003E000007C00
  17137. >>>>0x64 ulequad 0x000000000000001F \b, RGB555
  17138. >>>0x5C ulequad 0x000003E000001F00
  17139. >>>>0x64 ulequad 0x000000000000007C \b, BGR555
  17140. >>>0x5C ulequad 0x000007E00000F800
  17141. >>>>0x64 ulequad 0x000000000000001F \b, RGB565
  17142. >>>0x5C ulequad 0x000007E000001F00
  17143. >>>>0x64 ulequad 0x00000000000000F8 \b, BGR565
  17144. >>>0x5C ulequad 0x000000F000000F00
  17145. >>>>0x64 ulequad 0x0000F0000000000F \b, ARGB4444
  17146. >>>0x5C ulequad 0x000000F00000000F
  17147. >>>>0x64 ulequad 0x0000F00000000F00 \b, ABGR4444
  17148. >>>0x5C ulequad 0x00000F000000F000
  17149. >>>>0x64 ulequad 0x0000000F000000F0 \b, RGBA4444
  17150. >>>0x5C ulequad 0x00000F00000000F0
  17151. >>>>0x64 ulequad 0x0000000F0000F000 \b, BGRA4444
  17152. >>>0x5C ulequad 0x000000F000000F00
  17153. >>>>0x64 ulequad 0x000000000000000F \b, xRGB4444
  17154. >>>0x5C ulequad 0x000000F00000000F
  17155. >>>>0x64 ulequad 0x0000000000000F00 \b, xBGR4444
  17156. >>>0x5C ulequad 0x00000F000000F000
  17157. >>>>0x64 ulequad 0x00000000000000F0 \b, RGBx4444
  17158. >>>0x5C ulequad 0x00000F00000000F0
  17159. >>>>0x64 ulequad 0x000000000000F000 \b, BGRx4444
  17160. >>>0x5C ulequad 0x000003E000007C00
  17161. >>>>0x64 ulequad 0x000080000000001F \b, ARGB1555
  17162. >>>0x5C ulequad 0x000003E000001F00
  17163. >>>>0x64 ulequad 0x000080000000007C \b, ABGR1555
  17164. >>>0x5C ulequad 0x000007C00000F800
  17165. >>>>0x64 ulequad 0x000000010000003E \b, RGBA5551
  17166. >>>0x5C ulequad 0x000007C00000003E
  17167. >>>>0x64 ulequad 0x000000010000F800 \b, BGRA5551
  17168. >>88 ulelong 24
  17169. >>>0x5C ulequad 0x0000FF0000FF0000
  17170. >>>>0x64 ulequad 0x00000000000000FF \b, RGB888
  17171. >>>0x5C ulequad 0x0000FF00000000FF
  17172. >>>>0x64 ulequad 0x0000000000FF0000 \b, BGR888
  17173. >>88 ulelong 32
  17174. >>>0x5C ulequad 0x0000FF0000FF0000
  17175. >>>>0x64 ulequad 0xFF000000000000FF \b, ARGB8888
  17176. >>>0x5C ulequad 0x0000FF00000000FF
  17177. >>>>0x64 ulequad 0xFF00000000FF0000 \b, ABGR8888
  17178. >>>0x5C ulequad 0x00FF0000FF000000
  17179. >>>>0x64 ulequad 0x000000FF0000FF00 \b, RGBA8888
  17180. >>>0x5C ulequad 0x00FF00000000FF00
  17181. >>>>0x64 ulequad 0x000000FFFF000000 \b, BGBA8888
  17182. >>>0x5C ulequad 0x0000FF0000FF0000
  17183. >>>>0x64 ulequad 0x00000000000000FF \b, xRGB8888
  17184. >>>0x5C ulequad 0x0000FF00000000FF
  17185. >>>>0x64 ulequad 0x0000000000FF0000 \b, xBGR8888
  17186. >>>0x5C ulequad 0x00FF0000FF000000
  17187. >>>>0x64 ulequad 0x000000000000FF00 \b, RGBx8888
  17188. >>>0x5C ulequad 0x00FF00000000FF00
  17189. >>>>0x64 ulequad 0x00000000FF000000 \b, BGBx8888
  17190. # Less common 32-bit color formats.
  17191. >>>0x5C ulequad 0xFFFF00000000FFFF
  17192. >>>>0x64 ulequad 0x0000000000000000 \b, G16R16
  17193. >>>0x5C ulequad 0x0000FFFFFFFF0000
  17194. >>>>0x64 ulequad 0x0000000000000000 \b, R16G16
  17195. >>>0x5C ulequad 0x000FFC003FF00000
  17196. >>>>0x64 ulequad 0xC0000000000003FF \b, A2R10G10B10
  17197. >>>0x5C ulequad 0x000FFC00000003FF
  17198. >>>>0x64 ulequad 0xC00000003FF00000 \b, A2B10G10R10
  17199. # Type: Microsoft DirectDraw Surface
  17200. # URL: https://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp
  17201. # From: Morten Hustveit <morten@debian.org>
  17202. # Updated by: David Korth <gerbilsoft@gerbilsoft.com>
  17203. 0 string/b DDS\040\174\000\000\000 Microsoft DirectDraw Surface (DDS):
  17204. >0 use ms-directdraw-surface
  17205. # Type: Sega PVR image.
  17206. # From: David Korth <gerbilsoft@gerbilsoft.com>
  17207. # References:
  17208. # - https://fabiensanglard.net/Mykaruga/tools/segaPVRFormat.txt
  17209. # - https://github.com/yazgoo/pvrx2png
  17210. # - https://github.com/nickworonekin/puyotools
  17211. # Sega PVR header.
  17212. 0 name sega-pvr-image-header
  17213. >0x0C leshort x %u x
  17214. >0x0E leshort x %u
  17215. # Image format.
  17216. >0x08 byte 0 \b, ARGB1555
  17217. >0x08 byte 1 \b, RGB565
  17218. >0x08 byte 2 \b, ARGB4444
  17219. >0x08 byte 3 \b, YUV442
  17220. >0x08 byte 4 \b, Bump
  17221. >0x08 byte 5 \b, 4bpp
  17222. >0x08 byte 6 \b, 8bpp
  17223. # Image data type.
  17224. >0x09 byte 0x01 \b, square twiddled
  17225. >0x09 byte 0x02 \b, square twiddled & mipmap
  17226. >0x09 byte 0x03 \b, VQ
  17227. >0x09 byte 0x04 \b, VQ & mipmap
  17228. >0x09 byte 0x05 \b, 8-bit CLUT twiddled
  17229. >0x09 byte 0x06 \b, 4-bit CLUT twiddled
  17230. >0x09 byte 0x07 \b, 8-bit direct twiddled
  17231. >0x09 byte 0x08 \b, 4-bit direct twiddled
  17232. >0x09 byte 0x09 \b, rectangle
  17233. >0x09 byte 0x0B \b, rectangular stride
  17234. >0x09 byte 0x0D \b, rectangular twiddled
  17235. >0x09 byte 0x10 \b, small VQ
  17236. >0x09 byte 0x11 \b, small VQ & mipmap
  17237. >0x09 byte 0x12 \b, square twiddled & mipmap
  17238. # Sega PVR image.
  17239. 0 string PVRT
  17240. >0x10 string DDS\040\174\000\000\000 Sega PVR (Xbox) image:
  17241. >>0x20 use ms-directdraw-surface
  17242. >0x10 belong !0x44445320 Sega PVR image:
  17243. >>0 use sega-pvr-image-header
  17244. # Sega PVR image with GBIX.
  17245. 0 string GBIX
  17246. >0x10 string PVRT
  17247. >>0x10 string DDS\040\174\000\000\000 Sega PVR (Xbox) image:
  17248. >>>0x20 use ms-directdraw-surface
  17249. >>0x10 belong !0x44445320 Sega PVR image:
  17250. >>>0x10 use sega-pvr-image-header
  17251. >>0x08 lelong x \b, global index = %u
  17252. # Sega GVR header.
  17253. 0 name sega-gvr-image-header
  17254. >0x0C beshort x %u x
  17255. >0x0E beshort x %u
  17256. # Image data format.
  17257. >0x0B byte 0 \b, I4
  17258. >0x0B byte 1 \b, I8
  17259. >0x0B byte 2 \b, IA4
  17260. >0x0B byte 3 \b, IA8
  17261. >0x0B byte 4 \b, RGB565
  17262. >0x0B byte 5 \b, RGB5A3
  17263. >0x0B byte 6 \b, ARGB8888
  17264. >0x0B byte 8 \b, CI4
  17265. >0x0B byte 9 \b, CI8
  17266. >0x0B byte 14 \b, DXT1
  17267. # Sega GVR image.
  17268. 0 string GVRT Sega GVR image:
  17269. >0x10 use sega-gvr-image-header
  17270. # Sega GVR image with GBIX.
  17271. 0 string GBIX
  17272. >0x10 string GVRT Sega GVR image:
  17273. >>0x10 use sega-gvr-image-header
  17274. >>0x08 belong x \b, global index = %u
  17275. # Sega GVR image with GCIX. (Wii)
  17276. 0 string GCIX
  17277. >0x10 string GVRT Sega GVR image:
  17278. >>0x10 use sega-gvr-image-header
  17279. >>0x08 belong x \b, global index = %u
  17280. # Light Field Picture
  17281. # Documentation: http://optics.miloush.net/lytro/TheFileFormat.aspx
  17282. # Typical file extensions: .lfp .lfr .lfx
  17283. 0 belong 0x894C4650
  17284. >4 belong 0x0D0A1A0A
  17285. >12 belong 0x00000000 Lytro Light Field Picture
  17286. >8 belong x \b, version %d
  17287. # Type: Vision Research Phantom CINE Format
  17288. # URL: https://www.phantomhighspeed.com/
  17289. # URL2: http://phantomhighspeed.force.com/vriknowledge/servlet/fileField?id=0BEU0000000Cfyk
  17290. # From: Harry Mallon <hjmallon at gmail.com>
  17291. #
  17292. # This has a short "CI" code but the 44 is the size of the struct which is
  17293. # stable
  17294. 0 string CI
  17295. >2 leshort 44 Vision Research CINE Video,
  17296. >>4 leshort 0 Grayscale,
  17297. >>4 leshort 1 JPEG Compressed,
  17298. >>4 leshort 2 RAW,
  17299. >>6 leshort x version %d,
  17300. >>20 lelong x %d frames,
  17301. >>48 lelong x %dx
  17302. >>52 lelong x \b%d
  17303. # Type: ARRI Raw Image
  17304. # Info: SMPTE RDD30:2014
  17305. # From: Harry Mallon <hjmallon at gmail.com>
  17306. 0 string ARRI ARRI ARI image data,
  17307. >4 lelong 0x78563412 little-endian,
  17308. >4 lelong 0x12345678 big-endian,
  17309. >12 lelong x version %d,
  17310. >20 lelong x %dx
  17311. >24 lelong x \b%d
  17312. # Type: Khronos KTX texture.
  17313. # From: David Korth <gerbilsoft@gerbilsoft.com>
  17314. # Reference: https://www.khronos.org/opengles/sdk/tools/KTX/file_format_spec/
  17315. # glEnum decoding.
  17316. # NOTE: Only the most common formats are listed here.
  17317. 0 name khronos-ktx-glEnum
  17318. >0 lelong 0x1907 \b, RGB
  17319. >0 lelong 0x1908 \b, RGBA
  17320. >0 lelong 0x1909 \b, LUMINANCE
  17321. >0 lelong 0x190A \b, LUMINANCE_ALPHA
  17322. >0 lelong 0x80E1 \b, BGR
  17323. >0 lelong 0x80E2 \b, BGRA
  17324. >0 lelong 0x83A0 \b, RGB_S3TC
  17325. >0 lelong 0x83A1 \b, RGB4_S3TC
  17326. >0 lelong 0x83A2 \b, RGBA_S3TC
  17327. >0 lelong 0x83A3 \b, RGBA4_S3TC
  17328. >0 lelong 0x83A4 \b, RGBA_DXT5_S3TC
  17329. >0 lelong 0x83A5 \b, RGBA4_DXT5_S3TC
  17330. >0 lelong 0x83F0 \b, COMPRESSED_RGB_S3TC_DXT1_EXT
  17331. >0 lelong 0x83F1 \b, COMPRESSED_RGBA_S3TC_DXT1_EXT
  17332. >0 lelong 0x83F2 \b, COMPRESSED_RGBA_S3TC_DXT3_EXT
  17333. >0 lelong 0x83F3 \b, COMPRESSED_RGBA_S3TC_DXT5_EXT
  17334. >0 lelong 0x8D64 \b, ETC1_RGB8_OES
  17335. >0 lelong 0x9270 \b, COMPRESSED_R11_EAC
  17336. >0 lelong 0x9271 \b, COMPRESSED_SIGNED_R11_EAC
  17337. >0 lelong 0x9272 \b, COMPRESSED_RG11_EAC
  17338. >0 lelong 0x9273 \b, COMPRESSED_SIGNED_RG11_EAC
  17339. >0 lelong 0x9274 \b, COMPRESSED_RGB8_ETC2
  17340. >0 lelong 0x9275 \b, COMPRESSED_SRGB8_ETC2
  17341. >0 lelong 0x9276 \b, COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2
  17342. >0 lelong 0x9277 \b, COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2
  17343. >0 lelong 0x9278 \b, COMPRESSED_RGBA2_ETC2_EAC
  17344. >0 lelong 0x9279 \b, COMPRESSED_SRGB8_ALPHA8_ETC2_EAC
  17345. >0 lelong 0x93B0 \b, COMPRESSED_RGBA_ASTC_4x4_KHR
  17346. >0 lelong 0x93B1 \b, COMPRESSED_RGBA_ASTC_5x4_KHR
  17347. >0 lelong 0x93B2 \b, COMPRESSED_RGBA_ASTC_5x5_KHR
  17348. >0 lelong 0x93B3 \b, COMPRESSED_RGBA_ASTC_6x5_KHR
  17349. >0 lelong 0x93B4 \b, COMPRESSED_RGBA_ASTC_6x6_KHR
  17350. >0 lelong 0x93B5 \b, COMPRESSED_RGBA_ASTC_8x5_KHR
  17351. >0 lelong 0x93B6 \b, COMPRESSED_RGBA_ASTC_8x6_KHR
  17352. >0 lelong 0x93B7 \b, COMPRESSED_RGBA_ASTC_8x8_KHR
  17353. >0 lelong 0x93B8 \b, COMPRESSED_RGBA_ASTC_10x5_KHR
  17354. >0 lelong 0x93B9 \b, COMPRESSED_RGBA_ASTC_10x6_KHR
  17355. >0 lelong 0x93BA \b, COMPRESSED_RGBA_ASTC_10x8_KHR
  17356. >0 lelong 0x93BB \b, COMPRESSED_RGBA_ASTC_10x10_KHR
  17357. >0 lelong 0x93BC \b, COMPRESSED_RGBA_ASTC_12x10_KHR
  17358. >0 lelong 0x93BD \b, COMPRESSED_RGBA_ASTC_12x12_KHR
  17359. >0 lelong 0x93D0 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR
  17360. >0 lelong 0x93D1 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR
  17361. >0 lelong 0x93D2 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR
  17362. >0 lelong 0x93D3 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR
  17363. >0 lelong 0x93D4 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR
  17364. >0 lelong 0x93D5 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR
  17365. >0 lelong 0x93D6 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR
  17366. >0 lelong 0x93D7 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR
  17367. >0 lelong 0x93D8 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR
  17368. >0 lelong 0x93D9 \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR
  17369. >0 lelong 0x93DA \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR
  17370. >0 lelong 0x93DB \b, COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR
  17371. >0 lelong 0x93DC \b, COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR
  17372. >0 lelong 0x93DD \b, COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR
  17373. # Endian-specific KTX header.
  17374. # TODO: glType (all textures I've seen so far are GL_UNSIGNED_BYTE)
  17375. 0 name khronos-ktx-endian-header
  17376. >20 lelong x \b, %u
  17377. >24 lelong >1 x %u
  17378. >28 lelong >1 x %u
  17379. >8 lelong >0
  17380. >>8 use khronos-ktx-glEnum
  17381. >8 lelong 0
  17382. >>12 use khronos-ktx-glEnum
  17383. # Main KTX header.
  17384. # Determine endianness, then check the rest of the header.
  17385. 0 string \xABKTX\ 11\xBB\r\n\x1A\n Khronos KTX texture
  17386. >12 lelong 0x04030201 (little-endian)
  17387. >>16 use khronos-ktx-endian-header
  17388. >12 belong 0x04030201 (big-endian)
  17389. >>16 use \^khronos-ktx-endian-header
  17390. # Type: Khronos KTX2 texture.
  17391. # From: David Korth <gerbilsoft@gerbilsoft.com>
  17392. # Based on draft19.
  17393. # Reference: http://github.khronos.org/KTX-Specification/
  17394. # Supercompression enum.
  17395. 0 name khronos-ktx2-supercompression
  17396. >0 lelong 1 BasisLZ
  17397. >0 lelong 2 Zstandard
  17398. >0 lelong 3 ZLIB
  17399. # Vulkan format identifier.
  17400. # NOTE: Formats prohibited from KTX2 are commented out.
  17401. 0 name khronos-ktx2-vkFormat
  17402. >0 lelong 0 UNDEFINED
  17403. >0 lelong 1 R4G4_UNORM_PACK8
  17404. >0 lelong 2 R4G4B4A4_UNORM_PACK16
  17405. >0 lelong 3 B4G4R4A4_UNORM_PACK16
  17406. >0 lelong 4 R5G6B5_UNORM_PACK16
  17407. >0 lelong 5 B5G6R5_UNORM_PACK16
  17408. >0 lelong 6 R5G5B5A1_UNORM_PACK16
  17409. >0 lelong 7 B5G5R5A1_UNORM_PACK16
  17410. >0 lelong 8 A1R5G5B5_UNORM_PACK16
  17411. >0 lelong 9 R8_UNORM
  17412. >0 lelong 10 R8_SNORM
  17413. #>0 lelong 11 R8_USCALED
  17414. #>0 lelong 12 R8_SSCALED
  17415. >0 lelong 13 R8_UINT
  17416. >0 lelong 14 R8_SINT
  17417. >0 lelong 15 R8_SRGB
  17418. >0 lelong 16 R8G8_UNORM
  17419. >0 lelong 17 R8G8_SNORM
  17420. #>0 lelong 18 R8G8_USCALED
  17421. #>0 lelong 19 R8G8_SSCALED
  17422. >0 lelong 20 R8G8_UINT
  17423. >0 lelong 21 R8G8_SINT
  17424. >0 lelong 22 R8G8_SRGB
  17425. >0 lelong 23 R8G8B8_UNORM
  17426. >0 lelong 24 R8G8B8_SNORM
  17427. #>0 lelong 25 R8G8B8_USCALED
  17428. #>0 lelong 26 R8G8B8_SSCALED
  17429. >0 lelong 27 R8G8B8_UINT
  17430. >0 lelong 28 R8G8B8_SINT
  17431. >0 lelong 29 R8G8B8_SRGB
  17432. >0 lelong 30 B8G8R8_UNORM
  17433. >0 lelong 31 B8G8R8_SNORM
  17434. #>0 lelong 32 B8G8R8_USCALED
  17435. #>0 lelong 33 B8G8R8_SSCALED
  17436. >0 lelong 34 B8G8R8_UINT
  17437. >0 lelong 35 B8G8R8_SINT
  17438. >0 lelong 36 B8G8R8_SRGB
  17439. >0 lelong 37 R8G8B8A8_UNORM
  17440. >0 lelong 38 R8G8B8A8_SNORM
  17441. #>0 lelong 39 R8G8B8A8_USCALED
  17442. #>0 lelong 40 R8G8B8A8_SSCALED
  17443. >0 lelong 41 R8G8B8A8_UINT
  17444. >0 lelong 42 R8G8B8A8_SINT
  17445. >0 lelong 43 R8G8B8A8_SRGB
  17446. >0 lelong 44 B8G8R8A8_UNORM
  17447. >0 lelong 45 B8G8R8A8_SNORM
  17448. #>0 lelong 46 B8G8R8A8_USCALED
  17449. #>0 lelong 47 B8G8R8A8_SSCALED
  17450. >0 lelong 48 B8G8R8A8_UINT
  17451. >0 lelong 49 B8G8R8A8_SINT
  17452. >0 lelong 50 B8G8R8A8_SRGB
  17453. #>0 lelong 51 A8B8G8R8_UNORM_PACK32
  17454. #>0 lelong 52 A8B8G8R8_SNORM_PACK32
  17455. #>0 lelong 53 A8B8G8R8_USCALED_PACK32
  17456. #>0 lelong 54 A8B8G8R8_SSCALED_PACK32
  17457. #>0 lelong 55 A8B8G8R8_UINT_PACK32
  17458. #>0 lelong 56 A8B8G8R8_SINT_PACK32
  17459. #>0 lelong 57 A8B8G8R8_SRGB_PACK32
  17460. >0 lelong 58 A2R10G10B10_UNORM_PACK32
  17461. >0 lelong 59 A2R10G10B10_SNORM_PACK32
  17462. #>0 lelong 60 A2R10G10B10_USCALED_PACK32
  17463. #>0 lelong 61 A2R10G10B10_SSCALED_PACK32
  17464. >0 lelong 62 A2R10G10B10_UINT_PACK32
  17465. >0 lelong 63 A2R10G10B10_SINT_PACK32
  17466. >0 lelong 64 A2B10G10R10_UNORM_PACK32
  17467. >0 lelong 65 A2B10G10R10_SNORM_PACK32
  17468. #>0 lelong 66 A2B10G10R10_USCALED_PACK32
  17469. #>0 lelong 67 A2B10G10R10_SSCALED_PACK32
  17470. >0 lelong 68 A2B10G10R10_UINT_PACK32
  17471. >0 lelong 69 A2B10G10R10_SINT_PACK32
  17472. >0 lelong 70 R16_UNORM
  17473. >0 lelong 71 R16_SNORM
  17474. #>0 lelong 72 R16_USCALED
  17475. #>0 lelong 73 R16_SSCALED
  17476. >0 lelong 74 R16_UINT
  17477. >0 lelong 75 R16_SINT
  17478. >0 lelong 76 R16_SFLOAT
  17479. >0 lelong 77 R16G16_UNORM
  17480. >0 lelong 78 R16G16_SNORM
  17481. #>0 lelong 79 R16G16_USCALED
  17482. #>0 lelong 80 R16G16_SSCALED
  17483. >0 lelong 81 R16G16_UINT
  17484. >0 lelong 82 R16G16_SINT
  17485. >0 lelong 83 R16G16_SFLOAT
  17486. >0 lelong 84 R16G16B16_UNORM
  17487. >0 lelong 85 R16G16B16_SNORM
  17488. #>0 lelong 86 R16G16B16_USCALED
  17489. #>0 lelong 87 R16G16B16_SSCALED
  17490. >0 lelong 88 R16G16B16_UINT
  17491. >0 lelong 89 R16G16B16_SINT
  17492. >0 lelong 90 R16G16B16_SFLOAT
  17493. >0 lelong 91 R16G16B16A16_UNORM
  17494. >0 lelong 92 R16G16B16A16_SNORM
  17495. #>0 lelong 93 R16G16B16A16_USCALED
  17496. #>0 lelong 94 R16G16B16A16_SSCALED
  17497. >0 lelong 95 R16G16B16A16_UINT
  17498. >0 lelong 96 R16G16B16A16_SINT
  17499. >0 lelong 97 R16G16B16A16_SFLOAT
  17500. >0 lelong 98 R32_UINT
  17501. >0 lelong 99 R32_SINT
  17502. >0 lelong 100 R32_SFLOAT
  17503. >0 lelong 101 R32G32_UINT
  17504. >0 lelong 102 R32G32_SINT
  17505. >0 lelong 103 R32G32_SFLOAT
  17506. >0 lelong 104 R32G32B32_UINT
  17507. >0 lelong 105 R32G32B32_SINT
  17508. >0 lelong 106 R32G32B32_SFLOAT
  17509. >0 lelong 107 R32G32B32A32_UINT
  17510. >0 lelong 108 R32G32B32A32_SINT
  17511. >0 lelong 109 R32G32B32A32_SFLOAT
  17512. >0 lelong 110 R64_UINT
  17513. >0 lelong 111 R64_SINT
  17514. >0 lelong 112 R64_SFLOAT
  17515. >0 lelong 113 R64G64_UINT
  17516. >0 lelong 114 R64G64_SINT
  17517. >0 lelong 115 R64G64_SFLOAT
  17518. >0 lelong 116 R64G64B64_UINT
  17519. >0 lelong 117 R64G64B64_SINT
  17520. >0 lelong 118 R64G64B64_SFLOAT
  17521. >0 lelong 119 R64G64B64A64_UINT
  17522. >0 lelong 120 R64G64B64A64_SINT
  17523. >0 lelong 121 R64G64B64A64_SFLOAT
  17524. >0 lelong 122 B10G11R11_UFLOAT_PACK32
  17525. >0 lelong 123 E5B9G9R9_UFLOAT_PACK32
  17526. >0 lelong 124 D16_UNORM
  17527. >0 lelong 125 X8_D24_UNORM_PACK32
  17528. >0 lelong 126 D32_SFLOAT
  17529. >0 lelong 127 S8_UINT
  17530. >0 lelong 128 D16_UNORM_S8_UINT
  17531. >0 lelong 129 D24_UNORM_S8_UINT
  17532. >0 lelong 130 D32_SFLOAT_S8_UINT
  17533. >0 lelong 131 BC1_RGB_UNORM_BLOCK
  17534. >0 lelong 132 BC1_RGB_SRGB_BLOCK
  17535. >0 lelong 133 BC1_RGBA_UNORM_BLOCK
  17536. >0 lelong 134 BC1_RGBA_SRGB_BLOCK
  17537. >0 lelong 135 BC2_UNORM_BLOCK
  17538. >0 lelong 136 BC2_SRGB_BLOCK
  17539. >0 lelong 137 BC3_UNORM_BLOCK
  17540. >0 lelong 138 BC3_SRGB_BLOCK
  17541. >0 lelong 139 BC4_UNORM_BLOCK
  17542. >0 lelong 140 BC4_SNORM_BLOCK
  17543. >0 lelong 141 BC5_UNORM_BLOCK
  17544. >0 lelong 142 BC5_SNORM_BLOCK
  17545. >0 lelong 143 BC6H_UFLOAT_BLOCK
  17546. >0 lelong 144 BC6H_SFLOAT_BLOCK
  17547. >0 lelong 145 BC7_UNORM_BLOCK
  17548. >0 lelong 146 BC7_SRGB_BLOCK
  17549. >0 lelong 147 ETC2_R8G8B8_UNORM_BLOCK
  17550. >0 lelong 148 ETC2_R8G8B8_SRGB_BLOCK
  17551. >0 lelong 149 ETC2_R8G8B8A1_UNORM_BLOCK
  17552. >0 lelong 150 ETC2_R8G8B8A1_SRGB_BLOCK
  17553. >0 lelong 151 ETC2_R8G8B8A8_UNORM_BLOCK
  17554. >0 lelong 152 ETC2_R8G8B8A8_SRGB_BLOCK
  17555. >0 lelong 153 EAC_R11_UNORM_BLOCK
  17556. >0 lelong 154 EAC_R11_SNORM_BLOCK
  17557. >0 lelong 155 EAC_R11G11_UNORM_BLOCK
  17558. >0 lelong 156 EAC_R11G11_SNORM_BLOCK
  17559. >0 lelong 157 ASTC_4x4_UNORM_BLOCK
  17560. >0 lelong 158 ASTC_4x4_SRGB_BLOCK
  17561. >0 lelong 159 ASTC_5x4_UNORM_BLOCK
  17562. >0 lelong 160 ASTC_5x4_SRGB_BLOCK
  17563. >0 lelong 161 ASTC_5x5_UNORM_BLOCK
  17564. >0 lelong 162 ASTC_5x5_SRGB_BLOCK
  17565. >0 lelong 163 ASTC_6x5_UNORM_BLOCK
  17566. >0 lelong 164 ASTC_6x5_SRGB_BLOCK
  17567. >0 lelong 165 ASTC_6x6_UNORM_BLOCK
  17568. >0 lelong 166 ASTC_6x6_SRGB_BLOCK
  17569. >0 lelong 167 ASTC_8x5_UNORM_BLOCK
  17570. >0 lelong 168 ASTC_8x5_SRGB_BLOCK
  17571. >0 lelong 169 ASTC_8x6_UNORM_BLOCK
  17572. >0 lelong 170 ASTC_8x6_SRGB_BLOCK
  17573. >0 lelong 171 ASTC_8x8_UNORM_BLOCK
  17574. >0 lelong 172 ASTC_8x8_SRGB_BLOCK
  17575. >0 lelong 173 ASTC_10x5_UNORM_BLOCK
  17576. >0 lelong 174 ASTC_10x5_SRGB_BLOCK
  17577. >0 lelong 175 ASTC_10x6_UNORM_BLOCK
  17578. >0 lelong 176 ASTC_10x6_SRGB_BLOCK
  17579. >0 lelong 177 ASTC_10x8_UNORM_BLOCK
  17580. >0 lelong 178 ASTC_10x8_SRGB_BLOCK
  17581. >0 lelong 179 ASTC_10x10_UNORM_BLOCK
  17582. >0 lelong 180 ASTC_10x10_SRGB_BLOCK
  17583. >0 lelong 181 ASTC_12x10_UNORM_BLOCK
  17584. >0 lelong 182 ASTC_12x10_SRGB_BLOCK
  17585. >0 lelong 183 ASTC_12x12_UNORM_BLOCK
  17586. >0 lelong 184 ASTC_12x12_SRGB_BLOCK
  17587. >0 lelong 1000156000 G8B8G8R8_422_UNORM
  17588. >0 lelong 1000156001 B8G8R8G8_422_UNORM
  17589. >0 lelong 1000156002 G8_B8_R8_3PLANE_420_UNORM
  17590. >0 lelong 1000156003 G8_B8R8_2PLANE_420_UNORM
  17591. >0 lelong 1000156004 G8_B8_R8_3PLANE_422_UNORM
  17592. >0 lelong 1000156005 G8_B8R8_2PLANE_422_UNORM
  17593. >0 lelong 1000156006 G8_B8_R8_3PLANE_444_UNORM
  17594. >0 lelong 1000156007 R10X6_UNORM_PACK16
  17595. >0 lelong 1000156008 R10X6G10X6_UNORM_2PACK16
  17596. >0 lelong 1000156009 R10X6G10X6B10X6A10X6_UNORM_4PACK16
  17597. >0 lelong 1000156010 G10X6B10X6G10X6R10X6_422_UNORM_4PACK16
  17598. >0 lelong 1000156011 B10X6G10X6R10X6G10X6_422_UNORM_4PACK16
  17599. >0 lelong 1000156012 G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16
  17600. >0 lelong 1000156013 G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16
  17601. >0 lelong 1000156014 G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16
  17602. >0 lelong 1000156015 G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16
  17603. >0 lelong 1000156016 G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16
  17604. >0 lelong 1000156017 R12X4_UNORM_PACK16
  17605. >0 lelong 1000156018 R12X4G12X4_UNORM_2PACK16
  17606. >0 lelong 1000156019 R12X4G12X4B12X4A12X4_UNORM_4PACK16
  17607. >0 lelong 1000156020 G12X4B12X4G12X4R12X4_422_UNORM_4PACK16
  17608. >0 lelong 1000156021 B12X4G12X4R12X4G12X4_422_UNORM_4PACK16
  17609. >0 lelong 1000156022 G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16
  17610. >0 lelong 1000156023 G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16
  17611. >0 lelong 1000156024 G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16
  17612. >0 lelong 1000156025 G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16
  17613. >0 lelong 1000156026 G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16
  17614. >0 lelong 1000156027 G16B16G16R16_422_UNORM
  17615. >0 lelong 1000156028 B16G16R16G16_422_UNORM
  17616. >0 lelong 1000156029 G16_B16_R16_3PLANE_420_UNORM
  17617. >0 lelong 1000156030 G16_B16R16_2PLANE_420_UNORM
  17618. >0 lelong 1000156031 G16_B16_R16_3PLANE_422_UNORM
  17619. >0 lelong 1000156032 G16_B16R16_2PLANE_422_UNORM
  17620. >0 lelong 1000156033 G16_B16_R16_3PLANE_444_UNORM
  17621. >0 lelong 1000054000 PVRTC1_2BPP_UNORM_BLOCK_IMG
  17622. >0 lelong 1000054001 PVRTC1_4BPP_UNORM_BLOCK_IMG
  17623. >0 lelong 1000054002 PVRTC2_2BPP_UNORM_BLOCK_IMG
  17624. >0 lelong 1000054003 PVRTC2_4BPP_UNORM_BLOCK_IMG
  17625. >0 lelong 1000054004 PVRTC1_2BPP_SRGB_BLOCK_IMG
  17626. >0 lelong 1000054005 PVRTC1_4BPP_SRGB_BLOCK_IMG
  17627. >0 lelong 1000054006 PVRTC2_2BPP_SRGB_BLOCK_IMG
  17628. >0 lelong 1000054007 PVRTC2_4BPP_SRGB_BLOCK_IMG
  17629. >0 lelong 1000066000 ASTC_4x4_SFLOAT_BLOCK_EXT
  17630. >0 lelong 1000066001 ASTC_5x4_SFLOAT_BLOCK_EXT
  17631. >0 lelong 1000066002 ASTC_5x5_SFLOAT_BLOCK_EXT
  17632. >0 lelong 1000066003 ASTC_6x5_SFLOAT_BLOCK_EXT
  17633. >0 lelong 1000066004 ASTC_6x6_SFLOAT_BLOCK_EXT
  17634. >0 lelong 1000066005 ASTC_8x5_SFLOAT_BLOCK_EXT
  17635. >0 lelong 1000066006 ASTC_8x6_SFLOAT_BLOCK_EXT
  17636. >0 lelong 1000066007 ASTC_8x8_SFLOAT_BLOCK_EXT
  17637. >0 lelong 1000066008 ASTC_10x5_SFLOAT_BLOCK_EXT
  17638. >0 lelong 1000066009 ASTC_10x6_SFLOAT_BLOCK_EXT
  17639. >0 lelong 1000066010 ASTC_10x8_SFLOAT_BLOCK_EXT
  17640. >0 lelong 1000066011 ASTC_10x10_SFLOAT_BLOCK_EXT
  17641. >0 lelong 1000066012 ASTC_12x10_SFLOAT_BLOCK_EXT
  17642. >0 lelong 1000066013 ASTC_12x12_SFLOAT_BLOCK_EXT
  17643. # Main KTX2 header.
  17644. 0 string \xABKTX\ 20\xBB\r\n\x1A\n Khronos KTX2 texture
  17645. >20 lelong x \b, %u
  17646. >24 lelong >1 x %u
  17647. >28 lelong >1 x %u
  17648. >32 lelong >1 \b, %u layers
  17649. >36 lelong >1 \b, %u faces
  17650. >40 lelong >1 \b, %u mipmaps
  17651. >44 lelong >0 \b,
  17652. >>44 use khronos-ktx2-supercompression
  17653. >12 lelong >0 \b,
  17654. >>12 use khronos-ktx2-vkFormat
  17655. # Type: Valve VTF texture.
  17656. # From: David Korth <gerbilsoft@gerbilsoft.com>
  17657. # References:
  17658. # - https://developer.valvesoftware.com/wiki/Valve_Texture_Format
  17659. # VTF image formats.
  17660. 0 name vtf-image-format
  17661. >0 lelong 0 RGBA8888
  17662. >0 lelong 1 ABGR8888
  17663. >0 lelong 2 RGB888
  17664. >0 lelong 3 BGR888
  17665. >0 lelong 4 RGB565
  17666. >0 lelong 5 I8
  17667. >0 lelong 6 IA88
  17668. >0 lelong 7 P8
  17669. >0 lelong 8 A8
  17670. >0 lelong 9 RGB888 (bluescreen)
  17671. >0 lelong 10 BGR888 (bluescreen)
  17672. >0 lelong 11 ARGB8888
  17673. >0 lelong 12 BGRA8888
  17674. >0 lelong 13 DXT1
  17675. >0 lelong 14 DXT3
  17676. >0 lelong 15 DXT5
  17677. >0 lelong 16 BGRx8888
  17678. >0 lelong 17 BGR565
  17679. >0 lelong 18 BGRx5551
  17680. >0 lelong 19 BGRA4444
  17681. >0 lelong 20 DXT1+A1
  17682. >0 lelong 21 BGRA5551
  17683. >0 lelong 22 UV88
  17684. >0 lelong 23 UVWQ8888
  17685. >0 lelong 24 RGBA16161616F
  17686. >0 lelong 25 RGBA16161616
  17687. >0 lelong 26 UVLX8888
  17688. # Main VTF header.
  17689. 0 string VTF\0 Valve Texture Format
  17690. >4 lelong x v%u
  17691. >8 lelong x \b.%u
  17692. >0x10 leshort x \b, %u
  17693. >0x12 leshort >1 x %u
  17694. >4 lequad 0x0000000700000002
  17695. >>0x3F leshort >1 x %u
  17696. >0x18 leshort >1 \b, %u frames
  17697. >0x38 byte x \b, mipmaps: %u
  17698. >0x34 lelong >-1 \b,
  17699. >>0x34 use vtf-image-format
  17700. # Type: Valve VTF3 (PS3) texture.
  17701. # From: David Korth <gerbilsoft@gerbilsoft.com>
  17702. 0 string VTF3 Valve Texture Format (PS3)
  17703. >0x14 beshort x \b, %u
  17704. >0x16 beshort x \b x %u
  17705. >0x10 belong&0x2000 0 \b, DXT1
  17706. >0x10 belong&0x2000 0x2000 \b, DXT5
  17707. # Type: ASTC texture.
  17708. # From: David Korth <gerbilsoft@gerbilsoft.com>
  17709. # References:
  17710. # - https://stackoverflow.com/questions/22600678/determine-internal-format-of-given-astc-compressed-image-through-its-header
  17711. # - https://stackoverflow.com/a/22682244
  17712. 0 lelong 0x5ca1ab13 ASTC
  17713. >4 byte x %u
  17714. >5 byte x \bx%u
  17715. >6 byte >1 \bx%u
  17716. # X, Y, and Z dimensions are stored as 24-bit LE.
  17717. # Pretend it's 32-bit and mask off the high byte.
  17718. >7 lelong&0x00FFFFFF x texture, %u
  17719. >10 lelong&0x00FFFFFF x x %u
  17720. >13 lelong&0x00FFFFFF >1 x %u
  17721. # Zebra Metafile graphic
  17722. # http://www.fileformat.info/format/zbr/egff.htm
  17723. 0 beshort 0x9a02 Zebra Metafile graphic
  17724. >2 leshort 1 (version 1.x)
  17725. >2 leshort 2 (version 1.1x or 1.2x)
  17726. >2 leshort 3 (version 1.49)
  17727. >2 leshort 4 (version 1.50)
  17728. >4 string x (comment = %s)
  17729. # Microsoft Paint graphic
  17730. # http://www.fileformat.info/format/mspaint/egff.htm
  17731. 0 string DanM icrosoft Paint image data (version 1.x)
  17732. >4 leshort x (%d
  17733. >>6 leshort x x %d)
  17734. 0 string LinS Microsoft Paint image data (version 2.0)
  17735. >4 leshort x (%d
  17736. >>6 leshort x x %d)
  17737. # reMarkable tablet internal file format (https://www.remarkable.com/)
  17738. # https://github.com/ax3l/lines-are-beautiful
  17739. # https://plasma.ninja/blog/devices/remarkable/binary/format/2017/12/26/\
  17740. # reMarkable-lines-file-format.html#what-to-do-next
  17741. # from Axel Huebl
  17742. 0 string reMarkable
  17743. >11 string lines
  17744. >>17 string with
  17745. >>>22 string selections
  17746. >>>>33 string and
  17747. >>>>>37 string layers
  17748. >>>>>>43 lelong x reMarkable tablet notebook lines, 1404 x 1872, %x page(s)
  17749. # newer per-page files for the reMarkable
  17750. 0 string reMarkable
  17751. >11 string .lines
  17752. >>18 string file,
  17753. >>>24 string version=
  17754. >>>>32 byte x reMarkable tablet page (v%c), 1404 x 1872,
  17755. >>>>>43 lelong x %d layer(s)
  17756. # Type: PVR3 texture.
  17757. # From: David Korth <gerbilsoft@gerbilsoft.com>
  17758. # References:
  17759. # - http://cdn.imgtec.com/sdk-documentation/PVR+File+Format.Specification.pdf
  17760. # PVR3 pixel formats.
  17761. 0 name pvr3-pixel-format
  17762. >0 ulelong 0 PVRTC 2bpp RGB
  17763. >0 ulelong 1 PVRTC 2bpp RGBA
  17764. >0 ulelong 2 PVRTC 4bpp RGB
  17765. >0 ulelong 3 PVRTC 4bpp RGBA
  17766. >0 ulelong 4 PVRTC-II 2bpp
  17767. >0 ulelong 5 PVRTC-II 4bpp
  17768. >0 ulelong 6 ETC1
  17769. >0 ulelong 7 DXT1
  17770. >0 ulelong 8 DXT2
  17771. >0 ulelong 9 DXT3
  17772. >0 ulelong 10 DXT4
  17773. >0 ulelong 11 DXT5
  17774. >0 ulelong 12 BC4
  17775. >0 ulelong 13 BC5
  17776. >0 ulelong 14 BC6
  17777. >0 ulelong 15 BC7
  17778. >0 ulelong 16 UYVY
  17779. >0 ulelong 17 YUY2
  17780. >0 ulelong 18 BW1bpp
  17781. >0 ulelong 19 R9G9B9E5 Shared Exponent
  17782. >0 ulelong 20 RGBG8888
  17783. >0 ulelong 21 GRGB8888
  17784. >0 ulelong 22 ETC2 RGB
  17785. >0 ulelong 23 ETC2 RGBA
  17786. >0 ulelong 24 ETC2 RGB A1
  17787. >0 ulelong 25 EAC R11
  17788. >0 ulelong 26 EAC RG11
  17789. >0 ulelong 27 ASTC_4x4
  17790. >0 ulelong 28 ASTC_5x4
  17791. >0 ulelong 29 ASTC_5x5
  17792. >0 ulelong 30 ASTC_6x5
  17793. >0 ulelong 31 ASTC_6x6
  17794. >0 ulelong 32 ASTC_8x5
  17795. >0 ulelong 33 ASTC_8x6
  17796. >0 ulelong 34 ASTC_8x8
  17797. >0 ulelong 35 ASTC_10x5
  17798. >0 ulelong 36 ASTC_10x6
  17799. >0 ulelong 37 ASTC_10x8
  17800. >0 ulelong 38 ASTC_10x10
  17801. >0 ulelong 39 ASTC_12x10
  17802. >0 ulelong 40 ASTC_12x12
  17803. >0 ulelong 41 ASTC_3x3x3
  17804. >0 ulelong 42 ASTC_4x3x3
  17805. >0 ulelong 43 ASTC_4x4x3
  17806. >0 ulelong 44 ASTC_4x4x4
  17807. >0 ulelong 45 ASTC_5x4x4
  17808. >0 ulelong 46 ASTC_5x5x4
  17809. >0 ulelong 47 ASTC_5x5x5
  17810. >0 ulelong 48 ASTC_6x5x5
  17811. >0 ulelong 49 ASTC_6x6x5
  17812. >0 ulelong 50 ASTC_6x6x6
  17813. 0 string PVR\x03 PowerVR 3.0 texture:
  17814. >0x18 ulelong x %u x
  17815. >0x1C ulelong x %u
  17816. >0x20 ulelong >1 x %u
  17817. >0x08 byte x \b,
  17818. >0x0C ulelong 0
  17819. >>0x08 use pvr3-pixel-format
  17820. >0x0C ulelong !0
  17821. >>0x08 byte !0 %c
  17822. >>>0x0C byte !0 \b%u
  17823. >>0x09 byte !0 \b%c
  17824. >>>0x0D byte !0 \b%u
  17825. >>0x0A byte !0 \b%c
  17826. >>>0x0E byte !0 \b%u
  17827. >>0x0B byte !0 \b%c
  17828. >>>0x0F byte !0 \b%u
  17829. >0x10 ulelong 1 \b, sRGB
  17830. >0x04 ulelong&0x02 0x02 \b, premultiplied alpha
  17831. 0 string \x03RVP PowerVR 3.0 texture: BE,
  17832. >0x18 ubelong x %u x
  17833. >0x1C ubelong x %u
  17834. >0x20 ubelong >1 x %u
  17835. >0x08 byte x \b,
  17836. >0x0C ubelong 0
  17837. >>0x08 use pvr3-pixel-format
  17838. >0x0C ubelong !0
  17839. >>0x0B byte !0 %c
  17840. >>>0x0F byte !0 \b%u
  17841. >>0x0A byte !0 \b%c
  17842. >>>0x0E byte !0 \b%u
  17843. >>0x09 byte !0 \b%c
  17844. >>>0x0D byte !0 \b%u
  17845. >>0x08 byte !0 \b%c
  17846. >>>0x0C byte !0 \b%u
  17847. >0x10 ubelong 1 \b, sRGB
  17848. >0x04 ubelong&0x02 0x02 \b, premultiplied alpha
  17849. # Type: Microsoft Xbox XPR0 texture.
  17850. # From: David Korth <gerbilsoft@gerbilsoft.com>
  17851. # References:
  17852. # - https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/blob/develop/src/core/hle/D3D8/XbD3D8Types.h
  17853. # XPR pixel formats.
  17854. 0 name xbox-xpr-pixel-format
  17855. >0 byte 0x00 L8
  17856. >0 byte 0x01 AL8
  17857. >0 byte 0x02 ARGB1555
  17858. >0 byte 0x03 RGB555
  17859. >0 byte 0x04 ARGB4444
  17860. >0 byte 0x05 RGB565
  17861. >0 byte 0x06 ARGB8888
  17862. >0 byte 0x07 xRGB8888
  17863. >0 byte 0x0B P8
  17864. >0 byte 0x0C DXT1
  17865. >0 byte 0x0E DXT2
  17866. >0 byte 0x0F DXT4
  17867. >0 byte 0x10 Linear ARGB1555
  17868. >0 byte 0x11 Linear RGB565
  17869. >0 byte 0x12 Linear ARGB8888
  17870. >0 byte 0x13 Linear L8
  17871. >0 byte 0x16 Linear R8B8
  17872. >0 byte 0x17 Linear G8B8
  17873. >0 byte 0x19 A8
  17874. >0 byte 0x1A A8L8
  17875. >0 byte 0x1B Linear AL8
  17876. >0 byte 0x1C Linear RGB555
  17877. >0 byte 0x1D Linear ARGB4444
  17878. >0 byte 0x1E Linear xRGB8888
  17879. >0 byte 0x1F Linear A8
  17880. >0 byte 0x20 Linear A8L8
  17881. >0 byte 0x24 YUY2
  17882. >0 byte 0x25 UYVY
  17883. >0 byte 0x27 L6V5U5
  17884. >0 byte 0x28 V8U8
  17885. >0 byte 0x29 R8B8
  17886. >0 byte 0x2A D24S8
  17887. >0 byte 0x2B F24S8
  17888. >0 byte 0x2C D16
  17889. >0 byte 0x2D F16
  17890. >0 byte 0x2E Linear D24S8
  17891. >0 byte 0x2F Linear F24S8
  17892. >0 byte 0x30 Linear D16
  17893. >0 byte 0x31 Linear F16
  17894. >0 byte 0x32 L16
  17895. >0 byte 0x33 V16U16
  17896. >0 byte 0x35 Linear L16
  17897. >0 byte 0x36 Linear V16U16
  17898. >0 byte 0x37 Linear L6V5U5
  17899. >0 byte 0x38 RGBA5551
  17900. >0 byte 0x39 RGBA4444
  17901. >0 byte 0x3A QWVU8888
  17902. >0 byte 0x3B BGRA8888
  17903. >0 byte 0x3C RGBA8888
  17904. >0 byte 0x3D Linear RGBA5551
  17905. >0 byte 0x3E Linear RGBA4444
  17906. >0 byte 0x3F Linear ABGR8888
  17907. >0 byte 0x40 Linear BGRA8888
  17908. >0 byte 0x41 Linear RGBA8888
  17909. >0 byte 0x64 Vertex Data
  17910. 0 string XPR0 Microsoft Xbox XPR0 texture
  17911. >0x19 byte x \b, format:
  17912. >>0x19 use xbox-xpr-pixel-format
  17913. # ILDA Image Data Transfer Format
  17914. # https://www.ilda.com/resources/StandardsDocs/ILDA_IDTF14_rev011.pdf
  17915. #
  17916. # Updated by Chuck Hein (laser@geekdude.com)
  17917. #
  17918. 0 string ILDA ILDA Image Data Transfer Format
  17919. >7 byte 0x00 3D Coordinates with Indexed Color
  17920. >7 byte 0x01 2D Coordinates with Indexed Color
  17921. >7 byte 0x02 Color Palette
  17922. >7 byte 0x04 3D Coordinates with True Color
  17923. >7 byte 0x05 2D Coordinates with True Color
  17924. >8 string >0 \b, palette %s
  17925. >16 string >0 \b, company %s
  17926. >24 beshort >0 \b, number of records %d
  17927. >>26 beshort x \b, palette number %d
  17928. >>28 beshort >0 \b, number of frames %d
  17929. >>30 byte >0 \b, projector number %d
  17930. # Dropbox "lepton" compressed jpeg format
  17931. # https://github.com/dropbox/lepton
  17932. 0 belong&0xfffff0ff 0xcf84005a Lepton image file
  17933. >2 byte x (version %d)
  17934. # Apple QuickTake camera raw images
  17935. # https://en.wikipedia.org/wiki/Apple_QuickTake
  17936. # dcraw can decode them
  17937. 0 name quicktake
  17938. >4 belong 8
  17939. >>544 beshort x \b, %dx
  17940. >>546 beshort x \b%d
  17941. >4 belong 4
  17942. >>546 beshort x \b, %dx
  17943. >>544 beshort x \b%d
  17944. 0 string qktk Apple QuickTake 100 Raw Image
  17945. >0 use quicktake
  17946. 0 string qktn
  17947. >4 byte 0 Apple QuickTake 150 Raw Image
  17948. >4 byte >0 Apple QuickTake 200 Raw Image
  17949. >0 use quicktake
  17950. # From: Joerg Jenderek
  17951. # URL: http://fileformats.archiveteam.org/wiki/Corel_Photo-Paint_image
  17952. # Reference: http://blog.argasinski.eu/wp-content/uploads/2011/08/cpt-specification-0.01.pdf
  17953. 0 string CPT
  17954. >4 string FILE Corel Photo-Paint image, version
  17955. # version like 7, 9 or 8
  17956. >>3 ubyte x %c,
  17957. !:mime image/x-corel-cpt
  17958. !:ext cpt
  17959. # if blocks_array_offset available jump blockNumber*8 bytes
  17960. >>0x34 ulelong >0
  17961. >>>(0x28.l*8) ubyte x
  17962. # jump additional stored blocks_array_offset bytes forward to object block
  17963. >>>>&(0x34.l-1) ulelong x %u
  17964. # object height in pixels
  17965. >>>>>&0 ulelong x x %u
  17966. # if no blocks_array_offset available jump blockNumber*8 bytes
  17967. >>0x34 ulelong =0
  17968. >>>(0x28.l*8) ubyte x
  17969. # jump additional 0x13C bytes forward to object block
  17970. >>>>&0x13B ulelong x %u
  17971. >>>>>&0 ulelong x x %u
  17972. # image color model used
  17973. >>0x8 ulelong x
  17974. >>>0x8 ulelong 0x1 RGB 24 bits
  17975. >>>0x8 ulelong 0x3 CMYK 24 bits
  17976. >>>0x8 ulelong 0x5 greyscale 8 bits
  17977. >>>0x8 ulelong 0x6 black and white 1 bit
  17978. >>>0x8 ulelong 0xA RGB 8 bits
  17979. # palette_length number of colors * 3 in case of 8-bit RGB paletted image
  17980. # 0 otherwise. Allowed values: 0 or [1..256] * 3
  17981. #>>0xC ulelong >0 \b, palette length %u
  17982. >>>>0xC ulelong/3 <256 \b, %u colors
  17983. >>>0x8 ulelong 0xB LAB
  17984. >>>0x8 ulelong 0xC RGB 48 bits
  17985. >>>0x8 ulelong 0xE greyscale 16 bits
  17986. # this should not happen
  17987. >>>0x8 default x color model
  17988. >>>>0x8 ulelong x 0x%x
  17989. # bit 1 in CPT file flags: UCS-2 file comment present
  17990. >>0x31 ubyte &0x02
  17991. # look for comment marker
  17992. >>>0x100 search/0xc9d \4\2\0\0
  17993. # UCS-2 file comment
  17994. >>>>&0 lestring16 x "%s"
  17995. # if no UCS-2 is present show ANSI file comment[112] if available
  17996. >>0x31 ubyte&0x02 =0
  17997. >>>0x3C string >\0 "%-.112s"
  17998. # reserved seems to be always 0
  17999. #>>0x10 ulelong >0 \b, reserved1 %u
  18000. # horizontal real dpi = dpi_h * 25.4 / 10**6
  18001. >>0x18 ulelong x \b, %u micro dots/mm
  18002. # image vertical DPI in CPT DPI unit
  18003. #>>0x1C ulelong x \b, %u micro dots/mm
  18004. # reserved seems to be always 0
  18005. #>>0x20 ulelong >0 \b, reserved2 %u
  18006. #>>0x24 ulelong >0 \b, reserved3 %u
  18007. # blocks_count; number of CPT_Block blocks. Allowed values: > 0
  18008. >>0x28 ulelong x \b, %u block
  18009. # plural s
  18010. >>0x28 ulelong !1 \bs
  18011. # CPT file flags
  18012. # lower byte of CPT file flags: 0x94~CPT9FILE 0x01~often CPT7FILE 0x8C~CPT8FILE
  18013. #>>0x30 ubyte x \b, lower flags 0x%x
  18014. # upper byte of CPT file flags:
  18015. #>>0x31 ubyte >0 \b, upper flags 0x%x
  18016. # bit 2 in CPT file flags: unknown
  18017. #>>0x31 ubyte &0x04 \b, with UNKNOWN
  18018. # bits 3-7 in CPT file flags: unknown, seem to be often 0
  18019. # show unusual flag combinations
  18020. >>0x31 ubyte&0xFC >0
  18021. >>>0x30 uleshort x \b, flags 0x%4.4x
  18022. # reserved seems to be always 0
  18023. #>>0x32 uleshort >0 \b, reserved4 0x%x
  18024. # blocks_array_offset is always 0 for CPT7 and CPT8 files created by PP7-PP8
  18025. # typical values like: 13Ch 154h 43Ch 4F0h DA8h
  18026. >>0x34 ulelong x \b, array offset 0x%x
  18027. # reserved seems to be often 0
  18028. >>0x38 ulelong >0 \b, reserved5 0x%x
  18029. # possible next master block
  18030. #>>0x100 ubequad !0 \b, next block=0x%llx...
  18031. # bit 0: ICC profile block present
  18032. >>0x31 ubyte &0x01 \b, with ICC profile
  18033. # check for characteristic string acsp of color profile for DEBUGGING
  18034. #>>>0x178 string x icc=%.4s
  18035. # display ICC/ICM color profile by ./icc
  18036. #>>>0x154 use color-profile
  18037. # Type: Crunch compressed texture.
  18038. # From: David Korth <gerbilsoft@gerbilsoft.com>
  18039. # References:
  18040. # - https://github.com/BinomialLLC/crunch/blob/44c8402e24441c7524ca364941fd224ab3b971e9/inc/crn_decomp.h#L267
  18041. 0 ubelong 0x4878004A Crunch compressed texture:
  18042. >0x0C ubeshort x %u x
  18043. >0x0E ubeshort x %u
  18044. >0x12 ubyte 0 \b, DXT1
  18045. >0x12 ubyte 1 \b, DXT3
  18046. >0x12 ubyte 2 \b, DXT5
  18047. >0x12 ubyte 3 \b, DXT5 CCxY
  18048. >0x12 ubyte 4 \b, DXT5 xGxR
  18049. >0x12 ubyte 5 \b, DXT5 xGBR
  18050. >0x12 ubyte 6 \b, DXT5 AGBR
  18051. >0x12 ubyte 7 \b, DXn XY
  18052. >0x12 ubyte 8 \b, DXn YX
  18053. >0x12 ubyte 9 \b, DXT5 Alpha
  18054. >0x12 ubyte 10 \b, ETC1
  18055. >0x10 ubyte >1 \b, %u images
  18056. >0x11 ubyte >1 \b, %u faces
  18057. # TODO: Flags at 0x13? (ubeshort)
  18058. # Type: BasisLZ compressed texture.
  18059. # From: David Korth <gerbilsoft@gerbilsoft.com>
  18060. # References:
  18061. # - https://github.com/BinomialLLC/basis_universal/blob/master/spec/basis_spec.txt
  18062. 0 uleshort 0x4273
  18063. >0x04 uleshort 0x4D BasisLZ
  18064. >>0x02 uleshort x v%x compressed texture:
  18065. >>0x14 ubyte 0 ETC1S
  18066. >>0x14 ubyte 1 UASTC 4x4
  18067. >>0x0E ulelong&0xFFFFFF >1 \b, %u slices
  18068. >>0x11 ulelong&0xFFFFFF >1 \b, %u images
  18069. >>0x15 uleshort&0x02 2 \b, Y-flipped
  18070. # MIME registration: https://www.iana.org/assignments/media-types/model/e57
  18071. # Sample files: http://www.libe57.org/data.html
  18072. # Reference implementation: http://www.libe57.org/
  18073. # https://www.ri.cmu.edu/pub_files/2011/1/2011-huber-e57-v3.pdf
  18074. 0 string ASTM-E57 ASTM E57 three-dimensional model
  18075. !:mime model/e57
  18076. !:ext e57
  18077. #------------------------------------------------------------------------------
  18078. # $File: inform,v 1.5 2009/09/19 16:28:09 christos Exp $
  18079. # inform: file(1) magic for Inform interactive fiction language
  18080. # URL: http://www.inform-fiction.org/
  18081. # From: Reuben Thomas <rrt@sc3d.org>
  18082. 0 search/100/cW constant\ story Inform source text
  18083. #------------------------------------------------------------------------------
  18084. # $File: intel,v 1.19 2020/12/12 20:01:47 christos Exp $
  18085. # intel: file(1) magic for x86 Unix
  18086. #
  18087. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  18088. # is in "microsoft"). DOS is in "msdos"; the ambitious soul can do
  18089. # Windows as well.
  18090. #
  18091. # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
  18092. # whatever comes next (HP-PA Hummingbird?). OS/2 may also go elsewhere
  18093. # as well, if, as, and when IBM makes it portable.
  18094. #
  18095. # The `versions' should be un-commented if they work for you.
  18096. # (Was the problem just one of endianness?)
  18097. #
  18098. 0 leshort 0502 basic-16 executable
  18099. >12 lelong >0 not stripped
  18100. #>22 leshort >0 - version %d
  18101. 0 leshort 0503 basic-16 executable (TV)
  18102. >12 lelong >0 not stripped
  18103. #>22 leshort >0 - version %d
  18104. 0 leshort 0510 x86 executable
  18105. >12 lelong >0 not stripped
  18106. 0 leshort 0511 x86 executable (TV)
  18107. >12 lelong >0 not stripped
  18108. 0 leshort =0512 iAPX 286 executable small model (COFF)
  18109. >12 lelong >0 not stripped
  18110. #>22 leshort >0 - version %d
  18111. 0 leshort =0522 iAPX 286 executable large model (COFF)
  18112. >12 lelong >0 not stripped
  18113. #>22 leshort >0 - version %d
  18114. # updated by Joerg Jenderek at Oct 2015
  18115. # https://de.wikipedia.org/wiki/Common_Object_File_Format
  18116. # http://www.delorie.com/djgpp/doc/coff/filhdr.html
  18117. # ./msdos (version 5.25) labeled the next entry as "MS Windows COFF Intel 80386 object file"
  18118. # ./intel (version 5.25) label labeled the next entry as "80386 COFF executable"
  18119. # SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
  18120. 0 leshort =0514
  18121. # use subroutine to display name+flags+variables for common object formatted files
  18122. >0 use display-coff
  18123. #>12 lelong >0 not stripped
  18124. # no hint found, that at offset 22 is version
  18125. #>22 leshort >0 - version %d
  18126. 0 leshort 0x0200
  18127. >0 use display-coff
  18128. 0 leshort 0x8664
  18129. >0 use display-coff
  18130. # rom: file(1) magic for BIOS ROM Extensions found in intel machines
  18131. # mapped into memory between 0xC0000 and 0xFFFFF
  18132. # From: Alex Myczko <alex@aiei.ch>
  18133. # updated by Joerg Jenderek
  18134. # https://en.wikipedia.org/wiki/Option_ROM
  18135. 0 beshort 0x55AA BIOS (ia32) ROM Ext.
  18136. !:mime application/octet-stream
  18137. !:ext rom/bin
  18138. >5 string USB USB
  18139. >7 string LDR UNDI image
  18140. >30 string IBM IBM comp. Video
  18141. >26 string Adaptec Adaptec
  18142. >28 string Adaptec Adaptec
  18143. >42 string PROMISE Promise
  18144. >2 byte x (%d*512)
  18145. # Flash descriptors for Intel SPI flash roms.
  18146. # From Dr. Jesus <j@hug.gs>
  18147. 0 lelong 0x0ff0a55a Intel serial flash for ICH/PCH ROM <= 5 or 3400 series A-step
  18148. 16 lelong 0x0ff0a55a Intel serial flash for PCH ROM
  18149. # From: Joerg Jenderek
  18150. # URL: https://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface
  18151. # Reference: https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf
  18152. # Note: generated for example by `cat /sys/firmware/acpi/tables/DSDT MyDSDT.aml`
  18153. 0 string DSDT
  18154. >0 use acpi-table
  18155. # not tested or other file format
  18156. 0 string APIC
  18157. >0 use acpi-table
  18158. #0 string ASF!
  18159. #>0 use acpi-table
  18160. 0 string FACP
  18161. >0 use acpi-table
  18162. #0 string FACS
  18163. #>0 use acpi-table
  18164. 0 string MCFG
  18165. >0 use acpi-table
  18166. 0 string SLIC
  18167. >0 use acpi-table
  18168. 0 string SSDT
  18169. >0 use acpi-table
  18170. 0 name acpi-table
  18171. # skip ASCII text starting with DSDT by looking for valid "low" revision
  18172. >8 ubyte <17 ACPI Machine Language file
  18173. # assume that ACPI tables size are lower than 16 MiB
  18174. #>4 ulelong <0x01000000
  18175. # DSDT for Differentiated System Description Table
  18176. >>0 string x '%.4s'
  18177. #!:mime application/octet-stream
  18178. !:mime application/x-intel-aml
  18179. !:ext aml
  18180. # the manufacture model ID like: VBOXBIOS BXDSDT
  18181. >>16 string >\0 %.8s
  18182. # OEM revision of DSDT for supplied OEM Table ID like: 0 1 2 20090511
  18183. >>>24 ulelong x %x
  18184. # OEM ID like: INTEL VBOX (VirtualBox) BXDSDT (qemu) MEDION or \030\001\0\0 for s3pt.aml
  18185. >>10 ubyte >040 by %c
  18186. >>>11 ubyte >040 \b%c
  18187. >>>>12 ubyte >040 \b%c
  18188. >>>>>13 ubyte >040 \b%c
  18189. >>>>>>14 ubyte >040 \b%c
  18190. >>>>>>>15 ubyte >040 \b%c
  18191. # This field also sets the global integer width for the AML interpreter.
  18192. # Values less than two will cause the interpreter to use 32-bit.
  18193. # Values of two and greater will cause the interpreter to use full 64-bit.
  18194. # 16 for asf!.aml, 67 fo rsdp.aml
  18195. >>8 ubyte x \b, revision %u
  18196. # length, in bytes, of the entire DSDT (including the header)
  18197. >>4 ulelong x \b, %u bytes
  18198. # entire table must sum to zero
  18199. #>>9 ubyte x \b, checksum 0x%x
  18200. # vendor ID for the ASL Compiler like: INTL MSFT ...
  18201. >>28 string >\0 \b, created by %.4s
  18202. # revision number of the ASL Compiler like: 20051117 20140724 20190703 20200110 ...
  18203. >>>32 ulelong x %x
  18204. #------------------------------------------------------------------------------
  18205. # $File: interleaf,v 1.10 2009/09/19 16:28:10 christos Exp $
  18206. # interleaf: file(1) magic for InterLeaf TPS:
  18207. #
  18208. 0 string =\210OPS Interleaf saved data
  18209. 0 string =<!OPS Interleaf document text
  18210. >5 string ,\ Version\ = \b, version
  18211. >>17 string >\0 %.3s
  18212. #------------------------------------------------------------------------------
  18213. # $File: island,v 1.5 2009/09/19 16:28:10 christos Exp $
  18214. # island: file(1) magic for IslandWite/IslandDraw, from SunOS 5.5.1
  18215. # "/etc/magic":
  18216. # From: guy@netapp.com (Guy Harris)
  18217. #
  18218. 4 string pgscriptver IslandWrite document
  18219. 13 string DrawFile IslandDraw document
  18220. #------------------------------------------------------------------------------
  18221. # $File: ispell,v 1.8 2009/09/19 16:28:10 christos Exp $
  18222. # ispell: file(1) magic for ispell
  18223. #
  18224. # Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602. This magic
  18225. # will match 0x9600 through 0x9603 in *both* little endian and big endian.
  18226. # (No other current magic entries collide.)
  18227. #
  18228. # Updated by Daniel Quinlan (quinlan@yggdrasil.com)
  18229. #
  18230. 0 leshort&0xFFFC 0x9600 little endian ispell
  18231. >0 byte 0 hash file (?),
  18232. >0 byte 1 3.0 hash file,
  18233. >0 byte 2 3.1 hash file,
  18234. >0 byte 3 hash file (?),
  18235. >2 leshort 0x00 8-bit, no capitalization, 26 flags
  18236. >2 leshort 0x01 7-bit, no capitalization, 26 flags
  18237. >2 leshort 0x02 8-bit, capitalization, 26 flags
  18238. >2 leshort 0x03 7-bit, capitalization, 26 flags
  18239. >2 leshort 0x04 8-bit, no capitalization, 52 flags
  18240. >2 leshort 0x05 7-bit, no capitalization, 52 flags
  18241. >2 leshort 0x06 8-bit, capitalization, 52 flags
  18242. >2 leshort 0x07 7-bit, capitalization, 52 flags
  18243. >2 leshort 0x08 8-bit, no capitalization, 128 flags
  18244. >2 leshort 0x09 7-bit, no capitalization, 128 flags
  18245. >2 leshort 0x0A 8-bit, capitalization, 128 flags
  18246. >2 leshort 0x0B 7-bit, capitalization, 128 flags
  18247. >2 leshort 0x0C 8-bit, no capitalization, 256 flags
  18248. >2 leshort 0x0D 7-bit, no capitalization, 256 flags
  18249. >2 leshort 0x0E 8-bit, capitalization, 256 flags
  18250. >2 leshort 0x0F 7-bit, capitalization, 256 flags
  18251. >4 leshort >0 and %d string characters
  18252. 0 beshort&0xFFFC 0x9600 big endian ispell
  18253. >1 byte 0 hash file (?),
  18254. >1 byte 1 3.0 hash file,
  18255. >1 byte 2 3.1 hash file,
  18256. >1 byte 3 hash file (?),
  18257. >2 beshort 0x00 8-bit, no capitalization, 26 flags
  18258. >2 beshort 0x01 7-bit, no capitalization, 26 flags
  18259. >2 beshort 0x02 8-bit, capitalization, 26 flags
  18260. >2 beshort 0x03 7-bit, capitalization, 26 flags
  18261. >2 beshort 0x04 8-bit, no capitalization, 52 flags
  18262. >2 beshort 0x05 7-bit, no capitalization, 52 flags
  18263. >2 beshort 0x06 8-bit, capitalization, 52 flags
  18264. >2 beshort 0x07 7-bit, capitalization, 52 flags
  18265. >2 beshort 0x08 8-bit, no capitalization, 128 flags
  18266. >2 beshort 0x09 7-bit, no capitalization, 128 flags
  18267. >2 beshort 0x0A 8-bit, capitalization, 128 flags
  18268. >2 beshort 0x0B 7-bit, capitalization, 128 flags
  18269. >2 beshort 0x0C 8-bit, no capitalization, 256 flags
  18270. >2 beshort 0x0D 7-bit, no capitalization, 256 flags
  18271. >2 beshort 0x0E 8-bit, capitalization, 256 flags
  18272. >2 beshort 0x0F 7-bit, capitalization, 256 flags
  18273. >4 beshort >0 and %d string characters
  18274. # ispell 4.0 hash files kromJx <kromJx@crosswinds.net>
  18275. # Ispell 4.0
  18276. 0 string ISPL ispell
  18277. >4 long x hash file version %d,
  18278. >8 long x lexletters %d,
  18279. >12 long x lexsize %d,
  18280. >16 long x hashsize %d,
  18281. >20 long x stblsize %d
  18282. #------------------------------------------------------------------------------
  18283. # $File: isz,v 1.5 2019/04/19 00:42:27 christos Exp $
  18284. # ISO Zipped file format
  18285. # https://www.ezbsystems.com/isz/iszspec.txt
  18286. 0 string IsZ! ISO Zipped file
  18287. >4 byte x \b, header size %u
  18288. >5 byte x \b, version %u
  18289. >8 lelong x \b, serial %u
  18290. #12 leshort x \b, sector size %u
  18291. #>16 lelong x \b, total sectors %u
  18292. >17 byte >0 \b, password protected
  18293. #>24 lequad x \b, segment size %llu
  18294. #>32 lelong x \b, blocks %u
  18295. #>36 lelong x \b, block size %u
  18296. #------------------------------------------------------------
  18297. # $File: java,v 1.21 2019/02/18 17:58:50 christos Exp $
  18298. # Java ByteCode and Mach-O binaries (e.g., Mac OS X) use the
  18299. # same magic number, 0xcafebabe, so they are both handled
  18300. # in the entry called "cafebabe".
  18301. #------------------------------------------------------------
  18302. # Java serialization
  18303. # From Martin Pool (m.pool@pharos.com.au)
  18304. 0 beshort 0xaced Java serialization data
  18305. >2 beshort >0x0004 \b, version %d
  18306. 0 belong 0xfeedfeed Java KeyStore
  18307. !:mime application/x-java-keystore
  18308. 0 belong 0xcececece Java JCE KeyStore
  18309. !:mime application/x-java-jce-keystore
  18310. # Java source
  18311. 0 regex \^import.*;$ Java source
  18312. !:mime text/x-java
  18313. # Java HPROF dumps
  18314. # https://java.net/downloads/heap-snapshot/hprof-binary-format.html
  18315. 0 string JAVA\x20PROFILE\x201.0.
  18316. >0x12 byte 0
  18317. >>0x11 ubyte-0x31 <2 Java HPROF dump,
  18318. >>>0x17 beqdate/1000 x created %s
  18319. # Java jmod module
  18320. # See https://hg.openjdk.java.net/jdk9/jdk9/jdk/file/tip/src/java.base/share/classes/jdk/internal/jmod/JmodFile.java
  18321. # Grr. 2 byte magic "JM", really? In 2019?
  18322. 0 belong 0x4a4d0100 Java jmod module version 1.0
  18323. !:mime application/x-java-jmod
  18324. # Java jlinked image
  18325. # See https://hg.openjdk.java.net/jdk9/jdk9/jdk/file/tip/src/java.base/share/native/libjimage/imageFile.hpp
  18326. 0 belong 0xcafedada Java module image (big endian)
  18327. >4 beshort >0x00 \b, version %d
  18328. >6 beshort x \b.%d
  18329. !:mime application/x-java-image
  18330. 0 lelong 0xcafedada Java module image (little endian)
  18331. >6 leshort >0x00 \b, version %d
  18332. >4 leshort x \b.%d
  18333. !:mime application/x-java-image
  18334. #------------------------------------------------------------------------------
  18335. # $File: javascript,v 1.2 2019/08/05 10:34:26 christos Exp $
  18336. # javascript: magic for javascript and node.js scripts.
  18337. #
  18338. 0 search/1/w #!/bin/node Node.js script text executable
  18339. !:mime application/javascript
  18340. 0 search/1/w #!/usr/bin/node Node.js script text executable
  18341. !:mime application/javascript
  18342. 0 search/1/w #!/bin/nodejs Node.js script text executable
  18343. !:mime application/javascript
  18344. 0 search/1/w #!/usr/bin/nodejs Node.js script text executable
  18345. !:mime application/javascript
  18346. 0 search/1 #!/usr/bin/env\ node Node.js script text executable
  18347. !:mime application/javascript
  18348. 0 search/1 #!/usr/bin/env\ nodejs Node.js script text executable
  18349. !:mime application/javascript
  18350. # Hermes by Facebook https://hermesengine.dev/
  18351. # https://github.com/facebook/hermes/blob/master/include/hermes/\
  18352. # BCGen/HBC/BytecodeFileFormat.h#L24
  18353. 0 lequad 0x1F1903C103BC1FC6 Hermes JavaScript bytecode
  18354. >8 lelong x \b, version %d
  18355. #------------------------------------------------------------------------------
  18356. # $File: jpeg,v 1.33 2021/03/21 15:04:50 christos Exp $
  18357. # JPEG images
  18358. # SunOS 5.5.1 had
  18359. #
  18360. # 0 string \377\330\377\340 JPEG file
  18361. # 0 string \377\330\377\356 JPG file
  18362. #
  18363. # both of which turn into "JPEG image data" here.
  18364. #
  18365. 0 beshort 0xffd8 JPEG image data
  18366. !:mime image/jpeg
  18367. !:apple 8BIMJPEG
  18368. !:strength *3
  18369. !:ext jpeg/jpg/jpe/jfif
  18370. >6 string JFIF \b, JFIF standard
  18371. # The following added by Erik Rossen <rossen@freesurf.ch> 1999-09-06
  18372. # in a vain attempt to add image size reporting for JFIF. Note that these
  18373. # tests are not fool-proof since some perfectly valid JPEGs are currently
  18374. # impossible to specify in magic(4) format.
  18375. # First, a little JFIF version info:
  18376. >>11 byte x \b %d.
  18377. >>12 byte x \b%02d
  18378. # Next, the resolution or aspect ratio of the image:
  18379. >>13 byte 0 \b, aspect ratio
  18380. >>13 byte 1 \b, resolution (DPI)
  18381. >>13 byte 2 \b, resolution (DPCM)
  18382. >>14 beshort x \b, density %dx
  18383. >>16 beshort x \b%d
  18384. >>4 beshort x \b, segment length %d
  18385. # Next, show thumbnail info, if it exists:
  18386. >>18 byte !0 \b, thumbnail %dx
  18387. >>>19 byte x \b%d
  18388. >6 string Exif \b, Exif standard: [
  18389. >>12 indirect/r x
  18390. >>12 string x \b]
  18391. # Jump to the first segment
  18392. >(4.S+4) use jpeg_segment
  18393. # This uses recursion...
  18394. 0 name jpeg_segment
  18395. >0 beshort 0xFFFE
  18396. # Recursion handled by FFE0
  18397. #>>(2.S+2) use jpeg_segment
  18398. >>2 pstring/HJ x \b, comment: "%s"
  18399. >0 beshort 0xFFC0
  18400. >>(2.S+2) use jpeg_segment
  18401. >>4 byte x \b, baseline, precision %d
  18402. >>7 beshort x \b, %dx
  18403. >>5 beshort x \b%d
  18404. >>9 byte x \b, components %d
  18405. >0 beshort 0xFFC1
  18406. >>(2.S+2) use jpeg_segment
  18407. >>4 byte x \b, extended sequential, precision %d
  18408. >>7 beshort x \b, %dx
  18409. >>5 beshort x \b%d
  18410. >>9 byte x \b, components %d
  18411. >0 beshort 0xFFC2
  18412. >>(2.S+2) use jpeg_segment
  18413. >>4 byte x \b, progressive, precision %d
  18414. >>7 beshort x \b, %dx
  18415. >>5 beshort x \b%d
  18416. >>9 byte x \b, components %d
  18417. # Define Huffman Tables
  18418. >0 beshort 0xFFC4
  18419. >>(2.S+2) use jpeg_segment
  18420. >0 beshort 0xFFE1
  18421. # Recursion handled by FFE0
  18422. #>>(2.S+2) use jpeg_segment
  18423. >>4 string Exif \b, Exif Standard: [
  18424. >>>10 indirect/r x
  18425. >>>10 string x \b]
  18426. # Application specific markers
  18427. >0 beshort&0xFFE0 =0xFFE0
  18428. >>(2.S+2) use jpeg_segment
  18429. # DB: Define Quantization tables
  18430. # DD: Define Restart interval [XXX: wrong here, it is 4 bytes]
  18431. # D8: Start of image
  18432. # D9: End of image
  18433. # Dn: Restart
  18434. >0 beshort&0xFFD0 =0xFFD0
  18435. >>0 beshort&0xFFE0 !0xFFE0
  18436. >>>(2.S+2) use jpeg_segment
  18437. #>0 beshort x unknown 0x%x
  18438. #>>(2.S+2) use jpeg_segment
  18439. # HSI is Handmade Software's proprietary JPEG encoding scheme
  18440. 0 string hsi1 JPEG image data, HSI proprietary
  18441. # From: David Santinoli <david@santinoli.com>
  18442. 0 string \x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A JPEG 2000
  18443. # From: Johan van der Knijff <johan.vanderknijff@kb.nl>
  18444. # Added sub-entries for JP2, JPX, JPM and MJ2 formats; added mimetypes
  18445. # https://github.com/bitsgalore/jp2kMagic
  18446. #
  18447. # Now read value of 'Brand' field, which yields a few possibilities:
  18448. >20 string \x6a\x70\x32\x20 Part 1 (JP2)
  18449. !:mime image/jp2
  18450. >20 string \x6a\x70\x78\x20 Part 2 (JPX)
  18451. !:mime image/jpx
  18452. >20 string \x6a\x70\x6d\x20 Part 6 (JPM)
  18453. !:mime image/jpm
  18454. >20 string \x6d\x6a\x70\x32 Part 3 (MJ2)
  18455. !:mime video/mj2
  18456. # Type: JPEG 2000 codesream
  18457. # From: Mathieu Malaterre <mathieu.malaterre@gmail.com>
  18458. 0 belong 0xff4fff51 JPEG 2000 codestream
  18459. 45 beshort 0xff52
  18460. # JPEG extended range
  18461. 0 string \x49\x49\xbc
  18462. >3 byte 1
  18463. >>4 lelong%2 0 JPEG-XR
  18464. !:mime image/jxr
  18465. !:ext jxr
  18466. # JPEG XL
  18467. # From: Ian Tester
  18468. 0 string \xff\x0a JPEG XL codestream
  18469. !:mime image/jxl
  18470. !:ext jxl
  18471. # JPEG XL (transcoded JPEG file)
  18472. 0 string \x00\x00\x00\x0cJXL\x20\x0d\x0a\x87\x0a JPEG XL container
  18473. !:mime image/jxl
  18474. !:ext jxl
  18475. #------------------------------------------------------------------------------
  18476. # $File: karma,v 1.8 2015/08/29 07:10:35 christos Exp $
  18477. # karma: file(1) magic for Karma data files
  18478. #
  18479. # From <rgooch@atnf.csiro.au>
  18480. 0 string KarmaRHD\040Version Karma Data Structure Version
  18481. >16 belong x %u
  18482. #------------------------------------------------------------------------------
  18483. # $File: kde,v 1.5 2010/11/25 15:00:12 christos Exp $
  18484. # kde: file(1) magic for KDE
  18485. 0 string/t [KDE\ Desktop\ Entry] KDE desktop entry
  18486. !:mime application/x-kdelnk
  18487. 0 string/t #\ KDE\ Config\ File KDE config file
  18488. !:mime application/x-kdelnk
  18489. 0 string/t #\ xmcd xmcd database file for kscd
  18490. !:mime text/x-xmcd
  18491. #------------------------------------------------------------------------------
  18492. # $File: keepass,v 1.2 2019/04/19 00:42:27 christos Exp $
  18493. # keepass: file(1) magic for KeePass file
  18494. #
  18495. # Keepass Password Safe:
  18496. # * original one: https://keepass.info/
  18497. # * *nix port: https://www.keepassx.org/
  18498. # * android port: https://code.google.com/p/keepassdroid/
  18499. 0 lelong 0x9AA2D903 Keepass password database
  18500. >4 lelong 0xB54BFB65 1.x KDB
  18501. >>48 lelong >0 \b, %d groups
  18502. >>52 lelong >0 \b, %d entries
  18503. >>8 lelong&0x0f 1 \b, SHA-256
  18504. >>8 lelong&0x0f 2 \b, AES
  18505. >>8 lelong&0x0f 4 \b, RC4
  18506. >>8 lelong&0x0f 8 \b, Twofish
  18507. >>120 lelong >0 \b, %d key transformation rounds
  18508. >4 lelong 0xB54BFB67 2.x KDBX
  18509. #------------------------------------------------------------------------------
  18510. # $File: kerberos,v 1.3 2019/04/19 00:42:27 christos Exp $
  18511. # kerberos: MIT kerberos file binary formats
  18512. #
  18513. # This magic entry is for demonstration purposes and could be improved
  18514. # if the following features were implemented in file:
  18515. #
  18516. # Strings inside [[ .. ]] in the descriptions have special meanings and
  18517. # are not printed.
  18518. #
  18519. # - Provide some form of iteration in number of components
  18520. # [[${counter}=%d]] in the description
  18521. # then append
  18522. # [${counter}--] in the offset of the entries
  18523. # - Provide a way to round the next offset
  18524. # Add [R:4] after the offset?
  18525. # - Provide a way to have optional entries
  18526. # XXX: Syntax:
  18527. # - Provide a way to "save" entries to print them later.
  18528. # if the description is [[${name}=%s]], then nothing is
  18529. # printed and a subsequent entry in the same magic file
  18530. # can refer to ${name}
  18531. # - Provide a way to format strings as hex values
  18532. #
  18533. # https://www.gnu.org/software/shishi/manual/html_node/\
  18534. # The-Keytab-Binary-File-Format.html
  18535. #
  18536. 0 name keytab_entry
  18537. #>0 beshort x \b, size=%d
  18538. #>2 beshort x \b, components=%d
  18539. >4 pstring/H x \b, realm=%s
  18540. >>&0 pstring/H x \b, principal=%s/
  18541. >>>&0 pstring/H x \b%s
  18542. >>>>&0 belong x \b, type=%d
  18543. >>>>>&0 bedate x \b, date=%s
  18544. >>>>>>&0 byte x \b, kvno=%u
  18545. #>>>>>>>&0 pstring/H x
  18546. #>>>>>>>>&0 belong x
  18547. #>>>>>>>>>>&0 use keytab_entry
  18548. 0 belong 0x05020000 Kerberos Keytab file
  18549. >4 use keytab_entry
  18550. #------------------------------------------------------------------------------
  18551. # $File: kicad,v 1.2 2020/05/06 14:03:28 christos Exp $
  18552. # kicad: file(1) magic for KiCad files
  18553. #
  18554. # See
  18555. #
  18556. # http://kicad-pcb.org
  18557. #
  18558. # KiCad Schematic Document
  18559. 0 string (kicad_sch
  18560. >10 byte 0x20 KiCad Schematic Document
  18561. !:ext kicad_sch/kicad_sch-bak
  18562. >>11 string (version
  18563. >>>19 byte 0x20
  18564. >>>>20 regex [0-9.]+ (Version %s)
  18565. # KiCad Schematic Document (Legacy)
  18566. 0 string EESchema
  18567. >8 byte 0x20
  18568. >>9 string Schematic
  18569. >>>18 byte 0x20 KiCad Schematic Document (Legacy)
  18570. !:ext sch/bak
  18571. >>>>24 string Version
  18572. >>>>>31 byte 0x20
  18573. >>>>>>32 string x (Version %s)
  18574. # KiCad Symbol Library
  18575. 0 string (kicad_symbol_lib
  18576. >17 byte 0x20 KiCad Symbol Library
  18577. !:ext kicad_sym
  18578. >>18 string (version
  18579. >>>26 byte 0x20
  18580. >>>>27 regex [0-9.]+ (Version %s)
  18581. # KiCad Symbol Library (Legacy)
  18582. 0 string EESchema-LIBRARY
  18583. >16 byte 0x20 KiCad Symbol Library (Legacy)
  18584. !:ext lib
  18585. >>17 string Version
  18586. >>>24 byte 0x20
  18587. >>>>25 string x (Version %s)
  18588. # KiCad Symbol Library Documentation (Legacy)
  18589. 0 string EESchema-DOCLIB
  18590. >15 byte 0x20 KiCad Symbol Library Documentation (Legacy)
  18591. !:ext dcm
  18592. >>17 string Version
  18593. >>>24 byte 0x20
  18594. >>>>25 string x (Version %s)
  18595. # KiCad Board Layout
  18596. 0 string (kicad_pcb
  18597. >10 byte 0x20 KiCad Board Layout
  18598. !:ext kicad_pcb/kicad_pcb-bak
  18599. >>11 string (version
  18600. >>>19 byte 0x20
  18601. >>>>20 regex [0-9.]+ (Version %s)
  18602. # KiCad Footprint
  18603. 0 string (module
  18604. >7 byte 0x20 KiCad Footprint
  18605. !:ext kicad_mod
  18606. # KiCad Footprint (Legacy)
  18607. 0 string PCBNEW-LibModule-V1 KiCad Footprint (Legacy)
  18608. !:ext mod
  18609. # KiCad Netlist
  18610. 0 string (export
  18611. >7 byte 0x20 KiCad Netlist
  18612. !:ext net
  18613. # KiCad Symbol Library Table
  18614. 0 string (sym_lib_table
  18615. >14 byte 0xA KiCad Symbol Library Table
  18616. >14 byte 0xD KiCad Symbol Library Table
  18617. >14 byte 0x20 KiCad Symbol Library Table
  18618. # KiCad Footprint Library Table
  18619. 0 string (fp_lib_table
  18620. >13 byte 0xA KiCad Footprint Library Table
  18621. >13 byte 0xD KiCad Footprint Library Table
  18622. >13 byte 0x20 KiCad Footprint Library Table
  18623. #------------------------------------------------------------------------------
  18624. # $File: kml,v 1.6 2019/05/21 04:50:10 christos Exp $
  18625. # Type: Google KML, formerly Keyhole Markup Language
  18626. # Future development of this format has been handed
  18627. # over to the Open Geospatial Consortium.
  18628. # https://www.opengeospatial.org/standards/kml/
  18629. # From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
  18630. 0 string/t \<?xml
  18631. >20 search/400 \ xmlns=
  18632. >>&0 regex ['"]http://earth.google.com/kml Google KML document
  18633. !:mime application/vnd.google-earth.kml+xml
  18634. >>>&1 string 2.0' \b, version 2.0
  18635. >>>&1 string 2.1' \b, version 2.1
  18636. >>>&1 string 2.2' \b, version 2.2
  18637. #------------------------------------------------------------------------------
  18638. # Type: OpenGIS KML, formerly Keyhole Markup Language
  18639. # This standard is maintained by the
  18640. # Open Geospatial Consortium.
  18641. # https://www.opengeospatial.org/standards/kml/
  18642. # From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
  18643. >>&0 regex ['"]http://www.opengis.net/kml OpenGIS KML document
  18644. !:mime application/vnd.google-earth.kml+xml
  18645. >>>&1 string/t 2.2 \b, version 2.2
  18646. #------------------------------------------------------------------------------
  18647. # Type: Google KML Archive (ZIP based)
  18648. # https://code.google.com/apis/kml/documentation/kml_tut.html
  18649. # From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
  18650. 0 string PK\003\004
  18651. >4 byte 0x14
  18652. >>30 string doc.kml Compressed Google KML Document, including resources.
  18653. !:mime application/vnd.google-earth.kmz
  18654. #------------------------------------------------------------------------------
  18655. # $File: lammps,v 1.1 2021/03/14 16:24:18 christos Exp $
  18656. #
  18657. # Magic file patterns for use with file(1) for the
  18658. # LAMMPS molecular dynamics simulation software.
  18659. # https://lammps.sandia.gov
  18660. #
  18661. # Updated: 2021-03-14 by akohlmey@gmail.com
  18662. # Binary restart file for the LAMMPS MD code
  18663. 0 string LammpS\ RestartT LAMMPS binary restart file
  18664. >0x14 long x (rev %d),
  18665. >>0x20 string x Version %s,
  18666. >>>0x10 lelong 0x0001 Little Endian
  18667. >>>0x10 lelong 0x1000 Big Endian
  18668. # Atom style binary dump file for the LAMMPS MD code
  18669. # written on a little endian machine
  18670. 0 lequad -8
  18671. >0x08 string DUMPATOM LAMMPS atom style binary dump
  18672. >>0x14 long x (rev %d),
  18673. >>>0x10 lelong 0x0001 Little Endian,
  18674. >>>>0x18 lequad x First time step: %lld
  18675. # written on a big endian machine
  18676. 0 bequad -8
  18677. >0x08 string DUMPATOM LAMMPS atom style binary dump
  18678. >>0x14 belong x (rev %d),
  18679. >>>0x10 lelong 0x1000 Big Endian,
  18680. >>>>0x18 bequad x First time step: %lld
  18681. # Atom style binary dump file for the LAMMPS MD code
  18682. # written on a little endian machine
  18683. 0 lequad -10
  18684. >0x08 string DUMPCUSTOM LAMMPS custom style binary dump
  18685. >>0x16 lelong x (rev %d),
  18686. >>>0x12 lelong 0x0001 Little Endian,
  18687. >>>>0x1a lequad x First time step: %lld
  18688. # written on a big endian machine
  18689. 0 bequad -10
  18690. >0x08 string DUMPCUSTOM LAMMPS custom style binary dump
  18691. >>0x16 belong x (rev %d),
  18692. >>>0x12 lelong 0x1000 Big Endian,
  18693. >>>>0x1a bequad x First time step: %lld
  18694. # LAMMPS log file
  18695. 0 string LAMMPS\ ( LAMMPS log file
  18696. >8 regex/16 [0-9]+\ [A-Za-z]+\ [0-9]+ written by version %s
  18697. # Data file written either by LAMMPS, msi2lmp or VMD/TopoTools
  18698. 0 string LAMMPS\ data\ file LAMMPS data file
  18699. >0x12 string CGCMM\ style written by TopoTools
  18700. >0x12 string msi2lmp written by msi2lmp
  18701. >0x11 string via\ write_data written by LAMMPS
  18702. # LAMMPS data file written by OVITO
  18703. 0 string #\ LAMMPS\ data\ file LAMMPS data file
  18704. >0x13 string written\ by\ OVITO written by OVITO
  18705. # LAMMPS text mode dump file
  18706. 0 string ITEM:\ TIMESTEP LAMMPS text mode dump,
  18707. >15 regex/16 [0-9]+ First time step: %s
  18708. #------------------------------------------------------------------------------
  18709. # $File: lecter,v 1.4 2009/09/19 16:28:10 christos Exp $
  18710. # DEC SRC Virtual Paper: Lectern files
  18711. # Karl M. Hegbloom <karlheg@inetarena.com>
  18712. 0 string lect DEC SRC Virtual Paper Lectern file
  18713. #------------------------------------------------------------------------------
  18714. # $File: lex,v 1.6 2009/09/19 16:28:10 christos Exp $
  18715. # lex: file(1) magic for lex
  18716. #
  18717. # derived empirically, your offsets may vary!
  18718. 0 search/100 yyprevious C program text (from lex)
  18719. >3 search/1 >\0 for %s
  18720. # C program text from GNU flex, from Daniel Quinlan <quinlan@yggdrasil.com>
  18721. 0 search/100 generated\ by\ flex C program text (from flex)
  18722. # lex description file, from Daniel Quinlan <quinlan@yggdrasil.com>
  18723. 0 search/1 %{ lex description text
  18724. #------------------------------------------------------------------------------
  18725. # $File: lif,v 1.9 2021/02/26 03:13:48 christos Exp $
  18726. # lif: file(1) magic for lif
  18727. #
  18728. # (Daniel Quinlan <quinlan@yggdrasil.com>)
  18729. #
  18730. # Modified by: Joerg Jenderek
  18731. # URL: https://www.hp9845.net/9845/projects/hpdir/
  18732. # https://github.com/bug400/lifutils
  18733. # Reference: https://www.hp9845.net/9845/downloads/manuals/LIF_excerpt_64941-90906_flpRef_Jan84.pdf
  18734. # Note: called by TrID "HP Logical Interchange Format disk image"
  18735. 0 beshort 0x8000
  18736. # GRR: line above is too general as it catches also compressed DEGAS low-res bitmap *.pc1
  18737. # skip many compressed DEGAS low-res bitmap *.pc1 by test for unused bytes
  18738. >14 beshort =0
  18739. # skip MUNCHIE.PC1 BOARD.PC1 ENEMIES.PC1 by test for low version number
  18740. >>20 ubeshort <0x0100
  18741. # skip DEGAS MUNCHIE.PC1 BOARD.PC1 ENEMIES.PC1 by test for ASCII like volume name
  18742. #>>>2 ubelong >0x2020201F
  18743. >>>0 use lif-file
  18744. 0 name lif-file
  18745. # LIF ID
  18746. >0 beshort x lif file
  18747. !:mime application/x-lif-disk
  18748. # lif used by Tony Duell LIF utilities; enhanced version by Joachim Siebold use also dat; hpi used by hpdir
  18749. !:ext lif/hpi/dat
  18750. # volume label; A-Z 0-9 _ ; default are 6 spaces
  18751. >2 string x "%.6s"
  18752. # version number; 0 for systems without extensions or 1 for model 64000
  18753. >20 ubeshort x \b, version %u
  18754. # LIF identifier; 010000 for system 3000
  18755. >12 beshort !0x1000 \b, LIF identifier 0x%x
  18756. # directory start address in units like: 2
  18757. >8 ubelong x \b, directory
  18758. >8 ubelong !2 start address %u
  18759. # length of directory like: 2 4 7 10 12 14 (for model 64000) 16 18 20 24 30 50 57 77 80
  18760. >16 ubelong x length %u
  18761. # level 1 extensions
  18762. >20 beshort =0
  18763. >>24 ubequad !0 \b, for extensions 0x%llx...
  18764. >20 beshort >0
  18765. >>24 ubequad !0 \b, extensions 0x%llx...
  18766. # word 21-126 reserved for extensions and future use; set to nil
  18767. >42 ubequad !0 \b, RESERVED 0x%llx
  18768. # lif first file name for standard directory; 0xffff... means uninitialized
  18769. >8 ubelong 2
  18770. >>512 string <\xff\xff \b, 1st file %-.10s
  18771. #------------------------------------------------------------------------------
  18772. # $File: linux,v 1.77 2021/02/24 23:05:02 christos Exp $
  18773. # linux: file(1) magic for Linux files
  18774. #
  18775. # Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
  18776. # The following basic Linux magic is useful for reference, but using
  18777. # "long" magic is a better practice in order to avoid collisions.
  18778. #
  18779. # 2 leshort 100 Linux/i386
  18780. # >0 leshort 0407 impure executable (OMAGIC)
  18781. # >0 leshort 0410 pure executable (NMAGIC)
  18782. # >0 leshort 0413 demand-paged executable (ZMAGIC)
  18783. # >0 leshort 0314 demand-paged executable (QMAGIC)
  18784. #
  18785. 0 lelong 0x00640107 Linux/i386 impure executable (OMAGIC)
  18786. >16 lelong 0 \b, stripped
  18787. 0 lelong 0x00640108 Linux/i386 pure executable (NMAGIC)
  18788. >16 lelong 0 \b, stripped
  18789. 0 lelong 0x0064010b Linux/i386 demand-paged executable (ZMAGIC)
  18790. >16 lelong 0 \b, stripped
  18791. 0 lelong 0x006400cc Linux/i386 demand-paged executable (QMAGIC)
  18792. >16 lelong 0 \b, stripped
  18793. #
  18794. 0 string \007\001\000 Linux/i386 object file
  18795. >20 lelong >0x1020 \b, DLL library
  18796. # Linux-8086 stuff:
  18797. 0 string \01\03\020\04 Linux-8086 impure executable
  18798. >28 long !0 not stripped
  18799. 0 string \01\03\040\04 Linux-8086 executable
  18800. >28 long !0 not stripped
  18801. #
  18802. 0 string \243\206\001\0 Linux-8086 object file
  18803. #
  18804. 0 string \01\03\020\20 Minix-386 impure executable
  18805. >28 long !0 not stripped
  18806. 0 string \01\03\040\20 Minix-386 executable
  18807. >28 long !0 not stripped
  18808. 0 string \01\03\04\20 Minix-386 NSYM/GNU executable
  18809. >28 long !0 not stripped
  18810. # core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
  18811. 216 lelong 0421 Linux/i386 core file
  18812. !:strength / 2
  18813. >220 string >\0 of '%s'
  18814. >200 lelong >0 (signal %d)
  18815. #
  18816. # LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
  18817. # this can be overridden by the DOS executable (COM) entry
  18818. 2 string LILO Linux/i386 LILO boot/chain loader
  18819. #
  18820. # Linux make config build file, from Ole Aamot <oka@oka.no>
  18821. # Updated by Ken Sharp
  18822. 28 string make\ config Linux make config build file (old)
  18823. 49 search/70 Kernel\ Configuration Linux make config build file
  18824. #
  18825. # PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
  18826. # Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
  18827. # See: https://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html
  18828. 0 leshort 0x0436 Linux/i386 PC Screen Font v1 data,
  18829. >2 byte&0x01 0 256 characters,
  18830. >2 byte&0x01 !0 512 characters,
  18831. >2 byte&0x02 0 no directory,
  18832. >2 byte&0x02 !0 Unicode directory,
  18833. >3 byte >0 8x%d
  18834. 0 string \x72\xb5\x4a\x86\x00\x00 Linux/i386 PC Screen Font v2 data,
  18835. >16 lelong x %d characters,
  18836. >12 lelong&0x01 0 no directory,
  18837. >12 lelong&0x01 !0 Unicode directory,
  18838. >24 lelong x %d
  18839. >28 lelong x \bx%d
  18840. # Linux swap and hibernate files
  18841. # Linux kernel: include/linux/swap.h
  18842. # util-linux: libblkid/src/superblocks/swap.c
  18843. # format v0, unsupported since 2002
  18844. 0xff6 string SWAP-SPACE Linux old swap file, 4k page size
  18845. 0x1ff6 string SWAP-SPACE Linux old swap file, 8k page size
  18846. 0x3ff6 string SWAP-SPACE Linux old swap file, 16k page size
  18847. 0x7ff6 string SWAP-SPACE Linux old swap file, 32k page size
  18848. 0xfff6 string SWAP-SPACE Linux old swap file, 64k page size
  18849. # format v1, supported since 1998
  18850. 0 name linux-swap
  18851. >0x400 lelong 1 little endian, version %u,
  18852. >>0x404 lelong x size %u pages,
  18853. >>0x408 lelong x %u bad pages,
  18854. >0x400 belong 1 big endian, version %u,
  18855. >>0x404 belong x size %u pages,
  18856. >>0x408 belong x %u bad pages,
  18857. >0x41c string \0 no label,
  18858. >0x41c string >\0 LABEL=%s,
  18859. >0x40c belong x UUID=%08x
  18860. >0x410 beshort x \b-%04x
  18861. >0x412 beshort x \b-%04x
  18862. >0x414 beshort x \b-%04x
  18863. >0x416 belong x \b-%08x
  18864. >0x41a beshort x \b%04x
  18865. 0xff6 string SWAPSPACE2 Linux swap file, 4k page size,
  18866. >0 use linux-swap
  18867. 0x1ff6 string SWAPSPACE2 Linux swap file, 8k page size,
  18868. >0 use linux-swap
  18869. 0x3ff6 string SWAPSPACE2 Linux swap file, 16k page size,
  18870. >0 use linux-swap
  18871. 0x7ff6 string SWAPSPACE2 Linux swap file, 32k page size,
  18872. >0 use linux-swap
  18873. 0xfff6 string SWAPSPACE2 Linux swap file, 64k page size,
  18874. >0 use linux-swap
  18875. 0 name linux-hibernate
  18876. >0 string S1SUSPEND \b, with SWSUSP1 image
  18877. >0 string S2SUSPEND \b, with SWSUSP2 image
  18878. >0 string ULSUSPEND \b, with uswsusp image
  18879. >0 string LINHIB0001 \b, with compressed hibernate image
  18880. >0 string \xed\xc3\x02\xe9\x98\x56\xe5\x0c \b, with tuxonice image
  18881. >0 default x \b, with unknown hibernate image
  18882. 0xfec string SWAPSPACE2 Linux swap file, 4k page size,
  18883. >0 use linux-swap
  18884. >0xff6 use linux-hibernate
  18885. 0x1fec string SWAPSPACE2 Linux swap file, 8k page size,
  18886. >0 use linux-swap
  18887. >0x1ff6 use linux-hibernate
  18888. 0x3fec string SWAPSPACE2 Linux swap file, 16k page size,
  18889. >0 use linux-swap
  18890. >0x3ff6 use linux-hibernate
  18891. 0x7fec string SWAPSPACE2 Linux swap file, 32k page size,
  18892. >0 use linux-swap
  18893. >0x7ff6 use linux-hibernate
  18894. 0xffec string SWAPSPACE2 Linux swap file, 64k page size,
  18895. >0 use linux-swap
  18896. >0xfff6 use linux-hibernate
  18897. #
  18898. # Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
  18899. # and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
  18900. # and Nicolas Lichtmaier <nick@debian.org>
  18901. # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
  18902. # Linux kernel boot images (i386 arch) (Wolfram Kleff)
  18903. # URL: https://www.kernel.org/doc/Documentation/x86/boot.txt
  18904. 514 string HdrS Linux kernel
  18905. !:strength + 55
  18906. # often no extension like in linux, vmlinuz, bzimage or memdisk but sometimes
  18907. # Acronis Recovery kernel64.dat and Plop Boot Manager plpbtrom.bin
  18908. # DamnSmallLinux 1.5 damnsmll.lnx
  18909. !:ext /dat/bin/lnx
  18910. >510 leshort 0xAA55 x86 boot executable
  18911. >>518 leshort >0x1ff
  18912. >>>529 byte 0 zImage,
  18913. >>>529 byte 1 bzImage,
  18914. >>>526 lelong >0
  18915. >>>>(526.s+0x200) string >\0 version %s,
  18916. >>498 leshort 1 RO-rootFS,
  18917. >>498 leshort 0 RW-rootFS,
  18918. >>508 leshort >0 root_dev 0x%X,
  18919. >>502 leshort >0 swap_dev 0x%X,
  18920. >>504 leshort >0 RAMdisksize %u KB,
  18921. >>506 leshort 0xFFFF Normal VGA
  18922. >>506 leshort 0xFFFE Extended VGA
  18923. >>506 leshort 0xFFFD Prompt for Videomode
  18924. >>506 leshort >0 Video mode %d
  18925. # This also matches new kernels, which were caught above by "HdrS".
  18926. 0 belong 0xb8c0078e Linux kernel
  18927. >0x1e3 string Loading version 1.3.79 or older
  18928. >0x1e9 string Loading from prehistoric times
  18929. # System.map files - Nicolas Lichtmaier <nick@debian.org>
  18930. 8 search/1 \ A\ _text Linux kernel symbol map text
  18931. # LSM entries - Nicolas Lichtmaier <nick@debian.org>
  18932. 0 search/1 Begin3 Linux Software Map entry text
  18933. 0 search/1 Begin4 Linux Software Map entry text (new format)
  18934. # From Matt Zimmerman, enhanced for v3 by Matthew Palmer
  18935. 0 belong 0x4f4f4f4d User-mode Linux COW file
  18936. >4 belong <3 \b, version %d
  18937. >>8 string >\0 \b, backing file %s
  18938. >4 belong >2 \b, version %d
  18939. >>32 string >\0 \b, backing file %s
  18940. ############################################################################
  18941. # Linux kernel versions
  18942. 0 string \xb8\xc0\x07\x8e\xd8\xb8\x00\x90 Linux
  18943. >497 leshort 0 x86 boot sector
  18944. >>514 belong 0x8e of a kernel from the dawn of time!
  18945. >>514 belong 0x908ed8b4 version 0.99-1.1.42
  18946. >>514 belong 0x908ed8b8 for memtest86
  18947. >497 leshort !0 x86 kernel
  18948. >>504 leshort >0 RAMdisksize=%u KB
  18949. >>502 leshort >0 swap=0x%X
  18950. >>508 leshort >0 root=0x%X
  18951. >>>498 leshort 1 \b-ro
  18952. >>>498 leshort 0 \b-rw
  18953. >>506 leshort 0xFFFF vga=normal
  18954. >>506 leshort 0xFFFE vga=extended
  18955. >>506 leshort 0xFFFD vga=ask
  18956. >>506 leshort >0 vga=%d
  18957. >>514 belong 0x908ed881 version 1.1.43-1.1.45
  18958. >>514 belong 0x15b281cd
  18959. >>>0xa8e belong 0x55AA5a5a version 1.1.46-1.2.13,1.3.0
  18960. >>>0xa99 belong 0x55AA5a5a version 1.3.1,2
  18961. >>>0xaa3 belong 0x55AA5a5a version 1.3.3-1.3.30
  18962. >>>0xaa6 belong 0x55AA5a5a version 1.3.31-1.3.41
  18963. >>>0xb2b belong 0x55AA5a5a version 1.3.42-1.3.45
  18964. >>>0xaf7 belong 0x55AA5a5a version 1.3.46-1.3.72
  18965. >>514 string HdrS
  18966. >>>518 leshort >0x1FF
  18967. >>>>529 byte 0 \b, zImage
  18968. >>>>529 byte 1 \b, bzImage
  18969. >>>>(526.s+0x200) string >\0 \b, version %s
  18970. # Linux boot sector thefts.
  18971. 0 belong 0xb8c0078e Linux
  18972. >0x1e6 belong 0x454c4b53 ELKS Kernel
  18973. >0x1e6 belong !0x454c4b53 style boot sector
  18974. ############################################################################
  18975. # Linux S390 kernel image
  18976. # Created by: Jan Kaluza <jkaluza@redhat.com>
  18977. 8 string \x02\x00\x00\x18\x60\x00\x00\x50\x02\x00\x00\x68\x60\x00\x00\x50\x40\x40\x40\x40\x40\x40\x40\x40 Linux S390
  18978. >0x00010000 search/b/4096 \x00\x0a\x00\x00\x8b\xad\xcc\xcc
  18979. # 64bit
  18980. >>&0 string \xc1\x00\xef\xe3\xf0\x68\x00\x00 Z10 64bit kernel
  18981. >>&0 string \xc1\x00\xef\xc3\x00\x00\x00\x00 Z9-109 64bit kernel
  18982. >>&0 string \xc0\x00\x20\x00\x00\x00\x00\x00 Z990 64bit kernel
  18983. >>&0 string \x00\x00\x00\x00\x00\x00\x00\x00 Z900 64bit kernel
  18984. # 32bit
  18985. >>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z10 32bit kernel
  18986. >>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z9-109 32bit kernel
  18987. >>&0 string \x80\x00\x20\x00\x00\x00\x00\x00 Z990 32bit kernel
  18988. >>&0 string \x80\x00\x00\x00\x00\x00\x00\x00 Z900 32bit kernel
  18989. ############################################################################
  18990. # Linux ARM compressed kernel image
  18991. # From: Kevin Cernekee <cernekee@gmail.com>
  18992. # Update: Joerg Jenderek
  18993. 0x24 lelong 0x016f2818 Linux kernel ARM boot executable zImage
  18994. # There are three possible situations: LE, BE with LE bootloader and pure BE.
  18995. # In order to aid telling these apart a new endian flag was added. In order
  18996. # to support kernels before the flag and BE with LE bootloader was added we'll
  18997. # do a negative check against the BE variant of the flag when we see a LE magic.
  18998. >0x30 belong !0x04030201 (little-endian)
  18999. # raspian "kernel7.img", Vu+ Ultimo4K "kernel_auto.bin"
  19000. !:ext img/bin
  19001. >0x30 belong 0x04030201 (big-endian)
  19002. 0x24 belong 0x016f2818 Linux kernel ARM boot executable zImage (big-endian)
  19003. ############################################################################
  19004. # Linux AARCH64 kernel image
  19005. 0x38 lelong 0x644d5241 Linux kernel ARM64 boot executable Image
  19006. >0x18 lelong ^1 \b, little-endian
  19007. >0x18 lelong &1 \b, big-endian
  19008. >0x18 lelong &2 \b, 4K pages
  19009. >0x18 lelong &4 \b, 16K pages
  19010. >0x18 lelong &6 \b, 32K pages
  19011. ############################################################################
  19012. # Linux 8086 executable
  19013. 0 lelong&0xFF0000FF 0xC30000E9 Linux-Dev86 executable, headerless
  19014. >5 string .
  19015. >>4 string >\0 \b, libc version %s
  19016. 0 lelong&0xFF00FFFF 0x4000301 Linux-8086 executable
  19017. >2 byte&0x01 !0 \b, unmapped zero page
  19018. >2 byte&0x20 0 \b, impure
  19019. >2 byte&0x20 !0
  19020. >>2 byte&0x10 !0 \b, A_EXEC
  19021. >2 byte&0x02 !0 \b, A_PAL
  19022. >2 byte&0x04 !0 \b, A_NSYM
  19023. >2 byte&0x08 !0 \b, A_STAND
  19024. >2 byte&0x40 !0 \b, A_PURE
  19025. >2 byte&0x80 !0 \b, A_TOVLY
  19026. >28 long !0 \b, not stripped
  19027. >37 string .
  19028. >>36 string >\0 \b, libc version %s
  19029. # 0 lelong&0xFF00FFFF 0x10000301 ld86 I80386 executable
  19030. # 0 lelong&0xFF00FFFF 0xB000301 ld86 M68K executable
  19031. # 0 lelong&0xFF00FFFF 0xC000301 ld86 NS16K executable
  19032. # 0 lelong&0xFF00FFFF 0x17000301 ld86 SPARC executable
  19033. # SYSLINUX boot logo files (from 'ppmtolss16' sources)
  19034. # https://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:
  19035. # file extension .lss .16
  19036. 0 lelong =0x1413f33d SYSLINUX' LSS16 image data
  19037. # syslinux-4.05/mime/image/x-lss16.xml
  19038. !:mime image/x-lss16
  19039. >4 leshort x \b, width %d
  19040. >6 leshort x \b, height %d
  19041. 0 string OOOM User-Mode-Linux's Copy-On-Write disk image
  19042. >4 belong x version %d
  19043. # SE Linux policy database
  19044. # From: Mike Frysinger <vapier@gentoo.org>
  19045. 0 lelong 0xf97cff8c SE Linux policy
  19046. >16 lelong x v%d
  19047. >20 lelong 1 MLS
  19048. >24 lelong x %d symbols
  19049. >28 lelong x %d ocons
  19050. # Linux Logical Volume Manager (LVM)
  19051. # Emmanuel VARAGNAT <emmanuel.varagnat@guzu.net>
  19052. #
  19053. # System ID, UUID and volume group name are 128 bytes long
  19054. # but they should never be full and initialized with zeros...
  19055. #
  19056. # LVM1
  19057. #
  19058. 0x0 string/b HM\001 LVM1 (Linux Logical Volume Manager), version 1
  19059. >0x12c string/b >\0 , System ID: %s
  19060. 0x0 string/b HM\002 LVM1 (Linux Logical Volume Manager), version 2
  19061. >0x12c string/b >\0 , System ID: %s
  19062. # LVM2
  19063. #
  19064. # It seems that the label header can be in one the four first sector
  19065. # of the disk... (from _find_labeller in lib/label/label.c of LVM2)
  19066. #
  19067. # 0x200 seems to be the common case
  19068. 0 name lvm2
  19069. # display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
  19070. >0x0 string >\x2f \b, UUID: %.6s
  19071. >0x6 string >\x2f \b-%.4s
  19072. >0xa string >\x2f \b-%.4s
  19073. >0xe string >\x2f \b-%.4s
  19074. >0x12 string >\x2f \b-%.4s
  19075. >0x16 string >\x2f \b-%.4s
  19076. >0x1a string >\x2f \b-%.6s
  19077. >0x20 lequad x \b, size: %lld
  19078. # read the offset to add to the start of the header, and the header
  19079. # start in 0x200
  19080. 0x218 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  19081. >&(&-12.l-0x20) use lvm2
  19082. 0x018 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  19083. >&(&-12.l-0x20) use lvm2
  19084. 0x418 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  19085. >&(&-12.l-0x20) use lvm2
  19086. 0x618 string/b LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  19087. >&(&-12.l-0x20) use lvm2
  19088. # LVM snapshot
  19089. # from Jason Farrel
  19090. 0 string SnAp LVM Snapshot (CopyOnWrite store)
  19091. >4 lelong !0 - valid,
  19092. >4 lelong 0 - invalid,
  19093. >8 lelong x version %d,
  19094. >12 lelong x chunk_size %d
  19095. # SE Linux policy database
  19096. 0 lelong 0xf97cff8c SE Linux policy
  19097. >16 lelong x v%d
  19098. >20 lelong 1 MLS
  19099. >24 lelong x %d symbols
  19100. >28 lelong x %d ocons
  19101. # LUKS: Linux Unified Key Setup, On-Disk Format, http://luks.endorphin.org/spec
  19102. # Anthon van der Neut (anthon@mnt.org)
  19103. 0 string LUKS\xba\xbe LUKS encrypted file,
  19104. >6 beshort x ver %d
  19105. >8 string x [%s,
  19106. >40 string x %s,
  19107. >72 string x %s]
  19108. >168 string x UUID: %s
  19109. # Summary: Xen saved domain file
  19110. # Created by: Radek Vokal <rvokal@redhat.com>
  19111. 0 string LinuxGuestRecord Xen saved domain
  19112. >20 search/256 (name
  19113. >>&1 string x (name %s)
  19114. # Type: Xen, the virtual machine monitor
  19115. # From: Radek Vokal <rvokal@redhat.com>
  19116. 0 string LinuxGuestRecord Xen saved domain
  19117. #>2 regex \(name\ [^)]*\) %s
  19118. >20 search/256 (name (name
  19119. >>&1 string x %s...)
  19120. # Systemd journald files
  19121. # See https://www.freedesktop.org/wiki/Software/systemd/journal-files/.
  19122. # From: Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl>
  19123. # check magic
  19124. 0 string LPKSHHRH
  19125. # check that state is one of known values
  19126. >16 ubyte&252 0
  19127. # check that each half of three unique id128s is non-zero
  19128. >>24 ubequad >0
  19129. >>>32 ubequad >0
  19130. >>>>40 ubequad >0
  19131. >>>>>48 ubequad >0
  19132. >>>>>>56 ubequad >0
  19133. >>>>>>>64 ubequad >0 Journal file
  19134. !:mime application/octet-stream
  19135. # provide more info
  19136. >>>>>>>>184 leqdate 0 empty
  19137. >>>>>>>>16 ubyte 0 \b, offline
  19138. >>>>>>>>16 ubyte 1 \b, online
  19139. >>>>>>>>16 ubyte 2 \b, archived
  19140. >>>>>>>>8 ulelong&1 1 \b, sealed
  19141. >>>>>>>>12 ulelong&1 1 \b, compressed
  19142. # BCache backing and cache devices
  19143. # From: Gabriel de Perthuis <g2p.code@gmail.com>
  19144. 0x1008 lequad 8
  19145. >0x1018 string \xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81 BCache
  19146. >>0x1010 ulequad 0 cache device
  19147. >>0x1010 ulequad 1 backing device
  19148. >>0x1010 ulequad 3 cache device
  19149. >>0x1010 ulequad 4 backing device
  19150. >>0x1048 string >0 \b, label "%.32s"
  19151. >>0x1028 ubelong x \b, uuid %08x
  19152. >>0x102c ubeshort x \b-%04x
  19153. >>0x102e ubeshort x \b-%04x
  19154. >>0x1030 ubeshort x \b-%04x
  19155. >>0x1032 ubelong x \b-%08x
  19156. >>0x1036 ubeshort x \b%04x
  19157. >>0x1038 ubelong x \b, set uuid %08x
  19158. >>0x103c ubeshort x \b-%04x
  19159. >>0x103e ubeshort x \b-%04x
  19160. >>0x1040 ubeshort x \b-%04x
  19161. >>0x1042 ubelong x \b-%08x
  19162. >>0x1046 ubeshort x \b%04x
  19163. # Linux device tree:
  19164. # File format description can be found in the Linux kernel sources at
  19165. # Documentation/devicetree/booting-without-of.txt
  19166. # From Christoph Biedl
  19167. 0 belong 0xd00dfeed
  19168. # structure must be within blob, strings are omitted to handle devicetrees > 1M
  19169. >&(8.L) byte x
  19170. >>20 belong >1 Device Tree Blob version %d
  19171. >>>4 belong x \b, size=%d
  19172. >>>20 belong >1
  19173. >>>>28 belong x \b, boot CPU=%d
  19174. >>>20 belong >2
  19175. >>>>32 belong x \b, string block size=%d
  19176. >>>20 belong >16
  19177. >>>>36 belong x \b, DT structure block size=%d
  19178. # glibc locale archive as defined in glibc locale/locarchive.h
  19179. 0 lelong 0xde020109 locale archive
  19180. >24 lelong x %d strings
  19181. # Linux Software RAID (mdadm)
  19182. # Russell Coker <russell@coker.com.au>
  19183. 0 name linuxraid
  19184. >16 belong x UUID=%8x:
  19185. >20 belong x \b%8x:
  19186. >24 belong x \b%8x:
  19187. >28 belong x \b%8x
  19188. >32 string x name=%s
  19189. >72 lelong x level=%d
  19190. >92 lelong x disks=%d
  19191. 4096 lelong 0xa92b4efc Linux Software RAID
  19192. >4100 lelong x version 1.2 (%d)
  19193. >4096 use linuxraid
  19194. 0 lelong 0xa92b4efc Linux Software RAID
  19195. >4 lelong x version 1.1 (%d)
  19196. >0 use linuxraid
  19197. # Summary: Database file for mlocate
  19198. # Description: A database file as used by mlocate, a fast implementation
  19199. # of locate/updatedb. It uses merging to reuse the existing
  19200. # database and avoid rereading most of the filesystem. It's
  19201. # the default version of locate on Arch Linux (and others).
  19202. # File path: /var/lib/mlocate/mlocate.db by default (but configurable)
  19203. # Site: https://fedorahosted.org/mlocate/
  19204. # Format docs: https://linux.die.net/man/5/mlocate.db
  19205. # Type: mlocate database file
  19206. # URL: https://fedorahosted.org/mlocate/
  19207. # From: Wander Nauta <info@wandernauta.nl>
  19208. 0 string \0mlocate mlocate database
  19209. >12 byte x \b, version %d
  19210. >13 byte 1 \b, require visibility
  19211. >16 string x \b, root %s
  19212. # Dump files for iproute2 tool. Generated by the "ip r|a save" command. URL:
  19213. # https://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
  19214. # From: Pavel Emelyanov <xemul@parallels.com>
  19215. 0 lelong 0x45311224 iproute2 routes dump
  19216. 0 lelong 0x47361222 iproute2 addresses dump
  19217. # Image and service files for CRIU tool.
  19218. # URL: https://criu.org
  19219. # From: Pavel Emelyanov <xemul@parallels.com>
  19220. 0 lelong 0x54564319 CRIU image file v1.1
  19221. 0 lelong 0x55105940 CRIU service file
  19222. 0 lelong 0x58313116 CRIU inventory
  19223. # Kdump compressed dump files
  19224. # https://sourceforge.net/p/makedumpfile/code/ci/master/tree/IMPLEMENTATION
  19225. 0 string KDUMP Kdump compressed dump
  19226. >8 long x v%d
  19227. >12 string >\0 \b, system %s
  19228. >77 string >\0 \b, node %s
  19229. >142 string >\0 \b, release %s
  19230. >207 string >\0 \b, version %s
  19231. >272 string >\0 \b, machine %s
  19232. >337 string >\0 \b, domain %s
  19233. # Device Tree files
  19234. 0 search/1024 /dts-v1/ Device Tree File (v1)
  19235. # beat c code
  19236. !:strength +14
  19237. # e2fsck undo file
  19238. # David Gilman <davidgilman1@gmail.com>
  19239. 0 string E2UNDO02 e2fsck undo file, version 2
  19240. >44 lelong x \b, undo file is
  19241. >>44 lelong&1 0 not finished
  19242. >>44 lelong&1 1 finished
  19243. >48 lelong x \b, undo file features:
  19244. >>48 lelong&1 0 lacks filesystem offset
  19245. >>48 lelong&1 1 has filesystem offset
  19246. >>>64 lequad x at 0x%llx
  19247. # ansible vault (does not really belong here)
  19248. 0 string $ANSIBLE_VAULT; Ansible Vault
  19249. >&0 regex [0-9]*\.[0-9]* \b, version %s
  19250. >>&0 string ;
  19251. >>>&0 regex [A-Z0-9]* \b, encryption %s
  19252. #------------------------------------------------------------------------------
  19253. # $File: lisp,v 1.27 2020/08/14 19:23:39 christos Exp $
  19254. # lisp: file(1) magic for lisp programs
  19255. #
  19256. # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
  19257. # updated by Joerg Jenderek
  19258. # GRR: This lot is too weak
  19259. #0 string ;;
  19260. # windows INF files often begin with semicolon and use CRLF as line end
  19261. # lisp files are mainly created on unix system with LF as line end
  19262. #>2 search/4096 !\r Lisp/Scheme program text
  19263. #>2 search/4096 \r Windows INF file
  19264. 0 search/4096 (setq\ Lisp/Scheme program text
  19265. !:mime text/x-lisp
  19266. 0 search/4096 (defvar\ Lisp/Scheme program text
  19267. !:mime text/x-lisp
  19268. 0 search/4096 (defparam\ Lisp/Scheme program text
  19269. !:mime text/x-lisp
  19270. 0 search/4096 (defun\ Lisp/Scheme program text
  19271. !:mime text/x-lisp
  19272. 0 search/4096 (autoload\ Lisp/Scheme program text
  19273. !:mime text/x-lisp
  19274. 0 search/4096 (custom-set-variables\ Lisp/Scheme program text
  19275. !:mime text/x-lisp
  19276. # URL: https://en.wikipedia.org/wiki/Emacs_Lisp
  19277. # Reference: https://ftp.gnu.org/old-gnu/emacs/elisp-manual-18-1.03.tar.gz
  19278. # Update: Joerg Jenderek
  19279. # Emacs 18 - this is always correct, but not very magical.
  19280. 0 string \012(
  19281. # look for emacs lisp keywords
  19282. # GRR: split regex because it is too long or get error like
  19283. # lisp, 36: Warning: cannot get string from `^(defun|defvar|defconst|defmacro|setq|fset|put|provide|require|'
  19284. >&0 regex \^(defun|defvar|defconst|defmacro|setq|fset) Emacs v18 byte-compiled Lisp data
  19285. !:mime application/x-elc
  19286. # https://searchcode.com/codesearch/view/2173420/
  19287. # not really pure text
  19288. !:apple EMAxTEXT
  19289. !:ext elc
  19290. # remaining regex
  19291. >&0 regex \^(put|provide|require|random) Emacs v18 byte-compiled Lisp data
  19292. !:mime application/x-elc
  19293. !:apple EMAxTEXT
  19294. !:ext elc
  19295. # missed cl.elc dbx.elc simple.elc look like normal lisp starting with ;;;
  19296. # Emacs 19+ - ver. recognition added by Ian Springer
  19297. # Also applies to XEmacs 19+ .elc files; could tell them apart with regexs
  19298. # - Chris Chittleborough <cchittleborough@yahoo.com.au>
  19299. # Update: Joerg Jenderek
  19300. 0 string ;ELC
  19301. # version\0\0\0
  19302. >4 byte >18 Emacs/XEmacs v%d byte-compiled Lisp data
  19303. # why less than 32 ? does not make sense to me. GNU Emacs version is 24.5 at April 2015
  19304. #>4 byte <32 Emacs/XEmacs v%d byte-compiled Lisp data
  19305. !:mime application/x-elc
  19306. !:apple EMAxTEXT
  19307. !:ext elc
  19308. # Files produced by GNU/Emacs pdumper
  19309. 0 string DUMPEDGNUEMACS GNU/Emacs pdumper image
  19310. # Files produced by CLISP Common Lisp From: Bruno Haible <haible@ilog.fr>
  19311. 0 string (SYSTEM::VERSION\040' CLISP byte-compiled Lisp program (pre 2004-03-27)
  19312. 0 string (|SYSTEM|::|VERSION|\040' CLISP byte-compiled Lisp program text
  19313. 0 long 0x70768BD2 CLISP memory image data
  19314. 0 long 0xD28B7670 CLISP memory image data, other endian
  19315. #.com and .bin for MIT scheme
  19316. 0 string \372\372\372\372 MIT scheme (library?)
  19317. # From: David Allouche <david@allouche.net>
  19318. 0 search/1 \<TeXmacs| TeXmacs document text
  19319. !:mime text/texmacs
  19320. #------------------------------------------------------------------------------
  19321. # $File: llvm,v 1.9 2019/04/19 00:42:27 christos Exp $
  19322. # llvm: file(1) magic for LLVM byte-codes
  19323. # URL: https://llvm.org/docs/BitCodeFormat.html
  19324. # From: Al Stone <ahs3@fc.hp.com>
  19325. 0 string llvm LLVM byte-codes, uncompressed
  19326. 0 string llvc0 LLVM byte-codes, null compression
  19327. 0 string llvc1 LLVM byte-codes, gzip compression
  19328. 0 string llvc2 LLVM byte-codes, bzip2 compression
  19329. 0 lelong 0x0b17c0de LLVM bitcode, wrapper
  19330. # Are these Mach-O ABI values? They appear to be.
  19331. >16 lelong 0x01000007 x86_64
  19332. >16 lelong 0x00000007 i386
  19333. >16 lelong 0x00000012 ppc
  19334. >16 lelong 0x01000012 ppc64
  19335. >16 lelong 0x0000000c arm
  19336. 0 string BC\xc0\xde LLVM IR bitcode
  19337. #------------------------------------------------------------------------------
  19338. # $File: locoscript,v 1.1 2021/01/03 20:56:25 christos Exp $
  19339. # locoscript: file(1) magic for LocoScript documents and related files
  19340. #
  19341. # See http://fileformats.archiveteam.org/wiki/LocoScript
  19342. 0 string JOY\x01\x01 LocoScript 1 document
  19343. 0 string JOY\x01\x02 LocoScript 2 document
  19344. 0 string JOY\x01\x04 LocoScript 3 document
  19345. 0 string JOY\x01\x06 LocoScript 4 document
  19346. 0 string DOC\x01\x01 LocoScript PC document
  19347. 0 string DOC\x01\x03 LocoScript Professional document
  19348. #------------------------------------------------------------------------------
  19349. # $File: lua,v 1.8 2020/10/08 23:23:56 christos Exp $
  19350. # lua: file(1) magic for Lua scripting language
  19351. # URL: https://www.lua.org/
  19352. # From: Reuben Thomas <rrt@sc3d.org>, Seo Sanghyeon <tinuviel@sparcs.kaist.ac.kr>
  19353. # Lua scripts
  19354. 0 search/1/w #!\ /usr/bin/lua Lua script text executable
  19355. !:mime text/x-lua
  19356. 0 search/1/w #!\ /usr/local/bin/lua Lua script text executable
  19357. !:mime text/x-lua
  19358. 0 search/1 #!/usr/bin/env\ lua Lua script text executable
  19359. !:mime text/x-lua
  19360. 0 search/1 #!\ /usr/bin/env\ lua Lua script text executable
  19361. !:mime text/x-lua
  19362. # Lua bytecode
  19363. 0 string \033Lua Lua bytecode,
  19364. # 2.4 uses 0x23 as its version byte because it shares the format
  19365. # with 2.3 (which was never released publicly).
  19366. >4 byte 0x23 version 2.4
  19367. >4 byte 0x25 version 2.5/3.0
  19368. >4 byte 0x31 version 3.1
  19369. >4 byte 0x32 version 3.2
  19370. >4 byte 0x40 version 4.0
  19371. >4 byte 0x50 version 5.0
  19372. >4 byte 0x51 version 5.1
  19373. >4 byte 0x52 version 5.2
  19374. >4 byte 0x53 version 5.3
  19375. >4 byte 0x54 version 5.4
  19376. #------------------------------------------------------------------------------
  19377. # $File: luks,v 1.4 2009/09/19 16:28:10 christos Exp $
  19378. # luks: file(1) magic for Linux Unified Key Setup
  19379. # URL: http://luks.endorphin.org/spec
  19380. # From: Anthon van der Neut <anthon@mnt.org>
  19381. 0 string LUKS\xba\xbe LUKS encrypted file,
  19382. >6 beshort x ver %d
  19383. >8 string x [%s,
  19384. >40 string x %s,
  19385. >72 string x %s]
  19386. >168 string x UUID: %s
  19387. #------------------------------------------------------------------------------
  19388. # $File: m4,v 1.3 2019/02/27 16:46:23 christos Exp $
  19389. # make: file(1) magic for M4 scripts
  19390. #
  19391. 0 search/8192 dnl
  19392. >0 regex \^dnl\ M4 macro processor script text
  19393. !:mime text/x-m4
  19394. 0 search/8192 AC_DEFUN
  19395. >0 regex \^AC_DEFUN\\(\\[ M4 macro processor script text
  19396. !:strength + 15
  19397. !:mime text/x-m4
  19398. #------------------------------------------------------------
  19399. # $File: mach,v 1.28 2020/12/12 20:01:47 christos Exp $
  19400. # Mach has two magic numbers, 0xcafebabe and 0xfeedface.
  19401. # Unfortunately the first, cafebabe, is shared with
  19402. # Java ByteCode, so they are both handled in the file "cafebabe".
  19403. # The "feedface" ones are handled herein.
  19404. #------------------------------------------------------------
  19405. # if set, it's for the 64-bit version of the architecture
  19406. # yes, this is separate from the low-order magic number bit
  19407. # it's also separate from the "64-bit libraries" bit in the
  19408. # upper 8 bits of the CPU subtype
  19409. # Reference: https://opensource.apple.com/source/cctools/cctools-949.0.1/
  19410. # include/mach-o/loader.h
  19411. # display CPU type as string like: i386 x86_64 ... armv7 armv7k ...
  19412. 0 name mach-o-cpu
  19413. >0 belong&0xff000000 0
  19414. #
  19415. # 32-bit ABIs.
  19416. #
  19417. # 1 vax
  19418. >>0 belong&0x00ffffff 1
  19419. >>>4 belong&0x00ffffff 0 vax
  19420. >>>4 belong&0x00ffffff 1 vax11/780
  19421. >>>4 belong&0x00ffffff 2 vax11/785
  19422. >>>4 belong&0x00ffffff 3 vax11/750
  19423. >>>4 belong&0x00ffffff 4 vax11/730
  19424. >>>4 belong&0x00ffffff 5 uvaxI
  19425. >>>4 belong&0x00ffffff 6 uvaxII
  19426. >>>4 belong&0x00ffffff 7 vax8200
  19427. >>>4 belong&0x00ffffff 8 vax8500
  19428. >>>4 belong&0x00ffffff 9 vax8600
  19429. >>>4 belong&0x00ffffff 10 vax8650
  19430. >>>4 belong&0x00ffffff 11 vax8800
  19431. >>>4 belong&0x00ffffff 12 uvaxIII
  19432. >>>4 belong&0x00ffffff >12 vax subarchitecture=%d
  19433. >>0 belong&0x00ffffff 2 romp
  19434. >>0 belong&0x00ffffff 3 architecture=3
  19435. >>0 belong&0x00ffffff 4 ns32032
  19436. >>0 belong&0x00ffffff 5 ns32332
  19437. >>0 belong&0x00ffffff 6 m68k
  19438. # 7 x86
  19439. >>0 belong&0x00ffffff 7
  19440. >>>4 belong&0x0000000f 3 i386
  19441. >>>4 belong&0x0000000f 4 i486
  19442. >>>>4 belong&0x00fffff0 0
  19443. >>>>4 belong&0x00fffff0 0x80 \bsx
  19444. >>>4 belong&0x0000000f 5 i586
  19445. >>>4 belong&0x0000000f 6
  19446. >>>>4 belong&0x00fffff0 0 p6
  19447. >>>>4 belong&0x00fffff0 0x10 pentium_pro
  19448. >>>>4 belong&0x00fffff0 0x20 pentium_2_m0x20
  19449. >>>>4 belong&0x00fffff0 0x30 pentium_2_m3
  19450. >>>>4 belong&0x00fffff0 0x40 pentium_2_m0x40
  19451. >>>>4 belong&0x00fffff0 0x50 pentium_2_m5
  19452. >>>>4 belong&0x00fffff0 >0x50 pentium_2_m0x%x
  19453. >>>4 belong&0x0000000f 7 celeron
  19454. >>>>4 belong&0x00fffff0 0x00 \b_m0x%x
  19455. >>>>4 belong&0x00fffff0 0x10 \b_m0x%x
  19456. >>>>4 belong&0x00fffff0 0x20 \b_m0x%x
  19457. >>>>4 belong&0x00fffff0 0x30 \b_m0x%x
  19458. >>>>4 belong&0x00fffff0 0x40 \b_m0x%x
  19459. >>>>4 belong&0x00fffff0 0x50 \b_m0x%x
  19460. >>>>4 belong&0x00fffff0 0x60
  19461. >>>>4 belong&0x00fffff0 0x70 \b_mobile
  19462. >>>>4 belong&0x00fffff0 >0x70 \b_m0x%x
  19463. >>>4 belong&0x0000000f 8 pentium_3
  19464. >>>>4 belong&0x00fffff0 0x00
  19465. >>>>4 belong&0x00fffff0 0x10 \b_m
  19466. >>>>4 belong&0x00fffff0 0x20 \b_xeon
  19467. >>>>4 belong&0x00fffff0 >0x20 \b_m0x%x
  19468. >>>4 belong&0x0000000f 9 pentiumM
  19469. >>>>4 belong&0x00fffff0 0x00
  19470. >>>>4 belong&0x00fffff0 >0x00 \b_m0x%x
  19471. >>>4 belong&0x0000000f 10 pentium_4
  19472. >>>>4 belong&0x00fffff0 0x00
  19473. >>>>4 belong&0x00fffff0 0x10 \b_m
  19474. >>>>4 belong&0x00fffff0 >0x10 \b_m0x%x
  19475. >>>4 belong&0x0000000f 11 itanium
  19476. >>>>4 belong&0x00fffff0 0x00
  19477. >>>>4 belong&0x00fffff0 0x10 \b_2
  19478. >>>>4 belong&0x00fffff0 >0x10 \b_m0x%x
  19479. >>>4 belong&0x0000000f 12 xeon
  19480. >>>>4 belong&0x00fffff0 0x00
  19481. >>>>4 belong&0x00fffff0 0x10 \b_mp
  19482. >>>>4 belong&0x00fffff0 >0x10 \b_m0x%x
  19483. >>>4 belong&0x0000000f >12 ia32 family=%d
  19484. >>>>4 belong&0x00fffff0 0x00
  19485. >>>>4 belong&0x00fffff0 >0x00 model=%x
  19486. >>0 belong&0x00ffffff 8 mips
  19487. >>>4 belong&0x00ffffff 1 R2300
  19488. >>>4 belong&0x00ffffff 2 R2600
  19489. >>>4 belong&0x00ffffff 3 R2800
  19490. >>>4 belong&0x00ffffff 4 R2000a
  19491. >>>4 belong&0x00ffffff 5 R2000
  19492. >>>4 belong&0x00ffffff 6 R3000a
  19493. >>>4 belong&0x00ffffff 7 R3000
  19494. >>>4 belong&0x00ffffff >7 subarchitecture=%d
  19495. >>0 belong&0x00ffffff 9 ns32532
  19496. >>0 belong&0x00ffffff 10 mc98000
  19497. >>0 belong&0x00ffffff 11 hppa
  19498. >>>4 belong&0x00ffffff 0 7100
  19499. >>>4 belong&0x00ffffff 1 7100LC
  19500. >>>4 belong&0x00ffffff >1 subarchitecture=%d
  19501. >>0 belong&0x00ffffff 12 arm
  19502. >>>4 belong&0x00ffffff 0
  19503. >>>4 belong&0x00ffffff 1 subarchitecture=%d
  19504. >>>4 belong&0x00ffffff 2 subarchitecture=%d
  19505. >>>4 belong&0x00ffffff 3 subarchitecture=%d
  19506. >>>4 belong&0x00ffffff 4 subarchitecture=%d
  19507. >>>4 belong&0x00ffffff 5 \bv4t
  19508. >>>4 belong&0x00ffffff 6 \bv6
  19509. >>>4 belong&0x00ffffff 7 \bv5tej
  19510. >>>4 belong&0x00ffffff 8 \bxscale
  19511. >>>4 belong&0x00ffffff 9 \bv7
  19512. >>>4 belong&0x00ffffff 10 \bv7f
  19513. >>>4 belong&0x00ffffff 11 \bv7s
  19514. >>>4 belong&0x00ffffff 12 \bv7k
  19515. >>>4 belong&0x00ffffff 13 \bv8
  19516. >>>4 belong&0x00ffffff 14 \bv6m
  19517. >>>4 belong&0x00ffffff 15 \bv7m
  19518. >>>4 belong&0x00ffffff 16 \bv7em
  19519. >>>4 belong&0x00ffffff >16 subarchitecture=%d
  19520. # 13 m88k
  19521. >>0 belong&0x00ffffff 13
  19522. >>>4 belong&0x00ffffff 0 mc88000
  19523. >>>4 belong&0x00ffffff 1 mc88100
  19524. >>>4 belong&0x00ffffff 2 mc88110
  19525. >>>4 belong&0x00ffffff >2 mc88000 subarchitecture=%d
  19526. >>0 belong&0x00ffffff 14 SPARC
  19527. >>0 belong&0x00ffffff 15 i860g
  19528. >>0 belong&0x00ffffff 16 alpha
  19529. >>0 belong&0x00ffffff 17 rs6000
  19530. >>0 belong&0x00ffffff 18 ppc
  19531. >>>4 belong&0x00ffffff 0
  19532. >>>4 belong&0x00ffffff 1 \b_601
  19533. >>>4 belong&0x00ffffff 2 \b_602
  19534. >>>4 belong&0x00ffffff 3 \b_603
  19535. >>>4 belong&0x00ffffff 4 \b_603e
  19536. >>>4 belong&0x00ffffff 5 \b_603ev
  19537. >>>4 belong&0x00ffffff 6 \b_604
  19538. >>>4 belong&0x00ffffff 7 \b_604e
  19539. >>>4 belong&0x00ffffff 8 \b_620
  19540. >>>4 belong&0x00ffffff 9 \b_750
  19541. >>>4 belong&0x00ffffff 10 \b_7400
  19542. >>>4 belong&0x00ffffff 11 \b_7450
  19543. >>>4 belong&0x00ffffff 100 \b_970
  19544. >>>4 belong&0x00ffffff >100 subarchitecture=%d
  19545. >>0 belong&0x00ffffff >18 architecture=%d
  19546. >0 belong&0xff000000 0x01000000
  19547. #
  19548. # 64-bit ABIs.
  19549. #
  19550. >>0 belong&0x00ffffff 0 64-bit architecture=%d
  19551. >>0 belong&0x00ffffff 1 64-bit architecture=%d
  19552. >>0 belong&0x00ffffff 2 64-bit architecture=%d
  19553. >>0 belong&0x00ffffff 3 64-bit architecture=%d
  19554. >>0 belong&0x00ffffff 4 64-bit architecture=%d
  19555. >>0 belong&0x00ffffff 5 64-bit architecture=%d
  19556. >>0 belong&0x00ffffff 6 64-bit architecture=%d
  19557. >>0 belong&0x00ffffff 7 x86_64
  19558. >>>4 belong&0x00ffffff 0 subarchitecture=%d
  19559. >>>4 belong&0x00ffffff 1 subarchitecture=%d
  19560. >>>4 belong&0x00ffffff 2 subarchitecture=%d
  19561. >>>4 belong&0x00ffffff 3
  19562. >>>4 belong&0x00ffffff 4 \b_arch1
  19563. >>>4 belong&0x00ffffff 8 \b_haswell
  19564. >>>4 belong&0x00ffffff >4 subarchitecture=%d
  19565. >>0 belong&0x00ffffff 8 64-bit architecture=%d
  19566. >>0 belong&0x00ffffff 9 64-bit architecture=%d
  19567. >>0 belong&0x00ffffff 10 64-bit architecture=%d
  19568. >>0 belong&0x00ffffff 11 64-bit architecture=%d
  19569. >>0 belong&0x00ffffff 12 arm64
  19570. >>>4 belong&0x00ffffff 0
  19571. >>>4 belong&0x00ffffff 1 \bv8
  19572. >>>4 belong&0x00ffffff 2 \be
  19573. >>>>7 ubyte&0xff >0 (caps:
  19574. >>>>7 ubyte&0xff <0x80 0x%02x
  19575. >>>>7 ubyte&0xc0 0x80 PAC
  19576. >>>>>7 ubyte&0x3f x \b%02d
  19577. >>>>7 ubyte&0xc0 0xc0 PAK
  19578. >>>>>7 ubyte&0x3f x \b%02d
  19579. >>>>7 ubyte&0xff x \b)
  19580. >>>4 belong&0x00ffffff >2 subarchitecture=%d
  19581. >>0 belong&0x00ffffff 13 64-bit architecture=%d
  19582. >>0 belong&0x00ffffff 14 64-bit architecture=%d
  19583. >>0 belong&0x00ffffff 15 64-bit architecture=%d
  19584. >>0 belong&0x00ffffff 16 64-bit architecture=%d
  19585. >>0 belong&0x00ffffff 17 64-bit architecture=%d
  19586. >>0 belong&0x00ffffff 18 ppc64
  19587. >>>4 belong&0x00ffffff 0
  19588. >>>4 belong&0x00ffffff 1 \b_601
  19589. >>>4 belong&0x00ffffff 2 \b_602
  19590. >>>4 belong&0x00ffffff 3 \b_603
  19591. >>>4 belong&0x00ffffff 4 \b_603e
  19592. >>>4 belong&0x00ffffff 5 \b_603ev
  19593. >>>4 belong&0x00ffffff 6 \b_604
  19594. >>>4 belong&0x00ffffff 7 \b_604e
  19595. >>>4 belong&0x00ffffff 8 \b_620
  19596. >>>4 belong&0x00ffffff 9 \b_650
  19597. >>>4 belong&0x00ffffff 10 \b_7400
  19598. >>>4 belong&0x00ffffff 11 \b_7450
  19599. >>>4 belong&0x00ffffff 100 \b_970
  19600. >>>4 belong&0x00ffffff >100 subarchitecture=%d
  19601. >>0 belong&0x00ffffff >18 64-bit architecture=%d
  19602. >0 belong&0xff000000 0x02000000
  19603. #
  19604. # 64_32-bit ABIs.
  19605. #
  19606. >>0 belong&0x00ffffff 0 64_32-bit architecture=%d
  19607. >>0 belong&0x00ffffff 1 64_32-bit architecture=%d
  19608. >>0 belong&0x00ffffff 2 64_32-bit architecture=%d
  19609. >>0 belong&0x00ffffff 3 64_32-bit architecture=%d
  19610. >>0 belong&0x00ffffff 4 64_32-bit architecture=%d
  19611. >>0 belong&0x00ffffff 5 64_32-bit architecture=%d
  19612. >>0 belong&0x00ffffff 6 64_32-bit architecture=%d
  19613. >>0 belong&0x00ffffff 7 64_32-bit architecture=%d
  19614. >>0 belong&0x00ffffff 8 64_32-bit architecture=%d
  19615. >>0 belong&0x00ffffff 9 64_32-bit architecture=%d
  19616. >>0 belong&0x00ffffff 10 64_32-bit architecture=%d
  19617. >>0 belong&0x00ffffff 11 64_32-bit architecture=%d
  19618. >>0 belong&0x00ffffff 12 64_32-bit arm
  19619. >>>4 belong&0x00ffffff 0
  19620. >>>4 belong&0x00ffffff 1 \bv8
  19621. >>>4 belong&0x00ffffff >1 subarchitecture=%d
  19622. >>0 belong&0x00ffffff 13 64_32-bit architecture=%d
  19623. >>0 belong&0x00ffffff 14 64_32-bit architecture=%d
  19624. >>0 belong&0x00ffffff 15 64_32-bit architecture=%d
  19625. >>0 belong&0x00ffffff 16 64_32-bit architecture=%d
  19626. >>0 belong&0x00ffffff 17 64_32-bit architecture=%d
  19627. >>0 belong&0x00ffffff 18 64_32-bit architecture=%d
  19628. >>0 belong&0x00ffffff >18 64_32-bit architecture=%d
  19629. 0 name mach-o-be
  19630. >0 byte 0xcf 64-bit
  19631. >4 use mach-o-cpu
  19632. >12 belong 1 object
  19633. # GRR: Does not work for Mach-O with 2 architectures; instead display oo
  19634. #!:ext o
  19635. !:ext o/
  19636. >12 belong 2 executable
  19637. # the executables normally have no file extension like perl,
  19638. # but exceptions like perl5.18 perl5.16
  19639. !:ext 16/18/
  19640. >12 belong 3 fixed virtual memory shared library
  19641. >12 belong 4 core
  19642. >12 belong 5 preload executable
  19643. >12 belong 6 dynamically linked shared library
  19644. # GRR: Does not work for Mach-O with 2 architectures; instead display dylibdylib
  19645. #!:ext dylib
  19646. !:ext dylib/
  19647. >12 belong 7 dynamic linker
  19648. >12 belong 8 bundle
  19649. # normally name extension bundle; but exceptions like: AMDil_r700.dylib
  19650. !:ext bundle/dylib/
  19651. >12 belong 9 dynamically linked shared library stub
  19652. >12 belong 10 dSYM companion file
  19653. >12 belong 11 kext bundle
  19654. >12 belong >11
  19655. >>12 belong x filetype=%d
  19656. >24 belong >0 \b, flags:<
  19657. >>24 belong &0x00000001 \bNOUNDEFS
  19658. >>24 belong &0x00000002 \b|INCRLINK
  19659. >>24 belong &0x00000004 \b|DYLDLINK
  19660. >>24 belong &0x00000008 \b|BINDATLOAD
  19661. >>24 belong &0x00000010 \b|PREBOUND
  19662. >>24 belong &0x00000020 \b|SPLIT_SEGS
  19663. >>24 belong &0x00000040 \b|LAZY_INIT
  19664. >>24 belong &0x00000080 \b|TWOLEVEL
  19665. >>24 belong &0x00000100 \b|FORCE_FLAT
  19666. >>24 belong &0x00000200 \b|NOMULTIDEFS
  19667. >>24 belong &0x00000400 \b|NOFIXPREBINDING
  19668. >>24 belong &0x00000800 \b|PREBINDABLE
  19669. >>24 belong &0x00001000 \b|ALLMODSBOUND
  19670. >>24 belong &0x00002000 \b|SUBSECTIONS_VIA_SYMBOLS
  19671. >>24 belong &0x00004000 \b|CANONICAL
  19672. >>24 belong &0x00008000 \b|WEAK_DEFINES
  19673. >>24 belong &0x00010000 \b|BINDS_TO_WEAK
  19674. >>24 belong &0x00020000 \b|ALLOW_STACK_EXECUTION
  19675. >>24 belong &0x00040000 \b|ROOT_SAFE
  19676. >>24 belong &0x00080000 \b|SETUID_SAFE
  19677. >>24 belong &0x00100000 \b|NO_REEXPORTED_DYLIBS
  19678. >>24 belong &0x00200000 \b|PIE
  19679. >>24 belong &0x00400000 \b|DEAD_STRIPPABLE_DYLIB
  19680. >>24 belong &0x00800000 \b|HAS_TLV_DESCRIPTORS
  19681. >>24 belong &0x01000000 \b|NO_HEAP_EXECUTION
  19682. >>24 belong &0x02000000 \b|APP_EXTENSION_SAFE
  19683. >>24 belong &0x04000000 \b|NLIST_OUTOFSYNC_WITH_DYLDINFO
  19684. >>24 belong &0x08000000 \b|SIM_SUPPORT
  19685. >>24 belong &0x80000000 \b|DYLIB_IN_CACHE
  19686. >>24 belong x \b>
  19687. #
  19688. 0 lelong&0xfffffffe 0xfeedface Mach-O
  19689. !:strength +1
  19690. !:mime application/x-mach-binary
  19691. >0 use \^mach-o-be
  19692. 0 belong&0xfffffffe 0xfeedface Mach-O
  19693. !:strength +1
  19694. !:mime application/x-mach-binary
  19695. >0 use mach-o-be
  19696. #------------------------------------------------------------------------------
  19697. # $File: macintosh,v 1.31 2020/12/12 20:01:47 christos Exp $
  19698. # macintosh description
  19699. #
  19700. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  19701. # Daniel Quinlan, quinlan@yggdrasil.com
  19702. # Update: Joerg Jenderek
  19703. # URL: https://en.wikipedia.org/wiki/BinHex
  19704. # Reference: http://fileformats.archiveteam.org/wiki/BinHex
  19705. # Note: only tested with version 4.0 and hqx extension
  19706. # Any text/binary before the characteristic comment sentence is to be ignored like in
  19707. # http://ftp.vim.org/pub/ftp/ftp/infomac/disk/mac-update-40b7.hqx
  19708. 0 search/1602 (This\ file\
  19709. >&0 use binhex
  19710. # http://ftp.vim.org/pub/ftp/ftp/infomac/_Disk_&_File/zap-res-forks-101.hqx
  19711. 0 search/2652/b (This\ file\
  19712. >&0 use binhex
  19713. 0 name binhex
  19714. # keep split search string format similar like in version 5.37
  19715. >0 string must\ be\ converted\ with\ BinHex\ BinHex binary text, version
  19716. # http://www.macdisk.com/binhexen.php3
  19717. !:apple BNHQTEXT
  19718. # http://www.faqs.org/faqs/macintosh/comm-faq/part1/
  19719. >>&0 string 1.0 1.0
  19720. !:mime application/mac-binhex
  19721. !:ext hex
  19722. >>&0 string 2.0 2.0
  19723. !:mime application/mac-binhex
  19724. !:ext hcx
  19725. # BinHex 3.0 never existed
  19726. >>&0 string 4.0 4.0
  19727. !:mime application/mac-binhex40
  19728. !:ext hqx
  19729. # BinHex 5.0 also MacBinary I
  19730. >>&0 string 5.0 5.0
  19731. !:mime application/mac-binhex40
  19732. !:ext hqx
  19733. # this should never happen
  19734. >>&0 default x
  19735. >>>&0 string x %.3s
  19736. !:mime application/mac-binhex
  19737. !:ext hqx
  19738. # Stuffit archives are the de facto standard of compression for Macintosh
  19739. # files obtained from most archives. (franklsm@tuns.ca)
  19740. 0 string SIT! StuffIt Archive (data)
  19741. !:mime application/x-stuffit
  19742. !:apple SIT!SIT!
  19743. >2 string x : %s
  19744. 0 string SITD StuffIt Deluxe (data)
  19745. >2 string x : %s
  19746. 0 string Seg StuffIt Deluxe Segment (data)
  19747. >2 string x : %s
  19748. # Newer StuffIt archives (grant@netbsd.org)
  19749. 0 string StuffIt StuffIt Archive
  19750. !:mime application/x-stuffit
  19751. !:apple SIT!SIT!
  19752. #>162 string >0 : %s
  19753. # Macintosh Applications and Installation binaries (franklsm@tuns.ca)
  19754. # GRR: Too weak
  19755. #0 string APPL Macintosh Application (data)
  19756. #>2 string x \b: %s
  19757. # Macintosh System files (franklsm@tuns.ca)
  19758. # GRR: Too weak
  19759. #0 string zsys Macintosh System File (data)
  19760. #0 string FNDR Macintosh Finder (data)
  19761. #0 string libr Macintosh Library (data)
  19762. #>2 string x : %s
  19763. #0 string shlb Macintosh Shared Library (data)
  19764. #>2 string x : %s
  19765. #0 string cdev Macintosh Control Panel (data)
  19766. #>2 string x : %s
  19767. #0 string INIT Macintosh Extension (data)
  19768. #>2 string x : %s
  19769. #0 string FFIL Macintosh Truetype Font (data)
  19770. #>2 string x : %s
  19771. #0 string LWFN Macintosh Postscript Font (data)
  19772. #>2 string x : %s
  19773. # Additional Macintosh Files (franklsm@tuns.ca)
  19774. # GRR: Too weak
  19775. #0 string PACT Macintosh Compact Pro Archive (data)
  19776. #>2 string x : %s
  19777. #0 string ttro Macintosh TeachText File (data)
  19778. #>2 string x : %s
  19779. #0 string TEXT Macintosh TeachText File (data)
  19780. #>2 string x : %s
  19781. #0 string PDF Macintosh PDF File (data)
  19782. #>2 string x : %s
  19783. # MacBinary format (Eric Fischer, enf@pobox.com)
  19784. # Update: Joerg Jenderek
  19785. # URL: https://en.wikipedia.org/wiki/MacBinary
  19786. # Reference: https://files.stairways.com/other/macbinaryii-standard-info.txt
  19787. #
  19788. # Unfortunately MacBinary doesn't really have a magic number prior
  19789. # to the MacBinary III format.
  19790. #
  19791. # old version number, must be kept at zero for compatibility
  19792. 0 byte 0
  19793. # length of filename (must be in the range 1-63)
  19794. >1 ubyte >0
  19795. # skip T.PIC.LZ INSTRUMENT.7T INVENTORY
  19796. >>1 ubyte <64
  19797. # skip Docs.MWII ReadMe.MacWrite "Notes (MacWrite II)"
  19798. # by looking for printable characters at beginning of file name
  19799. >>>2 ubelong >0x1F000000
  19800. # zero fill, must be zero for compatibility
  19801. >>>>74 byte 0
  19802. # zero fill, must be zero for compatibility
  19803. >>>>>82 byte 0
  19804. # MacBinary I test for valid version numbers
  19805. >>>>>>122 ubeshort 0
  19806. # additional check for creation date after 1 Jan 1970 ~ 7C25B080h
  19807. #>>>>>>>91 ubelong >0x7c25b07F
  19808. # additional check for undefined header fields in MacBinary I
  19809. #>>>>>>>101 ulong 0
  19810. >>>>>>>0 use mac-bin
  19811. # MacBinary II the newer versions begins at 129
  19812. >>>>>>122 ubeshort 0x8181
  19813. >>>>>>>0 use mac-bin
  19814. # MacBinary III with MacBinary II to read
  19815. >>>>>122 ubeshort 0x8281
  19816. >>>>>>0 use mac-bin
  19817. # display information of MacBinary file
  19818. 0 name mac-bin
  19819. >122 ubyte x MacBinary
  19820. # versions for MacBinary II/III
  19821. >122 ubyte 129 II
  19822. >122 ubyte 130 III
  19823. # only in MacBinary III
  19824. >>102 string !mBIN with surprising version
  19825. !:mime application/x-macbinary
  19826. !:apple PSPTBINA
  19827. !:ext bin/macbin
  19828. # THIS SHOULD NEVER HAPPEN! Maybe another file type is misidetified as MacBinary
  19829. #>1 ubyte >63 \b, name length %u too BIG!
  19830. #>122 ubeshort x \b, version 0x%x
  19831. # Finder flags if not 0
  19832. # >73 byte !0 \b, flags 0x
  19833. # >73 byte =0
  19834. # >>101 byte !0 \b, flags 0x
  19835. # # original Finder flags (Bits 8-15)
  19836. # >73 byte !0 \b%x
  19837. # # finder flags, bits 0-7
  19838. # >101 byte !0 \b%x
  19839. >73 byte &0x01 \b, inited
  19840. >73 byte &0x02 \b, changed
  19841. >73 byte &0x04 \b, busy
  19842. >73 byte &0x08 \b, bozo
  19843. >73 byte &0x10 \b, system
  19844. >73 byte &0x20 \b, bundle
  19845. >73 byte &0x40 \b, invisible
  19846. >73 byte &0x80 \b, locked
  19847. # 75 beshort # vertical posn in window
  19848. #>75 beshort !0 \b, v.pos %u
  19849. # 77 beshort # horiz posn in window
  19850. #>77 beshort !0 \b, h.pos %u
  19851. # 79 beshort # window or folder ID
  19852. >79 ubeshort !0 \b, ID 0x%x
  19853. # protected flag
  19854. >81 byte !0 \b, protected 0x%x
  19855. # length of comment after resource
  19856. >99 ubeshort !0 \b, comment length %u
  19857. # char. code of file name
  19858. >106 ubyte !0 \b, char. code 0x%x
  19859. # still more Finder flags
  19860. >107 ubyte !0 \b, more flags 0x%x
  19861. # length of total files when unpacked only used when pack and unpack on the fly
  19862. >116 ubelong !0 \b, total length %u
  19863. # 120 beshort # length of add'l header
  19864. >120 ubeshort !0 \b, 2nd header length %u
  19865. # 124 beshort # checksum
  19866. #>124 ubeshort !0 \b, CRC 0x%x
  19867. # creation date in seconds since MacOS epoch start. So 1 Jan 1970 ~ 7C25B080
  19868. >91 beldate-0x7C25B080 x \b, %s
  19869. # THIS SHOULD NEVER HAPPEN! Maybe another file type is misidetified or time overflow
  19870. >91 ubelong <0x7c25b080 INVALID date
  19871. #>91 belong-0x7C25B080 x \b, DEBUG DATE %d
  19872. # last modified date
  19873. >95 beldate-0x7C25B080 x \b, modified %s
  19874. # Apple creator+typ if not null
  19875. # file creator (normally expressed as four characters)
  19876. >69 ulong !0 \b, creator
  19877. # instead 4 character code display full creator name
  19878. >>69 use apple-creator
  19879. # file type (normally expressed as four characters)
  19880. >65 ulong !0 \b, type
  19881. >>65 use apple-type
  19882. # length of data segment
  19883. >83 ubelong !0 \b, %u bytes
  19884. # filename (in the range 1-63)
  19885. >1 pstring x "%s"
  19886. # print 1 space and then at offset 128 inspect data fork content if it has one
  19887. >83 ubelong !0 \b
  19888. >>128 indirect x
  19889. # Afterwards resource fork if length of resource segment not zero
  19890. >87 ubelong !0
  19891. # calculate resource fork offset
  19892. >>83 ubelong+128 x \b, at 0x%x
  19893. # length of resource segment
  19894. >>87 ubelong !0 %u bytes
  19895. >>(83.S+128) ubequad x resource
  19896. # further resource fork content inspection
  19897. >>>&-8 indirect x
  19898. # Apple Type/Creator Database
  19899. # URL: https://en.wikipedia.org/wiki/Type_code
  19900. # Reference: https://www.lacikam.co.il/tcdb/
  19901. # https://www.macdisk.com/macsigen.php
  19902. # Note: classic Mac OS files have two 4 character codes for type and creator.
  19903. # Thereby the Finder attach documents types to applications.
  19904. #>65 string x \b, type "%4.4s"
  19905. # display information about apple type
  19906. 0 name apple-type
  19907. >0 string 8BIM PhotoShop
  19908. >0 string ALB3 PageMaker 3
  19909. >0 string ALB4 PageMaker 4
  19910. >0 string ALT3 PageMaker 3
  19911. >0 string APPL application
  19912. >0 string AWWP AppleWorks word processor
  19913. >0 string CIRC simulated circuit
  19914. >0 string DRWG MacDraw
  19915. >0 string EPSF Encapsulated PostScript
  19916. >0 string FFIL font suitcase
  19917. >0 string FKEY function key
  19918. >0 string FNDR Macintosh Finder
  19919. >0 string GIFf GIF image
  19920. >0 string Gzip GNU gzip
  19921. >0 string INIT system extension
  19922. >0 string LIB\ library
  19923. >0 string LWFN PostScript font
  19924. >0 string MSBC Microsoft BASIC
  19925. >0 string PACT Compact Pro archive
  19926. >0 string PDF\ Portable Document Format
  19927. >0 string PICT picture
  19928. >0 string PNTG MacPaint picture
  19929. >0 string PREF preferences
  19930. >0 string PROJ Think C project
  19931. >0 string QPRJ Think Pascal project
  19932. >0 string SCFL Defender scores
  19933. >0 string SCRN startup screen
  19934. >0 string SITD StuffIt Deluxe
  19935. >0 string SPn3 SuperPaint
  19936. >0 string STAK HyperCard stack
  19937. >0 string Seg\ StuffIt segment
  19938. >0 string TARF Unix tar archive
  19939. >0 string TEXT ASCII
  19940. >0 string TIFF TIFF image
  19941. >0 string TOVF Eudora table of contents
  19942. >0 string WDBN Microsoft Word word processor
  19943. >0 string WORD MacWrite word processor
  19944. >0 string XLS\ Microsoft Excel
  19945. >0 string ZIVM compress (.Z)
  19946. >0 string ZSYS Pre-System 7 system file
  19947. >0 string acf3 Aldus FreeHand
  19948. >0 string cdev control panel
  19949. >0 string dfil Desk Accessory suitcase
  19950. >0 string libr library
  19951. >0 string nX^d WriteNow word processor
  19952. >0 string nX^w WriteNow dictionary
  19953. >0 string rsrc resource
  19954. >0 string scbk Scrapbook
  19955. >0 string shlb shared library
  19956. >0 string ttro SimpleText read-only
  19957. >0 string zsys system file
  19958. # additional types added in Dec 2017
  19959. >0 string BINA binary file
  19960. >0 string BMPp BMP image
  19961. >0 string JPEG JPEG image
  19962. #>0 string W4BN Microsoft Word x.y word processor?
  19963. # if type name is not known display 4 character identifier
  19964. >0 default x
  19965. >>0 string x '%4.4s'
  19966. #>69 string x \b, creator "%4.4s"
  19967. # Now Apple has no repository of registered Creator IDs any more. These are
  19968. # just the ones that I happened to have files from and was able to identify.
  19969. # display information about apple creator
  19970. 0 name apple-creator
  19971. >0 string 8BIM Adobe Photoshop
  19972. >0 string ALD3 PageMaker 3
  19973. >0 string ALD4 PageMaker 4
  19974. >0 string ALFA Alpha editor
  19975. >0 string APLS Apple Scanner
  19976. >0 string APSC Apple Scanner
  19977. >0 string BRKL Brickles
  19978. >0 string BTFT BitFont
  19979. >0 string CCL2 Common Lisp 2
  19980. >0 string CCL\ Common Lisp
  19981. >0 string CDmo The Talking Moose
  19982. >0 string CPCT Compact Pro
  19983. >0 string CSOm Eudora
  19984. >0 string DMOV Font/DA Mover
  19985. >0 string DSIM DigSim
  19986. >0 string EDIT Macintosh Edit
  19987. >0 string ERIK Macintosh Finder
  19988. >0 string EXTR self-extracting archive
  19989. >0 string Gzip GNU gzip
  19990. >0 string KAHL Think C
  19991. >0 string LWFU LaserWriter Utility
  19992. >0 string LZIV compress
  19993. >0 string MACA MacWrite
  19994. >0 string MACS Macintosh operating system
  19995. >0 string MAcK MacKnowledge terminal emulator
  19996. >0 string MLND Defender
  19997. >0 string MPNT MacPaint
  19998. >0 string MSBB Microsoft BASIC (binary)
  19999. >0 string MSWD Microsoft Word
  20000. >0 string NCSA NCSA Telnet
  20001. >0 string PJMM Think Pascal
  20002. >0 string PSAL Hunt the Wumpus
  20003. #>0 string PSI2 Apple File Exchange
  20004. >0 string R*ch BBEdit
  20005. >0 string RMKR Resource Maker
  20006. >0 string RSED Resource Editor
  20007. >0 string Rich BBEdit
  20008. >0 string SIT! StuffIt
  20009. >0 string SPNT SuperPaint
  20010. >0 string Unix NeXT Mac filesystem
  20011. >0 string VIM! Vim editor
  20012. >0 string WILD HyperCard
  20013. >0 string XCEL Microsoft Excel
  20014. >0 string aCa2 Fontographer
  20015. >0 string aca3 Aldus FreeHand
  20016. >0 string dosa Macintosh MS-DOS file system
  20017. >0 string movr Font/DA Mover
  20018. >0 string nX^n WriteNow
  20019. >0 string pdos Apple ProDOS file system
  20020. >0 string scbk Scrapbook
  20021. >0 string ttxt SimpleText
  20022. >0 string ufox Foreign File Access
  20023. # additional creators added in Dec 2017
  20024. # Claris/Apple Works
  20025. >0 string BOBO Apple Works
  20026. # CU-SeeMe_0.87b3_(68K).bin
  20027. #>0 string CUce bar
  20028. >0 string PSPT Apple File Exchange
  20029. # Disk_Copy_4.2.sea.bin
  20030. #>0 string NCse foo
  20031. # probably StuffIt/Aladdin by Smith Micro Software, Inc.
  20032. >0 string STi0 stuffit
  20033. # MacGzip-1.1.3.sea.bin
  20034. #>0 string aust bar
  20035. # D-Disk_Copy_6.3.3.smi.bin
  20036. >0 string oneb Disk Copy Self Mounting
  20037. # if creator name is not known display 4 character identifier
  20038. >0 default x
  20039. >>0 string x '%4.4s'
  20040. # sas magic from Bruce Foster (bef@nwu.edu)
  20041. #
  20042. #0 string SAS SAS
  20043. #>8 string x %s
  20044. 0 string SAS SAS
  20045. >24 string DATA data file
  20046. >24 string CATALOG catalog
  20047. >24 string INDEX data file index
  20048. >24 string VIEW data view
  20049. # sas 7+ magic from Reinhold Koch (reinhold.koch@roche.com)
  20050. #
  20051. 0x54 string SAS SAS 7+
  20052. >0x9C string DATA data file
  20053. >0x9C string CATALOG catalog
  20054. >0x9C string INDEX data file index
  20055. >0x9C string VIEW data view
  20056. # spss magic for SPSS system and portable files,
  20057. # from Bruce Foster (bef@nwu.edu).
  20058. 0 long 0xc1e2c3c9 SPSS Portable File
  20059. >40 string x %s
  20060. 0 string $FL2 SPSS System File
  20061. >24 string x %s
  20062. 0 string $FL3 SPSS System File
  20063. >24 string x %s
  20064. # Macintosh filesystem data
  20065. # From "Tom N Harris" <telliamed@mac.com>
  20066. # Fixed HFS+ and Partition map magic: Ethan Benson <erbenson@alaska.net>
  20067. # The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these
  20068. # entries depend on the data arithmetic added after v.35
  20069. # There's also some Pascal strings in here, ditto...
  20070. # The boot block signature, according to IM:Files, is
  20071. # "for HFS volumes, this field always contains the value 0x4C4B."
  20072. # But if this is true for MFS or HFS+ volumes, I don't know.
  20073. # Alternatively, the boot block is supposed to be zeroed if it's
  20074. # unused, so a simply >0 should suffice.
  20075. 0x400 beshort 0xD2D7 Macintosh MFS data
  20076. >0 beshort 0x4C4B (bootable)
  20077. >0x40a beshort &0x8000 (locked)
  20078. >0x402 beldate-0x7C25B080 x created: %s,
  20079. >0x406 beldate-0x7C25B080 >0 last backup: %s,
  20080. >0x414 belong x block size: %d,
  20081. >0x412 beshort x number of blocks: %d,
  20082. >0x424 pstring x volume name: %s
  20083. # *.hfs updated by Joerg Jenderek
  20084. # https://en.wikipedia.org/wiki/Hierarchical_File_System
  20085. # "BD" gives many false positives
  20086. 0x400 beshort 0x4244
  20087. # ftp://ftp.mars.org/pub/hfs/hfsutils-3.2.6.tar.gz/hfsutils-3.2.6/libhfs/apple.h
  20088. # first block of volume bit map (always 3)
  20089. >0x40e ubeshort 0x0003
  20090. # maximal length of volume name is 27
  20091. >>0x424 ubyte <28 Macintosh HFS data
  20092. !:mime application/x-apple-diskimage
  20093. #!:apple hfsdINIT
  20094. #!:apple MACSdisk
  20095. # https://www.macdisk.com/macsigen.php
  20096. #!:apple ddskdevi
  20097. !:apple ????devi
  20098. # https://en.wikipedia.org/wiki/Apple_Disk_Image
  20099. !:ext hfs/dmg
  20100. >>>0 beshort 0x4C4B (bootable)
  20101. #>>>0 beshort 0x0000 (not bootable)
  20102. >>>0x40a beshort &0x8000 (locked)
  20103. >>>0x40a beshort ^0x0100 (mounted)
  20104. >>>0x40a beshort &0x0200 (spared blocks)
  20105. >>>0x40a beshort &0x0800 (unclean)
  20106. >>>0x47C beshort 0x482B (Embedded HFS+ Volume)
  20107. # https://www.epochconverter.com/
  20108. # 0x7C245F00 seconds ~ 2082758400 ~ 01 Jan 2036 00:00:00 ~ 66 years to 1970
  20109. # 0x7C25B080 seconds ~ 2082844800 ~ 02 Jan 2036 00:00:00
  20110. # construct not working
  20111. #>>>0x402 beldate-0x7C25B080 x created: %s,
  20112. #>>>0x406 beldate-0x7C25B080 x last modified: %s,
  20113. #>>>0x440 beldate-0x7C25B080 >0 last backup: %s,
  20114. # found block sizes 200h,1200h,2800h
  20115. >>>0x414 belong x block size: %d,
  20116. >>>0x412 beshort x number of blocks: %d,
  20117. >>>0x424 pstring x volume name: %s
  20118. 0x400 beshort 0x482B Macintosh HFS Extended
  20119. >&0 beshort x version %d data
  20120. >0 beshort 0x4C4B (bootable)
  20121. >0x404 belong ^0x00000100 (mounted)
  20122. >&2 belong &0x00000200 (spared blocks)
  20123. >&2 belong &0x00000800 (unclean)
  20124. >&2 belong &0x00008000 (locked)
  20125. >&6 string x last mounted by: '%.4s',
  20126. # really, that should be treated as a belong and we print a string
  20127. # based on the value. TN1150 only mentions '8.10' for "MacOS 8.1"
  20128. >&14 beldate-0x7C25B080 x created: %s,
  20129. # only the creation date is local time, all other timestamps in HFS+ are UTC.
  20130. >&18 bedate-0x7C25B080 x last modified: %s,
  20131. >&22 bedate-0x7C25B080 >0 last backup: %s,
  20132. >&26 bedate-0x7C25B080 >0 last checked: %s,
  20133. >&38 belong x block size: %d,
  20134. >&42 belong x number of blocks: %d,
  20135. >&46 belong x free blocks: %d
  20136. ## AFAIK, only the signature is different
  20137. # same as Apple Partition Map
  20138. # GRR: This magic is too weak, it is just "TS"
  20139. #0x200 beshort 0x5453 Apple Old Partition data
  20140. #>0x2 beshort x block size: %d,
  20141. #>0x230 string x first type: %s,
  20142. #>0x210 string x name: %s,
  20143. #>0x254 belong x number of blocks: %d,
  20144. #>0x400 beshort 0x504D
  20145. #>>0x430 string x second type: %s,
  20146. #>>0x410 string x name: %s,
  20147. #>>0x454 belong x number of blocks: %d,
  20148. #>>0x800 beshort 0x504D
  20149. #>>>0x830 string x third type: %s,
  20150. #>>>0x810 string x name: %s,
  20151. #>>>0x854 belong x number of blocks: %d,
  20152. #>>>0xa00 beshort 0x504D
  20153. #>>>>0xa30 string x fourth type: %s,
  20154. #>>>>0xa10 string x name: %s,
  20155. #>>>>0xa54 belong x number of blocks: %d
  20156. # From: Remi Mommsen <mommsen@slac.stanford.edu>
  20157. 0 string BOMStore Mac OS X bill of materials (BOM) file
  20158. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  20159. # URL: https://en.wikipedia.org/wiki/Datafork_TrueType
  20160. # Derived from the 'fondu' and 'ufond' source code (fondu.sf.net). 'sfnt' is
  20161. # TrueType; 'POST' is PostScript. 'FONT' and 'NFNT' sometimes appear, but I
  20162. # don't know what they mean.
  20163. 0 belong 0x100
  20164. >(0x4.L+24) beshort x
  20165. >>&4 belong 0x73666e74 Mac OSX datafork font, TrueType
  20166. >>&4 belong 0x464f4e54 Mac OSX datafork font, 'FONT'
  20167. >>&4 belong 0x4e464e54 Mac OSX datafork font, 'NFNT'
  20168. >>&4 belong 0x504f5354 Mac OSX datafork font, PostScript
  20169. #------------------------------------------------------------------------------
  20170. # $File: macos,v 1.1 2012/12/21 16:41:07 christos Exp $
  20171. # MacOS files
  20172. #
  20173. 0 string book\0\0\0\0mark\0\0\0\0 MacOS Alias file
  20174. #------------------------------------------------------------------------------
  20175. # $File: magic,v 1.10 2010/11/25 15:00:12 christos Exp $
  20176. # magic: file(1) magic for magic files
  20177. #
  20178. 0 string/t #\ Magic magic text file for file(1) cmd
  20179. 0 lelong 0xF11E041C magic binary file for file(1) cmd
  20180. >4 lelong x (version %d) (little endian)
  20181. 0 belong 0xF11E041C magic binary file for file(1) cmd
  20182. >4 belong x (version %d) (big endian)
  20183. #------------------------------------------------------------------------------
  20184. # $File: mail.news,v 1.27 2021/04/05 16:36:14 christos Exp $
  20185. # mail.news: file(1) magic for mail and news
  20186. #
  20187. # Unfortunately, saved netnews also has From line added in some news software.
  20188. #0 string From mail text
  20189. 0 string/t Relay-Version: old news text
  20190. !:mime message/rfc822
  20191. 0 string/t #!\ rnews batched news text
  20192. !:mime message/rfc822
  20193. 0 string/t N#!\ rnews mailed, batched news text
  20194. !:mime message/rfc822
  20195. 0 string/t Forward\ to mail forwarding text
  20196. !:mime message/rfc822
  20197. 0 string/t Pipe\ to mail piping text
  20198. !:mime message/rfc822
  20199. 0 string/tc delivered-to: SMTP mail text
  20200. !:mime message/rfc822
  20201. 0 string/tc return-path: SMTP mail text
  20202. !:mime message/rfc822
  20203. 0 string/t Path: news text
  20204. !:mime message/news
  20205. 0 string/t Xref: news text
  20206. !:mime message/news
  20207. 0 string/t From: news or mail text
  20208. !:mime message/rfc822
  20209. 0 string/t Article saved news text
  20210. !:mime message/news
  20211. # Reference: http://quimby.gnus.org/notes/BABYL
  20212. # Update: Joerg Jenderek
  20213. # Note: used by Rmail in Emacs version 22 and before
  20214. # is not text because of characters like Control-L Control-_
  20215. 0 string/b BABYL\ OPTIONS: Emacs RMAIL
  20216. #0 string/t BABYL Emacs RMAIL text
  20217. # https://reposcope.com/mimetype/message/x-gnu-rmail
  20218. !:mime message/x-gnu-rmail
  20219. # ~/RMAIL
  20220. !:ext /
  20221. 0 string/t Received: RFC 822 mail text
  20222. !:mime message/rfc822
  20223. 0 string/t MIME-Version: MIME entity text
  20224. #0 string/t Content- MIME entity text
  20225. # TNEF files...
  20226. 0 lelong 0x223E9F78 Transport Neutral Encapsulation Format
  20227. !:mime application/vnd.ms-tnef
  20228. # From: Kevin Sullivan <ksulliva@psc.edu>
  20229. 0 string *mbx* MBX mail folder
  20230. # From: Simon Matter <simon.matter@invoca.ch>
  20231. 0 string \241\002\213\015skiplist\ file\0\0\0 Cyrus skiplist DB
  20232. 0 string \241\002\213\015twoskip\ file\0\0\0\0 Cyrus twoskip DB
  20233. # JAM(mbp) Fidonet message area databases
  20234. # JHR file
  20235. 0 string JAM\0 JAM message area header file
  20236. >12 leshort >0 (%d messages)
  20237. # Squish Fidonet message area databases
  20238. # SQD file (requires at least one message in the area)
  20239. # XXX: Weak magic
  20240. #256 leshort 0xAFAE4453 Squish message area data file
  20241. #>4 leshort >0 (%d messages)
  20242. #0 string \<!--\ MHonArc text/html; x-type=mhonarc
  20243. # Cyrus: file(1) magic for compiled Cyrus sieve scripts
  20244. # URL: https://www.cyrusimap.org/docs/cyrus-imapd/2.4.6/internal/bytecode.php
  20245. # URL: http://git.cyrusimap.org/cyrus-imapd/tree/sieve/bytecode.h?h=master
  20246. # From: Philipp Hahn <hahn@univention.de>
  20247. # Compiled Cyrus sieve script
  20248. 0 string CyrSBytecode Cyrus sieve bytecode data,
  20249. >12 belong =1 version 1, big-endian
  20250. >12 lelong =1 version 1, little-endian
  20251. >12 belong x version %d, network-endian
  20252. # Dovecot mail server, version 2.2 and later.
  20253. # Dovecot mailing list: dovecot@dovecot.org
  20254. # File format spec: https://wiki.dovecot.org/Design/Dcrypt/#File_format
  20255. # From: Stephen Gildea
  20256. 0 string CRYPTED\003\007 Dovecot encrypted message
  20257. >9 byte x \b, dcrypt version %d
  20258. #------------------------------------------------------------------------------
  20259. # $File: make,v 1.4 2018/05/29 17:26:02 christos Exp $
  20260. # make: file(1) magic for makefiles
  20261. #
  20262. # URL: https://en.wikipedia.org/wiki/Make_(software)
  20263. 0 regex/100l \^CFLAGS makefile script text
  20264. !:mime text/x-makefile
  20265. 0 regex/100l \^VPATH makefile script text
  20266. !:mime text/x-makefile
  20267. 0 regex/100l \^LDFLAGS makefile script text
  20268. !:mime text/x-makefile
  20269. 0 regex/100l \^all: makefile script text
  20270. !:mime text/x-makefile
  20271. 0 regex/100l \^\\.PRECIOUS makefile script text
  20272. !:mime text/x-makefile
  20273. # Update: Joerg Jenderek
  20274. # Reference: https://www.freebsd.org/cgi/man.cgi?make(1)
  20275. # exclude grub-core\lib\libgcrypt\mpi\Makefile.am with "#BEGIN_ASM_LIST"
  20276. # by additional escaping point character
  20277. 0 regex/100l \^\\.BEGIN BSD makefile script text
  20278. !:mime text/x-makefile
  20279. !:ext /mk
  20280. !:strength +10
  20281. # exclude MS Windows help file CoNtenT with ":include FOOBAR.CNT"
  20282. # and NSIS script with "!include" by additional escaping point character
  20283. 0 regex/100l \^\\.include BSD makefile script text
  20284. !:mime text/x-makefile
  20285. !:ext /mk
  20286. !:strength +10
  20287. 0 regex/100l \^\\.endif BSD makefile script text
  20288. !:mime text/x-makefile
  20289. !:ext /mk
  20290. !:strength +10
  20291. 0 regex/100l \^SUBDIRS automake makefile script text
  20292. !:mime text/x-makefile
  20293. !:strength +10
  20294. #------------------------------------------------------------------------------
  20295. # $File: map,v 1.8 2019/12/01 22:46:23 christos Exp $
  20296. # map: file(1) magic for Map data
  20297. #
  20298. # Garmin .FIT files https://pub.ks-and-ks.ne.jp/cycling/edge500_fit.shtml
  20299. 8 string .FIT FIT Map data
  20300. >15 byte 0
  20301. >>35 belong x \b, unit id %d
  20302. >>39 lelong x \b, serial %u
  20303. # https://pub.ks-and-ks.ne.jp/cycling/edge500_fit.shtml
  20304. # 20 years after unix epoch
  20305. # TZ=GMT date -d '1989-12-31 0:00' +%s
  20306. >>43 leldate+631065600 x \b, %s
  20307. >>47 leshort x \b, manufacturer %d
  20308. >>47 leshort 1 \b (garmin)
  20309. >>49 leshort x \b, product %d
  20310. >>53 byte x \b, type %d
  20311. >>53 byte 1 \b (Device)
  20312. >>53 byte 2 \b (Settings)
  20313. >>53 byte 3 \b (Sports/Cycling)
  20314. >>53 byte 4 \b (Activity)
  20315. >>53 byte 8 \b (Elevations)
  20316. >>53 byte 10 \b (Totals)
  20317. # Summary: Garmin map
  20318. # From: Joerg Jenderek
  20319. # URL: https://en.wikipedia.org/wiki/Garmin_.img
  20320. # Reference: https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/IMG_File_Format
  20321. # sourceforge.net/projects/garmin-img/files/IMG%20File%20Format/1.0/imgformat-1.0.pdf
  20322. # GRR: similar to MBR boot sector handled by ./filesystems
  20323. 0x1FE leshort =0xAA55
  20324. # look for valid map signature
  20325. >0x13 string =IMG\0
  20326. >>0 use garmin-map
  20327. 0 name garmin-map
  20328. >0 ubyte x Garmin
  20329. !:mime application/x-garmin-map
  20330. # If non-zero, every byte of the entire .img file is to be XORed with this value
  20331. >0 ubyte !0 \b, 0x%x XORed
  20332. # goto block before FAT
  20333. >(0x40.b*512) ubyte x
  20334. # 1st fat name "DLLINFO TXT" only found for vpm
  20335. >>&512 string =DLLINFO\ TXT map (Voice Processing)
  20336. # there exist 2 other Garmin VPM formats; see ./audio
  20337. !:ext vpm
  20338. # Deutsch__Yannick_D4481-00_0210.vpm
  20339. #>>>512 search/0x0116da60/s RIFF \b; with
  20340. # determine type voice type by ./riff
  20341. #>>>>&0 indirect x \b
  20342. >>&512 string !DLLINFO\ TXT map
  20343. !:ext img
  20344. # 9 zeros
  20345. >1 ubelong !0 \b, zeroes 0x%x
  20346. # Map's version major
  20347. >8 ubyte x v%u
  20348. # Map's version minor
  20349. >9 ubyte x \b.%.2u
  20350. # Map description[20], 0x20 padded
  20351. >0x49 string x %.20s
  20352. # Map name, continued (0x20 padded, \0 terminated)
  20353. >0x65 string >\ \b%.31s
  20354. # Update year (+1900 for val >= 0x63, +2000 for val <= 0x62)
  20355. >0xB ubyte x \b, updated
  20356. >>0xB ubyte >0x62
  20357. >>>0xB ubyte-100 x 20%.2u
  20358. >>0xB ubyte <0x63
  20359. >>>0xB ubyte x 20%.2u
  20360. # Update month (0-11)
  20361. >0xA ubyte x \b-%.2u
  20362. # All zeroes
  20363. >0xc uleshort !0 \b, zeroes 0x%x
  20364. # Mapsource flag, 1 - file created by Mapsource, 0 - Garmin map visible in Basecamp and Homeport
  20365. #>0xE ubyte !0 \b, Mapsource flag 0x%x
  20366. >0xE ubyte 1 \b, Mapsource
  20367. # Checksum, sum of all bytes modulo 256 should be 0
  20368. #>0xF ubyte x \b, Checksum 0x%x
  20369. # Signature: DSKIMG 0x00 or DSDIMG 0x00 for demo map
  20370. >0x10 string !DSKIMG \b, signature "%.7s"
  20371. >0x39 use garmin-date
  20372. # Map file identifier like GARMIN\0
  20373. >0x41 string !GARMIN \b, id "%.7s"
  20374. # Block size exponent, E1; appears to always be 0x09; minimum block size 512 bytes
  20375. >0x61 ubyte !0x09 \b, E1=%u
  20376. # Block size exponent, E2 ; file blocksize=2**(E1+E2)
  20377. >>0x62 ubyte x \b, E2=%u
  20378. >0x61 ubyte =0x09 \b, blocksize
  20379. >>0x62 ubyte 0 512
  20380. >>0x62 ubyte 1 1024
  20381. >>0x62 ubyte 2 2048
  20382. >>0x62 ubyte 3 4096
  20383. >>0x62 ubyte 4 8192
  20384. >>0x62 ubyte 5 16384
  20385. >>0x62 default x
  20386. >>>0x62 ubyte x E2=%u
  20387. # MBR signature
  20388. >0x1FE leshort !0xAA55 \b, invalid MBR
  20389. # 512 zeros
  20390. >0x200 uquad !0 \b, zeroes 0x%llx
  20391. # First sub-file offset (absolute); sometimes NO/UNKNOWN sub file!
  20392. >0x40C ulelong >0 \b, at 0x%x
  20393. # sub-file Header length
  20394. #>>(0x40C.l) uleshort x \b, header len 0x%x
  20395. >>(0x40C.l) uleshort x %u bytes
  20396. # sub-file Type[10] like "GARMIN RGN" "GARMIN TRE", "GARMIN TYP", etc.
  20397. >>(0x40C.l+2) ubyte >0x1F
  20398. >>>(0x40C.l+2) ubyte <0xFF
  20399. >>>>(0x40C.l+2) string x "%.10s"
  20400. # 0x00 for most maps, 0x80 for locked maps (City Nav, City Select, etc.)
  20401. >>>>(0x40C.l+13) ubyte >0 \b, locked 0x%x
  20402. # Block sequence numbers like 0000 0100 0200 ... FFFF
  20403. # >0x420 ubequad >0 \b, seq. 0x%16.16llx
  20404. # >>0x428 ubequad >0 \b%16.16llx
  20405. # >>>0x430 ubequad >0 \b%16.16llx
  20406. # >>>>0x438 ubequad >0 \b%16.16llx
  20407. # >>>>>0x440 ubequad >0 \b%16.16llx
  20408. # >>>>>>0x448 ubequad >0 \b%16.16llx
  20409. # >>>>>>>0x450 ubequad >0 \b%16.16llx
  20410. # >>>>>>>>0x458 ubequad >0 \b%16.16llx
  20411. # >>>>>>>>>0x460 ubequad >0 \b%16.16llx
  20412. # >>>>>>>>>>0x468 ubequad >0 \b%16.16llx
  20413. # >>>>>>>>>>>0x470 ubequad >0 \b%16.16llx
  20414. # >>>>>>>>>>>>0x478 ubequad >0 \b%16.16llx
  20415. # >>>>>>>>>>>>>0x480 ubequad >0 \b%16.16llx
  20416. # >>>>>>>>>>>>>>0x488 ubequad >0 \b%16.16llx
  20417. # >>>>>>>>>>>>>>>0x490 ubequad >0 \b%16.16llx
  20418. # >>>>>>>>>>>>>>>>0x498 ubequad >0 \b%16.16llx
  20419. # >>>>>>>>>>>>>>>>>0x4A0 ubequad >0 \b%16.16llx
  20420. # >>>>>>>>>>>>>>>>>>0x4A8 ubequad >0 \b%16.16llx
  20421. # look for end of FAT
  20422. #>>0x420 search/512/s \xff\xff FAT END
  20423. # Physical block number of FAT header
  20424. #>0x40 ubyte x \b, FAT at phy. block %u
  20425. >0x40 ubyte x
  20426. >>(0x40.b*512) ubyte x
  20427. # 1st FAT block
  20428. >>>&511 use garmin-fat
  20429. # 2nd FAT block
  20430. >>>&1023 use garmin-fat
  20431. # 3th FAT block
  20432. >>>&1535 use garmin-fat
  20433. # 4th FAT block
  20434. >>>&2047 use garmin-fat
  20435. # ... xth FAT block
  20436. #
  20437. # 314 zeros but not in vpm and also gmaptz.img
  20438. >0x84 uquad !0 \b, at 0x84 0x%llx
  20439. # display FileAllocationTable block entry in garmin map
  20440. 0 name garmin-fat
  20441. >0 ubyte x \b;
  20442. # sub file part; 0x0003 seems to be garbage
  20443. >0x10 uleshort !0 next 0x%4.4x
  20444. >0x10 uleshort =0
  20445. # fat flag 0~dummy block 1~true sub file
  20446. >>0 ubyte !1 flag %u
  20447. >>0 ubyte =1
  20448. # sub-file name like MAKEGMAP 12345678
  20449. >>>0x1 string x %.8s
  20450. # sub-file typ like RGN TRE MDR LBL
  20451. >>>0x9 string x \b.%.3s
  20452. # size of sub file
  20453. >>>0xC ulelong x \b, %u bytes
  20454. # 32-bit block sequence numbers
  20455. #>>>0x20 ubequad x \b, seq. 0x%16.16llx
  20456. # display date stored inside Garmin maps like yyyy-mm-dd h:mm:ss
  20457. 0 name garmin-date
  20458. # year like 2018
  20459. >0 uleshort x \b, created %u
  20460. # month (0-11)
  20461. >2 ubyte x \b-%.2u
  20462. # day (1-31)
  20463. >3 ubyte x \b-%.2u
  20464. # hour (0-23)
  20465. >4 ubyte x %u
  20466. # minute (0-59)
  20467. >5 ubyte x \b:%.2u
  20468. # second (0-59)
  20469. >6 ubyte x \b:%.2u
  20470. # Summary: Garmin Map subfiles
  20471. # From: Joerg Jenderek
  20472. # URL: https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/IMG_File_Format
  20473. # Garmin Common Header
  20474. 2 string GARMIN\
  20475. # skip ASCII text by checking for low header length
  20476. >0 uleshort <0x1000 Garmin map,
  20477. # URL: https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/GMP_Subfile_Format
  20478. >>9 string GMP subtile
  20479. !:mime application/x-garmin-gpm
  20480. !:ext gmp
  20481. # copyright message
  20482. >>>(0.s) string x %s
  20483. >>>0x0E use garmin-date
  20484. # URL: https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/MDR_Subfile_Format
  20485. # This contains the searchable address table used for finding routing destinations
  20486. >>9 string MDR address table
  20487. !:mime application/x-garmin-mdr
  20488. !:ext mdr
  20489. # URL: https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/NOD_Subfile_Format
  20490. # http://svn.parabola.me.uk/display/trunk/doc/nod.txt
  20491. # This contains the routing information
  20492. >>9 string NOD routing
  20493. !:mime application/x-garmin-nod
  20494. !:ext nod
  20495. >>>0x0E use garmin-date
  20496. #>>>0x15 ulelong x \b, at 0x%x
  20497. #>>>0x19 ulelong x 0x%x bytes NOD1
  20498. #>>>0x25 ulelong x \b, at 0x%x
  20499. #>>>0x29 ulelong x 0x%x bytes NOD2
  20500. #>>>0x31 ulelong x \b, at 0x%x
  20501. #>>>0x35 ulelong x 0x%x bytes NOD3
  20502. # URL: http://www.pinns.co.uk/osm/net.html
  20503. # routable highways (length, direction, allowed speed,house address information)
  20504. >>9 string NET highways
  20505. !:mime application/x-garmin-net
  20506. !:ext net
  20507. #>>>0x15 ulelong x \b, at 0x%x
  20508. #>>>0x19 ulelong x 0x%x bytes NET1
  20509. #>>>0x22 ulelong >0
  20510. #>>>>0x1E ulelong x \b, at 0x%x
  20511. #>>>>0x22 ulelong x 0x%x bytes NET2
  20512. #>>>0x2B ulelong >0
  20513. #>>>>0x27 ulelong x \b, at 0x%x
  20514. #>>>>0x2B ulelong x 0x%x bytes NET3
  20515. # URL: https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/LBL_Subfile_Format
  20516. >>9 string LBL labels
  20517. !:mime application/x-garmin-lbl
  20518. !:ext lbl
  20519. >>>(0.s) string x %s
  20520. # Label coding type 6h 9h and ah
  20521. >>>0x1E ubyte x \b, coding type 0x%x
  20522. #>>>0x15 ulelong x \b, at 0x%x
  20523. #>>>0x19 ulelong x 0x%x bytes LBL1
  20524. #>>>0x1F ulelong x \b, at 0x%x
  20525. #>>>0x23 ulelong x 0x%x bytes LBL2
  20526. #>>>0x2D ulelong x \b, at 0x%x
  20527. #>>>0x31 ulelong x 0x%x bytes LBL3
  20528. # URL: https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/SRT_Subfile_Format
  20529. # A lookup table of the chars in the map's codepage, and their collating sequence
  20530. >>9 string SRT sort table
  20531. !:mime application/x-garmin-srt
  20532. !:ext srt
  20533. >>>0x0E use garmin-date
  20534. # URL: https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/TRE_Subfile_Format
  20535. >>9 string TRE tree
  20536. !:mime application/x-garmin-tre
  20537. !:ext tre
  20538. # title like City Nav Europe NTU 2019.2 Basemap
  20539. # or OSM Street map
  20540. >>>(0.s) string x %s
  20541. # 2nd title like Copyright 1995-2018 by GARMIN Corporation.
  20542. # or http://www.openstreetmap.org/
  20543. >>>>&1 string x %s
  20544. >>>0x0E use garmin-date
  20545. #>>>0x21 ulelong x \b, at 0x%x
  20546. #>>>0x25 ulelong x 0x%x bytes TRE1
  20547. #>>>0x29 ulelong x \b, at 0x%x
  20548. #>>>0x2D ulelong x 0x%x bytes TRE2
  20549. #>>>0x31 ulelong x \b, at 0x%x
  20550. #>>>0x35 ulelong x 0x%x bytes TRE3
  20551. # Copyright record size
  20552. #>>>0x39 uleshort x \b, copyright record size %u
  20553. # Map ID
  20554. >>>0x74 ulelong x \b, ID 0x%x
  20555. # URL: https://www.gpspower.net/garmin-tutorials/353310-basecamp-installing-free-desktop-map.html
  20556. # For road traffic information service (RDS/TMS/TMC). Commonly seen in City Navigator maps
  20557. >>9 string TRF traffic,
  20558. !:mime application/x-garmin-trf
  20559. !:ext trf
  20560. # city/region like Preitenegg
  20561. >>>(0.s+1) string x 1st %s
  20562. # highway part like L606/L148
  20563. >>>>&1 string x %s
  20564. # URL: https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/Format
  20565. # Reference: http://www.pinns.co.uk/osm/typformat.html
  20566. # customize the appearance of objects. For GPS and MapSource/Qlandkarte better looking maps
  20567. >>9 string TYP types
  20568. !:mime application/x-garmin-typ
  20569. !:ext typ
  20570. >>>0x0E use garmin-date
  20571. # character set 1252 65001~UTF8
  20572. >>>0x15 uleshort x \b, code page %u
  20573. # POIs
  20574. #>>>0x17 ulelong x \b, at 0x%x
  20575. #>>>0x1B ulelong x 0x%x bytes TYP1
  20576. # extra pois
  20577. #>>>0x5B ulelong x \b, at 0x%x
  20578. #>>>0x5F ulelong x 0x%x bytes TYP8
  20579. # URL: https://wiki.openstreetmap.org/wiki/OSM_Map_On_Garmin/RGN_Subfile_Format
  20580. # http://www.pinns.co.uk/osm/RGN.html
  20581. # region data used by the Garmin software
  20582. >>9 string RGN region
  20583. !:mime application/x-garmin-rgn
  20584. !:ext rgn
  20585. # POIs,Indexed POIs,Polylines or Polygons or first map level
  20586. #>>>0x15 ulelong x \b, at 0x%x
  20587. #>>>0x19 ulelong x 0x%x bytes RGN1
  20588. # polygons with extended types
  20589. #>>>0x21 ulelong >0
  20590. #>>>>0x1D ulelong x \b, at 0x%x
  20591. #>>>>0x21 ulelong x 0x%x bytes RGN2
  20592. # polylines with extended types
  20593. #>>>0x3D ulelong >0
  20594. #>>>>0x39 ulelong x \b, at 0x%x
  20595. #>>>>0x3D ulelong x 0x%x bytes RGN3
  20596. # extended POIs
  20597. #>>>0x59 ulelong >0
  20598. #>>>>0x55 ulelong x \b, at 0x%x
  20599. #>>>>0x59 ulelong x 0x%x bytes RGN3
  20600. #>>9 default x unknown map type
  20601. # Header length; GMP:31h 35h 3Dh,MDR:11Eh 238h 2C4h 310h,NOD:3Fh 7Fh,NET:64h,
  20602. # LBL:2A9h,SRT:1Dh 25h 27h,TRE:CFh 135h,TRF:5Ah,TYP:5Bh 6Eh 7Ch AEh,RGN:7Dh
  20603. >>0 uleshort x \b, header length 0x%x
  20604. # URL: https://www.memotech.franken.de/FileFormats/
  20605. # Reference: https://www.memotech.franken.de/FileFormats/Garmin_RGN_Format.pdf
  20606. # From: Joerg Jenderek
  20607. 0 string KpGr Garmin update
  20608. # format version like: 0064h~1.0
  20609. >0x4 uleshort !0x0064
  20610. >>4 uleshort/100 x \b, version %u
  20611. >>4 uleshort%100 x \b.%u
  20612. # 1st Garmin entry
  20613. >6 use garmin-entry
  20614. # 2nd Garmin entry
  20615. >(0x6.l+10) ubyte x
  20616. >>&0 use garmin-entry
  20617. # 3rd entry
  20618. >(0x6.l+10) ubyte x
  20619. >>&(&0.l+4) ubyte x
  20620. >>>&0 use garmin-entry
  20621. # look again at version to use default clause
  20622. >0x4 uleshort x
  20623. # test for region content by looking for
  20624. # Garmin *.srf by ./images with normal builder name "SQA" or longer "hales"
  20625. # 1 space after equal sign
  20626. >>0x3a search/5/s GARMIN\ BITMAP \b=
  20627. !:mime image/x-garmin-exe
  20628. !:ext exe
  20629. >>>&0 indirect x
  20630. # if not bitmap *.srf then region; 1 space after equal sign
  20631. >>0x3a default x \b=
  20632. !:mime application/x-garmin-rgn
  20633. !:ext rgn
  20634. # recursiv embedded
  20635. >>>0x3a search/5/s KpGrd
  20636. >>>>&0 indirect x
  20637. # look for ZIP or JAR archive by ./archive and ./zip
  20638. >>>0x3a search/5/s PK\003\004
  20639. >>>>&0 indirect x
  20640. # TODO: other garmin RGN record content like foo
  20641. #>>0x3a search/5/s bar BAR
  20642. # display information of Garmin RGN record
  20643. 0 name garmin-entry
  20644. # record length: 2 for Data, for Application often 1Bh sometimes 1Dh, "big" for Region
  20645. #>0 ulelong x \b, length 0x%x
  20646. # data record (ID='D') with version content like 0064h~1.0
  20647. >4 ubyte =0x44
  20648. >>5 uleshort !0x0064 \b; Data
  20649. >>>5 uleshort/100 x \b, version %u
  20650. >>>5 uleshort%100 x \b.%u
  20651. # Application Record (ID='A')
  20652. >4 ubyte =0x41 \b; App
  20653. # version content like 00c8h~2.0
  20654. >>5 uleshort !0x00C8
  20655. >>>5 uleshort/100 x \b, version %u
  20656. >>>5 uleshort%100 x \b.%u
  20657. # builder name like: SQA sqa build hales
  20658. >>7 string x \b, build by %s
  20659. # build date like: Oct 25 1999, Oct 1 2008, Feb 23 2009, Dec 15 2009
  20660. >>>&1 string x %s
  20661. # build time like: 11:26:12, 11:45:54, 14:16:13, 18:23:01
  20662. >>>>&1 string x %s
  20663. # region record (ID='R')
  20664. >4 ubyte =0x52 \b; Region
  20665. # region ID:14~fw_all.bin: 78~ZIP, RGN or SRF bitmap; 148~ZIP or JAR; 249~display firmware; 251~WiFi or GCD firmware; 255~ZIP
  20666. >>5 uleshort x ID=%u
  20667. # delay in ms: like 0, 500
  20668. >>7 ulelong !0 \b, %u ms
  20669. # region size (is record length - 10)
  20670. #>>11 ulelong x \b, length 0x%x
  20671. # region content like:
  20672. # "KpGr"~recursiv embedded,"GARMIN BITMAP"~Garmin Bitmap *.srf, "PK"~ZIP archive
  20673. #>>15 string x \b, content "%s"
  20674. >>15 ubequad x \b, content 0x%llx...
  20675. # This does NOT WORK!
  20676. #>>15 indirect x \b; contains
  20677. >4 default x \b; other
  20678. # garmin Record ID Identifies the record content like: D A R
  20679. >>4 ubyte x ID '%c'
  20680. # TOM TOM GPS watches ttbin files:
  20681. # https://github.com/ryanbinns/ttwatch/tree/master/ttbin
  20682. # From: Daniel Lenski
  20683. 0 byte 0x20
  20684. >1 leshort 0x0007
  20685. >>0x76 byte 0x20
  20686. >>>0x77 leshort 0x0075 TomTom activity file, v7
  20687. >>>>8 leldate x (%s,
  20688. >>>>3 byte x device firmware %d.
  20689. >>>>4 byte x \b%d.
  20690. >>>>5 byte x \b%d,
  20691. >>>>6 leshort x product ID %04d)
  20692. #------------------------------------------------------------------------------
  20693. # $File: maple,v 1.8 2017/03/17 21:35:28 christos Exp $
  20694. # maple: file(1) magic for maple files
  20695. # "H. Nanosecond" <aldomel@ix.netcom.com>
  20696. # Maple V release 4, a multi-purpose math program
  20697. #
  20698. # maple library .lib
  20699. 0 string \000MVR4\nI MapleVr4 library
  20700. # .ind
  20701. # no magic for these :-(
  20702. # they are compiled indexes for maple files
  20703. # .hdb
  20704. 0 string \000\004\000\000 Maple help database
  20705. # .mhp
  20706. # this has the form <PACKAGE=name>
  20707. 0 string \<PACKAGE= Maple help file
  20708. 0 string \<HELP\ NAME= Maple help file
  20709. 0 string \n\<HELP\ NAME= Maple help file with extra carriage return at start (yuck)
  20710. #0 string #\ Newton Maple help file, old style
  20711. 0 string #\ daub Maple help file, old style
  20712. #0 string #=========== Maple help file, old style
  20713. # .mws
  20714. 0 string \000\000\001\044\000\221 Maple worksheet
  20715. #this is anomalous
  20716. 0 string WriteNow\000\002\000\001\000\000\000\000\100\000\000\000\000\000 Maple worksheet, but weird
  20717. # this has the form {VERSION 2 3 "IBM INTEL NT" "2.3" }\n
  20718. # that is {VERSION major_version miunor_version computer_type version_string}
  20719. 0 string {VERSION\ Maple worksheet
  20720. >9 string >\0 version %.1s.
  20721. >>11 string >\0 %.1s
  20722. # .mps
  20723. 0 string \0\0\001$ Maple something
  20724. # from byte 4 it is either 'nul E' or 'soh R'
  20725. # I think 'nul E' means a file that was saved as a different name
  20726. # a sort of revision marking
  20727. # 'soh R' means new
  20728. >4 string \000\105 An old revision
  20729. >4 string \001\122 The latest save
  20730. # .mpl
  20731. # some of these are the same as .mps above
  20732. #0000000 000 000 001 044 000 105 same as .mps
  20733. #0000000 000 000 001 044 001 122 same as .mps
  20734. 0 string #\n##\ <SHAREFILE= Maple something
  20735. 0 string \n#\n##\ <SHAREFILE= Maple something
  20736. 0 string ##\ <SHAREFILE= Maple something
  20737. 0 string #\r##\ <SHAREFILE= Maple something
  20738. 0 string \r#\r##\ <SHAREFILE= Maple something
  20739. 0 string #\ \r##\ <DESCRIBE> Maple something anomalous.
  20740. #--------------------------------------------
  20741. # marc21: file(1) magic for MARC 21 Format
  20742. #
  20743. # Kevin Ford (kefo@loc.gov)
  20744. #
  20745. # MARC21 formats are for the representation and communication
  20746. # of bibliographic and related information in machine-readable
  20747. # form. For more info, see https://www.loc.gov/marc/
  20748. # leader position 20-21 must be 45
  20749. # and 22-23 also 00 so far, but we check that later.
  20750. 20 string 45
  20751. >0 search/2048 \x1e
  20752. # leader starts with 5 digits, followed by codes specific to MARC format
  20753. >>0 regex/1l (^[0-9]{5})[acdnp][^bhlnqsu-z] MARC21 Bibliographic
  20754. !:mime application/marc
  20755. >>0 regex/1l (^[0-9]{5})[acdnosx][z] MARC21 Authority
  20756. !:mime application/marc
  20757. >>0 regex/1l (^[0-9]{5})[cdn][uvxy] MARC21 Holdings
  20758. !:mime application/marc
  20759. >>0 regex/1l (^[0-9]{5})[acdn][w] MARC21 Classification
  20760. !:mime application/marc
  20761. >>0 regex/1l (^[0-9]{5})[cdn][q] MARC21 Community
  20762. !:mime application/marc
  20763. # leader position 22-23, should be "00" but is it?
  20764. >>0 regex/1l (^.{21})([^0]{2}) (non-conforming)
  20765. !:mime application/marc
  20766. #------------------------------------------------------------------------------
  20767. # $File: mathcad,v 1.5 2009/09/19 16:28:10 christos Exp $
  20768. # mathcad: file(1) magic for Mathcad documents
  20769. # URL: http://www.mathsoft.com/
  20770. # From: Josh Triplett <josh@freedesktop.org>
  20771. 0 string .MCAD\t Mathcad document
  20772. #------------------------------------------------------------------------------
  20773. # $File: mathematica,v 1.11 2021/02/23 00:51:10 christos Exp $
  20774. # mathematica: file(1) magic for mathematica files
  20775. # "H. Nanosecond" <aldomel@ix.netcom.com>
  20776. # Mathematica a multi-purpose math program
  20777. # versions 2.2 and 3.0
  20778. #mathematica .mb
  20779. 0 string \064\024\012\000\035\000\000\000 Mathematica version 2 notebook
  20780. !:ext mb
  20781. 0 string \064\024\011\000\035\000\000\000 Mathematica version 2 notebook
  20782. !:ext mb
  20783. # .ma
  20784. # multiple possibilities:
  20785. 0 string (*^\n\n::[\011frontEndVersion\ =\ Mathematica notebook
  20786. #>41 string >\0 %s
  20787. !:ext mb
  20788. #0 string (*^\n\n::[\011palette Mathematica notebook version 2.x
  20789. #0 string (*^\n\n::[\011Information Mathematica notebook version 2.x
  20790. #>675 string >\0 %s #doesn't work well
  20791. # there may be 'cr' instead of 'nl' in some does this matter?
  20792. # generic:
  20793. 0 string (*^\r\r::[\011 Mathematica notebook version 2.x
  20794. !:ext mb
  20795. 0 string (*^\r\n\r\n::[\011 Mathematica notebook version 2.x
  20796. !:ext mb
  20797. 0 string (*^\015 Mathematica notebook version 2.x
  20798. !:ext mb
  20799. 0 string (*^\n\r\n\r::[\011 Mathematica notebook version 2.x
  20800. !:ext mb
  20801. 0 string (*^\r::[\011 Mathematica notebook version 2.x
  20802. !:ext mb
  20803. 0 string (*^\r\n::[\011 Mathematica notebook version 2.x
  20804. !:ext mb
  20805. 0 string (*^\n\n::[\011 Mathematica notebook version 2.x
  20806. !:ext mb
  20807. 0 string (*^\n::[\011 Mathematica notebook version 2.x
  20808. !:ext mb
  20809. # Mathematica .mx files
  20810. #0 string (*This\ is\ a\ Mathematica\ binary\ dump\ file.\ It\ can\ be\ loaded\ with\ Get.*) Mathematica binary file
  20811. 0 string (*This\ is\ a\ Mathematica\ binary\ Mathematica binary file
  20812. #>71 string \000\010\010\010\010\000\000\000\000\000\000\010\100\010\000\000\000
  20813. # >71... is optional
  20814. >88 string >\0 from %s
  20815. # Mathematica files PBF:
  20816. # 115 115 101 120 102 106 000 001 000 000 000 203 000 001 000
  20817. 0 string MMAPBF\000\001\000\000\000\203\000\001\000 Mathematica PBF (fonts I think)
  20818. # .ml files These are menu resources I think
  20819. # these start with "[0-9][0-9][0-9]\ A~[0-9][0-9][0-9]\
  20820. # how to put that into a magic rule?
  20821. 4 string \ A~ MAthematica .ml file
  20822. # .nb files
  20823. #too long 0 string (***********************************************************************\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Mathematica-Compatible Notebook Mathematica 3.0 notebook
  20824. 0 string (*********************** Mathematica 3.0 notebook
  20825. # other (* matches it is a comment start in these langs
  20826. # GRR: Too weak; also matches other languages e.g. ML
  20827. #0 string (* Mathematica, or Pascal, Modula-2 or 3 code text
  20828. #########################
  20829. # MatLab v5
  20830. 0 string MATLAB Matlab v5 mat-file
  20831. >126 short 0x494d (big endian)
  20832. >>124 beshort x version 0x%04x
  20833. >126 short 0x4d49 (little endian)
  20834. >>124 leshort x version 0x%04x
  20835. #------------------------------------------------------------------------------
  20836. # $File: matroska,v 1.9 2019/04/19 00:42:27 christos Exp $
  20837. # matroska: file(1) magic for Matroska files
  20838. #
  20839. # See https://www.matroska.org/
  20840. #
  20841. # EBML id:
  20842. 0 belong 0x1a45dfa3
  20843. # DocType id:
  20844. >4 search/4096 \x42\x82
  20845. # DocType contents:
  20846. >>&1 string webm WebM
  20847. !:mime video/webm
  20848. >>&1 string matroska Matroska data
  20849. !:mime video/x-matroska
  20850. #------------------------------------------------------------------------------
  20851. # $File: mcrypt,v 1.5 2009/09/19 16:28:10 christos Exp $
  20852. # Mavroyanopoulos Nikos <nmav@hellug.gr>
  20853. # mcrypt: file(1) magic for mcrypt 2.2.x;
  20854. 0 string \0m\3 mcrypt 2.5 encrypted data,
  20855. >4 string >\0 algorithm: %s,
  20856. >>&1 leshort >0 keysize: %d bytes,
  20857. >>>&0 string >\0 mode: %s,
  20858. 0 string \0m\2 mcrypt 2.2 encrypted data,
  20859. >3 byte 0 algorithm: blowfish-448,
  20860. >3 byte 1 algorithm: DES,
  20861. >3 byte 2 algorithm: 3DES,
  20862. >3 byte 3 algorithm: 3-WAY,
  20863. >3 byte 4 algorithm: GOST,
  20864. >3 byte 6 algorithm: SAFER-SK64,
  20865. >3 byte 7 algorithm: SAFER-SK128,
  20866. >3 byte 8 algorithm: CAST-128,
  20867. >3 byte 9 algorithm: xTEA,
  20868. >3 byte 10 algorithm: TWOFISH-128,
  20869. >3 byte 11 algorithm: RC2,
  20870. >3 byte 12 algorithm: TWOFISH-192,
  20871. >3 byte 13 algorithm: TWOFISH-256,
  20872. >3 byte 14 algorithm: blowfish-128,
  20873. >3 byte 15 algorithm: blowfish-192,
  20874. >3 byte 16 algorithm: blowfish-256,
  20875. >3 byte 100 algorithm: RC6,
  20876. >3 byte 101 algorithm: IDEA,
  20877. >4 byte 0 mode: CBC,
  20878. >4 byte 1 mode: ECB,
  20879. >4 byte 2 mode: CFB,
  20880. >4 byte 3 mode: OFB,
  20881. >4 byte 4 mode: nOFB,
  20882. >5 byte 0 keymode: 8bit
  20883. >5 byte 1 keymode: 4bit
  20884. >5 byte 2 keymode: SHA-1 hash
  20885. >5 byte 3 keymode: MD5 hash
  20886. #------------------------------------------------------------------------------
  20887. # $File: measure,v 1.3 2021/03/25 17:30:10 christos Exp $
  20888. # measure: file(1) magic for measurement data
  20889. # DIY-Thermocam raw data
  20890. 0 name diy-thermocam-parser
  20891. >0 beshort x scale %d-
  20892. >2 beshort x \b%d,
  20893. >4 lefloat x spot sensor temperature %f,
  20894. >9 ubyte 0 unit celsius,
  20895. >9 ubyte 1 unit fahrenheit,
  20896. >8 ubyte x color scheme %d
  20897. >10 ubyte 1 \b, show spot sensor
  20898. >11 ubyte 1 \b, show scale bar
  20899. >12 ubyte &1 \b, minimum point enabled
  20900. >12 ubyte &2 \b, maximum point enabled
  20901. >13 lefloat x \b, calibration: offset %f,
  20902. >17 lefloat x slope %f
  20903. 0 name diy-thermocam-checker
  20904. >9 ubyte <2
  20905. >>10 ubyte <2
  20906. >>>11 ubyte <2
  20907. >>>>12 ubyte <4
  20908. >>>>>17 lefloat >0.0001 DIY-Thermocam raw data
  20909. # V2 and Leption 3.x:
  20910. 38408 ubyte <19
  20911. >38400 use diy-thermocam-checker
  20912. >>38400 default x (Lepton 3.x),
  20913. >>>38400 use diy-thermocam-parser
  20914. # V1 or Lepton 2.x
  20915. 9608 ubyte <19
  20916. >9600 use diy-thermocam-checker
  20917. >>9600 default x (Lepton 2.x),
  20918. >>>9600 use diy-thermocam-parser
  20919. # Becker & Hickl Photon Counting (PMS) data file
  20920. # format documentation: https://www.becker-hickl.com/wp-content/uploads/2018/11/opm-pms400-v01.pdf (page 57)
  20921. (0x02.l) string *IDENTIFICATION Becker & Hickl PMS Data File
  20922. >0x12 short x (%d data blocks)
  20923. !:ext sdt
  20924. #------------------------------------------------------------------------------
  20925. # $File: mercurial,v 1.5 2019/04/19 00:42:27 christos Exp $
  20926. # mercurial: file(1) magic for Mercurial changeset bundles
  20927. # https://www.selenic.com/mercurial/wiki/
  20928. #
  20929. # Jesse Glick (jesse.glick@sun.com)
  20930. #
  20931. 0 string HG10 Mercurial changeset bundle
  20932. >4 string UN (uncompressed)
  20933. >4 string GZ (gzip compressed)
  20934. >4 string BZ (bzip2 compressed)
  20935. #------------------------------------------------------------------------------
  20936. # $File: metastore,v 1.3 2019/04/19 00:42:27 christos Exp $
  20937. # metastore: file(1) magic for metastore files
  20938. # From: Thomas Wissen
  20939. # see https://david.hardeman.nu/software.php#metastore
  20940. 0 string MeTaSt00r3 Metastore data file,
  20941. >10 bequad x version %0llx
  20942. #------------------------------------------------------------------------------
  20943. # $File: meteorological,v 1.2 2017/03/17 21:35:28 christos Exp $
  20944. # rinex: file(1) magic for RINEX files
  20945. # http://igscb.jpl.nasa.gov/igscb/data/format/rinex210.txt
  20946. # ftp://cddis.gsfc.nasa.gov/pub/reports/formats/rinex300.pdf
  20947. # data for testing: ftp://cddis.gsfc.nasa.gov/pub/gps/data
  20948. 60 string RINEX
  20949. >80 search/256 XXRINEXB RINEX Data, GEO SBAS Broadcast
  20950. >>&32 string x \b, date %15.15s
  20951. >>5 string x \b, version %6.6s
  20952. !:mime rinex/broadcast
  20953. >80 search/256 XXRINEXD RINEX Data, Observation (Hatanaka comp)
  20954. >>&32 string x \b, date %15.15s
  20955. >>5 string x \b, version %6.6s
  20956. !:mime rinex/observation
  20957. >80 search/256 XXRINEXC RINEX Data, Clock
  20958. >>&32 string x \b, date %15.15s
  20959. >>5 string x \b, version %6.6s
  20960. !:mime rinex/clock
  20961. >80 search/256 XXRINEXH RINEX Data, GEO SBAS Navigation
  20962. >>&32 string x \b, date %15.15s
  20963. >>5 string x \b, version %6.6s
  20964. !:mime rinex/navigation
  20965. >80 search/256 XXRINEXG RINEX Data, GLONASS Navigation
  20966. >>&32 string x \b, date %15.15s
  20967. >>5 string x \b, version %6.6s
  20968. !:mime rinex/navigation
  20969. >80 search/256 XXRINEXL RINEX Data, Galileo Navigation
  20970. >>&32 string x \b, date %15.15s
  20971. >>5 string x \b, version %6.6s
  20972. !:mime rinex/navigation
  20973. >80 search/256 XXRINEXM RINEX Data, Meteorological
  20974. >>&32 string x \b, date %15.15s
  20975. >>5 string x \b, version %6.6s
  20976. !:mime rinex/meteorological
  20977. >80 search/256 XXRINEXN RINEX Data, Navigation
  20978. >>&32 string x \b, date %15.15s
  20979. >>5 string x \b, version %6.6s
  20980. !:mime rinex/navigation
  20981. >80 search/256 XXRINEXO RINEX Data, Observation
  20982. >>&32 string x \b, date %15.15s
  20983. >>5 string x \b, version %6.6s
  20984. !:mime rinex/observation
  20985. # https://en.wikipedia.org/wiki/GRIB
  20986. 0 string GRIB
  20987. >7 byte =1 Gridded binary (GRIB) version 1
  20988. >7 byte =2 Gridded binary (GRIB) version 2
  20989. #------------------------------------------------------------------------------
  20990. # $File: microfocus,v 1.3 2019/04/19 00:42:27 christos Exp $
  20991. # Micro Focus COBOL data files.
  20992. # https://documentation.microfocus.com/help/index.jsp?topic=\
  20993. # %2FGUID-0E0191D8-C39A-44D1-BA4C-D67107BAF784%2FHRFLRHFILE05.html
  20994. # http://www.cobolproducts.com/datafile/data-viewer.html
  20995. # https://github.com/miracle2k/mfcobol-export
  20996. 0 string \x30\x00\x00\x7C
  20997. >36 string \x00\x3E Micro Focus File with Header (DAT)
  20998. !:mime application/octet-stream
  20999. 0 string \x30\x7E\x00\x00
  21000. >36 string \x00\x3E Micro Focus File with Header (DAT)
  21001. !:mime application/octet-stream
  21002. 39 string \x02
  21003. >136 string \x02\x02\x04\x04 Micro Focus Index File (IDX)
  21004. !:mime application/octet-stream
  21005. #------------------------------------------------------------------------------
  21006. # $File: mime,v 1.8 2017/03/17 22:20:22 christos Exp $
  21007. # mime: file(1) magic for MIME encoded files
  21008. #
  21009. 0 string/t Content-Type:\040
  21010. >14 string >\0 %s
  21011. 0 string/t Content-Type:
  21012. >13 string >\0 %s
  21013. #------------------------------------------------------------------------------
  21014. # $File: mips,v 1.10 2014/04/30 21:41:02 christos Exp $
  21015. # mips: file(1) magic for MIPS ECOFF and Ucode, as used in SGI IRIX
  21016. # and DEC Ultrix
  21017. #
  21018. 0 beshort 0x0160 MIPSEB ECOFF executable
  21019. >20 beshort 0407 (impure)
  21020. >20 beshort 0410 (swapped)
  21021. >20 beshort 0413 (paged)
  21022. >8 belong >0 not stripped
  21023. >8 belong 0 stripped
  21024. >22 byte x - version %d
  21025. >23 byte x \b.%d
  21026. #
  21027. 0 beshort 0x0162 MIPSEL-BE ECOFF executable
  21028. >20 beshort 0407 (impure)
  21029. >20 beshort 0410 (swapped)
  21030. >20 beshort 0413 (paged)
  21031. >8 belong >0 not stripped
  21032. >8 belong 0 stripped
  21033. >23 byte x - version %d
  21034. >22 byte x \b.%d
  21035. #
  21036. 0 beshort 0x6001 MIPSEB-LE ECOFF executable
  21037. >20 beshort 03401 (impure)
  21038. >20 beshort 04001 (swapped)
  21039. >20 beshort 05401 (paged)
  21040. >8 belong >0 not stripped
  21041. >8 belong 0 stripped
  21042. >23 byte x - version %d
  21043. >22 byte x \b.%d
  21044. #
  21045. 0 beshort 0x6201 MIPSEL ECOFF executable
  21046. >20 beshort 03401 (impure)
  21047. >20 beshort 04001 (swapped)
  21048. >20 beshort 05401 (paged)
  21049. >8 belong >0 not stripped
  21050. >8 belong 0 stripped
  21051. >23 byte x - version %d
  21052. >22 byte x \b.%d
  21053. #
  21054. # MIPS 2 additions
  21055. #
  21056. 0 beshort 0x0163 MIPSEB MIPS-II ECOFF executable
  21057. >20 beshort 0407 (impure)
  21058. >20 beshort 0410 (swapped)
  21059. >20 beshort 0413 (paged)
  21060. >8 belong >0 not stripped
  21061. >8 belong 0 stripped
  21062. >22 byte x - version %d
  21063. >23 byte x \b.%d
  21064. #
  21065. 0 beshort 0x0166 MIPSEL-BE MIPS-II ECOFF executable
  21066. >20 beshort 0407 (impure)
  21067. >20 beshort 0410 (swapped)
  21068. >20 beshort 0413 (paged)
  21069. >8 belong >0 not stripped
  21070. >8 belong 0 stripped
  21071. >22 byte x - version %d
  21072. >23 byte x \b.%d
  21073. #
  21074. 0 beshort 0x6301 MIPSEB-LE MIPS-II ECOFF executable
  21075. >20 beshort 03401 (impure)
  21076. >20 beshort 04001 (swapped)
  21077. >20 beshort 05401 (paged)
  21078. >8 belong >0 not stripped
  21079. >8 belong 0 stripped
  21080. >23 byte x - version %d
  21081. >22 byte x \b.%d
  21082. #
  21083. 0 beshort 0x6601 MIPSEL MIPS-II ECOFF executable
  21084. >20 beshort 03401 (impure)
  21085. >20 beshort 04001 (swapped)
  21086. >20 beshort 05401 (paged)
  21087. >8 belong >0 not stripped
  21088. >8 belong 0 stripped
  21089. >23 byte x - version %d
  21090. >22 byte x \b.%d
  21091. #
  21092. # MIPS 3 additions
  21093. #
  21094. 0 beshort 0x0140 MIPSEB MIPS-III ECOFF executable
  21095. >20 beshort 0407 (impure)
  21096. >20 beshort 0410 (swapped)
  21097. >20 beshort 0413 (paged)
  21098. >8 belong >0 not stripped
  21099. >8 belong 0 stripped
  21100. >22 byte x - version %d
  21101. >23 byte x \b.%d
  21102. #
  21103. 0 beshort 0x0142 MIPSEL-BE MIPS-III ECOFF executable
  21104. >20 beshort 0407 (impure)
  21105. >20 beshort 0410 (swapped)
  21106. >20 beshort 0413 (paged)
  21107. >8 belong >0 not stripped
  21108. >8 belong 0 stripped
  21109. >22 byte x - version %d
  21110. >23 byte x \b.%d
  21111. #
  21112. 0 beshort 0x4001 MIPSEB-LE MIPS-III ECOFF executable
  21113. >20 beshort 03401 (impure)
  21114. >20 beshort 04001 (swapped)
  21115. >20 beshort 05401 (paged)
  21116. >8 belong >0 not stripped
  21117. >8 belong 0 stripped
  21118. >23 byte x - version %d
  21119. >22 byte x \b.%d
  21120. #
  21121. 0 beshort 0x4201 MIPSEL MIPS-III ECOFF executable
  21122. >20 beshort 03401 (impure)
  21123. >20 beshort 04001 (swapped)
  21124. >20 beshort 05401 (paged)
  21125. >8 belong >0 not stripped
  21126. >8 belong 0 stripped
  21127. >23 byte x - version %d
  21128. >22 byte x \b.%d
  21129. #
  21130. 0 beshort 0x180 MIPSEB Ucode
  21131. 0 beshort 0x182 MIPSEL-BE Ucode
  21132. #------------------------------------------------------------------------------
  21133. # $File: mirage,v 1.7 2009/09/19 16:28:10 christos Exp $
  21134. # mirage: file(1) magic for Mirage executables
  21135. #
  21136. # XXX - byte order?
  21137. #
  21138. 0 long 31415 Mirage Assembler m.out executable
  21139. #-----------------------------------------------------------------------------
  21140. # $File: misctools,v 1.18 2019/04/19 00:42:27 christos Exp $
  21141. # misctools: file(1) magic for miscellaneous UNIX tools.
  21142. #
  21143. 0 search/1 %%!! X-Post-It-Note text
  21144. 0 string/c BEGIN:VCALENDAR vCalendar calendar file
  21145. !:mime text/calendar
  21146. # updated by Joerg Jenderek at Apr 2015
  21147. # Extension: .vcf
  21148. # https://en.wikipedia.org/wiki/VCard
  21149. 0 string/c BEGIN:VCARD vCard visiting card
  21150. # deprecated
  21151. #!:mime text/x-vcard
  21152. !:mime text/vcard
  21153. # VERSION must come right after BEGIN for 3.0 or 4.0 except in 2.1 , where it can be anywhere
  21154. >12 search/14000/c VERSION:
  21155. # VERSION 2.1 , 3.0 or 4.0
  21156. >>&0 string x \b, version %-.3s
  21157. # Summary: Libtool library file
  21158. # Extension: .la
  21159. # Submitted by: Tomasz Trojanowski <tomek@uninet.com.pl>
  21160. 0 search/80 .la\ -\ a\ libtool\ library\ file libtool library file
  21161. # Summary: Libtool object file
  21162. # Extension: .lo
  21163. # Submitted by: Abel Cheung <abelcheung@gmail.com>
  21164. 0 search/80 .lo\ -\ a\ libtool\ object\ file libtool object file
  21165. # From: Daniel Novotny <dnovotny@redhat.com>
  21166. # Update: Joerg Jenderek
  21167. # URL: https://en.wikipedia.org/wiki/Core_dump#User-mode_memory_dumps
  21168. # Reference: https://msdn.microsoft.com/en-us/library/ms680378%28VS.85%29.aspx
  21169. #
  21170. # "Windows Minidump" by TrID
  21171. # ./misctools (version 5.25) labeled the entry as "MDMP crash report data"
  21172. 0 string MDMP Mini DuMP crash report
  21173. # https://filext.com/file-extension/DMP
  21174. !:mime application/x-dmp
  21175. !:ext dmp/mdmp
  21176. # The high-order word is an internal value that is implementation specific.
  21177. # The low-order word is MINIDUMP_VERSION 0xA793
  21178. >4 ulelong&0x0000FFFF !0xA793 \b, version 0x%4.4x
  21179. # NumberOfStreams 8,9,10,13
  21180. >8 ulelong x \b, %d streams
  21181. # StreamDirectoryRva 0x20
  21182. >12 ulelong !0x20 \b, 0x%8.8x RVA
  21183. # CheckSum 0
  21184. >16 ulelong !0 \b, CheckSum 0x%8.8x
  21185. # Reserved or TimeDateStamp
  21186. >20 ledate x \b, %s
  21187. # https://msdn.microsoft.com/en-us/library/windows/desktop/ms680519%28v=vs.85%29.aspx
  21188. # Flags MINIDUMP_TYPE enumeration type 0 0x121 0x800
  21189. >24 ulelong x \b, 0x%x type
  21190. # >24 ulelong >0 \b; include
  21191. # >>24 ulelong &0x00000001 \b data sections,
  21192. # >>24 ulelong &0x00000020 \b list of unloaded modules,
  21193. # >>24 ulelong &0x00000100 \b process and thread information,
  21194. # >>24 ulelong &0x00000800 \b memory information,
  21195. # Summary: abook addressbook file
  21196. # Submitted by: Mark Schreiber <mark7@alumni.cmu.edu>
  21197. 0 string #\x20abook\x20addressbook\x20file abook address book
  21198. !:mime application/x-abook-addressbook
  21199. #------------------------------------------------------------------------------
  21200. # $File: mkid,v 1.6 2009/09/19 16:28:10 christos Exp $
  21201. # mkid: file(1) magic for mkid(1) databases
  21202. #
  21203. # ID is the binary tags database produced by mkid(1).
  21204. #
  21205. # XXX - byte order?
  21206. #
  21207. 0 string \311\304 ID tags data
  21208. >2 short >0 version %d
  21209. #------------------------------------------------------------------------------
  21210. # $File: mlssa,v 1.4 2009/09/19 16:28:10 christos Exp $
  21211. # mlssa: file(1) magic for MLSSA datafiles
  21212. #
  21213. 0 lelong 0xffffabcd MLSSA datafile,
  21214. >4 leshort x algorithm %d,
  21215. >10 lelong x %d samples
  21216. #------------------------------------------------------------------------------
  21217. # $File: mmdf,v 1.6 2009/09/19 16:28:10 christos Exp $
  21218. # mmdf: file(1) magic for MMDF mail files
  21219. #
  21220. 0 string \001\001\001\001 MMDF mailbox
  21221. #------------------------------------------------------------------------------
  21222. # $File: modem,v 1.9 2019/04/19 00:42:27 christos Exp $
  21223. # modem: file(1) magic for modem programs
  21224. #
  21225. # From: Florian La Roche <florian@knorke.saar.de>
  21226. 1 string PC\ Research,\ Inc Digifax-G3-File
  21227. >29 byte 1 \b, fine resolution
  21228. >29 byte 0 \b, normal resolution
  21229. # Summary: CCITT Group 3 Facsimile in "raw" form (i.e. no header).
  21230. # Modified by: Joerg Jenderek
  21231. # URL: https://de.wikipedia.org/wiki/Fax
  21232. # Reference: https://web.archive.org/web/20020628195336/http://www.netnam.vn/unescocourse/computervision/104.htm
  21233. # GRR: EOL of G3 is too general as it catches also TrueType fonts, Postscript PrinterFontMetric, others
  21234. 0 short 0x0100
  21235. # 16 0-bits near beginning like True Type fonts *.ttf, Postscript PrinterFontMetric *.pfm, FTYPE.HYPERCARD, XFER
  21236. >2 search/9 \0\0
  21237. # maximal 7 0-bits for pixel sequences or 11 0-bits for EOL in G3
  21238. >2 default x
  21239. # skip IRCAM file (VAX big-endian) ./audio
  21240. >>0 belong !0x0001a364
  21241. # skip GEM Image data ./images
  21242. >>>2 beshort !0x0008
  21243. # look for first keyword of Panorama database *.pan
  21244. >>>>11 search/262 \x06DESIGN
  21245. # skip Panorama database
  21246. >>>>11 default x
  21247. # old Apple DreamWorld DreamGrafix *.3200 with keyword at end of g3 looking files
  21248. >>>>>27118 search/1864 DreamWorld
  21249. >>>>>27118 default x
  21250. # skip MouseTrap/Mt.Defaults with file size 16 found on Golden Orchard Apple II CD Rom
  21251. >>>>>>8 ubequad !0x2e01010454010203
  21252. # skip PICTUREH.SML found on Golden Orchard Apple II CD Rom
  21253. >>>>>>>8 ubequad !0x5dee74ad1aa56394 raw G3 (Group 3) FAX, byte-padded
  21254. # version 5.25 labeled the entry above "raw G3 data, byte-padded"
  21255. !:mime image/g3fax
  21256. #!:apple ????TIFF
  21257. !:ext g3
  21258. # unusual image starting with black pixel
  21259. #0 short 0x1300 raw G3 (Group 3) FAX
  21260. 0 short 0x1400
  21261. # 16 0-bits near beginning like PicturePuzzler found on Golden Orchard Apple CD Rom
  21262. >2 search/9 \0\0
  21263. # maximal 7 0-bits for pixel sequences or 11 0-bits for EOL in G3
  21264. >2 default x raw G3 (Group 3) FAX
  21265. # version 5.25 labeled the above entry as "raw G3 data"
  21266. !:mime image/g3fax
  21267. !:ext g3
  21268. # unusual image with black pixel near beginning
  21269. #0 short 0x1900 raw G3 (Group 3) FAX
  21270. #
  21271. # Magic data for vgetty voice formats
  21272. # (Martin Seine & Marc Eberhard)
  21273. #
  21274. # raw modem data version 1
  21275. #
  21276. 0 string RMD1 raw modem data
  21277. >4 string >\0 (%s /
  21278. >20 short >0 compression type 0x%04x)
  21279. #
  21280. # portable voice format 1
  21281. #
  21282. 0 string PVF1\n portable voice format
  21283. >5 string >\0 (binary %s)
  21284. #
  21285. # portable voice format 2
  21286. #
  21287. 0 string PVF2\n portable voice format
  21288. >5 string >\0 (ascii %s)
  21289. # From: Bernd Nuernberger <bernd.nuernberger@web.de>
  21290. # Brooktrout G3 fax data incl. 128 byte header
  21291. # Common suffixes: 3??, BRK, BRT, BTR
  21292. 0 leshort 0x01bb
  21293. >2 leshort 0x0100 Brooktrout 301 fax image,
  21294. >>9 leshort x %d x
  21295. >>0x2d leshort x %d
  21296. >>6 leshort 200 \b, fine resolution
  21297. >>6 leshort 100 \b, normal resolution
  21298. >>11 byte 1 \b, G3 compression
  21299. >>11 byte 2 \b, G32D compression
  21300. #------------------------------------------------------------------------------
  21301. # $File: modulefile,v 1.1 2019/10/15 18:04:40 christos Exp $
  21302. # modulefile: file(1) magic for user's environment modulefile
  21303. # URL: http://modules.sourceforge.net/
  21304. # Reference: https://modules.readthedocs.io/en/stable/modulefile.html
  21305. # From: Xavier Delaruelle <xavier.delaruelle@cea.fr>
  21306. 0 string #%Module modulefile
  21307. !:mime text/x-modulefile
  21308. #------------------------------------------------------------------------------
  21309. # $File: motorola,v 1.11 2014/04/30 21:41:02 christos Exp $
  21310. # motorola: file(1) magic for Motorola 68K and 88K binaries
  21311. #
  21312. # 68K
  21313. #
  21314. 0 beshort 0520 mc68k COFF
  21315. >18 beshort ^00000020 object
  21316. >18 beshort &00000020 executable
  21317. >12 belong >0 not stripped
  21318. >168 string .lowmem Apple toolbox
  21319. >20 beshort 0407 (impure)
  21320. >20 beshort 0410 (pure)
  21321. >20 beshort 0413 (demand paged)
  21322. >20 beshort 0421 (standalone)
  21323. 0 beshort 0521 mc68k executable (shared)
  21324. >12 belong >0 not stripped
  21325. 0 beshort 0522 mc68k executable (shared demand paged)
  21326. >12 belong >0 not stripped
  21327. #
  21328. # Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
  21329. #
  21330. 0 beshort 0554 68K BCS executable
  21331. #
  21332. # 88K
  21333. #
  21334. # Motorola/88Open BCS
  21335. #
  21336. 0 beshort 0555 88K BCS executable
  21337. #
  21338. # Motorola S-Records, from Gerd Truschinski <gt@freebsd.first.gmd.de>
  21339. 0 string S0 Motorola S-Record; binary data in text format
  21340. # ATARI ST relocatable PRG
  21341. #
  21342. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001
  21343. # (according to Roland Waldi, Oct 21, 1987)
  21344. # besides the magic 0x601a, the text segment size is checked to be
  21345. # not larger than 1 MB (which is a lot on ST).
  21346. # The additional 0x601b distinction I took from Doug Lee's magic.
  21347. 0 belong&0xFFFFFFF0 0x601A0000 Atari ST M68K contiguous executable
  21348. >2 belong x (txt=%d,
  21349. >6 belong x dat=%d,
  21350. >10 belong x bss=%d,
  21351. >14 belong x sym=%d)
  21352. 0 belong&0xFFFFFFF0 0x601B0000 Atari ST M68K non-contig executable
  21353. >2 belong x (txt=%d,
  21354. >6 belong x dat=%d,
  21355. >10 belong x bss=%d,
  21356. >14 belong x sym=%d)
  21357. # Atari ST/TT... program format (sent by Wolfram Kleff <kleff@cs.uni-bonn.de>)
  21358. 0 beshort 0x601A Atari 68xxx executable,
  21359. >2 belong x text len %u,
  21360. >6 belong x data len %u,
  21361. >10 belong x BSS len %u,
  21362. >14 belong x symboltab len %u,
  21363. >18 belong 0
  21364. >22 belong &0x01 fastload flag,
  21365. >22 belong &0x02 may be loaded to alternate RAM,
  21366. >22 belong &0x04 malloc may be from alternate RAM,
  21367. >22 belong x flags: 0x%X,
  21368. >26 beshort 0 no relocation tab
  21369. >26 beshort !0 + relocation tab
  21370. >30 string SFX [Self-Extracting LZH SFX archive]
  21371. >38 string SFX [Self-Extracting LZH SFX archive]
  21372. >44 string ZIP! [Self-Extracting ZIP SFX archive]
  21373. 0 beshort 0x0064 Atari 68xxx CPX file
  21374. >8 beshort x (version %04x)
  21375. #------------------------------------------------------------------------------
  21376. # $File: mozilla,v 1.11 2020/12/12 20:01:47 christos Exp $
  21377. # mozilla: file(1) magic for Mozilla XUL fastload files
  21378. # (XUL.mfasl and XPC.mfasl)
  21379. # URL: https://www.mozilla.org/
  21380. # From: Josh Triplett <josh@freedesktop.org>
  21381. 0 string XPCOM\nMozFASL\r\n\x1A Mozilla XUL fastload data
  21382. # Probably the next magic line contains misspelled "mozLz40\0"
  21383. 0 string mozLz4a Mozilla lz4 compressed bookmark data
  21384. # From: Joerg Jenderek
  21385. # URL: https://lz4.github.io/lz4/
  21386. # Reference: https://github.com/avih/dejsonlz4/archive/master.zip/
  21387. # dejsonlz4-master\src\dejsonlz4.c
  21388. # Note: mostly JSON compressed with a non-standard LZ4 header
  21389. # can be unpacked by dejsonlz4 but not lz4 program.
  21390. 0 string mozLz40\0 Mozilla lz4 compressed data
  21391. !:mime application/x-lz4+json
  21392. # mozlz4 extension seems to be used for search/store, while jsonlz4 for bookmarks
  21393. !:ext jsonlz4/mozlz4
  21394. # decomp_size
  21395. >8 ulelong x \b, originally %u bytes
  21396. # lz4 data
  21397. #>12 ubequad x \b, lz4 data 0x%16.16llx
  21398. # From: Joerg Jenderek
  21399. # URL: https://en.wikipedia.org/wiki/Firefox_4
  21400. # Reference: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
  21401. # Note: Most ZIP utilities are able to extract such archives
  21402. # maybe only partly or after some warnings. Example:
  21403. # zip -FF omni.ja --out omni.zip
  21404. 4 string PK\001\002 Mozilla archive omni.ja
  21405. !:mime application/x-zip
  21406. !:ext ja
  21407. # TODO:
  21408. #>4 use zip-dir-entry
  21409. #------------------------------------------------------------------------------
  21410. # $File: msdos,v 1.145 2021/02/23 00:51:10 christos Exp $
  21411. # msdos: file(1) magic for MS-DOS files
  21412. #
  21413. # .BAT files (Daniel Quinlan, quinlan@yggdrasil.com)
  21414. # updated by Joerg Jenderek at Oct 2008,Apr 2011
  21415. 0 string/t @
  21416. >1 string/cW \ echo\ off DOS batch file text
  21417. !:mime text/x-msdos-batch
  21418. !:ext bat
  21419. >1 string/cW echo\ off DOS batch file text
  21420. !:mime text/x-msdos-batch
  21421. !:ext bat
  21422. >1 string/cW rem DOS batch file text
  21423. !:mime text/x-msdos-batch
  21424. !:ext bat
  21425. >1 string/cW set\ DOS batch file text
  21426. !:mime text/x-msdos-batch
  21427. !:ext bat
  21428. # OS/2 batch files are REXX. the second regex is a bit generic, oh well
  21429. # the matched commands seem to be common in REXX and uncommon elsewhere
  21430. 100 search/0xffff rxfuncadd
  21431. >100 regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text
  21432. 100 search/0xffff say
  21433. >100 regex/c =^[\ \t]{0,10}say\ ['"] OS/2 REXX batch file text
  21434. # updated by Joerg Jenderek at Oct 2015
  21435. # https://de.wikipedia.org/wiki/Common_Object_File_Format
  21436. # http://www.delorie.com/djgpp/doc/coff/filhdr.html
  21437. # ./intel already labeled COFF type 0x14c=0514 as "80386 COFF executable"
  21438. #0 leshort 0x14c MS Windows COFF Intel 80386 object file
  21439. #>4 ledate x stamp %s
  21440. 0 leshort 0x166 MS Windows COFF MIPS R4000 object file
  21441. #>4 ledate x stamp %s
  21442. 0 leshort 0x184 MS Windows COFF Alpha object file
  21443. #>4 ledate x stamp %s
  21444. 0 leshort 0x268 MS Windows COFF Motorola 68000 object file
  21445. #>4 ledate x stamp %s
  21446. 0 leshort 0x1f0 MS Windows COFF PowerPC object file
  21447. #>4 ledate x stamp %s
  21448. 0 leshort 0x290 MS Windows COFF PA-RISC object file
  21449. #>4 ledate x stamp %s
  21450. # Tests for various EXE types.
  21451. #
  21452. # Many of the compressed formats were extracted from IDARC 1.23 source code.
  21453. #
  21454. 0 string/b MZ
  21455. # All non-DOS EXE extensions have the relocation table more than 0x40 bytes into the file.
  21456. >0x18 leshort <0x40 MS-DOS executable
  21457. !:mime application/x-dosexec
  21458. # Windows and later versions of DOS will allow .EXEs to be named with a .COM
  21459. # extension, mostly for compatibility's sake.
  21460. # URL: https://en.wikipedia.org/wiki/Personal_NetWare#VLM
  21461. # Reference: https://mark0.net/download/triddefs_xml.7z/defs/e/exe-vlm-msg.trid.xml
  21462. !:ext exe/com/vlm
  21463. # These traditional tests usually work but not always. When test quality support is
  21464. # implemented these can be turned on.
  21465. #>>0x18 leshort 0x1c (Borland compiler)
  21466. #>>0x18 leshort 0x1e (MS compiler)
  21467. # Maybe it's a PE?
  21468. >(0x3c.l) string PE\0\0 PE
  21469. !:mime application/x-dosexec
  21470. >>(0x3c.l+24) leshort 0x010b \b32 executable
  21471. >>(0x3c.l+24) leshort 0x020b \b32+ executable
  21472. >>(0x3c.l+24) leshort 0x0107 ROM image
  21473. >>(0x3c.l+24) default x Unknown PE signature
  21474. >>>&0 leshort x 0x%x
  21475. >>(0x3c.l+22) leshort&0x2000 >0 (DLL)
  21476. >>(0x3c.l+92) leshort 1
  21477. # Native PEs include ntoskrnl.exe, hal.dll, smss.exe, autochk.exe, and all the
  21478. # drivers in Windows/System32/drivers/*.sys.
  21479. >>>(0x3c.l+22) leshort&0x2000 >0 (native)
  21480. !:ext dll/sys
  21481. >>>(0x3c.l+22) leshort&0x2000 0 (native)
  21482. !:ext exe/sys
  21483. >>(0x3c.l+92) leshort 2
  21484. >>>(0x3c.l+22) leshort&0x2000 >0 (GUI)
  21485. # These could probably be at least partially distinguished from one another by
  21486. # looking for specific exported functions.
  21487. # CPL: Control Panel item
  21488. # TLB: Type library
  21489. # OCX: OLE/ActiveX control
  21490. # ACM: Audio compression manager codec
  21491. # AX: DirectShow source filter
  21492. # IME: Input method editor
  21493. !:ext dll/cpl/tlb/ocx/acm/ax/ime
  21494. >>>(0x3c.l+22) leshort&0x2000 0 (GUI)
  21495. # Screen savers typically include code from the scrnsave.lib static library, but
  21496. # that's not guaranteed.
  21497. !:ext exe/scr
  21498. >>(0x3c.l+92) leshort 3
  21499. >>>(0x3c.l+22) leshort&0x2000 >0 (console)
  21500. !:ext dll/cpl/tlb/ocx/acm/ax/ime
  21501. >>>(0x3c.l+22) leshort&0x2000 0 (console)
  21502. !:ext exe/com
  21503. # https://docs.microsoft.com/en-us/windows/win32/debug/pe-format
  21504. >>(0x3c.l+92) leshort 7 (POSIX)
  21505. >>(0x3c.l+92) leshort 9 (Windows CE)
  21506. >>(0x3c.l+92) leshort 10 (EFI application)
  21507. >>(0x3c.l+92) leshort 11 (EFI boot service driver)
  21508. >>(0x3c.l+92) leshort 12 (EFI runtime driver)
  21509. >>(0x3c.l+92) leshort 13 (EFI ROM)
  21510. >>(0x3c.l+92) leshort 14 (XBOX)
  21511. >>(0x3c.l+92) leshort 15 (Windows boot application)
  21512. >>(0x3c.l+92) default x (Unknown subsystem
  21513. >>>&0 leshort x 0x%x)
  21514. >>(0x3c.l+4) leshort 0x14c Intel 80386
  21515. >>(0x3c.l+4) leshort 0x166 MIPS R4000
  21516. >>(0x3c.l+4) leshort 0x168 MIPS R10000
  21517. >>(0x3c.l+4) leshort 0x184 Alpha
  21518. >>(0x3c.l+4) leshort 0x1a2 Hitachi SH3
  21519. >>(0x3c.l+4) leshort 0x1a3 Hitachi SH3 DSP
  21520. >>(0x3c.l+4) leshort 0x1a8 Hitachi SH5
  21521. >>(0x3c.l+4) leshort 0x169 MIPS WCE v2
  21522. >>(0x3c.l+4) leshort 0x1a6 Hitachi SH4
  21523. >>(0x3c.l+4) leshort 0x1c0 ARM
  21524. >>(0x3c.l+4) leshort 0x1c2 ARM Thumb
  21525. >>(0x3c.l+4) leshort 0x1c4 ARMv7 Thumb
  21526. >>(0x3c.l+4) leshort 0x1d3 Matsushita AM33
  21527. >>(0x3c.l+4) leshort 0x1f0 PowerPC
  21528. >>(0x3c.l+4) leshort 0x1f1 PowerPC with FPU
  21529. >>(0x3c.l+4) leshort 0x1f2 PowerPC (big-endian)
  21530. >>(0x3c.l+4) leshort 0x200 Intel Itanium
  21531. >>(0x3c.l+4) leshort 0x266 MIPS16
  21532. >>(0x3c.l+4) leshort 0x268 Motorola 68000
  21533. >>(0x3c.l+4) leshort 0x290 PA-RISC
  21534. >>(0x3c.l+4) leshort 0x366 MIPSIV
  21535. >>(0x3c.l+4) leshort 0x466 MIPS16 with FPU
  21536. >>(0x3c.l+4) leshort 0xebc EFI byte code
  21537. >>(0x3c.l+4) leshort 0x5032 RISC-V 32-bit
  21538. >>(0x3c.l+4) leshort 0x5064 RISC-V 64-bit
  21539. >>(0x3c.l+4) leshort 0x5128 RISC-V 128-bit
  21540. >>(0x3c.l+4) leshort 0x9041 Mitsubishi M32R
  21541. >>(0x3c.l+4) leshort 0x8664 x86-64
  21542. >>(0x3c.l+4) leshort 0xaa64 Aarch64
  21543. >>(0x3c.l+4) leshort 0xc0ee MSIL
  21544. >>(0x3c.l+4) default x Unknown processor type
  21545. >>>&0 leshort x 0x%x
  21546. >>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB)
  21547. >>(0x3c.l+22) leshort&0x1000 >0 system file
  21548. >>(0x3c.l+24) leshort 0x010b
  21549. >>>(0x3c.l+232) lelong >0 Mono/.Net assembly
  21550. >>(0x3c.l+24) leshort 0x020b
  21551. >>>(0x3c.l+248) lelong >0 Mono/.Net assembly
  21552. # hooray, there's a DOS extender using the PE format, with a valid PE
  21553. # executable inside (which just prints a message and exits if run in win)
  21554. >>(8.s*16) string 32STUB \b, 32rtm DOS extender
  21555. >>(8.s*16) string !32STUB \b, for MS Windows
  21556. >>(0x3c.l+0xf8) string UPX0 \b, UPX compressed
  21557. >>(0x3c.l+0xf8) search/0x140 PEC2 \b, PECompact2 compressed
  21558. >>(0x3c.l+0xf8) search/0x140 UPX2
  21559. >>>(&0x10.l+(-4)) string PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
  21560. >>(0x3c.l+0xf8) search/0x140 .idata
  21561. >>>(&0xe.l+(-4)) string PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
  21562. >>>(&0xe.l+(-4)) string ZZ0 \b, ZZip self-extracting archive
  21563. >>>(&0xe.l+(-4)) string ZZ1 \b, ZZip self-extracting archive
  21564. >>(0x3c.l+0xf8) search/0x140 .rsrc
  21565. >>>(&0x0f.l+(-4)) string a\\\4\5 \b, WinHKI self-extracting archive
  21566. >>>(&0x0f.l+(-4)) string Rar! \b, RAR self-extracting archive
  21567. >>>(&0x0f.l+(-4)) search/0x3000 MSCF \b, InstallShield self-extracting archive
  21568. >>>(&0x0f.l+(-4)) search/32 Nullsoft \b, Nullsoft Installer self-extracting archive
  21569. >>(0x3c.l+0xf8) search/0x140 .data
  21570. >>>(&0x0f.l) string WEXTRACT \b, MS CAB-Installer self-extracting archive
  21571. >>(0x3c.l+0xf8) search/0x140 .petite\0 \b, Petite compressed
  21572. >>>(0x3c.l+0xf7) byte x
  21573. >>>>(&0x104.l+(-4)) string =!sfx! \b, ACE self-extracting archive
  21574. >>(0x3c.l+0xf8) search/0x140 .WISE \b, WISE installer self-extracting archive
  21575. >>(0x3c.l+0xf8) search/0x140 .dz\0\0\0 \b, Dzip self-extracting archive
  21576. >>&(0x3c.l+0xf8) search/0x100 _winzip_ \b, ZIP self-extracting archive (WinZip)
  21577. >>&(0x3c.l+0xf8) search/0x100 SharedD \b, Microsoft Installer self-extracting archive
  21578. >>0x30 string Inno \b, InnoSetup self-extracting archive
  21579. # If the relocation table is 0x40 or more bytes into the file, it's definitely
  21580. # not a DOS EXE.
  21581. >0x18 leshort >0x3f
  21582. # Hmm, not a PE but the relocation table is too high for a traditional DOS exe,
  21583. # must be one of the unusual subformats.
  21584. >>(0x3c.l) string !PE\0\0 MS-DOS executable
  21585. !:mime application/x-dosexec
  21586. >>(0x3c.l) string NE \b, NE
  21587. !:mime application/x-dosexec
  21588. >>>(0x3c.l+0x36) byte 1 for OS/2 1.x
  21589. >>>(0x3c.l+0x36) byte 2 for MS Windows 3.x
  21590. >>>(0x3c.l+0x36) byte 3 for MS-DOS
  21591. >>>(0x3c.l+0x36) byte 4 for Windows 386
  21592. >>>(0x3c.l+0x36) byte 5 for Borland Operating System Services
  21593. >>>(0x3c.l+0x36) default x
  21594. >>>>(0x3c.l+0x36) byte x (unknown OS %x)
  21595. >>>(0x3c.l+0x36) byte 0x81 for MS-DOS, Phar Lap DOS extender
  21596. >>>(0x3c.l+0x0c) leshort&0x8000 0x8000 (DLL or font)
  21597. # DRV: Driver
  21598. # 3GR: Grabber device driver
  21599. # CPL: Control Panel Item
  21600. # VBX: Visual Basic Extension
  21601. # FON: Bitmap font
  21602. # FOT: Font resource file
  21603. !:ext dll/drv/3gr/cpl/vbx/fon/fot
  21604. >>>(0x3c.l+0x0c) leshort&0x8000 0 (EXE)
  21605. !:ext exe/scr
  21606. >>>&(&0x24.s-1) string ARJSFX \b, ARJ self-extracting archive
  21607. >>>(0x3c.l+0x70) search/0x80 WinZip(R)\ Self-Extractor \b, ZIP self-extracting archive (WinZip)
  21608. >>(0x3c.l) string LX\0\0 \b, LX
  21609. !:mime application/x-dosexec
  21610. >>>(0x3c.l+0x0a) leshort <1 (unknown OS)
  21611. >>>(0x3c.l+0x0a) leshort 1 for OS/2
  21612. >>>(0x3c.l+0x0a) leshort 2 for MS Windows
  21613. >>>(0x3c.l+0x0a) leshort 3 for DOS
  21614. >>>(0x3c.l+0x0a) leshort >3 (unknown OS)
  21615. >>>(0x3c.l+0x10) lelong&0x28000 =0x8000 (DLL)
  21616. >>>(0x3c.l+0x10) lelong&0x20000 >0 (device driver)
  21617. >>>(0x3c.l+0x10) lelong&0x300 0x300 (GUI)
  21618. >>>(0x3c.l+0x10) lelong&0x28300 <0x300 (console)
  21619. >>>(0x3c.l+0x08) leshort 1 i80286
  21620. >>>(0x3c.l+0x08) leshort 2 i80386
  21621. >>>(0x3c.l+0x08) leshort 3 i80486
  21622. >>>(8.s*16) string emx \b, emx
  21623. >>>>&1 string x %s
  21624. >>>&(&0x54.l-3) string arjsfx \b, ARJ self-extracting archive
  21625. # MS Windows system file, supposedly a collection of LE executables
  21626. >>(0x3c.l) string W3 \b, W3 for MS Windows
  21627. !:mime application/x-dosexec
  21628. >>(0x3c.l) string LE\0\0 \b, LE executable
  21629. !:mime application/x-dosexec
  21630. >>>(0x3c.l+0x0a) leshort 1
  21631. # some DOS extenders use LE files with OS/2 header
  21632. >>>>0x240 search/0x100 DOS/4G for MS-DOS, DOS4GW DOS extender
  21633. >>>>0x240 search/0x200 WATCOM\ C/C++ for MS-DOS, DOS4GW DOS extender
  21634. >>>>0x440 search/0x100 CauseWay\ DOS\ Extender for MS-DOS, CauseWay DOS extender
  21635. >>>>0x40 search/0x40 PMODE/W for MS-DOS, PMODE/W DOS extender
  21636. >>>>0x40 search/0x40 STUB/32A for MS-DOS, DOS/32A DOS extender (stub)
  21637. >>>>0x40 search/0x80 STUB/32C for MS-DOS, DOS/32A DOS extender (configurable stub)
  21638. >>>>0x40 search/0x80 DOS/32A for MS-DOS, DOS/32A DOS extender (embedded)
  21639. # this is a wild guess; hopefully it is a specific signature
  21640. >>>>&0x24 lelong <0x50
  21641. >>>>>(&0x4c.l) string \xfc\xb8WATCOM
  21642. >>>>>>&0 search/8 3\xdbf\xb9 \b, 32Lite compressed
  21643. # another wild guess: if real OS/2 LE executables exist, they probably have higher start EIP
  21644. #>>>>(0x3c.l+0x1c) lelong >0x10000 for OS/2
  21645. # fails with DOS-Extenders.
  21646. >>>(0x3c.l+0x0a) leshort 2 for MS Windows
  21647. >>>(0x3c.l+0x0a) leshort 3 for DOS
  21648. >>>(0x3c.l+0x0a) leshort 4 for MS Windows (VxD)
  21649. # VXD: VxD for Windows 95/98/Me
  21650. # 386: VxD for Windows 2.10, 3.0, 3.1x
  21651. # PDR: Port driver
  21652. # MPD: Miniport driver (?)
  21653. !:ext vxd/386/pdr/mpd
  21654. >>>(&0x7c.l+0x26) string UPX \b, UPX compressed
  21655. >>>&(&0x54.l-3) string UNACE \b, ACE self-extracting archive
  21656. # looks like ASCII, probably some embedded copyright message.
  21657. # and definitely not NE/LE/LX/PE
  21658. >>0x3c lelong >0x20000000
  21659. >>>(4.s*512) leshort !0x014c \b, MZ for MS-DOS
  21660. !:mime application/x-dosexec
  21661. !:ext exe/com
  21662. # header data too small for extended executable
  21663. >2 long !0
  21664. >>0x18 leshort <0x40
  21665. >>>(4.s*512) leshort !0x014c
  21666. >>>>&(2.s-514) string !LE
  21667. >>>>>&-2 string !BW \b, MZ for MS-DOS
  21668. !:mime application/x-dosexec
  21669. >>>>&(2.s-514) string LE \b, LE
  21670. >>>>>0x240 search/0x100 DOS/4G for MS-DOS, DOS4GW DOS extender
  21671. # educated guess since indirection is still not capable enough for complex offset
  21672. # calculations (next embedded executable would be at &(&2*512+&0-2)
  21673. # I suspect there are only LE executables in these multi-exe files
  21674. >>>>&(2.s-514) string BW
  21675. >>>>>0x240 search/0x100 DOS/4G \b, LE for MS-DOS, DOS4GW DOS extender (embedded)
  21676. >>>>>0x240 search/0x100 !DOS/4G \b, BW collection for MS-DOS
  21677. # This sequence skips to the first COFF segment, usually .text
  21678. >(4.s*512) leshort 0x014c \b, COFF
  21679. !:mime application/x-dosexec
  21680. >>(8.s*16) string go32stub for MS-DOS, DJGPP go32 DOS extender
  21681. >>(8.s*16) string emx
  21682. >>>&1 string x for DOS, Win or OS/2, emx %s
  21683. >>&(&0x42.l-3) byte x
  21684. >>>&0x26 string UPX \b, UPX compressed
  21685. # and yet another guess: small .text, and after large .data is unusual, could be 32lite
  21686. >>&0x2c search/0xa0 .text
  21687. >>>&0x0b lelong <0x2000
  21688. >>>>&0 lelong >0x6000 \b, 32lite compressed
  21689. >(8.s*16) string $WdX \b, WDos/X DOS extender
  21690. # By now an executable type should have been printed out. The executable
  21691. # may be a self-uncompressing archive, so look for evidence of that and
  21692. # print it out.
  21693. #
  21694. # Some signatures below from Greg Roelofs, newt@uchicago.edu.
  21695. #
  21696. >0x35 string \x8e\xc0\xb9\x08\x00\xf3\xa5\x4a\x75\xeb\x8e\xc3\x8e\xd8\x33\xff\xbe\x30\x00\x05 \b, aPack compressed
  21697. >0xe7 string LH/2\ Self-Extract \b, %s
  21698. >0x1c string UC2X \b, UCEXE compressed
  21699. >0x1c string WWP\ \b, WWPACK compressed
  21700. >0x1c string RJSX \b, ARJ self-extracting archive
  21701. >0x1c string diet \b, diet compressed
  21702. >0x1c string LZ09 \b, LZEXE v0.90 compressed
  21703. >0x1c string LZ91 \b, LZEXE v0.91 compressed
  21704. >0x1c string tz \b, TinyProg compressed
  21705. >0x1e string Copyright\ 1989-1990\ PKWARE\ Inc. Self-extracting PKZIP archive
  21706. !:mime application/zip
  21707. # Yes, this really is "Copr", not "Corp."
  21708. >0x1e string PKLITE\ Copr. Self-extracting PKZIP archive
  21709. !:mime application/zip
  21710. # winarj stores a message in the stub instead of the sig in the MZ header
  21711. >0x20 search/0xe0 aRJsfX \b, ARJ self-extracting archive
  21712. >0x20 string AIN
  21713. >>0x23 string 2 \b, AIN 2.x compressed
  21714. >>0x23 string <2 \b, AIN 1.x compressed
  21715. >>0x23 string >2 \b, AIN 1.x compressed
  21716. >0x24 string LHa's\ SFX \b, LHa self-extracting archive
  21717. !:mime application/x-lha
  21718. >0x24 string LHA's\ SFX \b, LHa self-extracting archive
  21719. !:mime application/x-lha
  21720. >0x24 string \ $ARX \b, ARX self-extracting archive
  21721. >0x24 string \ $LHarc \b, LHarc self-extracting archive
  21722. >0x20 string SFX\ by\ LARC \b, LARC self-extracting archive
  21723. >0x40 string aPKG \b, aPackage self-extracting archive
  21724. >0x64 string W\ Collis\0\0 \b, Compack compressed
  21725. >0x7a string Windows\ self-extracting\ ZIP \b, ZIP self-extracting archive
  21726. >>&0xf4 search/0x140 \x0\x40\x1\x0
  21727. >>>(&0.l+(4)) string MSCF \b, WinHKI CAB self-extracting archive
  21728. >1638 string -lh5- \b, LHa self-extracting archive v2.13S
  21729. >0x17888 string Rar! \b, RAR self-extracting archive
  21730. # Skip to the end of the EXE. This will usually work fine in the PE case
  21731. # because the MZ image is hardcoded into the toolchain and almost certainly
  21732. # won't match any of these signatures.
  21733. >(4.s*512) long x
  21734. >>&(2.s-517) byte x
  21735. >>>&0 string PK\3\4 \b, ZIP self-extracting archive
  21736. >>>&0 string Rar! \b, RAR self-extracting archive
  21737. >>>&0 string =!\x11 \b, AIN 2.x self-extracting archive
  21738. >>>&0 string =!\x12 \b, AIN 2.x self-extracting archive
  21739. >>>&0 string =!\x17 \b, AIN 1.x self-extracting archive
  21740. >>>&0 string =!\x18 \b, AIN 1.x self-extracting archive
  21741. >>>&7 search/400 **ACE** \b, ACE self-extracting archive
  21742. >>>&0 search/0x480 UC2SFX\ Header \b, UC2 self-extracting archive
  21743. # a few unknown ZIP sfxes, no idea if they are needed or if they are
  21744. # already captured by the generic patterns above
  21745. >(8.s*16) search/0x20 PKSFX \b, ZIP self-extracting archive (PKZIP)
  21746. # TODO: how to add this? >FileSize-34 string Windows\ Self-Installing\ Executable \b, ZIP self-extracting archive
  21747. #
  21748. # TELVOX Teleinformatica CODEC self-extractor for OS/2:
  21749. >49801 string \x79\xff\x80\xff\x76\xff \b, CODEC archive v3.21
  21750. >>49824 leshort =1 \b, 1 file
  21751. >>49824 leshort >1 \b, %u files
  21752. # added by Joerg Jenderek of https://www.freedos.org/software/?prog=kc
  21753. # and https://www.freedos.org/software/?prog=kpdos
  21754. # for FreeDOS files like KEYBOARD.SYS, KEYBRD2.SYS, KEYBRD3.SYS, *.KBD
  21755. 0 string/b KCF FreeDOS KEYBoard Layout collection
  21756. # only version=0x100 found
  21757. >3 uleshort x \b, version 0x%x
  21758. # length of string containing author,info and special characters
  21759. >6 ubyte >0
  21760. #>>6 pstring x \b, name=%s
  21761. >>7 string >\0 \b, author=%-.14s
  21762. >>7 search/254 \xff \b, info=
  21763. #>>>&0 string x \b%-s
  21764. >>>&0 string x \b%-.15s
  21765. # for FreeDOS *.KL files
  21766. 0 string/b KLF FreeDOS KEYBoard Layout file
  21767. # only version=0x100 or 0x101 found
  21768. >3 uleshort x \b, version 0x%x
  21769. # stringlength
  21770. >5 ubyte >0
  21771. >>8 string x \b, name=%-.2s
  21772. 0 string \xffKEYB\ \ \ \0\0\0\0
  21773. >12 string \0\0\0\0`\004\360 MS-DOS KEYBoard Layout file
  21774. # DOS device driver updated by Joerg Jenderek at May 2011,Mar 2017,Aug 2020
  21775. # URL: http://fileformats.archiveteam.org/wiki/DOS_device_driver
  21776. # Reference: http://www.delorie.com/djgpp/doc/rbinter/it/46/16.html
  21777. # https://amaus.net/static/S100/IBM/software/DOS/DOS%20techref/CHAPTER.009
  21778. 0 ulequad&0x07a0ffffffff 0xffffffff
  21779. # skip OS/2 INI ./os2
  21780. >4 ubelong !0x14000000
  21781. >>0 use msdos-driver
  21782. 0 name msdos-driver DOS executable (
  21783. #!:mime application/octet-stream
  21784. !:mime application/x-dosdriver
  21785. # also found FreeDOS print driver SPOOL.DEV and disc compression driver STACLOAD.BIN
  21786. # and IBM Token-Ring adapter IBMTOK.DOS. Why and when DOS instead SYS is used?
  21787. # PROTMAN.DOS ELNKPL.DOS
  21788. !:ext sys/dev/bin/dos
  21789. # 1 space char after "UPX compressed" to get phrase like "UPX compressed character device"
  21790. >40 search/7 UPX! \bUPX compressed\040
  21791. # DOS device driver attributes
  21792. >4 uleshort&0x8000 0x0000 \bblock device driver
  21793. # character device
  21794. >4 uleshort&0x8000 0x8000 \b
  21795. # 1 space char after "clock" to get phrase like "clock character device driver CLOCK$"
  21796. >>4 uleshort&0x0008 0x0008 \bclock\040
  21797. # fast video output by int 29h
  21798. # 1 space char after "fast" to get phrase like "fast standard input/output character device driver"
  21799. >>4 uleshort&0x0010 0x0010 \bfast\040
  21800. # standard input/output device
  21801. # 1 space char after "standard" to get phrase like "standard input/output character device driver"
  21802. >>4 uleshort&0x0003 >0 \bstandard\040
  21803. >>>4 uleshort&0x0001 0x0001 \binput
  21804. >>>4 uleshort&0x0003 0x0003 \b/
  21805. # 1 space char after "output" to get phrase like "input/output character device driver"
  21806. >>>4 uleshort&0x0002 0x0002 \boutput\040
  21807. >>4 uleshort&0x8000 0x8000 \bcharacter device driver
  21808. >0 ubyte x
  21809. # upx compressed device driver has garbage instead of real in name field of header
  21810. >>40 search/7 UPX!
  21811. >>40 default x
  21812. # leading/trailing nulls, zeros or non ASCII characters in 8-byte name field at offset 10 are skipped
  21813. # 1 space char before device driver name to get phrase like "device driver PROTMAN$"
  21814. >>>12 ubyte >0x2E \b\040
  21815. >>>>10 ubyte >0x20
  21816. >>>>>10 ubyte !0x2E
  21817. >>>>>>10 ubyte !0x2A \b%c
  21818. >>>>11 ubyte >0x20
  21819. >>>>>11 ubyte !0x2E \b%c
  21820. >>>>12 ubyte >0x20
  21821. >>>>>12 ubyte !0x39
  21822. >>>>>>12 ubyte !0x2E \b%c
  21823. >>>13 ubyte >0x20
  21824. >>>>13 ubyte !0x2E \b%c
  21825. >>>>14 ubyte >0x20
  21826. >>>>>14 ubyte !0x2E \b%c
  21827. >>>>15 ubyte >0x20
  21828. >>>>>15 ubyte !0x2E \b%c
  21829. >>>>16 ubyte >0x20
  21830. >>>>>16 ubyte !0x2E
  21831. >>>>>>16 ubyte <0xCB \b%c
  21832. >>>>17 ubyte >0x20
  21833. >>>>>17 ubyte !0x2E
  21834. >>>>>>17 ubyte <0x90 \b%c
  21835. # some character device drivers like ASPICD.SYS, btcdrom.sys and Cr_atapi.sys contain only spaces or points in name field
  21836. >>>12 ubyte <0x2F
  21837. # they have their real name at offset 22
  21838. # also block device drivers like DUMBDRV.SYS
  21839. >>>>22 string >\056 %-.6s
  21840. >4 uleshort&0x8000 0x0000
  21841. # 32 bit sector addressing ( > 32 MB) for block devices
  21842. >>4 uleshort&0x0002 0x0002 \b,32-bit sector-
  21843. # support by driver functions 13h, 17h, 18h
  21844. >4 uleshort&0x0040 0x0040 \b,IOCTL-
  21845. # open, close, removable media support by driver functions 0Dh, 0Eh, 0Fh
  21846. >4 uleshort&0x0800 0x0800 \b,close media-
  21847. # output until busy support by int 10h for character device driver
  21848. >4 uleshort&0x8000 0x8000
  21849. >>4 uleshort&0x2000 0x2000 \b,until busy-
  21850. # direct read/write support by driver functions 03h,0Ch
  21851. >4 uleshort&0x4000 0x4000 \b,control strings-
  21852. >4 uleshort&0x8000 0x8000
  21853. >>4 uleshort&0x6840 >0 \bsupport
  21854. >4 uleshort&0x8000 0x0000
  21855. >>4 uleshort&0x4842 >0 \bsupport
  21856. >0 ubyte x \b)
  21857. >0 ulelong !0xffffffff with pointer 0x%x
  21858. # DOS driver cmd640x.sys has 0x12 instead of 0xffffffff for pointer field to next device header
  21859. 0 ulequad 0x0513c00000000012
  21860. >0 use msdos-driver
  21861. # DOS drivers DC2975.SYS, DUMBDRV.SYS, ECHO.SYS has also none 0xffffffff for pointer field
  21862. 0 ulequad 0x32f28000ffff0016
  21863. >0 use msdos-driver
  21864. 0 ulequad 0x007f00000000ffff
  21865. >0 use msdos-driver
  21866. # https://www.uwe-sieber.de/files/cfg_echo.zip
  21867. 0 ulequad 0x001600000000ffff
  21868. >0 use msdos-driver
  21869. # DOS drivers LS120.SYS, MKELS120.SYS use reserved bits of attribute field
  21870. 0 ulequad 0x0bf708c2ffffffff
  21871. >0 use msdos-driver
  21872. 0 ulequad 0x07bd08c2ffffffff
  21873. >0 use msdos-driver
  21874. # 3Com EtherLink 3C501 CID\SERVER\IBMLS\IBM500D1\DLSNETDR.ZIP\ELNK.DOS
  21875. 0 ulequad 0x027ac0c0ffffffff
  21876. >0 use msdos-driver
  21877. # IBM Streamer CID\SERVER\IBMLS\IBM500D1\DLSNETDR.ZIP\IBMMPC.DOS
  21878. 0 ulequad 0x00228880ffffffff
  21879. >0 use msdos-driver
  21880. # updated by Joerg Jenderek
  21881. # GRR: line below too general as it catches also
  21882. # rt.lib DYADISKS.PIC and many more
  21883. # start with assembler instruction MOV
  21884. 0 ubyte 0x8c
  21885. # skip "AppleWorks word processor data" like ARTICLE.1 ./apple
  21886. >4 string !O====
  21887. # skip some unknown basic binaries like RocketRnger.SHR
  21888. >>5 string !MAIN
  21889. # skip "GPG symmetrically encrypted data" ./gnu
  21890. # skip "PGP symmetric key encrypted data" ./pgp
  21891. # openpgpdefs.h: fourth byte < 14 indicate cipher algorithm type
  21892. >>>4 ubyte >13 DOS executable (COM, 0x8C-variant)
  21893. # the remaining files should be DOS *.COM executables
  21894. # dosshell.COM 8cc0 2ea35f07 e85211 e88a11 b80058 cd
  21895. # hmload.COM 8cc8 8ec0 bbc02b 89dc 83c30f c1eb04 b4
  21896. # UNDELETE.COM 8cca 2e8916 6503 b430 cd21 8b 2e0200 8b
  21897. # BOOTFIX.COM 8cca 2e8916 9603 b430 cd21 8b 2e0200 8b
  21898. # RAWRITE3.COM 8cca 2e8916 d602 b430 cd21 8b 2e0200 8b
  21899. # SHARE.COM 8cca 2e8916 d602 b430 cd21 8b 2e0200 8b
  21900. # validchr.COM 8cca 2e8916 9603 b430 cd21 8b 2e028b1e
  21901. # devload.COM 8cca 8916ad01 b430 cd21 8b2e0200 892e
  21902. !:mime application/x-dosexec
  21903. !:ext com
  21904. # updated by Joerg Jenderek at Oct 2008
  21905. 0 ulelong 0xffff10eb DR-DOS executable (COM)
  21906. # byte 0xeb conflicts with "sequent" magic leshort 0xn2eb
  21907. 0 ubeshort&0xeb8d >0xeb00
  21908. # DR-DOS STACKER.COM SCREATE.SYS missed
  21909. 0 name msdos-com
  21910. >0 byte x DOS executable (COM)
  21911. !:mime application/x-dosexec
  21912. !:ext com
  21913. >6 string SFX\ of\ LHarc \b, %s
  21914. >0x1FE leshort 0xAA55 \b, boot code
  21915. >85 string UPX \b, UPX compressed
  21916. >4 string \ $ARX \b, ARX self-extracting archive
  21917. >4 string \ $LHarc \b, LHarc self-extracting archive
  21918. >0x20e string SFX\ by\ LARC \b, LARC self-extracting archive
  21919. # JMP 8bit
  21920. 0 byte 0xeb
  21921. # allow forward jumps only
  21922. >1 byte >-1
  21923. # that offset must be accessible
  21924. >>(1.b+2) byte x
  21925. >>>0 use msdos-com
  21926. # JMP 16bit
  21927. 0 byte 0xe9
  21928. # forward jumps
  21929. >1 short >-1
  21930. # that offset must be accessible
  21931. >>(1.s+3) byte x
  21932. >>>0 use msdos-com
  21933. # negative offset, must not lead into PSP
  21934. >1 short <-259
  21935. # that offset must be accessible
  21936. >>(1,s+65539) byte x
  21937. >>>0 use msdos-com
  21938. # updated by Joerg Jenderek at Oct 2008,2015
  21939. # following line is too general
  21940. 0 ubyte 0xb8
  21941. # skip 2 linux kernels like memtest.bin with "\xb8\xc0\x07\x8e" in ./linux
  21942. >0 string !\xb8\xc0\x07\x8e
  21943. # modified by Joerg Jenderek
  21944. # syslinux COM32 or COM32R executable
  21945. >>1 lelong&0xFFFFFFFe 0x21CD4CFe COM executable (32-bit COMBOOT
  21946. # https://www.syslinux.org/wiki/index.php/Comboot_API
  21947. # Since version 5.00 c32 modules switched from the COM32 object format to ELF
  21948. !:mime application/x-c32-comboot-syslinux-exec
  21949. !:ext c32
  21950. # https://syslinux.zytor.com/comboot.php
  21951. # older syslinux version ( <4 )
  21952. # (32-bit COMBOOT) programs *.C32 contain 32-bit code and run in flat-memory 32-bit protected mode
  21953. # start with assembler instructions mov eax,21cd4cffh
  21954. >>>1 lelong 0x21CD4CFf \b)
  21955. # syslinux:doc/comboot.txt
  21956. # A COM32R program must start with the byte sequence B8 FE 4C CD 21 (mov
  21957. # eax,21cd4cfeh) as a magic number.
  21958. # syslinux version (4.x)
  21959. # "COM executable (COM32R)" or "Syslinux COM32 module" by TrID
  21960. >>>1 lelong 0x21CD4CFe \b, relocatable)
  21961. # Hajin Jang <hajin_jang@worksmobile.com>:
  21962. # Disable simplest COM signature to prevent false positive on some EUC-KR text files.
  21963. ## remaining are DOS COM executables starting with assembler instruction MOV
  21964. ## like FreeDOS BANNER*.COM FINDDISK.COM GIF2RAW.COM WINCHK.COM
  21965. ## MS-DOS SYS.COM RESTART.COM
  21966. ## SYSLINUX.COM (version 1.40 - 2.13)
  21967. ## GFXBOOT.COM (version 3.75)
  21968. ## COPYBS.COM POWEROFF.COM INT18.COM
  21969. #>>1 default x COM executable for DOS
  21970. #!:mime application/x-dosexec
  21971. ##!:mime application/x-ms-dos-executable
  21972. ##!:mime application/x-msdos-program
  21973. #!:ext com
  21974. # URL: https://en.wikipedia.org/wiki/UPX
  21975. # Reference: https://github.com/upx/upx/archive/v3.96.zip/upx-3.96/
  21976. # src/stub/src/i086-dos16.com.S
  21977. # Update: Joerg Jenderek
  21978. # assembler instructions: cmp sp, offset sp_limit
  21979. 0 string/b \x81\xfc
  21980. #>2 uleshort x \b, sp_limit=0x%x
  21981. # assembler instructions: jump above +2; int 0x20; mov cx, offset bytes_to_copy
  21982. >4 string \x77\x02\xcd\x20\xb9
  21983. #>9 uleshort x \b, [bytes_to_copy]=0x%x
  21984. # at different offsets assembler instructions: push di; jump decomp_start_n2b
  21985. >0x1e search/3 \x57\xe9
  21986. #>>&0 uleshort x \b, decomp_start_n2b=0x%x
  21987. # src/stub/src/include/header.S; UPX_MAGIC_LE32
  21988. >>&2 string UPX! FREE-DOS executable (COM), UPX
  21989. !:mime application/x-dosexec
  21990. # UPX compressed *.CPI; See ./fonts
  21991. >>>&21 string =FONT compressed DOS code page font
  21992. !:ext cpx
  21993. >>>&21 string !FONT compressed
  21994. !:ext com
  21995. # compressed size?
  21996. #>>>&14 uleshort+152 x \b, %u bytes
  21997. # uncompressed len
  21998. >>>&12 uleshort x \b, uncompressed %u bytes
  21999. 252 string Must\ have\ DOS\ version DR-DOS executable (COM)
  22000. !:mime application/x-dosexec
  22001. !:ext com
  22002. # GRR search is not working
  22003. #2 search/28 \xcd\x21 COM executable for MS-DOS
  22004. #WHICHFAT.cOM
  22005. 2 string \xcd\x21 COM executable for DOS
  22006. !:mime application/x-dosexec
  22007. !:ext com
  22008. #DELTREE.cOM DELTREE2.cOM
  22009. 4 string \xcd\x21 COM executable for DOS
  22010. !:mime application/x-dosexec
  22011. !:ext com
  22012. #IFMEMDSK.cOM ASSIGN.cOM COMP.cOM
  22013. 5 string \xcd\x21 COM executable for DOS
  22014. !:mime application/x-dosexec
  22015. !:ext com
  22016. #DELTMP.COm HASFAT32.cOM
  22017. 7 string \xcd\x21
  22018. >0 byte !0xb8 COM executable for DOS
  22019. !:mime application/x-dosexec
  22020. !:ext com
  22021. #COMP.cOM MORE.COm
  22022. 10 string \xcd\x21
  22023. >5 string !\xcd\x21 COM executable for DOS
  22024. !:mime application/x-dosexec
  22025. !:ext com
  22026. #comecho.com
  22027. 13 string \xcd\x21 COM executable for DOS
  22028. !:mime application/x-dosexec
  22029. !:ext com
  22030. #HELP.COm EDIT.coM
  22031. 18 string \xcd\x21 COM executable for MS-DOS
  22032. !:mime application/x-dosexec
  22033. !:ext com
  22034. #NWRPLTRM.COm
  22035. 23 string \xcd\x21 COM executable for MS-DOS
  22036. !:mime application/x-dosexec
  22037. !:ext com
  22038. #LOADFIX.cOm LOADFIX.cOm
  22039. 30 string \xcd\x21 COM executable for MS-DOS
  22040. !:mime application/x-dosexec
  22041. !:ext com
  22042. #syslinux.com 3.11
  22043. 70 string \xcd\x21 COM executable for DOS
  22044. !:mime application/x-dosexec
  22045. !:ext com
  22046. # many compressed/converted COMs start with a copy loop instead of a jump
  22047. 0x6 search/0xa \xfc\x57\xf3\xa5\xc3 COM executable for MS-DOS
  22048. !:mime application/x-dosexec
  22049. !:ext com
  22050. 0x6 search/0xa \xfc\x57\xf3\xa4\xc3 COM executable for DOS
  22051. !:mime application/x-dosexec
  22052. !:ext com
  22053. >0x18 search/0x10 \x50\xa4\xff\xd5\x73 \b, aPack compressed
  22054. 0x3c string W\ Collis\0\0 COM executable for MS-DOS, Compack compressed
  22055. !:mime application/x-dosexec
  22056. !:ext com
  22057. # FIXME: missing diet .com compression
  22058. # miscellaneous formats
  22059. 0 string/b LZ MS-DOS executable (built-in)
  22060. #0 byte 0xf0 MS-DOS program library data
  22061. #
  22062. # AAF files:
  22063. # <stuartc@rd.bbc.co.uk> Stuart Cunningham
  22064. 0 string/b \320\317\021\340\241\261\032\341AAFB\015\000OM\006\016\053\064\001\001\001\377 AAF legacy file using MS Structured Storage
  22065. >30 byte 9 (512B sectors)
  22066. >30 byte 12 (4kB sectors)
  22067. 0 string/b \320\317\021\340\241\261\032\341\001\002\001\015\000\002\000\000\006\016\053\064\003\002\001\001 AAF file using MS Structured Storage
  22068. >30 byte 9 (512B sectors)
  22069. >30 byte 12 (4kB sectors)
  22070. # Popular applications
  22071. #
  22072. # Update: Joerg Jenderek
  22073. # URL: http://fileformats.archiveteam.org/wiki/DOC
  22074. # Reference: https://web.archive.org/web/20170206041048/
  22075. # http://www.msxnet.org/word2rtf/formats/ffh-dosword5
  22076. # wIdent+dty
  22077. 0 belong 0x31be0000
  22078. # skip droid skeleton like x-fmt-274-signature-id-488.doc
  22079. >128 ubyte >0 Microsoft
  22080. >>96 uleshort =0 Word
  22081. !:mime application/msword
  22082. !:apple MSWDWDBN
  22083. # DCX is used in the Unix version.
  22084. !:ext doc/dcx
  22085. >>>0x6E ulequad =0 1.0-4.0
  22086. >>>0x6E ulequad !0 5.0-6.0
  22087. >>>0x6E ulequad x (DOS) Document
  22088. # https://web.archive.org/web/20130831064118/http://msxnet.org/word2rtf/formats/write.txt
  22089. >>96 uleshort !0 Write 3.0 (Windows) Document
  22090. !:mime application/x-mswrite
  22091. !:apple MSWDWDBN
  22092. # sometimes also doc like in splitter.doc srchtest.doc
  22093. !:ext wri/doc
  22094. # wTool must be 0125400 octal
  22095. #>>4 uleshort !0xAB00 \b, wTool %o
  22096. # reserved; must be zero
  22097. #>>6 ulelong !0 \b, reserved %u
  22098. # block pointer to the block containing optional file manager information
  22099. #>>0x1C uleshort x \b, at 0x%x info block
  22100. # jump to File manager information block
  22101. >>(0x1C.s*128) uleshort x
  22102. # test for valid information start; maybe also 0012h
  22103. >>>&-2 uleshort =0x0014
  22104. # Document ASCIIZ name
  22105. >>>>&0x12 string x %s
  22106. # author name
  22107. >>>>>&1 string x \b, author %s
  22108. # reviser name
  22109. >>>>>>&1 string x \b, reviser %s
  22110. # keywords
  22111. >>>>>>>&1 string x \b, keywords %s
  22112. # comment
  22113. >>>>>>>>&1 string x \b, comment %s
  22114. # version number
  22115. >>>>>>>>>&1 string x \b, version %s
  22116. # date of last change MM/DD/YY
  22117. >>>>>>>>>>&1 string x \b, %-.8s
  22118. # creation date MM/DD/YY
  22119. >>>>>>>>>>&9 string x created %-.8s
  22120. # file name of print format like NORMAL.STY
  22121. >>0x1E string >0 \b, formatted by %-.66s
  22122. # count of pages in whole file for write variant; maybe some times wrong
  22123. >>96 uleshort >0 \b, %u pages
  22124. # name of the printer driver like HPLASMS
  22125. >>0x62 string >0 \b, %-.8s printer
  22126. # number of blocks used in the file; seems to be 0 for Word 4.0 and Write 3.0
  22127. >>0x6A uleshort >0 \b, %u blocks
  22128. # bit field for corrected text areas
  22129. #>>0x6C uleshort x \b, 0x%x bit field
  22130. # text of document; some times start with 4 non printable characters like CR LF
  22131. >>128 ubyte x \b,
  22132. >>>128 ubyte >0x1F
  22133. >>>>128 string x %s
  22134. >>>128 ubyte <0x20
  22135. >>>>129 ubyte >0x1F
  22136. >>>>>129 string x %s
  22137. >>>>129 ubyte <0x20
  22138. >>>>>130 ubyte >0x1F
  22139. >>>>>>130 string x %s
  22140. >>>>>130 ubyte <0x20
  22141. >>>>>>131 ubyte >0x1F
  22142. >>>>>>>131 string x %s
  22143. >>>>>>131 ubyte <0x20
  22144. >>>>>>>132 ubyte >0x1F
  22145. >>>>>>>>132 string x %s
  22146. >>>>>>>132 ubyte <0x20
  22147. >>>>>>>>133 ubyte >0x1F
  22148. >>>>>>>>>133 string x %s
  22149. #
  22150. 0 string/b PO^Q` Microsoft Word 6.0 Document
  22151. !:mime application/msword
  22152. #
  22153. 4 long 0
  22154. >0 belong 0xfe320000 Microsoft Word for Macintosh 1.0
  22155. !:mime application/msword
  22156. !:ext mcw
  22157. >0 belong 0xfe340000 Microsoft Word for Macintosh 3.0
  22158. !:mime application/msword
  22159. !:ext mcw
  22160. >0 belong 0xfe37001c Microsoft Word for Macintosh 4.0
  22161. !:mime application/msword
  22162. !:ext mcw
  22163. >0 belong 0xfe370023 Microsoft Word for Macintosh 5.0
  22164. !:mime application/msword
  22165. !:ext mcw
  22166. 0 string/b \333\245-\0\0\0 Microsoft Word 2.0 Document
  22167. !:mime application/msword
  22168. !:ext doc
  22169. # Note: seems already recognized as "OLE 2 Compound Document" in ./ole2compounddocs
  22170. #512 string/b \354\245\301 Microsoft Word Document
  22171. #!:mime application/msword
  22172. #
  22173. 0 string/b \xDB\xA5\x2D\x00 Microsoft WinWord 2.0 Document
  22174. !:mime application/msword
  22175. #
  22176. 0 string/b \xDB\xA5\x2D\x00 Microsoft WinWord 2.0 Document
  22177. !:mime application/msword
  22178. #
  22179. 0 string/b \x09\x04\x06\x00\x00\x00\x10\x00 Microsoft Excel Worksheet
  22180. !:mime application/vnd.ms-excel
  22181. # https://www.macdisk.com/macsigen.php
  22182. !:apple XCELXLS4
  22183. !:ext xls
  22184. #
  22185. # Update: Joerg Jenderek
  22186. # URL: https://en.wikipedia.org/wiki/Lotus_1-2-3
  22187. # Reference: http://www.aboutvb.de/bas/formate/pdf/wk3.pdf
  22188. # Note: newer Lotus versions >2 use longer BOF record
  22189. # record type (BeginningOfFile=0000h) + length (001Ah)
  22190. 0 belong 0x00001a00
  22191. # reserved should be 0h but 8c0dh for TUTMAC.WK3, 5h for SAMPADNS.WK3, 1h for a_readme.wk3, 1eh for K&G86.WK3
  22192. #>18 uleshort&0x73E0 0
  22193. # Lotus Multi Byte Character Set (LMBCS=1-31)
  22194. >20 ubyte >0
  22195. >>20 ubyte <32 Lotus 1-2-3
  22196. #!:mime application/x-123
  22197. !:mime application/vnd.lotus-1-2-3
  22198. !:apple ????L123
  22199. # (version 5.26) labeled the entry as "Lotus 1-2-3 wk3 document data"
  22200. >>>4 uleshort 0x1000 WorKsheet, version 3
  22201. !:ext wk3
  22202. # (version 5.26) labeled the entry as "Lotus 1-2-3 wk4 document data"
  22203. >>>4 uleshort 0x1002 WorKsheet, version 4
  22204. # also worksheet template 4 (.wt4)
  22205. !:ext wk4/wt4
  22206. # no example or documentation for wk5
  22207. #>>4 uleshort 0x???? WorKsheet, version 4
  22208. #!:ext wk5
  22209. # only MacrotoScript.123 example
  22210. >>>4 uleshort 0x1003 WorKsheet, version 97
  22211. # also worksheet template Smartmaster (.12M)?
  22212. !:ext 123
  22213. # only Set_Y2K.123 example
  22214. >>>4 uleshort 0x1005 WorKsheet, version 9.8 Millennium
  22215. !:ext 123
  22216. # no example for this version
  22217. >>>4 uleshort 0x8001 FoRMatting data
  22218. !:ext frm
  22219. # (version 5.26) labeled the entry as "Lotus 1-2-3 fm3 or fmb document data"
  22220. # TrID labeles the entry as "Formatting Data for Lotus 1-2-3 worksheet"
  22221. >>>4 uleshort 0x8007 ForMatting data, version 3
  22222. !:ext fm3
  22223. >>>4 default x unknown
  22224. # file revision sub code 0004h for worksheets
  22225. >>>>6 uleshort =0x0004 worksheet
  22226. !:ext wXX
  22227. >>>>6 uleshort !0x0004 formatting data
  22228. !:ext fXX
  22229. # main revision number
  22230. >>>>4 uleshort x \b, revision 0x%x
  22231. >>>6 uleshort =0x0004 \b, cell range
  22232. # active cellcoord range (start row, page,column ; end row, page, column)
  22233. # start values normally 0~1st sheet A1
  22234. >>>>8 ulelong !0
  22235. >>>>>10 ubyte >0 \b%d*
  22236. >>>>>8 uleshort x \b%d,
  22237. >>>>>11 ubyte x \b%d-
  22238. # end page mostly 0
  22239. >>>>14 ubyte >0 \b%d*
  22240. # end raw, column normally not 0
  22241. >>>>12 uleshort x \b%d,
  22242. >>>>15 ubyte x \b%d
  22243. # Lotus Multi Byte Character Set (1~cp850,2~cp851,...,16~japan,...,31~??)
  22244. >>>>20 ubyte >1 \b, character set 0x%x
  22245. # flags
  22246. >>>>21 ubyte x \b, flags 0x%x
  22247. >>>6 uleshort !0x0004
  22248. # record type (FONTNAME=00AEh)
  22249. >>>>30 search/29 \0\xAE
  22250. # variable length m (2) + entries (1) + ?? (1) + LCMBS string (n)
  22251. >>>>>&4 string >\0 \b, 1st font "%s"
  22252. #
  22253. # Update: Joerg Jenderek
  22254. # URL: http://fileformats.archiveteam.org/wiki/Lotus_1-2-3
  22255. # Reference: http://www.schnarff.com/file-formats/lotus-1-2-3/WSFF2.TXT
  22256. # Note: Used by both old Lotus 1-2-3 and Lotus Symphony (DOS) til version 2.x
  22257. # record type (BeginningOfFile=0000h) + length (0002h)
  22258. 0 belong 0x00000200
  22259. # GRR: line above is too general as it catches also MS Windows CURsor
  22260. # to display MS Windows cursor (strength=70) before Lotus 1-2-3 (strength=70-1)
  22261. !:strength -1
  22262. # skip Windows cursors with image height <256 and keep Lotus with low opcode 0001-0083h
  22263. >7 ubyte 0
  22264. # skip Windows cursors with image width 256 and keep Lotus with positive opcode
  22265. >>6 ubyte >0 Lotus
  22266. # !:mime application/x-123
  22267. !:mime application/vnd.lotus-1-2-3
  22268. !:apple ????L123
  22269. # revision number (0404h = 123 1A, 0405h = Lotus Symphony , 0406h = 123 2.x wk1 , 8006h = fmt , ...)
  22270. # undocumented; (version 5.26) labeled the configurations as "Lotus 1-2-3"
  22271. >>>4 uleshort 0x0007 1-2-3 CoNFiguration, version 2.x (PGRAPH.CNF)
  22272. !:ext cnf
  22273. >>>4 uleshort 0x0C05 1-2-3 CoNFiguration, version 2.4J
  22274. !:ext cnf
  22275. >>>4 uleshort 0x0801 1-2-3 CoNFiguration, version 1-2.1
  22276. !:ext cnf
  22277. >>>4 uleshort 0x0802 Symphony CoNFiguration
  22278. !:ext cnf
  22279. >>>4 uleshort 0x0804 1-2-3 CoNFiguration, version 2.2
  22280. !:ext cnf
  22281. >>>4 uleshort 0x080A 1-2-3 CoNFiguration, version 2.3-2.4
  22282. !:ext cnf
  22283. >>>4 uleshort 0x1402 1-2-3 CoNFiguration, version 3.x
  22284. !:ext cnf
  22285. >>>4 uleshort 0x1450 1-2-3 CoNFiguration, version 4.x
  22286. !:ext cnf
  22287. # (version 5.26) labeled the entry as "Lotus 123"
  22288. # TrID labeles the entry as "Lotus 123 Worksheet (generic)"
  22289. >>>4 uleshort 0x0404 1-2-3 WorKSheet, version 1
  22290. # extension "wks" also for Microsoft Works document
  22291. !:ext wks
  22292. # (version 5.26) labeled the entry as "Lotus 123"
  22293. # TrID labeles the entry as "Lotus 123 Worksheet (generic)"
  22294. >>>4 uleshort 0x0405 Symphony WoRksheet, version 1.0
  22295. !:ext wrk/wr1
  22296. # (version 5.26) labeled the entry as "Lotus 1-2-3 wk1 document data"
  22297. # TrID labeles the entry as "Lotus 123 Worksheet (V2)"
  22298. >>>4 uleshort 0x0406 1-2-3/Symphony worksheet, version 2
  22299. # Symphony (.wr1)
  22300. !:ext wk1/wr1
  22301. # no example for this japan version
  22302. >>>4 uleshort 0x0600 1-2-3 WorKsheet, version 1.xJ
  22303. !:ext wj1
  22304. # no example or documentation for wk2
  22305. #>>>4 uleshort 0x???? 1-2-3 WorKsheet, version 2
  22306. #!:ext wk2
  22307. # undocumented japan version
  22308. >>>4 uleshort 0x0602 1-2-3 worksheet, version 2.4J
  22309. !:ext wj3
  22310. # (version 5.26) labeled the entry as "Lotus 1-2-3 fmt document data"
  22311. >>>4 uleshort 0x8006 1-2-3 ForMaTting data, version 2.x
  22312. # japan version 2.4J (fj3)
  22313. !:ext fmt/fj3
  22314. # no example for this version
  22315. >>>4 uleshort 0x8007 1-2-3 FoRMatting data, version 2.0
  22316. !:ext frm
  22317. # (version 5.26) labeled the entry as "Lotus 1-2-3"
  22318. >>>4 default x unknown worksheet or configuration
  22319. !:ext cnf
  22320. >>>>4 uleshort x \b, revision 0x%x
  22321. # 2nd record for most worksheets describes cells range
  22322. >>>6 use lotus-cells
  22323. # 3rd record for most japan worksheets describes cells range
  22324. >>>(8.s+10) use lotus-cells
  22325. # check and then display Lotus worksheet cells range
  22326. 0 name lotus-cells
  22327. # look for type (RANGE=0006h) + length (0008h) at record begin
  22328. >0 ubelong 0x06000800 \b, cell range
  22329. # cell range (start column, row, end column, row) start values normally 0,0~A1 cell
  22330. >>4 ulong !0
  22331. >>>4 uleshort x \b%d,
  22332. >>>6 uleshort x \b%d-
  22333. # end of cell range
  22334. >>8 uleshort x \b%d,
  22335. >>10 uleshort x \b%d
  22336. # EndOfLotus123
  22337. 0 string/b WordPro\0 Lotus WordPro
  22338. !:mime application/vnd.lotus-wordpro
  22339. 0 string/b WordPro\r\373 Lotus WordPro
  22340. !:mime application/vnd.lotus-wordpro
  22341. # Summary: Script used by InstallScield to uninstall applications
  22342. # Extension: .isu
  22343. # Submitted by: unknown
  22344. # Modified by (1): Abel Cheung <abelcheung@gmail.com> (replace useless entry)
  22345. 0 string \x71\xa8\x00\x00\x01\x02
  22346. >12 string Stirling\ Technologies, InstallShield Uninstall Script
  22347. # Winamp .avs
  22348. #0 string Nullsoft\ AVS\ Preset\ \060\056\061\032 A plug in for Winamp ms-windows Freeware media player
  22349. 0 string/b Nullsoft\ AVS\ Preset\ Winamp plug in
  22350. # Windows Metafile .WMF
  22351. 0 string/b \327\315\306\232 Windows metafile
  22352. !:mime image/wmf
  22353. !:ext wmf
  22354. 0 string/b \002\000\011\000 Windows metafile
  22355. !:mime image/wmf
  22356. !:ext wmf
  22357. 0 string/b \001\000\011\000 Windows metafile
  22358. !:mime image/wmf
  22359. !:ext wmf
  22360. #tz3 files whatever that is (MS Works files)
  22361. 0 string/b \003\001\001\004\070\001\000\000 tz3 ms-works file
  22362. 0 string/b \003\002\001\004\070\001\000\000 tz3 ms-works file
  22363. 0 string/b \003\003\001\004\070\001\000\000 tz3 ms-works file
  22364. # PGP sig files .sig
  22365. #0 string \211\000\077\003\005\000\063\237\127 065 to \027\266\151\064\005\045\101\233\021\002 PGP sig
  22366. 0 string \211\000\077\003\005\000\063\237\127\065\027\266\151\064\005\045\101\233\021\002 PGP sig
  22367. 0 string \211\000\077\003\005\000\063\237\127\066\027\266\151\064\005\045\101\233\021\002 PGP sig
  22368. 0 string \211\000\077\003\005\000\063\237\127\067\027\266\151\064\005\045\101\233\021\002 PGP sig
  22369. 0 string \211\000\077\003\005\000\063\237\127\070\027\266\151\064\005\045\101\233\021\002 PGP sig
  22370. 0 string \211\000\077\003\005\000\063\237\127\071\027\266\151\064\005\045\101\233\021\002 PGP sig
  22371. 0 string \211\000\225\003\005\000\062\122\207\304\100\345\042 PGP sig
  22372. # windows zips files .dmf
  22373. 0 string/b MDIF\032\000\010\000\000\000\372\046\100\175\001\000\001\036\001\000 MS Windows special zipped file
  22374. # Windows icons
  22375. # Update: Joerg Jenderek
  22376. # URL: https://en.wikipedia.org/wiki/CUR_(file_format)
  22377. # Note: similar to Windows CURsor. container for BMP (only DIB part) or PNG
  22378. 0 belong 0x00000100
  22379. >9 byte 0
  22380. >>0 byte x
  22381. >>0 use cur-ico-dir
  22382. >9 ubyte 0xff
  22383. >>0 byte x
  22384. >>0 use cur-ico-dir
  22385. # displays number of icons and information for icon or cursor
  22386. 0 name cur-ico-dir
  22387. # skip some Lotus 1-2-3 worksheets, CYCLE.PIC and keep Windows cursors with
  22388. # 1st data offset = dir header size + n * dir entry size = 6 + n * 10h = ?6h
  22389. >18 ulelong &0x00000006
  22390. # skip remaining worksheets, because valid only for DIB image (40) or PNG image (\x89PNG)
  22391. >>(18.l) ulelong x MS Windows
  22392. >>>0 ubelong 0x00000100 icon resource
  22393. # https://www.iana.org/assignments/media-types/image/vnd.microsoft.icon
  22394. !:mime image/vnd.microsoft.icon
  22395. #!:mime image/x-icon
  22396. !:ext ico
  22397. >>>>4 uleshort x - %d icon
  22398. # plural s
  22399. >>>>4 uleshort >1 \bs
  22400. # 1st icon
  22401. >>>>0x06 use ico-entry
  22402. # 2nd icon
  22403. >>>>4 uleshort >1
  22404. >>>>>0x16 use ico-entry
  22405. >>>0 ubelong 0x00000200 cursor resource
  22406. #!:mime image/x-cur
  22407. !:mime image/x-win-bitmap
  22408. !:ext cur
  22409. >>>>4 uleshort x - %d icon
  22410. >>>>4 uleshort >1 \bs
  22411. # 1st cursor
  22412. >>>>0x06 use cur-entry
  22413. #>>>>0x16 use cur-entry
  22414. # display information of one cursor entry
  22415. 0 name cur-entry
  22416. >0 use cur-ico-entry
  22417. >4 uleshort x \b, hotspot @%dx
  22418. >6 uleshort x \b%d
  22419. # display information of one icon entry
  22420. 0 name ico-entry
  22421. >0 use cur-ico-entry
  22422. # normally 0 1 but also found 14
  22423. >4 uleshort >1 \b, %d planes
  22424. # normally 0 1 but also found some 3, 4, some 6, 8, 24, many 32, two 256
  22425. >6 uleshort >1 \b, %d bits/pixel
  22426. # display shared information of cursor or icon entry
  22427. 0 name cur-ico-entry
  22428. >0 byte =0 \b, 256x
  22429. >0 byte !0 \b, %dx
  22430. >1 byte =0 \b256
  22431. >1 byte !0 \b%d
  22432. # number of colors in palette
  22433. >2 ubyte !0 \b, %d colors
  22434. # reserved 0 FFh
  22435. #>3 ubyte x \b, reserved %x
  22436. #>8 ulelong x \b, image size %d
  22437. # offset of PNG or DIB image
  22438. #>12 ulelong x \b, offset 0x%x
  22439. # PNG header (\x89PNG)
  22440. >(12.l) ubelong =0x89504e47
  22441. # 1 space char after "with" to get phrase "with PNG image" by magic in ./images
  22442. >>&-4 indirect x \b with\040
  22443. # DIB image
  22444. >(12.l) ubelong !0x89504e47
  22445. #>>&-4 use dib-image
  22446. # Windows non-animated cursors
  22447. # Update: Joerg Jenderek
  22448. # URL: https://en.wikipedia.org/wiki/CUR_(file_format)
  22449. # Note: similar to Windows ICOn. container for BMP ( only DIB part)
  22450. # GRR: line below is too general as it catches also Lotus 1-2-3 files
  22451. 0 belong 0x00000200
  22452. >9 byte 0
  22453. >>0 use cur-ico-dir
  22454. >9 ubyte 0xff
  22455. >>0 use cur-ico-dir
  22456. # .chr files
  22457. 0 string/b PK\010\010BGI Borland font
  22458. >4 string >\0 %s
  22459. # then there is a copyright notice
  22460. # .bgi files
  22461. 0 string/b pk\010\010BGI Borland device
  22462. >4 string >\0 %s
  22463. # then there is a copyright notice
  22464. # Windows Recycle Bin record file (named INFO2)
  22465. # By Abel Cheung (abelcheung AT gmail dot com)
  22466. # Version 4 always has 280 bytes (0x118) per record, version 5 has 800 bytes
  22467. # Since Vista uses another structure, INFO2 structure probably won't change
  22468. # anymore. Detailed analysis in:
  22469. # http://www.cybersecurityinstitute.biz/downloads/INFO2.pdf
  22470. 0 lelong 0x00000004
  22471. >12 lelong 0x00000118 Windows Recycle Bin INFO2 file (Win98 or below)
  22472. 0 lelong 0x00000005
  22473. >12 lelong 0x00000320 Windows Recycle Bin INFO2 file (Win2k - WinXP)
  22474. # From Doug Lee via a FreeBSD pr
  22475. 9 string GERBILDOC First Choice document
  22476. 9 string GERBILDB First Choice database
  22477. 9 string GERBILCLIP First Choice database
  22478. 0 string GERBIL First Choice device file
  22479. 9 string RABBITGRAPH RabbitGraph file
  22480. 0 string DCU1 Borland Delphi .DCU file
  22481. 0 string =!<spell> MKS Spell hash list (old format)
  22482. 0 string =!<spell2> MKS Spell hash list
  22483. # Too simple - MPi
  22484. #0 string AH Halo(TM) bitmapped font file
  22485. 0 lelong 0x08086b70 TurboC BGI file
  22486. 0 lelong 0x08084b50 TurboC Font file
  22487. # Debian#712046: The magic below identifies "Delphi compiled form data".
  22488. # An additional source of information is available at:
  22489. # http://www.woodmann.com/fravia/dafix_t1.htm
  22490. 0 string TPF0
  22491. >4 pstring >\0 Delphi compiled form '%s'
  22492. # tests for DBase files moved, updated and merged to database
  22493. 0 string PMCC Windows 3.x .GRP file
  22494. 1 string RDC-meg MegaDots
  22495. >8 byte >0x2F version %c
  22496. >9 byte >0x2F \b.%c file
  22497. 0 lelong 0x4C
  22498. >4 lelong 0x00021401 Windows shortcut file
  22499. # .PIF files added by Joerg Jenderek from https://smsoft.ru/en/pifdoc.htm
  22500. # only for windows versions equal or greater 3.0
  22501. 0x171 string MICROSOFT\ PIFEX\0 Windows Program Information File
  22502. !:mime application/x-dosexec
  22503. !:ext pif
  22504. #>2 string >\0 \b, Title:%.30s
  22505. >0x24 string >\0 \b for %.63s
  22506. >0x65 string >\0 \b, directory=%.64s
  22507. >0xA5 string >\0 \b, parameters=%.64s
  22508. #>0x181 leshort x \b, offset %x
  22509. #>0x183 leshort x \b, offsetdata %x
  22510. #>0x185 leshort x \b, section length %x
  22511. >0x187 search/0xB55 WINDOWS\ VMM\ 4.0\0
  22512. >>&0x5e ubyte >0
  22513. >>>&-1 string <PIFMGR.DLL \b, icon=%s
  22514. #>>>&-1 string PIFMGR.DLL \b, icon=%s
  22515. >>>&-1 string >PIFMGR.DLL \b, icon=%s
  22516. >>&0xF0 ubyte >0
  22517. >>>&-1 string <Terminal \b, font=%.32s
  22518. #>>>&-1 string =Terminal \b, font=%.32s
  22519. >>>&-1 string >Terminal \b, font=%.32s
  22520. >>&0x110 ubyte >0
  22521. >>>&-1 string <Lucida\ Console \b, TrueTypeFont=%.32s
  22522. #>>>&-1 string =Lucida\ Console \b, TrueTypeFont=%.32s
  22523. >>>&-1 string >Lucida\ Console \b, TrueTypeFont=%.32s
  22524. #>0x187 search/0xB55 WINDOWS\ 286\ 3.0\0 \b, Windows 3.X standard mode-style
  22525. #>0x187 search/0xB55 WINDOWS\ 386\ 3.0\0 \b, Windows 3.X enhanced mode-style
  22526. >0x187 search/0xB55 WINDOWS\ NT\ \ 3.1\0 \b, Windows NT-style
  22527. #>0x187 search/0xB55 WINDOWS\ NT\ \ 4.0\0 \b, Windows NT-style
  22528. >0x187 search/0xB55 CONFIG\ \ SYS\ 4.0\0 \b +CONFIG.SYS
  22529. #>>&06 string x \b:%s
  22530. >0x187 search/0xB55 AUTOEXECBAT\ 4.0\0 \b +AUTOEXEC.BAT
  22531. #>>&06 string x \b:%s
  22532. # DOS EPS Binary File Header
  22533. # From: Ed Sznyter <ews@Black.Market.NET>
  22534. 0 belong 0xC5D0D3C6 DOS EPS Binary File
  22535. !:mime image/x-eps
  22536. >4 long >0 Postscript starts at byte %d
  22537. >>8 long >0 length %d
  22538. >>>12 long >0 Metafile starts at byte %d
  22539. >>>>16 long >0 length %d
  22540. >>>20 long >0 TIFF starts at byte %d
  22541. >>>>24 long >0 length %d
  22542. # TNEF magic From "Joomy" <joomy@se-ed.net>
  22543. # Microsoft Outlook's Transport Neutral Encapsulation Format (TNEF)
  22544. 0 lelong 0x223e9f78 TNEF
  22545. !:mime application/vnd.ms-tnef
  22546. # Norton Guide (.NG , .HLP) files added by Joerg Jenderek from source NG2HTML.C
  22547. # of http://www.davep.org/norton-guides/ng2h-105.tgz
  22548. # https://en.wikipedia.org/wiki/Norton_Guides
  22549. 0 string NG\0\001
  22550. # only value 0x100 found at offset 2
  22551. >2 ulelong 0x00000100 Norton Guide
  22552. !:mime application/x-norton-guide
  22553. # often like NORTON.NG but some times like NC.HLP
  22554. !:ext ng/hlp
  22555. # Title[40]
  22556. >>8 string >\0 "%-.40s"
  22557. #>>6 uleshort x \b, MenuCount=%u
  22558. # szCredits[5][66]
  22559. >>48 string >\0 \b, %-.66s
  22560. >>114 string >\0 %-.66s
  22561. # URL: https://en.wikipedia.org/wiki/Norton_Commander
  22562. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/msg-nc-eng.trid.xml
  22563. # From: Joerg Jenderek
  22564. # Note: Message file is used by executable with same main name.
  22565. # Only tested with version 5.50 (english) and 2.01 (Windows)
  22566. 0 string Abort
  22567. # \0 or i
  22568. #>5 ubyte x %x
  22569. # skip ASCII Abort text by looking for error message like in NCVIEW.MSG
  22570. >6 search/7089 Non-DOS\ disk Norton Commander module message
  22571. !:mime application/x-norton-msg
  22572. !:ext msg
  22573. # URL: http://www.antonis.de/dos/dos-tuts/mpdostip/html/nwdostip.htm
  22574. # Reference: https://mark0.net/download/triddefs_xml.7z/defs/m/msg-netware-dos.trid.xml
  22575. # From: Joerg Jenderek
  22576. 0 string DOS\ Client\ Message\ File: Novell DOS client message
  22577. #!:mime application/octet-stream
  22578. #!:mime application/x-novell-msg
  22579. !:ext msg
  22580. # look for second letter instead space character
  22581. >26 ubyte >0x20
  22582. # digit 1 or often main or program name like: IPXODI.COM TASKID pnwtrap DOSRqstr
  22583. >>25 ubyte !0x20 %c
  22584. >>>26 ubyte !0x20 \b%c
  22585. >>>>27 ubyte !0x20 \b%c
  22586. >>>>>28 ubyte !0x20 \b%c
  22587. >>>>>>29 ubyte !0x20 \b%c
  22588. >>>>>>>30 ubyte !0x20 \b%c
  22589. >>>>>>>>31 ubyte !0x20 \b%c
  22590. >>>>>>>>>32 ubyte !0x20 \b%c
  22591. >>>>>>>>>>33 ubyte !0x20 \b%c
  22592. >>>>>>>>>>>34 ubyte !0x20 \b%c
  22593. >>>>>>>>>>>>35 ubyte !0x20 \b%c
  22594. >>>>>>>>>>>>>36 ubyte !0x20 \b%c
  22595. # followed by string like: 0 v.10 V1.20
  22596. #
  22597. # followed by ,\040Tran\040
  22598. >28 search/14 ,\040Tran\040
  22599. # probably translated version string like: 0 v1.00
  22600. >>&0 string x \b, tran version %s
  22601. # followed by Ctrl-J Ctrl-Z
  22602. >>>&0 ubyte !0xa \b, terminated by 0x%2.2x
  22603. >>>>&0 ubyte x \b%2.2x
  22604. # Ctrl-Z
  22605. >0x65 ubyte !0x1A \b, at 0x65 0x%x
  22606. # one
  22607. >0x66 ubyte !0x01 \b, at 0x66 0x%x
  22608. # URL: https://en.wikipedia.org/wiki/NetWare
  22609. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/d/dat-novell-msg.trid.xml
  22610. # ftp://ftp.iitb.ac.in/LDP/en/NLM-HOWTO/NLM-HOWTO-single.html
  22611. # From: Joerg Jenderek
  22612. 0 string Novell\ Message\ Librarian\ Data\ File Novell message librarian data
  22613. #>35 string Version\ 1.00
  22614. #>49 string COPYRIGHT\ (c)\ 1985\ by\ Novell,\ Inc.
  22615. #>83 string \ \ All\ Rights\ Reserved
  22616. #!:mime application/octet-stream
  22617. #!:mime application/x-novell-msg
  22618. !:ext msg
  22619. #!:ext msg/dat
  22620. # 4DOS help (.HLP) files added by Joerg Jenderek from source TPHELP.PAS
  22621. # of https://www.4dos.info/
  22622. # pointer,HelpID[8]=4DHnnnmm
  22623. 0 ulelong 0x48443408 4DOS help file
  22624. >4 string x \b, version %-4.4s
  22625. # old binary Microsoft (.HLP) files added by Joerg Jenderek from http://file-extension.net/seeker/file_extension_hlp
  22626. 0 ulequad 0x3a000000024e4c MS Advisor help file
  22627. # HtmlHelp files (.chm)
  22628. 0 string/b ITSF\003\000\000\000\x60\000\000\000 MS Windows HtmlHelp Data
  22629. # GFA-BASIC (Wolfram Kleff)
  22630. 2 string/b GFA-BASIC3 GFA-BASIC 3 data
  22631. #------------------------------------------------------------------------------
  22632. # From Stuart Caie <kyzer@4u.net> (developer of cabextract)
  22633. # Update: Joerg Jenderek
  22634. # URL: https://en.wikipedia.org/wiki/Cabinet_(file_format)
  22635. # Reference: https://msdn.microsoft.com/en-us/library/bb267310.aspx
  22636. # Note: verified by `7z l *.cab`
  22637. # Microsoft Cabinet files
  22638. 0 string/b MSCF\0\0\0\0 Microsoft Cabinet archive data
  22639. #
  22640. # https://support.microsoft.com/en-us/help/973559/frequently-asked-questions-about-the-microsoft-support-diagnostic-tool
  22641. # CAB with *.{diagcfg,diagpkg} is used by Microsoft Support Diagnostic Tool MSDT.EXE
  22642. # because some archive does not have *.diag* as 1st or 2nd archive member like
  22643. # O15CTRRemove.diagcab or AzureStorageAnalyticsLogs_global.DiagCab
  22644. # brute looking after header for filenames with diagcfg or diagpkg extension in CFFILE section
  22645. >0x2c search/980/c .diag \b, Diagnostic
  22646. !:mime application/vnd.ms-cab-compressed
  22647. !:ext diagcab
  22648. # http://fileformats.archiveteam.org/wiki/PUZ
  22649. # Microsoft Publisher version about 2003 has a "Pack and Go" feature that
  22650. # bundles a Publisher document *PNG.pub with all links into a CAB
  22651. >0x2c search/300/c png.pub\0 \b, Publisher Packed and Go
  22652. !:mime application/vnd.ms-cab-compressed
  22653. !:ext puz
  22654. # ppz variant with Microsoft PowerPoint Viewer ppview32.exe to play PowerPoint presentation
  22655. >0x2c search/17/c ppview32.exe\0 \b, PowerPoint Viewer Packed and Go
  22656. !:mime application/vnd.ms-powerpoint
  22657. #!:mime application/mspowerpoint
  22658. !:ext ppz
  22659. # URL: https://en.wikipedia.org/wiki/Windows_Desktop_Gadgets
  22660. # Reference: https://docs.microsoft.com/en-us/previous-versions/windows/desktop/sidebar/
  22661. # http://win10gadgets.com/download/273/ All_CPU_Meter1.zip/All_CPU_Meter_V4.7.3.gadget
  22662. >0x2c search/968/c gadget.xml \b, Windows Desktop Gadget
  22663. #!:mime application/vnd.ms-cab-compressed
  22664. # http://extension.nirsoft.net/gadget
  22665. !:mime application/x-windows-gadget
  22666. !:ext gadget
  22667. # http://www.incredimail.com/
  22668. # IncrediMail CAB contains an initialisation file "content.ini" like in im2.ims
  22669. >0x2c search/3369/c content.ini\0 \b, IncrediMail
  22670. !:mime application/x-incredimail
  22671. # member Flavor.htm implies IncrediMail ecard like in tell_a_friend.imf
  22672. >>0x2c search/83/c Flavor.htm\0 ecard
  22673. !:ext imf
  22674. # member Macromedia Flash data *.swf implies IncrediMail skin like in im2.ims
  22675. >>0x2c search/211/c .swf\0 skin
  22676. !:ext ims
  22677. # member anim.im3 implies IncrediMail animation like in letter_fold.ima
  22678. >>0x2c search/92/c anim.im3\0 animation
  22679. !:ext ima
  22680. # other IncrediMail cab archive
  22681. >>0x2c default x
  22682. >>>0x2c search/116/c thumb ecard, image, notifier or skin
  22683. !:ext imf/imi/imn/ims
  22684. # http://file-extension.net/seeker/file_extension_ime
  22685. >>>0x2c default x emoticons or sound
  22686. !:ext ime/imw
  22687. # no Diagnostic, Packed and Go, Windows Desktop Gadget, IncrediMail
  22688. >0x2c default x
  22689. # look for 1st member name
  22690. >>(16.l+16) ubyte x
  22691. # https://en.wikipedia.org/wiki/SNP_file_format
  22692. >>>&-1 string/c _accrpt_.snp \b, Access report snapshot
  22693. !:mime application/msaccess
  22694. !:ext snp
  22695. # https://en.wikipedia.org/wiki/Microsoft_InfoPath
  22696. >>>&-1 string manifest.xsf \b, InfoPath Form Template
  22697. !:mime application/vnd.ms-cab-compressed
  22698. #!:mime application/vnd.ms-infopath
  22699. !:ext xsn
  22700. # https://www.cabextract.org.uk/wince_cab_format/
  22701. # extension of DOS 8+3 name with ".000" of 1st archive member name implies Windows CE installer
  22702. >>>&7 string =.000 \b, WinCE install
  22703. !:mime application/vnd.ms-cab-compressed
  22704. !:ext cab
  22705. # https://support.microsoft.com/kb/934307/en-US
  22706. # All inspected MSU contain a file with name WSUSSCAN.cab
  22707. # that is called "Windows Update meta data" by Microsoft
  22708. >>>&-1 string/c wsusscan.cab \b, Microsoft Standalone Update
  22709. !:mime application/vnd.ms-cab-compressed
  22710. !:ext msu
  22711. >>>&-1 default x
  22712. # look at point character of 1st archive member name for file name extension
  22713. >>>>&-1 search/255 .
  22714. # http://www.pptfaq.com/FAQ00164_What_is_a_PPZ_file-.htm
  22715. # PPZ were created using Pack & Go feature of PowerPoint versions 97 - 2002
  22716. # packs optional files, a PowerPoint presentation *.ppt with optional PLAYLIST.LST to CAB
  22717. >>>>>&0 string/c ppt\0 \b, PowerPoint Packed and Go
  22718. !:mime application/vnd.ms-powerpoint
  22719. #!:mime application/mspowerpoint
  22720. !:ext ppz
  22721. # https://msdn.microsoft.com/en-us/library/windows/desktop/bb773190(v=vs.85).aspx
  22722. # first member *.theme implies Windows 7 Theme Pack like in CommunityShowcaseAqua3.themepack
  22723. # or Windows 8 Desktop Theme Pack like in PanoramicGlaciers.deskthemepack
  22724. >>>>>&0 string/c theme \b, Windows
  22725. !:mime application/x-windows-themepack
  22726. # https://www.drewkeller.com/content/using-theme-both-windows-7-and-windows-8
  22727. # 1st member Panoramic.theme or Panoramas.theme implies Windows 8-10 Theme Pack
  22728. # with MTSM=RJSPBS in [MasterThemeSelector] inside *.theme
  22729. >>>>>>(16.l+16) string =Panoram 8
  22730. !:ext deskthemepack
  22731. >>>>>>(16.l+16) string !Panoram 7 or 8
  22732. !:ext themepack/deskthemepack
  22733. >>>>>>(16.l+16) ubyte x Theme Pack
  22734. >>>>>&0 default x
  22735. # look for null terminator of 1st member name
  22736. >>>>>>&0 search/255 \0
  22737. # 2nd member name WSUSSCAN.cab like in Microsoft-Windows-MediaFeaturePack-OOB-Package.msu
  22738. >>>>>>>&16 string/c wsusscan.cab \b, Microsoft Standalone Update
  22739. !:mime application/vnd.ms-cab-compressed
  22740. !:ext msu
  22741. >>>>>>>&16 default x
  22742. # archive with more then one file need some output in version 5.32 to avoid error message like
  22743. # Magdir/msdos, 1138: Warning: Current entry does not yet have a description for adding a MIME type
  22744. # Magdir/msdos, 1139: Warning: Current entry does not yet have a description for adding a EXTENSION type
  22745. # file: could not find any valid magic files!
  22746. >>>>>>>>28 uleshort >1 \b, many
  22747. !:mime application/vnd.ms-cab-compressed
  22748. !:ext cab
  22749. # remaining archives with just one file
  22750. >>>>>>>>28 uleshort =1
  22751. # neither extra bytes nor cab chain implies Windows 2000,XP setup files in directory i386
  22752. >>>>>>>>>30 uleshort =0x0000 \b, Windows 2000/XP setup
  22753. # cut of last char of source extension and add underscore to generate extension
  22754. # TERMCAP._ ... FXSCOUNT.H_ ... L3CODECA.AC_ ... NPDRMV2.ZI_
  22755. !:mime application/vnd.ms-cab-compressed
  22756. !:ext _/?_/??_
  22757. # archive need some output like "single" in version 5.32 to avoid error messages
  22758. >>>>>>>>>30 uleshort !0x0000 \b, single
  22759. !:mime application/vnd.ms-cab-compressed
  22760. !:ext cab
  22761. # TODO: additional extensions like
  22762. # .xtp InfoPath Template Part
  22763. # .lvf Logitech Video Effects Face Accessory
  22764. >8 ulelong x \b, %u bytes
  22765. >28 uleshort 1 \b, 1 file
  22766. >28 uleshort >1 \b, %u files
  22767. # Reserved fields, set to zero
  22768. #>4 belong !0 \b, reserved1 %x
  22769. #>12 belong !0 \b, reserved2 %x
  22770. # offset of the first CFFILE entry coffFiles: minimal 2Ch
  22771. >16 ulelong x \b, at 0x%x
  22772. >(16.l) use cab-file
  22773. # at least also 2nd member
  22774. >28 uleshort >1
  22775. >>(16.l+16) ubyte x
  22776. >>>&0 search/255 \0
  22777. # second member info
  22778. >>>>&0 use cab-file
  22779. #>20 belong !0 \b, reserved %x
  22780. # Cabinet file format version. Currently, versionMajor = 1 and versionMinor = 3
  22781. >24 ubeshort !0x0301 \b version 0x%x
  22782. # number of CFFOLDER entries
  22783. >26 uleshort >1 \b, %u cffolders
  22784. # cabinet file option indicators 1~PREVIOUS, 2~NEXT, 4~reserved fields
  22785. # only found for flags 0 1 2 3 4 not 7
  22786. >30 uleshort >0 \b, flags 0x%x
  22787. # Cabinet files have a 16-bit cabinet setID field that is designed for application use.
  22788. # default is zero, however, the -i option of cabarc can be used to set this field
  22789. >32 uleshort >0 \b, ID %u
  22790. # iCabinet is number of this cabinet file in a set, where 0 for the first cabinet
  22791. #>34 uleshort x \b, iCabinet %u
  22792. # add one for display because humans start numbering by 1 and also fit to name of disk szDisk*
  22793. >34 uleshort+1 x \b, number %u
  22794. >30 uleshort &0x0004 \b, extra bytes
  22795. # cbCFHeader optional size of per-cabinet reserved area 14h 1800h
  22796. >>36 uleshort >0 %u in head
  22797. # cbCFFolder is optional size of per-folder reserved area
  22798. >>38 ubyte >0 %u in folder
  22799. # cbCFData is optional size of per-datablock reserved area
  22800. >>39 ubyte >0 %u in data block
  22801. # optional per-cabinet reserved area abReserve[cbCFHeader]
  22802. >>36 uleshort >0
  22803. # 1st CFFOLDER after reserved area in header
  22804. >>>(36.s+40) use cab-folder
  22805. # no reserved area in header
  22806. >30 uleshort ^0x0004
  22807. # no previous and next cab archive
  22808. >>30 uleshort =0x0000
  22809. >>>36 use cab-folder
  22810. # only previous cab archive
  22811. >>30 uleshort =0x0001 \b, previous
  22812. >>>36 use cab-anchor
  22813. # only next cab archive
  22814. >>30 uleshort =0x0002 \b, next
  22815. >>>36 use cab-anchor
  22816. # previous+next cab archive
  22817. # can not use sub routine cab-anchor to display previous and next cabinet together
  22818. #>>>36 use cab-anchor
  22819. #>>>>&0 use cab-anchor
  22820. >>30 uleshort =0x0003 \b, previous
  22821. >>>36 string x %s
  22822. # optional name of previous disk szDisk*
  22823. >>>>&1 string x disk %s
  22824. >>>>>&1 string x \b, next %s
  22825. # optional name of previous disk szDisk*
  22826. >>>>>>&1 string x disk %s
  22827. >>>>>>>&1 use cab-folder
  22828. # display filename and disk name of previous or next cabinet
  22829. 0 name cab-anchor
  22830. # optional name of previous/next cabinet file szCabinet*[255]
  22831. >&0 string x %s
  22832. # optional name of previous/next disk szDisk*[255]
  22833. >>&1 string x disk %s
  22834. # display folder structure CFFOLDER information like compression of cabinet
  22835. 0 name cab-folder
  22836. # offset of the CFDATA block in this folder
  22837. #>0 ulelong x \b, coffCabStart 0x%x
  22838. # number of CFDATA blocks in folder
  22839. >4 uleshort x \b, %u datablock
  22840. # plural s
  22841. >4 uleshort >1 \bs
  22842. # compression typeCompress: 0~None 1~MSZIP 0x1503~LZX:21 0x1003~LZX:16 0x0f03~LZX:15
  22843. >6 uleshort x \b, 0x%x compression
  22844. # optional per-folder reserved area
  22845. #>8 ubequad x \b, abReserve 0x%llx
  22846. # display member structure CFFILE information like member name of cabinet
  22847. 0 name cab-file
  22848. # cbFile is uncompressed size of file in bytes
  22849. #>0 ulelong x \b, cbFile %u
  22850. # uoffFolderStart is uncompressed offset of file in folder
  22851. #>4 ulelong >0 \b, uoffFolderStart 0x%x
  22852. # iFolder is index into the CFFOLDER area. 0 indicates first folder in cabinet
  22853. # define ifoldCONTINUED_FROM_PREV (0xFFFD)
  22854. # define ifoldCONTINUED_TO_NEXT (0xFFFE)
  22855. # define ifoldCONTINUED_PREV_AND_NEXT (0xFFFF)
  22856. >8 uleshort >0 \b, iFolder 0x%x
  22857. # date stamp for file
  22858. #>10 uleshort x \b, date 0x%x
  22859. # time stamp for file
  22860. #>12 uleshort x \b, time 0x%x
  22861. # attribs is attribute flags for file
  22862. # define _A_RDONLY (0x01) file is read-only
  22863. # define _A_HIDDEN (0x02) file is hidden
  22864. # define _A_SYSTEM (0x04) file is a system file
  22865. # define _A_ARCH (0x20) file modified since last backup
  22866. # example http://sebastien.kirche.free.fr/pebuilder_plugins/depends.cab
  22867. # define _A_EXEC (0x40) run after extraction
  22868. # define _A_NAME_IS_UTF (0x80) szName[] contains UTF
  22869. # define UNKNOWN (0x0100) undocumented or accident
  22870. #>14 uleshort x \b, attribs 0x%x
  22871. >14 uleshort >0 +
  22872. >>14 uleshort &0x0001 \bR
  22873. >>14 uleshort &0x0002 \bH
  22874. >>14 uleshort &0x0004 \bS
  22875. >>14 uleshort &0x0020 \bA
  22876. >>14 uleshort &0x0040 \bX
  22877. >>14 uleshort &0x0080 \bUtf
  22878. # unknown 0x0100 flag found on one XP_CD:\I386\DRIVER.CAB
  22879. >>14 uleshort &0x0100 \b?
  22880. # szName is name of archive member
  22881. >16 string x "%s"
  22882. # next archive member name if more files
  22883. #>>&17 string >\0 \b, NEXT NAME %-.50s
  22884. # InstallShield Cabinet files
  22885. 0 string/b ISc( InstallShield Cabinet archive data
  22886. >5 byte&0xf0 =0x60 version 6,
  22887. >5 byte&0xf0 !0x60 version 4/5,
  22888. >(12.l+40) lelong x %u files
  22889. # Windows CE package files
  22890. 0 string/b MSCE\0\0\0\0 Microsoft WinCE install header
  22891. >20 lelong 0 \b, architecture-independent
  22892. >20 lelong 103 \b, Hitachi SH3
  22893. >20 lelong 104 \b, Hitachi SH4
  22894. >20 lelong 0xA11 \b, StrongARM
  22895. >20 lelong 4000 \b, MIPS R4000
  22896. >20 lelong 10003 \b, Hitachi SH3
  22897. >20 lelong 10004 \b, Hitachi SH3E
  22898. >20 lelong 10005 \b, Hitachi SH4
  22899. >20 lelong 70001 \b, ARM 7TDMI
  22900. >52 leshort 1 \b, 1 file
  22901. >52 leshort >1 \b, %u files
  22902. >56 leshort 1 \b, 1 registry entry
  22903. >56 leshort >1 \b, %u registry entries
  22904. # Windows Enhanced Metafile (EMF)
  22905. # See msdn.microsoft.com/archive/en-us/dnargdi/html/msdn_enhmeta.asp
  22906. # for further information.
  22907. 0 ulelong 1
  22908. >40 string \ EMF Windows Enhanced Metafile (EMF) image data
  22909. >>44 ulelong x version 0x%x
  22910. 0 string/b \224\246\056 Microsoft Word Document
  22911. !:mime application/msword
  22912. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  22913. # Magic type for Dell's BIOS .hdr files
  22914. # Dell's .hdr
  22915. 0 string/b $RBU
  22916. >23 string Dell %s system BIOS
  22917. >5 byte 2
  22918. >>48 byte x version %d.
  22919. >>49 byte x \b%d.
  22920. >>50 byte x \b%d
  22921. >5 byte <2
  22922. >>48 string x version %.3s
  22923. # Type: Microsoft Document Imaging Format (.mdi)
  22924. # URL: https://en.wikipedia.org/wiki/Microsoft_Document_Imaging_Format
  22925. # From: Daniele Sempione <scrows@oziosi.org>
  22926. # Too weak (EP)
  22927. #0 short 0x5045 Microsoft Document Imaging Format
  22928. # MS eBook format (.lit)
  22929. 0 string/b ITOLITLS Microsoft Reader eBook Data
  22930. >8 lelong x \b, version %u
  22931. !:mime application/x-ms-reader
  22932. # Windows CE Binary Image Data Format
  22933. # From: Dr. Jesus <j@hug.gs>
  22934. 0 string/b B000FF\n Windows Embedded CE binary image
  22935. # The second byte of these signatures is a file version; I don't know what,
  22936. # if anything, produced files with version numbers 0-2.
  22937. # From: John Elliott <johne@seasip.demon.co.uk>
  22938. 0 string \xfc\x03\x00 Mallard BASIC program data (v1.11)
  22939. 0 string \xfc\x04\x00 Mallard BASIC program data (v1.29+)
  22940. 0 string \xfc\x03\x01 Mallard BASIC protected program data (v1.11)
  22941. 0 string \xfc\x04\x01 Mallard BASIC protected program data (v1.29+)
  22942. 0 string MIOPEN Mallard BASIC Jetsam data
  22943. 0 string Jetsam0 Mallard BASIC Jetsam index data
  22944. # DOS backup 2.0 to 3.2
  22945. # backupid.@@@
  22946. # plausibility check for date
  22947. 0x3 ushort >1979
  22948. >0x5 ubyte-1 <31
  22949. >>0x6 ubyte-1 <12
  22950. # actually 121 nul bytes
  22951. >>>0x7 string \0\0\0\0\0\0\0\0
  22952. >>>>0x1 ubyte x DOS 2.0 backup id file, sequence %d
  22953. !:ext @@@
  22954. >>>>0x0 ubyte 0xff \b, last disk
  22955. # backed up file
  22956. # skip some AppleWorks word like Tomahawk.Awp, WIN98SE-DE.vhd
  22957. # by looking for trailing nul of maximal file name string
  22958. 0x52 ubyte 0
  22959. # test for flag byte: FFh~complete file, 00h~split file
  22960. # FFh -127 = -1 -127 = -128
  22961. # 00h -127 = 0 -127 = -127
  22962. >0 byte-127 <-126
  22963. # plausibility check for file name length
  22964. >>0x53 ubyte-1 <78
  22965. # looking for terminating nul of file name string
  22966. >>>(0x53.b+4) ubyte 0
  22967. # looking if last char of string is valid DOS file name
  22968. >>>>(0x53.b+3) ubyte >0x1F
  22969. # actually 44 nul bytes
  22970. # but sometimes garbage according to Ralf Quint. So can not be used as test
  22971. #>0x54 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
  22972. # first char of full file name is DOS (5Ch) or UNIX (2Fh) path separator
  22973. # only DOS variant found. UNIX variant according to V32SLASH.TXT in archive PD0315.EXE
  22974. >>>>>5 ubyte&0x8C 0x0C
  22975. # ./msdos (version 5.30) labeled the entry as
  22976. # "DOS 2.0 backed up file %s, split file, sequence %d" or
  22977. # "DOS 2.0 backed up file %s, complete file"
  22978. >>>>>>0 ubyte x DOS 2.0-3.2 backed up
  22979. #>>>>>>0 ubyte 0xff complete
  22980. >>>>>>0 ubyte 0
  22981. >>>>>>>1 uleshort x sequence %d of
  22982. # full file name with path but without drive letter and colon stored from 0x05 til 0x52
  22983. >>>>>>0x5 string x file %s
  22984. # backup name is original filename
  22985. #!:ext *
  22986. # magic/Magdir/msdos, 1169: Warning: EXTENSION type ` *' has bad char '*'
  22987. # file: line 1169: Bad magic entry ' *'
  22988. # after header original file content
  22989. >>>>>>128 indirect x \b;\040
  22990. # DOS backup 3.3 to 5.x
  22991. # CONTROL.nnn files
  22992. 0 string \x8bBACKUP\x20
  22993. # actually 128 nul bytes
  22994. >0xa string \0\0\0\0\0\0\0\0
  22995. >>0x9 ubyte x DOS 3.3 backup control file, sequence %d
  22996. >>0x8a ubyte 0xff \b, last disk
  22997. # NB: The BACKUP.nnn files consist of the files backed up,
  22998. # concatenated.
  22999. #------------------------------------------------------------------------------
  23000. # $File: msooxml,v 1.15 2020/09/05 22:59:14 christos Exp $
  23001. # msooxml: file(1) magic for Microsoft Office XML
  23002. # From: Ralf Brown <ralf.brown@gmail.com>
  23003. # .docx, .pptx, and .xlsx are XML plus other files inside a ZIP
  23004. # archive. The first member file is normally "[Content_Types].xml".
  23005. # but some libreoffice generated files put this later. Perhaps skip
  23006. # the "[Content_Types].xml" test?
  23007. # Since MSOOXML doesn't have anything like the uncompressed "mimetype"
  23008. # file of ePub or OpenDocument, we'll have to scan for a filename
  23009. # which can distinguish between the three types
  23010. 0 name msooxml
  23011. >0 string word/ Microsoft Word 2007+
  23012. !:mime application/vnd.openxmlformats-officedocument.wordprocessingml.document
  23013. >0 string ppt/ Microsoft PowerPoint 2007+
  23014. !:mime application/vnd.openxmlformats-officedocument.presentationml.presentation
  23015. >0 string xl/ Microsoft Excel 2007+
  23016. !:mime application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  23017. >0 string visio/ Microsoft Visio 2013+
  23018. !:mime application/vnd.ms-visio.drawing.main+xml
  23019. # start by checking for ZIP local file header signature
  23020. 0 string PK\003\004
  23021. !:strength +10
  23022. # make sure the first file is correct
  23023. >0x1E use msooxml
  23024. >0x1E default x
  23025. >>0x1E regex \\[Content_Types\\]\\.xml|_rels/\\.rels|docProps
  23026. # skip to the second local file header
  23027. # since some documents include a 520-byte extra field following the file
  23028. # header, we need to scan for the next header
  23029. >>>(18.l+49) search/6000 PK\003\004
  23030. # now skip to the *third* local file header; again, we need to scan due to a
  23031. # 520-byte extra field following the file header
  23032. >>>>&26 search/6000 PK\003\004
  23033. # and check the subdirectory name to determine which type of OOXML
  23034. # file we have. Correct the mimetype with the registered ones:
  23035. # https://technet.microsoft.com/en-us/library/cc179224.aspx
  23036. >>>>>&26 use msooxml
  23037. >>>>>&26 default x
  23038. # OpenOffice/Libreoffice orders ZIP entry differently, so check the 4th file
  23039. >>>>>>&26 search/6000 PK\003\004
  23040. >>>>>>>&26 use msooxml
  23041. >>>>>>>&26 default x Microsoft OOXML
  23042. >>>>>&26 default x Microsoft OOXML
  23043. #------------------------------------------------------------------------------
  23044. # $File: msvc,v 1.10 2018/10/01 19:14:03 christos Exp $
  23045. # msvc: file(1) magic for msvc
  23046. # "H. Nanosecond" <aldomel@ix.netcom.com>
  23047. # Microsoft visual C
  23048. #
  23049. # I have version 1.0
  23050. # .aps
  23051. 0 string HWB\000\377\001\000\000\000 Microsoft Visual C .APS file
  23052. # .ide
  23053. #too long 0 string \102\157\162\154\141\156\144\040\103\053\053\040\120\162\157\152\145\143\164\040\106\151\154\145\012\000\032\000\002\000\262\000\272\276\372\316 MSVC .ide
  23054. 0 string \102\157\162\154\141\156\144\040\103\053\053\040\120\162\157 MSVC .ide
  23055. # .res
  23056. 0 string \000\000\000\000\040\000\000\000\377 MSVC .res
  23057. 0 string \377\003\000\377\001\000\020\020\350 MSVC .res
  23058. 0 string \377\003\000\377\001\000\060\020\350 MSVC .res
  23059. #.lib
  23060. 0 string \360\015\000\000 Microsoft Visual C library
  23061. 0 string \360\075\000\000 Microsoft Visual C library
  23062. 0 string \360\175\000\000 Microsoft Visual C library
  23063. #.pch
  23064. 0 string DTJPCH0\000\022\103\006\200 Microsoft Visual C .pch
  23065. # Summary: Symbol Table / Debug info used by Microsoft compilers
  23066. # URL: https://en.wikipedia.org/wiki/Program_database
  23067. # Reference: https://code.google.com/p/pdbparser/wiki/MSF_Format
  23068. # Update: Joerg Jenderek
  23069. # Note: test only for Windows XP+SP3 x86 , 8.1 x64 arm and 10.1 x86
  23070. # info does only applies partly for older files like msvbvm50.pdb about year 2001
  23071. 0 string Microsoft\ C/C++\040
  23072. # "Microsoft Program DataBase" by TrID
  23073. >24 search/14 \r\n\x1A MSVC program database
  23074. !:mime application/x-ms-pdb
  23075. !:ext pdb
  23076. # "MSF 7.00" "program database 2.00" for msvbvm50.pdb
  23077. >>16 regex \([0-9.]+\) ver %s
  23078. #>>>0x38 search/128123456 /LinkInfo \b with linkinfo
  23079. # "MSF 7.00" variant
  23080. >>0x1e leshort 0
  23081. # PageSize 400h 1000h
  23082. >>>0x20 lelong x \b, %d
  23083. # Page Count
  23084. >>>0x28 lelong x \b*%d bytes
  23085. # "program database 2.00" variant
  23086. >>0x1e leshort !0
  23087. # PageSize 400h
  23088. >>>0x2c lelong x \b, %d
  23089. # Page Count for msoo-dll.pdb 4379h
  23090. >>>0x32 leshort x \b*%d bytes
  23091. # Reference: https://github.com/Microsoft/vstest/pull/856/commits/fdc7a9f074ca5a8dfeec83b1be9162bf0cf4000d
  23092. 0 string/c bsjb\001\000\001\000\000\000\000\000\f\000\000\000pdb\ v1.0 Microsoft Roslyn C# debugging symbols version 1.0
  23093. #.sbr
  23094. 0 string \000\002\000\007\000 MSVC .sbr
  23095. >5 string >\0 %s
  23096. #.bsc
  23097. 0 string \002\000\002\001 MSVC .bsc
  23098. #.wsp
  23099. 0 string 1.00\ .0000.0000\000\003 MSVC .wsp version 1.0000.0000
  23100. # these seem to start with the version and contain menus
  23101. #------------------------------------------------------------------------------
  23102. # msx: file(1) magic for the MSX Home Computer
  23103. # v1.3
  23104. # Fabio R. Schmidlin <sd-snatcher@users.sourceforge.net>
  23105. ############## MSX Music file formats ##############
  23106. # Gigamix MGSDRV music file
  23107. 0 string/b MGS MSX Gigamix MGSDRV3 music file,
  23108. >6 ubeshort 0x0D0A
  23109. >>3 byte x \bv%c
  23110. >>4 byte x \b.%c
  23111. >>5 byte x \b%c
  23112. >>8 string >\0 \b, title: %s
  23113. 1 string/b mgs2\ MSX Gigamix MGSDRV2 music file
  23114. >6 uleshort 0x80
  23115. >>0x2E uleshort 0
  23116. >>>0x30 string >\0 \b, title: %s
  23117. # KSS music file
  23118. 0 string/b KSCC KSS music file v1.03
  23119. >0xE byte 0
  23120. >>0xF byte&0x02 0 \b, soundchips: AY-3-8910, SCC(+)
  23121. >>0xF byte&0x02 2 \b, soundchip(s): SN76489
  23122. >>>0xF byte&0x04 4 stereo
  23123. >>0xF byte&0x01 1 \b, YM2413
  23124. >>0xF byte&0x08 8 \b, Y8950
  23125. 0 string/b KSSX KSS music file v1.20
  23126. >0xE byte&0xEF 0
  23127. >>0xF byte&0x40 0x00 \b, 60Hz
  23128. >>0xF byte&0x40 0x40 \b, 50Hz
  23129. >>0xF byte&0x02 0 \b, soundchips: AY-3-8910, SCC(+)
  23130. >>0xF byte&0x02 0x02 \b, soundchips: SN76489
  23131. >>>0xF byte&0x04 0x04 stereo
  23132. >>0xF byte&0x01 0x01 \b,
  23133. >>>0xF byte&0x18 0x00 \bYM2413
  23134. >>>0xF byte&0x18 0x08 \bYM2413, Y8950
  23135. >>>0xF byte&0x18 0x18 \bYM2413+Y8950 pseudostereo
  23136. >>0xF byte&0x18 0x10 \b, Majyutsushi DAC
  23137. # Moonblaster for Moonsound
  23138. 0 string/b MBMS
  23139. >4 byte 0x10 MSX Moonblaster for MoonSound music
  23140. # Music Player K-kaz
  23141. 0 string/b MPK MSX Music Player K-kaz song
  23142. >6 ubeshort 0x0D0A
  23143. >>3 byte x v%c
  23144. >>4 byte x \b.%c
  23145. >>5 byte x \b%c
  23146. # I don't know why these don't work
  23147. #0 search/0xFFFF \r\n.FM9
  23148. #>0 search/0xFFFF \r\n#FORMAT MSX Music Player K-kaz source MML file
  23149. #0 search/0xFFFF \r\nFM1\ \=
  23150. #>0 search/0xFFFF \r\nPSG1\=
  23151. #>>0 search/0xFFFF \r\nSCC1\= MSX MuSiCa MML source file
  23152. # OPX Music file
  23153. 0x35 beshort 0x0d0a
  23154. >0x7B beshort 0x0d0a
  23155. >>0x7D byte 0x1a
  23156. >>>0x87 uleshort 0 MSX OPX Music file
  23157. >>>>0x86 byte 0 v1.5
  23158. >>>>>0 string >\32 \b, title: %s
  23159. >>>>0x86 byte 1 v2.4
  23160. >>>>>0 string >\32 \b, title: %s
  23161. # SCMD music file
  23162. 0x8B string/b SCMD
  23163. >0xCE uleshort 0 MSX SCMD Music file
  23164. #>>-2 uleshort 0x6a71 ; The file must end with this value. How to code this here?
  23165. >>0x8F string >\0 \b, title: %s
  23166. 0 search/0xFFFF \r\n@title
  23167. >&0 search/0xFFFF \r\n@m=[ MSX SCMD source MML file
  23168. ############## MSX image file formats ##############
  23169. # MSX raw VRAM dump
  23170. 0 ubyte 0xFE
  23171. >1 uleshort 0
  23172. >>5 uleshort 0
  23173. >>>3 uleshort 0x37FF MSX SC2/GRP raw image
  23174. >>>3 uleshort 0x6A00 MSX Graph Saurus SR5 raw image
  23175. >>>3 uleshort >0x769E
  23176. >>>>3 uleshort <0x8000 MSX GE5/GE6 raw image
  23177. >>>>>3 uleshort 0x7FFF \b, with sprite patterns
  23178. >>>3 uleshort 0xD3FF MSX screen 7-12 raw image
  23179. >>>3 uleshort 0xD400 MSX Graph Saurus SR7/SR8/SRS raw image
  23180. # Graph Saurus compressed images
  23181. 0 ubyte 0xFD
  23182. >1 uleshort 0
  23183. >>5 uleshort 0
  23184. >>>3 uleshort >0x013D MSX Graph Saurus compressed image
  23185. # MSX G9B image file
  23186. 0 string/b G9B
  23187. >1 uleshort 11
  23188. >>3 uleshort >10
  23189. >>>5 ubyte >0 MSX G9B image, depth=%d
  23190. >>>>8 uleshort x \b, %dx
  23191. >>>>10 uleshort x \b%d
  23192. >>>>5 ubyte <9
  23193. >>>>>6 ubyte 0
  23194. >>>>>>7 ubyte x \b, codec=%d RGB color palettes
  23195. >>>>>6 ubyte 64 \b, codec=RGB fixed color
  23196. >>>>>6 ubyte 128 \b, codec=YJK
  23197. >>>>>6 ubyte 192 \b, codec=YUV
  23198. >>>>5 ubyte >8 codec=RGB fixed color
  23199. >>>>12 ubyte 0 \b, raw
  23200. >>>>12 ubyte 1 \b, bitbuster compression
  23201. ############## Other MSX file formats ##############
  23202. # MSX internal ROMs
  23203. 0 ubeshort 0xF3C3
  23204. >2 uleshort <0x4000
  23205. >>8 ubyte 0xC3
  23206. >>>9 uleshort <0x4000
  23207. >>>>0x0B ubeshort 0x00C3
  23208. >>>>>0x0D uleshort <0x4000
  23209. >>>>>>0x0F ubeshort 0x00C3
  23210. >>>>>>>0x11 uleshort <0x4000
  23211. >>>>>>>>0x13 ubeshort 0x00C3
  23212. >>>>>>>>>0x15 uleshort <0x4000
  23213. >>>>>>>>>>0x50 ubyte 0xC3
  23214. >>>>>>>>>>>0x51 uleshort <0x4000
  23215. >>>>>>>>>>>>(9.s) ubyte 0xC3
  23216. >>>>>>>>>>>>>&0 uleshort >0x4000
  23217. >>>>>>>>>>>>>>&0 ubyte 0xC3 MSX BIOS+BASIC
  23218. >>>>>>>>>>>>>>>0x002D ubyte+1 <3 \b. version=MSX%d
  23219. >>>>>>>>>>>>>>>0x002D ubyte 2 \b, version=MSX2+
  23220. >>>>>>>>>>>>>>>0x002D ubyte 3 \b, version=MSX Turbo-R
  23221. >>>>>>>>>>>>>>>0x002D ubyte >3 \b, version=Unknown MSX %d version
  23222. >>>>>>>>>>>>>>>0x0006 ubyte x \b, VDP.DR=0x%2x
  23223. >>>>>>>>>>>>>>>0x0007 ubyte x \b, VDP.DW=0x%2x
  23224. >>>>>>>>>>>>>>>0x002B ubyte&0xF 0 \b, charset=Japanese
  23225. >>>>>>>>>>>>>>>0x002B ubyte&0xF 1 \b, charset=International
  23226. >>>>>>>>>>>>>>>0x002B ubyte&0xF 2 \b, charset=Korean
  23227. >>>>>>>>>>>>>>>0x002B ubyte&0xF >2 \b, charset=Unknown id:%d
  23228. >>>>>>>>>>>>>>>0x002B ubyte&0x70 0x00 \b, date format=Y-M-D
  23229. >>>>>>>>>>>>>>>0x002B ubyte&0x70 0x10 \b, date format=M-D-Y
  23230. >>>>>>>>>>>>>>>0x002B ubyte&0x70 0x20 \b, date format=D-M-Y
  23231. >>>>>>>>>>>>>>>0x002B ubyte&0x80 0x00 \b, vfreq=60Hz
  23232. >>>>>>>>>>>>>>>0x002B ubyte&0x80 0x80 \b, vfreq=50Hz
  23233. >>>>>>>>>>>>>>>0x002C ubyte&0x0F 0 \b, keyboard=Japanese
  23234. >>>>>>>>>>>>>>>0x002C ubyte&0x0F 1 \b, keyboard=International
  23235. >>>>>>>>>>>>>>>0x002C ubyte&0x0F 2 \b, keyboard=French
  23236. >>>>>>>>>>>>>>>0x002C ubyte&0x0F 3 \b, keyboard=UK
  23237. >>>>>>>>>>>>>>>0x002C ubyte&0x0F 4 \b, keyboard=German
  23238. >>>>>>>>>>>>>>>0x002C ubyte&0x0F 5 \b, keyboard=Unknown id:%d
  23239. >>>>>>>>>>>>>>>0x002C ubyte&0x0F 6 \b, keyboard=Spanish
  23240. >>>>>>>>>>>>>>>0x002C ubyte&0x0F >6 \b, keyboard=Unknown id:%d
  23241. >>>>>>>>>>>>>>>0x002C ubyte&0xF0 0x00 \b, basic=Japanese
  23242. >>>>>>>>>>>>>>>0x002C ubyte&0xF0 0x10 \b, basic=International
  23243. >>>>>>>>>>>>>>>0x002C ubyte&0xF0 >0x10 \b, basic=Unknown id:%d
  23244. >>>>>>>>>>>>>>>0x002E ubyte&1 1 \b, built-in MIDI
  23245. 0 string/b CD
  23246. >2 uleshort >0x10
  23247. >>2 uleshort <0x4000
  23248. >>>4 uleshort <0x4000
  23249. >>>>6 uleshort <0x4000
  23250. >>>>>8 ubyte 0xC3
  23251. >>>>>>9 uleshort <0x4000
  23252. >>>>>>>0x10 ubyte 0xC3
  23253. >>>>>>>>0x11 uleshort <0x4000
  23254. >>>>>>>>>0x14 ubyte 0xC3
  23255. >>>>>>>>>>0x15 uleshort <0x4000 MSX2/2+/TR SubROM
  23256. 0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
  23257. >0x5F0 ubequad 0x8282828244380000
  23258. >>0x150 ubyte 0x38
  23259. >>>0x170 string \20\20\20
  23260. >>>>0x1E32 string ())
  23261. >>>>>0x2130 ubequad 0xA5A5594924231807
  23262. >>>>>0x2138 ubequad 0x4A4A3424488830C0 MSX Kanji Font
  23263. # MSX extension ROMs
  23264. 0 string/b AB
  23265. >2 uleshort 0x0010 MSX ROM
  23266. >>2 uleshort x \b, init=0x%4x
  23267. >>4 uleshort >0 \b, stahdl=0x%4x
  23268. >>6 uleshort >0 \b, devhdl=0x%4x
  23269. >>8 uleshort >0 \b, bas=0x%4x
  23270. >2 uleshort 0x4010 MSX ROM
  23271. >>2 uleshort x \b, init=0x%04x
  23272. >>4 uleshort >0 \b, stahdl=0x%04x
  23273. >>6 uleshort >0 \b, devhdl=0x%04x
  23274. >>8 uleshort >0 \b, bas=0x%04x
  23275. >2 uleshort 0x8010 MSX ROM
  23276. >>2 uleshort x \b, init=0x%04x
  23277. >>4 uleshort >0 \b, stahdl=0x%04x
  23278. >>6 uleshort >0 \b, devhdl=0x%04x
  23279. >>8 uleshort >0 \b, bas=0x%04x
  23280. 0 string/b AB\0\0
  23281. >6 uleshort 0
  23282. >>4 uleshort >0x400F MSX-BASIC extension ROM
  23283. >>>4 uleshort >0 \b, stahdl=0x%04x
  23284. >>>6 uleshort >0 \b, devhdl=0x%04x
  23285. >>>0x1C string OPLL \b, MSX-Music
  23286. >>>>0x18 string PAC2 \b (external)
  23287. >>>>0x18 string APRL \b (internal)
  23288. 0 string/b AB\0\0\0\0
  23289. >6 uleshort >0x400F MSX device BIOS
  23290. >>6 uleshort >0 \b, devhdl=0x%04x
  23291. 0 string/b AB
  23292. #>2 string 5JSuperLAYDOCK MSX Super Laydock ROM
  23293. #>3 string @HYDLIDE3MSX MSX Hydlide-3 ROM
  23294. #>3 string @3\x80IA862 Golvellius MSX1 ROM
  23295. >2 uleshort >15
  23296. >>2 uleshort <0xC000
  23297. >>>8 string \0\0\0\0\0\0\0\0
  23298. >>>>(2.s&0x3FFF) uleshort >0 MSX ROM
  23299. >>>>>0x10 string YZ\0\0\0\0 Konami Game Master 2 MSX ROM
  23300. >>>>>0x10 string CD \b, Konami RC-
  23301. >>>>>>0x12 ubyte x \b%d
  23302. >>>>>>0x13 ubyte/16 x \b%d
  23303. >>>>>>0x13 ubyte&0xF x \b%d
  23304. >>>>>0x10 string EF \b, Konami RC-
  23305. >>>>>>0x12 ubyte x \b%d
  23306. >>>>>>0x13 ubyte/16 x \b%d
  23307. >>>>>>0x13 ubyte&0xF x \b%d
  23308. >>>>>2 uleshort x \b, init=0x%04x
  23309. >>>>>4 uleshort >0 \b, stahdl=0x%04x
  23310. >>>>>6 uleshort >0 \b, devhdl=0x%04x
  23311. >>>>>8 uleshort >0 \b, bas=0x%04x
  23312. >>>2 uleshort 0
  23313. >>>>4 uleshort 0
  23314. >>>>>6 uleshort 0
  23315. >>>>>>8 uleshort >0 MSX BASIC program in ROM, bas=0x%04x
  23316. 0x4000 string/b AB
  23317. >0x4002 uleshort >0x400F
  23318. >>0x400A string \0\0\0\0\0\0 MSX ROM with nonstandard page order
  23319. >>>0x4002 uleshort x \b, init=0x%04x
  23320. >>>0x4004 uleshort >0 \b, stahdl=0x%04x
  23321. >>>0x4006 uleshort >0 \b, devhdl=0x%04x
  23322. >>>0x4008 uleshort >0 \b, bas=0x%04x
  23323. 0x8000 string/b AB
  23324. >0x8002 uleshort >0x400F
  23325. >>0x800A string \0\0\0\0\0\0 MSX ROM with nonstandard page order
  23326. >>>0x8002 uleshort x \b, init=0x%04x
  23327. >>>0x8004 uleshort >0 \b, stahdl=0x%04x
  23328. >>>0x8006 uleshort >0 \b, devhdl=0x%04x
  23329. >>>0x8008 uleshort >0 \b, bas=0x%04x
  23330. 0x3C000 string/b AB
  23331. >0x3C008 string \0\0\0\0\0\0\0\0 MSX MegaROM with nonstandard page order
  23332. >>0x3C002 uleshort x \b, init=0x%04x
  23333. >>0x3C004 uleshort >0 \b, stahdl=0x%04x
  23334. >>0x3C006 uleshort >0 \b, devhdl=0x%04x
  23335. >>0x3C008 uleshort >0 \b, bas=0x%04x
  23336. # MSX BIN file
  23337. #0 byte 0xFE
  23338. #>1 uleshort >0x8000
  23339. #>>3 uleshort >0x8004
  23340. #>>>5 uleshort >0x8000 MSX BIN file
  23341. # MSX-BASIC file
  23342. 0 byte 0xFF
  23343. >3 uleshort 0x000A
  23344. >>1 uleshort >0x8000 MSX-BASIC program
  23345. # MSX .CAS file
  23346. 0 string/b \x1F\xA6\xDE\xBA\xCC\x13\x7D\x74 MSX cassette archive
  23347. # Mega-Assembler file
  23348. 0 byte 0xFE
  23349. >1 uleshort 0x0001
  23350. >>5 uleshort 0xffff
  23351. >>>6 byte 0x0A MSX Mega-Assembler source
  23352. # Execrom Patchfile
  23353. 0 string ExecROM\ patchfile\x1A MSX ExecROM patchfile
  23354. >0x12 ubyte/16 x v%d
  23355. >0x12 ubyte&0xF x \b.%d
  23356. >0x13 ubyte x \b, contains %d patches
  23357. # Konami's King's Valley-2 custom stage (ELG file)
  23358. 4 uleshort 0x0900
  23359. >0xF byte 1
  23360. >>0x14 byte 0
  23361. >>>0x1E string \040\040\040
  23362. >>>>0x23 byte 1
  23363. >>>>>0x25 byte 0
  23364. >>>>>>0x15 string >\x30
  23365. >>>>>>>0x15 string <\x5A Konami King's Valley-2 custom stage, title: "%-8.8s"
  23366. >>>>>>>>0x1D byte <32 \b, theme: %d
  23367. # Metal Gear 1 savegame
  23368. #0x4F string \x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF
  23369. #>>0x60 string \xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF
  23370. #>>>0x7B string \0x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\x00 Metal Gear 1 savegame
  23371. # ------------------------------------------------------------------------
  23372. # $File: mup,v 1.5 2017/03/17 21:35:28 christos Exp $
  23373. # mup: file(1) magic for Mup (Music Publisher) input file.
  23374. #
  23375. # From: Abel Cheung <abel (@) oaka.org>
  23376. #
  23377. # NOTE: This header is mainly proposed in the Arkkra mailing list,
  23378. # and is not a mandatory header because of old mup input file
  23379. # compatibility. Noteedit also use mup format, but is not forcing
  23380. # user to use any header as well.
  23381. #
  23382. 0 search/1 //!Mup Mup music publication program input text
  23383. >6 string -Arkkra (Arkkra)
  23384. >>13 string -
  23385. >>>16 string .
  23386. >>>>14 string x \b, need V%.4s
  23387. >>>15 string .
  23388. >>>>14 string x \b, need V%.3s
  23389. >6 string -
  23390. >>9 string .
  23391. >>>7 string x \b, need V%.4s
  23392. >>8 string .
  23393. >>>7 string x \b, need V%.3s
  23394. #------------------------------------------------------------------------------
  23395. # $File: music,v 1.1 2011/11/25 03:28:17 christos Exp $
  23396. # music: file (1) magic for music formats
  23397. # BWW format used by Bagpipe Music Writer Gold by Robert MacNeil Musicworks
  23398. # and Bagpipe Writer by Doug Wickstrom
  23399. #
  23400. 0 string Bagpipe Bagpipe
  23401. >8 string Reader Reader
  23402. >>15 string >\0 (version %.3s)
  23403. >8 string Music\ Writer Music Writer
  23404. >>20 string :
  23405. >>>21 string >\0 (version %.3s)
  23406. >>21 string Gold Gold
  23407. >>>25 string :
  23408. >>>>26 string >\0 (version %.3s)
  23409. #------------------------------------------------------------------------------
  23410. # nasa: file(1) magic
  23411. # From: Barry Carter <carter.barry@gmail.com>
  23412. 0 string DAF/SPK NASA SPICE file (binary format)
  23413. 0 string DAFETF\ NAIF\ DAF\ ENCODED NASA SPICE file (transfer format)
  23414. #-----------------------------------------------------------------------------
  23415. # $File: natinst,v 1.6 2014/06/03 19:17:27 christos Exp $
  23416. # natinst: file(1) magic for National Instruments Code Files
  23417. #
  23418. # From <egamez@fcfm.buap.mx> Enrique Gamez-Flores
  23419. # version 1
  23420. # Many formats still missing, we use, for the moment LabVIEW
  23421. # We guess VXI format file. VISA, LabWindowsCVI, BridgeVIEW, etc, are missing
  23422. #
  23423. 0 string RSRC National Instruments,
  23424. # Check if it's a LabVIEW File
  23425. >8 string LV LabVIEW File,
  23426. # Check which kind of file it is
  23427. >>10 string SB Code Resource File, data
  23428. >>10 string IN Virtual Instrument Program, data
  23429. >>10 string AR VI Library, data
  23430. # This is for Menu Libraries
  23431. >8 string LMNULBVW Portable File Names, data
  23432. # This is for General Resources
  23433. >8 string rsc Resources File, data
  23434. # This is for VXI Package
  23435. 0 string VMAP National Instruments, VXI File, data
  23436. #------------------------------------------------------------------------------
  23437. # $File: ncr,v 1.8 2014/04/30 21:41:02 christos Exp $
  23438. # ncr: file(1) magic for NCR Tower objects
  23439. #
  23440. # contributed by
  23441. # Michael R. Wayne *** TMC & Associates *** INTERNET: wayne@ford-vax.arpa
  23442. # uucp: {philabs | pyramid} !fmsrl7!wayne OR wayne@fmsrl7.UUCP
  23443. #
  23444. 0 beshort 000610 Tower/XP rel 2 object
  23445. >12 belong >0 not stripped
  23446. >20 beshort 0407 executable
  23447. >20 beshort 0410 pure executable
  23448. >22 beshort >0 - version %d
  23449. 0 beshort 000615 Tower/XP rel 2 object
  23450. >12 belong >0 not stripped
  23451. >20 beshort 0407 executable
  23452. >20 beshort 0410 pure executable
  23453. >22 beshort >0 - version %d
  23454. 0 beshort 000620 Tower/XP rel 3 object
  23455. >12 belong >0 not stripped
  23456. >20 beshort 0407 executable
  23457. >20 beshort 0410 pure executable
  23458. >22 beshort >0 - version %d
  23459. 0 beshort 000625 Tower/XP rel 3 object
  23460. >12 belong >0 not stripped
  23461. >20 beshort 0407 executable
  23462. >20 beshort 0410 pure executable
  23463. >22 beshort >0 - version %d
  23464. 0 beshort 000630 Tower32/600/400 68020 object
  23465. >12 belong >0 not stripped
  23466. >20 beshort 0407 executable
  23467. >20 beshort 0410 pure executable
  23468. >22 beshort >0 - version %d
  23469. 0 beshort 000640 Tower32/800 68020
  23470. >18 beshort &020000 w/68881 object
  23471. >18 beshort &040000 compatible object
  23472. >18 beshort &060000 object
  23473. >20 beshort 0407 executable
  23474. >20 beshort 0413 pure executable
  23475. >12 belong >0 not stripped
  23476. >22 beshort >0 - version %d
  23477. 0 beshort 000645 Tower32/800 68010
  23478. >18 beshort &040000 compatible object
  23479. >18 beshort &060000 object
  23480. >20 beshort 0407 executable
  23481. >20 beshort 0413 pure executable
  23482. >12 belong >0 not stripped
  23483. >22 beshort >0 - version %d
  23484. #------------------------------------------------------------
  23485. # $File: neko,v 1.2 2019/04/19 00:42:27 christos Exp $
  23486. # From: Mikhail Gusarov <dottedmag@dottedmag.net>
  23487. # NekoVM (https://nekovm.org/) bytecode
  23488. 0 string NEKO NekoVM bytecode
  23489. >4 lelong x (%d global symbols,
  23490. >8 lelong x %d global fields,
  23491. >12 lelong x %d bytecode ops)
  23492. !:mime application/x-nekovm-bytecode
  23493. #------------------------------------------------------------------------------
  23494. # $File: netbsd,v 1.26 2019/01/01 03:11:23 christos Exp $
  23495. # netbsd: file(1) magic for NetBSD objects
  23496. #
  23497. # All new-style magic numbers are in network byte order.
  23498. # The old-style magic numbers are indistinguishable from the same magic
  23499. # numbers used in other systems, and are handled, for all those systems,
  23500. # in aout.
  23501. #
  23502. 0 name netbsd-detail
  23503. >20 lelong x @%#x
  23504. >4 lelong >0 \b+T=%d
  23505. >8 lelong >0 \b+D=%d
  23506. >12 lelong >0 \b+B=%d
  23507. >16 lelong >0 \b+S=%d
  23508. >24 lelong >0 \b+TR=%d
  23509. >28 lelong >0 \b+TD=%d
  23510. 0 name netbsd-4096
  23511. >0 byte &0x80
  23512. >>20 lelong <4096 shared library
  23513. >>20 lelong =4096 dynamically linked executable
  23514. >>20 lelong >4096 dynamically linked executable
  23515. >0 byte ^0x80 executable
  23516. >16 lelong >0 not stripped
  23517. 0 name netbsd-8192
  23518. >0 byte &0x80
  23519. >>20 lelong <8192 shared library
  23520. >>20 lelong =8192 dynamically linked executable
  23521. >>20 lelong >8192 dynamically linked executable
  23522. >0 byte ^0x80 executable
  23523. >16 lelong >0 not stripped
  23524. >0 use netbsd-detail
  23525. 0 name netbsd-normal
  23526. >0 byte &0x80 dynamically linked executable
  23527. >0 byte ^0x80
  23528. >>0 byte &0x40 position independent
  23529. >>20 lelong !0 executable
  23530. >>20 lelong =0 object file
  23531. >16 lelong >0 not stripped
  23532. >0 use netbsd-detail
  23533. 0 name netbsd-pure
  23534. >0 byte &0x80 dynamically linked executable
  23535. >0 byte ^0x80 executable
  23536. >16 lelong >0 not stripped
  23537. >0 use netbsd-detail
  23538. 0 name netbsd-core
  23539. >12 string >\0 from '%s'
  23540. >32 lelong !0 (signal %d)
  23541. 0 belong&0377777777 041400413 a.out NetBSD/i386 demand paged
  23542. >0 use netbsd-4096
  23543. 0 belong&0377777777 041400410 a.out NetBSD/i386 pure
  23544. >0 use netbsd-pure
  23545. 0 belong&0377777777 041400407 a.out NetBSD/i386
  23546. >0 use netbsd-normal
  23547. 0 belong&0377777777 041400507 a.out NetBSD/i386 core
  23548. >0 use netbsd-core
  23549. 0 belong&0377777777 041600413 a.out NetBSD/m68k demand paged
  23550. >0 use \^netbsd-8192
  23551. 0 belong&0377777777 041600410 a.out NetBSD/m68k pure
  23552. >0 use \^netbsd-pure
  23553. 0 belong&0377777777 041600407 a.out NetBSD/m68k
  23554. >0 use \^netbsd-normal
  23555. 0 belong&0377777777 041600507 a.out NetBSD/m68k core
  23556. >0 use \^netbsd-core
  23557. 0 belong&0377777777 042000413 a.out NetBSD/m68k4k demand paged
  23558. >0 use \^netbsd-4096
  23559. 0 belong&0377777777 042000410 a.out NetBSD/m68k4k pure
  23560. >0 use \^netbsd-pure
  23561. 0 belong&0377777777 042000407 a.out NetBSD/m68k4k
  23562. >0 use \^netbsd-normal
  23563. 0 belong&0377777777 042000507 a.out NetBSD/m68k4k core
  23564. >0 use \^netbsd-core
  23565. 0 belong&0377777777 042200413 a.out NetBSD/ns32532 demand paged
  23566. >0 use netbsd-4096
  23567. 0 belong&0377777777 042200410 a.out NetBSD/ns32532 pure
  23568. >0 use netbsd-pure
  23569. 0 belong&0377777777 042200407 a.out NetBSD/ns32532
  23570. >0 use netbsd-normal
  23571. 0 belong&0377777777 042200507 a.out NetBSD/ns32532 core
  23572. >0 use netbsd-core
  23573. 0 belong&0377777777 045200507 a.out NetBSD/powerpc core
  23574. >0 use netbsd-core
  23575. 0 belong&0377777777 042400413 a.out NetBSD/SPARC demand paged
  23576. >0 use \^netbsd-8192
  23577. 0 belong&0377777777 042400410 a.out NetBSD/SPARC pure
  23578. >0 use \^netbsd-pure
  23579. 0 belong&0377777777 042400407 a.out NetBSD/SPARC
  23580. >0 use \^netbsd-normal
  23581. 0 belong&0377777777 042400507 a.out NetBSD/SPARC core
  23582. >0 use \^netbsd-core
  23583. 0 belong&0377777777 042600413 a.out NetBSD/pmax demand paged
  23584. >0 use netbsd-4096
  23585. 0 belong&0377777777 042600410 a.out NetBSD/pmax pure
  23586. >0 use \^netbsd-pure
  23587. 0 belong&0377777777 042600407 a.out NetBSD/pmax
  23588. >0 use netbsd-normal
  23589. 0 belong&0377777777 042600507 a.out NetBSD/pmax core
  23590. >0 use netbsd-core
  23591. 0 belong&0377777777 043000413 a.out NetBSD/vax 1k demand paged
  23592. >0 use netbsd-4096
  23593. 0 belong&0377777777 043000410 a.out NetBSD/vax 1k pure
  23594. >0 use netbsd-pure
  23595. 0 belong&0377777777 043000407 a.out NetBSD/vax 1k
  23596. >0 use netbsd-normal
  23597. 0 belong&0377777777 043000507 a.out NetBSD/vax 1k core
  23598. >0 use netbsd-core
  23599. 0 belong&0377777777 045400413 a.out NetBSD/vax 4k demand paged
  23600. >0 use netbsd-4096
  23601. 0 belong&0377777777 045400410 a.out NetBSD/vax 4k pure
  23602. >0 use netbsd-pure
  23603. 0 belong&0377777777 045400407 a.out NetBSD/vax 4k
  23604. >0 use netbsd-normal
  23605. 0 belong&0377777777 045400507 a.out NetBSD/vax 4k core
  23606. >0 use netbsd-core
  23607. # NetBSD/alpha does not support (and has never supported) a.out objects,
  23608. # so no rules are provided for them. NetBSD/alpha ELF objects are
  23609. # dealt with in "elf".
  23610. 0 lelong 0x00070185 ECOFF NetBSD/alpha binary
  23611. >10 leshort 0x0001 not stripped
  23612. >10 leshort 0x0000 stripped
  23613. 0 belong&0377777777 043200507 a.out NetBSD/alpha core
  23614. >12 string >\0 from '%s'
  23615. >32 lelong !0 (signal %d)
  23616. 0 belong&0377777777 043400413 a.out NetBSD/mips demand paged
  23617. >0 use \^netbsd-8192
  23618. >16 belong >0 not stripped
  23619. 0 belong&0377777777 043400410 a.out NetBSD/mips pure
  23620. >0 use netbsd-pure
  23621. 0 belong&0377777777 043400407 a.out NetBSD/mips
  23622. >0 use netbsd-normal
  23623. 0 belong&0377777777 043400507 a.out NetBSD/mips core
  23624. >0 use netbsd-core
  23625. 0 belong&0377777777 043600413 a.out NetBSD/arm32 demand paged
  23626. >0 use netbsd-4096
  23627. 0 belong&0377777777 043600410 a.out NetBSD/arm32 pure
  23628. >0 use netbsd-pure
  23629. 0 belong&0377777777 043600407 a.out NetBSD/arm32
  23630. >0 use netbsd-normal
  23631. # NetBSD/arm26 has always used ELF objects, but it shares a core file
  23632. # format with NetBSD/arm32.
  23633. 0 belong&0377777777 043600507 a.out NetBSD/arm core
  23634. >0 use netbsd-core
  23635. # Kernel core dump format
  23636. 0 belong&0x0000ffff 0x00008fca NetBSD kernel core file
  23637. >0 belong&0x03ff0000 0x00000000 \b, Unknown
  23638. >0 belong&0x03ff0000 0x00010000 \b, sun 68010/68020
  23639. >0 belong&0x03ff0000 0x00020000 \b, sun 68020
  23640. >0 belong&0x03ff0000 0x00640000 \b, 386 PC
  23641. >0 belong&0x03ff0000 0x00860000 \b, i386 BSD
  23642. >0 belong&0x03ff0000 0x00870000 \b, m68k BSD (8K pages)
  23643. >0 belong&0x03ff0000 0x00880000 \b, m68k BSD (4K pages)
  23644. >0 belong&0x03ff0000 0x00890000 \b, ns32532 BSD
  23645. >0 belong&0x03ff0000 0x008a0000 \b, SPARC/32 BSD
  23646. >0 belong&0x03ff0000 0x008b0000 \b, pmax BSD
  23647. >0 belong&0x03ff0000 0x008c0000 \b, vax BSD (1K pages)
  23648. >0 belong&0x03ff0000 0x008d0000 \b, alpha BSD
  23649. >0 belong&0x03ff0000 0x008e0000 \b, mips BSD (Big Endian)
  23650. >0 belong&0x03ff0000 0x008f0000 \b, arm6 BSD
  23651. >0 belong&0x03ff0000 0x00900000 \b, m68k BSD (2K pages)
  23652. >0 belong&0x03ff0000 0x00910000 \b, sh3 BSD
  23653. >0 belong&0x03ff0000 0x00950000 \b, ppc BSD (Big Endian)
  23654. >0 belong&0x03ff0000 0x00960000 \b, vax BSD (4K pages)
  23655. >0 belong&0x03ff0000 0x00970000 \b, mips1 BSD
  23656. >0 belong&0x03ff0000 0x00980000 \b, mips2 BSD
  23657. >0 belong&0x03ff0000 0x00990000 \b, m88k BSD
  23658. >0 belong&0x03ff0000 0x00920000 \b, parisc BSD
  23659. >0 belong&0x03ff0000 0x009b0000 \b, sh5/64 BSD
  23660. >0 belong&0x03ff0000 0x009c0000 \b, SPARC/64 BSD
  23661. >0 belong&0x03ff0000 0x009d0000 \b, amd64 BSD
  23662. >0 belong&0x03ff0000 0x009e0000 \b, sh5/32 BSD
  23663. >0 belong&0x03ff0000 0x009f0000 \b, ia64 BSD
  23664. >0 belong&0x03ff0000 0x00b70000 \b, aarch64 BSD
  23665. >0 belong&0x03ff0000 0x00b80000 \b, or1k BSD
  23666. >0 belong&0x03ff0000 0x00b90000 \b, Risk-V BSD
  23667. >0 belong&0x03ff0000 0x00c80000 \b, hp200 BSD
  23668. >0 belong&0x03ff0000 0x012c0000 \b, hp300 BSD
  23669. >0 belong&0x03ff0000 0x020b0000 \b, hp800 HP-UX
  23670. >0 belong&0x03ff0000 0x020c0000 \b, hp200/hp300 HP-UX
  23671. >0 belong&0xfc000000 0x04000000 \b, CPU
  23672. >0 belong&0xfc000000 0x08000000 \b, DATA
  23673. >0 belong&0xfc000000 0x10000000 \b, STACK
  23674. >4 leshort x \b, (headersize = %d
  23675. >6 leshort x \b, segmentsize = %d
  23676. >8 lelong x \b, segments = %d)
  23677. # little endian only for now.
  23678. 0 name ktrace
  23679. >4 leshort 7
  23680. >>6 leshort <3 NetBSD ktrace file version %d
  23681. >>>12 string x from %s
  23682. >>>56 string x \b, emulation %s
  23683. >>>8 lelong <65536 \b, pid=%d
  23684. 56 string netbsd
  23685. >0 use ktrace
  23686. 56 string linux
  23687. >0 use ktrace
  23688. 56 string sunos
  23689. >0 use ktrace
  23690. 56 string hpux
  23691. >0 use ktrace
  23692. #------------------------------------------------------------------------------
  23693. # $File: netscape,v 1.8 2017/03/17 21:35:28 christos Exp $
  23694. # netscape: file(1) magic for Netscape files
  23695. # "H. Nanosecond" <aldomel@ix.netcom.com>
  23696. # version 3 and 4 I think
  23697. #
  23698. # Netscape Address book .nab
  23699. 0 string \000\017\102\104\000\000\000\000\000\000\001\000\000\000\000\002\000\000\000\002\000\000\004\000 Netscape Address book
  23700. # Netscape Communicator address book
  23701. 0 string \000\017\102\111 Netscape Communicator address book
  23702. # .snm Caches
  23703. 0 string #\ Netscape\ folder\ cache Netscape folder cache
  23704. 0 string \000\036\204\220\000 Netscape folder cache
  23705. # .n2p
  23706. # Net 2 Phone
  23707. #0 string 123\130\071\066\061\071\071\071\060\070\061\060\061\063\060
  23708. 0 string SX961999 Net2phone
  23709. #
  23710. #This is files ending in .art, FIXME add more rules
  23711. 0 string JG\004\016\0\0\0\0 AOL ART image
  23712. 0 string JG\003\016\0\0\0\0 AOL ART image
  23713. #------------------------------------------------------------------------------
  23714. # $File: netware,v 1.5 2020/09/04 16:30:51 christos Exp $
  23715. # netware: file(1) magic for NetWare Loadable Modules (NLMs)
  23716. # From: Mads Martin Joergensen <mmj@suse.de>
  23717. # URL: https://en.wikipedia.org/wiki/NetWare_Loadable_Module
  23718. 0 string NetWare\ Loadable\ Module NetWare Loadable Module
  23719. #!:mime application/octet-stream
  23720. !:ext nlm
  23721. #------------------------------------------------------------------------------
  23722. # $File: news,v 1.6 2009/09/19 16:28:11 christos Exp $
  23723. # news: file(1) magic for SunOS NeWS fonts (not "news" as in "netnews")
  23724. #
  23725. 0 string StartFontMetrics ASCII font metrics
  23726. 0 string StartFont ASCII font bits
  23727. 0 belong 0x137A2944 NeWS bitmap font
  23728. 0 belong 0x137A2947 NeWS font family
  23729. 0 belong 0x137A2950 scalable OpenFont binary
  23730. 0 belong 0x137A2951 encrypted scalable OpenFont binary
  23731. 8 belong 0x137A2B45 X11/NeWS bitmap font
  23732. 8 belong 0x137A2B48 X11/NeWS font family
  23733. #------------------------------------------------------------------------------
  23734. # $File: nitpicker,v 1.8 2019/04/19 00:42:27 christos Exp $
  23735. # nitpicker: file(1) magic for Flowfiles.
  23736. # From: Christian Jachmann <C.Jachmann@gmx.net> https://www.nitpicker.de
  23737. 0 string NPFF NItpicker Flow File
  23738. >4 byte x V%d.
  23739. >5 byte x %d
  23740. >6 bedate x started: %s
  23741. >10 bedate x stopped: %s
  23742. >14 belong x Bytes: %u
  23743. >18 belong x Bytes1: %u
  23744. >22 belong x Flows: %u
  23745. >26 belong x Pkts: %u
  23746. #------------------------------------------------------------------------------
  23747. # $File: numpy,v 1.1 2019/05/09 16:24:36 christos Exp $
  23748. # numpy: file(1) magic for NumPy array binary serialization format
  23749. # Reference: https://docs.scipy.org/doc/numpy/reference/generated/numpy.lib.format.html
  23750. 0 string \x93NUMPY NumPy array,
  23751. >6 ubyte x version %d
  23752. >7 ubyte x \b.%d,
  23753. >8 uleshort x header length %d
  23754. #------------------------------------------------------------------------------
  23755. # $File: oasis,v 1.2 2014/06/03 19:17:27 christos Exp $
  23756. # OASIS
  23757. # Summary: OASIS stream file
  23758. # Long description: Open Artwork System Interchange Standard
  23759. # File extension: .oas
  23760. # Full name: Ben Cowley (bcowley@broadcom.com)
  23761. # Philip Dixon (pdixon@broadcom.com)
  23762. # Reference: http://www.wrcad.com/oasis/oasis-3626-042303-draft.pdf
  23763. # (see page 3)
  23764. 0 string %SEMI-OASIS\r\n OASIS Stream file
  23765. #------------------------------------------------------------------------------
  23766. # $File: ocaml,v 1.5 2010/09/20 18:55:20 rrt Exp $
  23767. # ocaml: file(1) magic for Objective Caml files.
  23768. 0 string Caml1999 OCaml
  23769. >8 string X exec file
  23770. >8 string I interface file (.cmi)
  23771. >8 string O object file (.cmo)
  23772. >8 string A library file (.cma)
  23773. >8 string Y native object file (.cmx)
  23774. >8 string Z native library file (.cmxa)
  23775. >8 string M abstract syntax tree implementation file
  23776. >8 string N abstract syntax tree interface file
  23777. >9 string >\0 (Version %3.3s)
  23778. #------------------------------------------------------------------------------
  23779. # $File: octave,v 1.4 2009/09/19 16:28:11 christos Exp $
  23780. # octave binary data file(1) magic, from Dirk Eddelbuettel <edd@debian.org>
  23781. 0 string Octave-1-L Octave binary data (little endian)
  23782. 0 string Octave-1-B Octave binary data (big endian)
  23783. #------------------------------------------------------------------------------
  23784. # $File: ole2compounddocs,v 1.10 2021/02/23 00:51:10 christos Exp $
  23785. # Microsoft OLE 2 Compound Documents : file(1) magic for Microsoft Structured
  23786. # storage (https://en.wikipedia.org/wiki/Compound_File_Binary_Format)
  23787. # Additional tests for OLE 2 Compound Documents should be under this recipe.
  23788. # reference: https://www.openoffice.org/sc/compdocfileformat.pdf
  23789. 0 string \320\317\021\340\241\261\032\341
  23790. # https://digital-preservation.github.io/droid/
  23791. # skip droid skeleton like fmt-39-signature-id-128.doc by valid version
  23792. >0x1A ushort !0xABAB OLE 2 Compound Document
  23793. #>0x1C uleshort x \b, endnian 0x%4.4x
  23794. # big endian not tested
  23795. >>0x1C ubeshort =0xfffe \b, big-endian
  23796. >>>546 string jbjb : Microsoft Word Document
  23797. !:mime application/msword
  23798. !:apple MSWDWDBN
  23799. !:ext doc
  23800. # Byte Order 0xFFFE means little-endian found in real world applications
  23801. #>>0x1C uleshort =0xfffe \b, little-endian
  23802. >>0x1C uleshort =0xfffe
  23803. # From: Joerg Jenderek
  23804. # Major Version 3 or 4
  23805. >>>0x1A uleshort x \b, v%u
  23806. # Minor Version 32h=50 3Bh=59 3Eh=62
  23807. >>>0x18 uleshort x \b.%u
  23808. # SecID of first sector of the directory stream is often 1 but high like 3144h
  23809. >>>48 ulelong x \b, SecID 0x%x
  23810. # Sector Shift Exponent in short-stream container stream: 6~64 bytes
  23811. >>>32 uleshort !6 \b, exponent of short stream %u
  23812. # total number of sectors used for the FAT
  23813. >>>44 ulelong >1 \b, %u FAT sectors
  23814. # SecID of first sector of the short-sector allocation table (Mini FAT)
  23815. # or -2 (End Of ChainSecID) if not extant
  23816. >>>60 ulelong !0xffFFffFE \b, Mini FAT start sector 0x%x
  23817. # total number of sectors used for the short-sector allocation table
  23818. >>>64 ulelong !1 \b, %u Mini FAT sector
  23819. # plural s
  23820. >>>>64 ulelong >1 \bs
  23821. # SecID of first sector of the master sector allocation table (DIFAT)
  23822. # or -2 (End Of Chain SecID) if no additional sectors used
  23823. >>>68 ulelong !0xffFFffFE \b, DIFAT start sector 0x%x
  23824. # total number of sectors used for the master sector allocation table (DIFAT)
  23825. >>>72 ulelong >0 \b, %u DIFAT sectors
  23826. # First part of the master sector allocation table (DIFAT) containing 109 SecIDs
  23827. #>>>76 ubequad x \b, DIFAT=0x%16.16llx
  23828. #>>>84 ubequad x \b%16.16llx...
  23829. # pointer to root entry only works with standard configuration for SecID ~< 800h
  23830. # Red-Carpet-presentation-1.0-1.sdd sg10.sdv 2000_GA_Annual_Review_Data.xls
  23831. # "ORLEN Factbook 2017.xls" XnView_metadata.doc
  23832. # "Barham, Lisa - Die Shopping-Prinzessinnen.doc" then not recognized
  23833. >>>48 ulelong >0x800 too big for FILE_BYTES_MAX = 1 MiB
  23834. # Sector Shift Exponent 9~512 for major version 3 or C~4096 for major version 4
  23835. >>>0x1E uleshort 0xc \b, blocksize 4096
  23836. # jump to one block (4096 bytes per block) before root storage block
  23837. >>>>(48.l*4096) ubyte x
  23838. >>>>>&4095 use ole2-directory
  23839. #>>>0x1E uleshort 9 \b, blocksize 512
  23840. >>>0x1E uleshort 9
  23841. # jump to one block (512 bytes per block) before root storage block
  23842. # in 5.37 only true for offset ~< FILE_BYTES_MAX=7 MiB defined in ../../src/file.h
  23843. >>>>(48.l*512) ubyte x
  23844. >>>>>&511 use ole2-directory
  23845. # check directory entry structure and display types by GUID
  23846. 0 name ole2-directory
  23847. # directory entry name like "Root Entry"
  23848. #>0 lestring16 x \b, 1st %.10s
  23849. # type of the entry; 5~Root storage
  23850. #>66 ubyte x \b, type %x
  23851. # node colour of the entry: 00H ~ Red 01H ~ Black
  23852. #>67 ubyte x \b, color %x
  23853. # the DirIDs of the child nodes. Should both be -1 in the root storage entry
  23854. #>68 bequad !0xffffffffffffffff \b, DirIDs %llx
  23855. # second directory entry name like VisioDocument Control000
  23856. #>128 lestring16 x \b, 2nd %.20s
  23857. # third directory entry like WordDocument
  23858. #>256 lestring16 x \b, 3rd %.20s
  23859. # forth
  23860. #>384 lestring16 x \b, 4th %.10s
  23861. # 5th
  23862. #>512 lestring16 x \b, 5th %.10s
  23863. # 6th
  23864. #>640 lestring16 x \b, 6th %.10s
  23865. # 7th
  23866. #>768 lestring16 x \b, 7th %.10s
  23867. # https://wikileaks.org/ciav7p1/cms/page_13762814.html
  23868. # https://m.blog.naver.com/superman4u/40047693679
  23869. # https://misc.daniel-marschall.de/projects/guid_analysis/guid.txt
  23870. # http://www.windowstricks.in/online-windows-guid-converter
  23871. #>80 ubequad !0 \b, clsid 0x%16.16llx
  23872. #>>88 ubequad x \b%16.16llx
  23873. # test for "Root Entry" inside directory by type 5 value
  23874. >66 ubyte 5
  23875. # look for CLSID GUID 0
  23876. >>88 ubequad 0x0
  23877. >>>80 ubequad 0x0
  23878. # - Microstation V8 DGN files (www.bentley.com)
  23879. # URL: https://en.wikipedia.org/wiki/MicroStation
  23880. # Last update on 10/23/2006 by Lester Hightower
  23881. # 07/24/2019 by Joerg Jenderek
  23882. # Second directory entry name like Dgn~H Dgn~S
  23883. >>>>128 lestring16 Dgn~ : Microstation V8 CAD
  23884. #!:mime application/x-ole-storage
  23885. !:mime application/x-bentley-dgn
  23886. # http://www.q-cad.com/files/samples_cad_files/1344468165.dgn
  23887. !:ext dgn
  23888. #
  23889. # URL: http://fileformats.archiveteam.org/wiki/WordPerfect
  23890. # Second directory entry name PerfectOffice_
  23891. >>>>128 lestring16 PerfectOffice_ : WordPerfect 7-X3 presentations Master, Document or Graphic
  23892. !:mime application/vnd.wordperfect
  23893. # https://www.macdisk.com/macsigen.php "WPC2" for Wordperfect 2 *.wpd
  23894. !:apple ????WPC7
  23895. !:ext mst/wpd/wpg
  23896. #
  23897. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Word_Processor
  23898. # Second directory entry name MatOST_
  23899. >>>>128 lestring16 MatOST : Microsoft Works 3.0 document
  23900. !:mime application/vnd.ms-works
  23901. !:apple ????AWWP
  23902. !:ext wps
  23903. #
  23904. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Spreadsheet
  23905. # 3rd directory entry name WksSSWorkBook
  23906. >>>>256 lestring16 WksSSWorkBook : Microsoft Works 6-9 spreadsheet
  23907. !:mime application/vnd.ms-works
  23908. !:apple ????AWSS
  23909. !:ext xlr
  23910. #
  23911. # URL: http://fileformats.archiveteam.org/wiki/XLS
  23912. # what is the difference to {00020820-0000-0000-c000-000000000046} ?
  23913. # Second directory entry name Workbook
  23914. >>>>128 lestring16 Workbook
  23915. >>>>>256 lestring16 !WksSSWorkBook : Microsoft Excel 97-2003 worksheet 0 clsid
  23916. !:mime application/vnd.ms-excel
  23917. # https://www.macdisk.com/macsigen.php XLS5 for Excel 5
  23918. !:apple ????XLS9
  23919. !:ext xls
  23920. #
  23921. # URL: http://fileformats.archiveteam.org/wiki/PPT
  23922. # Second directory entry name Object1 Object12 Object35
  23923. >>>>128 lestring16 Object : Microsoft PowerPoint 4 presentation
  23924. !:mime application/vnd.ms-powerpoint
  23925. # https://www.macdisk.com/macsigen.php
  23926. !:apple ????PPT3
  23927. !:ext ppt
  23928. #
  23929. # URL: https://www.msoutlook.info/question/164
  23930. # Second directory entry name __CollDataStm
  23931. >>>>128 lestring16 __CollDataStm : Microsoft Outlook Send Receive Settings
  23932. #!:mime application/vnd.ms-outlook
  23933. !:mime application/x-ms-srs
  23934. # %APPDATA%\Microsoft\Outlook\Outlook.srs
  23935. !:ext srs
  23936. #
  23937. # URL: https://www.file-extensions.org/cag-file-extension
  23938. # Second directory entry name Category
  23939. >>>>128 lestring16 Category : Microsoft Clip Art Gallery
  23940. #!:mime application/x-ole-storage
  23941. !:mime application/x-ms-cag
  23942. !:apple MScgCGdb
  23943. !:ext cag/
  23944. #
  23945. # URL: https://www.filesuffix.com/de/extension/rra
  23946. # 3rd directory entry name StrIndex_StringTable
  23947. >>>>256 lestring16 StrIndex_StringTable : Windows temporarily installer
  23948. #!:mime application/x-ole-storage
  23949. !:mime application/x-ms-rra
  23950. !:ext rra
  23951. #
  23952. # URL: https://www.forensicswiki.org/wiki/Jump_Lists
  23953. # 3rd directory entry name DestList
  23954. >>>>256 lestring16 DestList : Windows jump list
  23955. #!:mime application/x-ole-storage
  23956. !:mime application/x-ms-jumplist
  23957. # %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*.automaticDestinations-ms
  23958. !:ext automaticDestinations-ms
  23959. #
  23960. # URL: https://en.wikipedia.org/wiki/Windows_thumbnail_cache
  23961. # Second directory entry name 256_
  23962. >>>>128 lestring16 256_ : Windows thumbnail database 256
  23963. #!:mime application/x-ole-storage
  23964. !:mime application/x-ms-thumbnail
  23965. # Thumbs.db
  23966. !:ext db
  23967. >>>>128 lestring16 96_ : Windows thumbnail database 96
  23968. !:mime application/x-ms-thumbnail
  23969. !:ext db
  23970. # 3rd directory entry name Catalog_
  23971. >>>>256 lestring16 Catalog : Windows thumbnail database
  23972. !:mime application/x-ms-thumbnail
  23973. !:ext db
  23974. #
  23975. # URL: https://support.microsoft.com/en-us/help/300887/how-to-use-system-information-msinfo32-command-line-tool-switches
  23976. # Note: older Microsoft Systeminfo (MSInfo Configuration File of msinfo32); newer use xml based
  23977. # Second directory entry name Control000
  23978. >>>>128 lestring16 Control000 : Microsoft old Systeminfo
  23979. #!:mime application/x-ole-storage
  23980. !:mime application/x-ms-info
  23981. !:ext nfo
  23982. #
  23983. # URL: http://fileformats.archiveteam.org/wiki/Corel_Print_House
  23984. # Second directory entry name Thumbnail
  23985. >>>>128 lestring16 Thumbnail : Corel PrintHouse image
  23986. #!:mime application/x-ole-storage
  23987. !:mime application/x-corel-cph
  23988. !:ext cph
  23989. # 3rd directory entry name Thumbnail
  23990. >>>>256 lestring16 Thumbnail : Corel PrintHouse image
  23991. !:mime application/x-corel-cph
  23992. !:ext cph
  23993. # URL: http://fileformats.archiveteam.org/wiki/Corel_Gallery
  23994. # Note: format since Gallery 2; sometimes called Corel Multimedia Manager Album
  23995. # third directory entry name _INFO_
  23996. >>>>256 lestring16 _INFO_ : Corel Gallery
  23997. # second directory entry name _ITEM_ or _DATA_
  23998. # later directory entry names: _ALBUM_ _THUMBNAIL_
  23999. #!:mime application/x-ole-storage
  24000. !:mime application/x-corel-gal
  24001. !:ext gal
  24002. #
  24003. # URL: https://en.wikipedia.org/wiki/Hangul_(word_processor)
  24004. # Note: "HWP Document File" signature found in FileHeader
  24005. # Second directory entry name FileHeader hint for Thinkfree Office document
  24006. >>>>128 lestring16 FileHeader : Hangul (Korean) 5.0 Word Processor File
  24007. #!:mime application/haansofthwp
  24008. !:mime application/x-hwp
  24009. # https://example-files.online-convert.com/document/hwp/example.hwp
  24010. !:ext hwp
  24011. #
  24012. # URL: https://ask.libreoffice.org/en/question/26303/creating-new-themes-for-the-gallery-not-functioning/
  24013. # Second directory entry name like dd2000 dd2001 dd2036 dd2060 dd2083
  24014. >>>>128 lestring16 dd2 : StarOffice Gallery view
  24015. #!:mime application/x-ole-storage
  24016. !:mime application/x-star-sdv
  24017. !:ext sdv
  24018. # URL: https://en.wikipedia.org/wiki/SoftMaker_Office
  24019. # second directory entry name Current User
  24020. >>>>128 lestring16 Current\ User : SoftMaker
  24021. # third directory entry name SMNativeObjData
  24022. >>>>>256 lestring16 SMNativeObjData
  24023. # 5th directory entry name PowerPoint
  24024. >>>>>>512 lestring16 PowerPoint PowerPoint presentation or template
  24025. !:mime application/vnd.ms-powerpoint
  24026. !:ext ppt/pps/pot
  24027. # 4th directory entry name PowerPoint
  24028. >>>>>384 lestring16 PowerPoint Presentations or template
  24029. # http://extension.nirsoft.net/prv
  24030. !:mime application/vnd.softmaker.presentations
  24031. !:ext prd/prv
  24032. # third directory entry name like Current User
  24033. >>>>256 lestring16 Current\ User : SoftMaker
  24034. # 5th directory entry name PowerPoint
  24035. >>>>>512 lestring16 PowerPoint Presentations or template
  24036. # http://extension.nirsoft.net/prd
  24037. !:mime application/vnd.softmaker.presentations
  24038. !:ext prd/prv
  24039. # 2nd directory entry name Pictures
  24040. >>>>>>128 lestring16 Pictures with pictures
  24041. # remaining null clsid
  24042. >>>>128 default x : UNKNOWN
  24043. # second directory entry name like VisioDocument Control000
  24044. >>>>>128 lestring16 x with names %.20s
  24045. # third directory entry like WordDocument
  24046. >>>>>256 lestring16 x %.20s
  24047. # forth
  24048. >>>>>384 lestring16 x %.20s
  24049. !:mime application/x-ole-storage
  24050. # look for known clsid GUID
  24051. # - Visio documents
  24052. # URL: http://fileformats.archiveteam.org/wiki/Visio
  24053. # Last update on 10/23/2006 by Lester Hightower, 07/20/2019 by Joerg Jenderek
  24054. >>88 ubequad 0xc000000000000046 : Microsoft
  24055. >>>80 ubequad 0x131a020000000000 Visio 2000-2002 Document, stencil or template
  24056. !:mime application/vnd.visio
  24057. # VSD~Drawing VSS~Stencil VST~Template
  24058. !:ext vsd/vss/vst
  24059. >>>80 ubequad 0x141a020000000000 Visio 2003-2010 Document, stencil or template
  24060. !:mime application/vnd.visio
  24061. !:ext vsd/vss/vst
  24062. #
  24063. # URL: http://fileformats.archiveteam.org/wiki/Windows_Installer
  24064. >>>80 ubequad 0x84100c0000000000 Windows Installer Package
  24065. !:mime application/x-msi
  24066. #!:mime application/x-ms-win-installer
  24067. !:ext msi
  24068. >>>80 ubequad 0x86100c0000000000 Windows Installer Patch
  24069. # ??
  24070. !:mime application/x-wine-extension-msp
  24071. #!:mime application/x-ms-msp
  24072. !:ext msp
  24073. #
  24074. # URL: http://fileformats.archiveteam.org/wiki/DOC
  24075. >>>80 ubequad 0x0009020000000000 Word 6-95 document or template
  24076. !:mime application/msword
  24077. # for template MSWDW8TN
  24078. !:apple MSWDWDBN
  24079. !:ext doc/dot
  24080. >>>80 ubequad 0x0609020000000000 Word 97-2003 document or template
  24081. !:mime application/msword
  24082. !:apple MSWDWDBN
  24083. # dot for template; no extension on Macintosh
  24084. !:ext doc/dot/
  24085. #
  24086. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Word_Processor
  24087. >>>80 ubequad 0x0213020000000000 Works 3-4 document or template
  24088. !:mime application/vnd.ms-works
  24089. !:apple ????AWWP
  24090. # ps for template https://filext.com/file-extension/PS bps for backup
  24091. !:ext wps/ps/bps
  24092. #
  24093. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Database
  24094. >>>80 ubequad 0x0313020000000000 Works 3-4 database or template
  24095. !:mime application/vnd.ms-works-db
  24096. # https://www.macdisk.com/macsigen.php
  24097. !:apple ????AWDB
  24098. # db for template www.file-extensions.org/db-file-extension-microsoft-works-data bdb for backup
  24099. !:ext wdb/db/bdb
  24100. #
  24101. # URL: https://en.wikipedia.org/wiki/Microsoft_Excel
  24102. >>>80 ubequad 0x1008020000000000 Excel 5-95 worksheet, addin or template
  24103. !:mime application/vnd.ms-excel
  24104. # https://www.macdisk.com/macsigen.php
  24105. !:apple ????XLS5
  24106. # worksheet/addin/template/no extension on Macintosh
  24107. !:ext xls/xla/xlt/
  24108. #
  24109. >>>80 ubequad 0x2008020000000000 Excel 97-2003
  24110. !:mime application/vnd.ms-excel
  24111. # https://www.macdisk.com/macsigen.php XLS5 for Excel 5
  24112. !:apple ????XLS9
  24113. # 3rd directory entry name
  24114. >>>>256 lestring16 _VBA_PROJECT_CUR addin
  24115. !:ext xla/
  24116. # 4th directory entry name
  24117. >>>>384 lestring16 _VBA_PROJECT_CUR addin
  24118. !:ext xla
  24119. #!:ext xla/
  24120. >>>>256 default x worksheet or template
  24121. !:ext xls/xlt
  24122. #!:ext xls/xlt/
  24123. #
  24124. # URL: http://fileformats.archiveteam.org/wiki/OLE2
  24125. >>>80 ubequad 0x0b0d020000000000 Outlook 97-2003 item
  24126. #>>>80 ubequad 0x0b0d020000000000 Outlook 97-2003 Message
  24127. #!:mime application/vnd.ms-outlook
  24128. !:mime application/x-ms-msg
  24129. !:ext msg
  24130. # URL: https://wiki.fileformat.com/email/oft/
  24131. >>>80 ubequad 0x46f0060000000000 Outlook 97-2003 item template
  24132. #!:mime application/vnd.ms-outlook
  24133. !:mime application/x-ms-oft
  24134. !:ext oft
  24135. #
  24136. # URL: http://fileformats.archiveteam.org/wiki/PPT
  24137. >>>80 ubequad 0x5148040000000000 PowerPoint 4.0 presentation
  24138. !:mime application/vnd.ms-powerpoint
  24139. # https://www.macdisk.com/macsigen.php
  24140. !:apple ????PPT3
  24141. !:ext ppt
  24142. #??
  24143. # URL: http://www.checkfilename.com/view-details/Microsoft-Works/RespageIndex/0/sTab/2/
  24144. >>88 ubequad 0xa29a00aa004a1a72 : Microsoft
  24145. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Word_Processor
  24146. >>>80 ubequad 0xc2dbcd28e20ace11 Works 4 document
  24147. !:mime application/vnd.ms-works
  24148. !:apple ????AWWP
  24149. !:ext wps
  24150. #
  24151. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Database
  24152. >>>80 ubequad 0xc3dbcd28e20ace11 Works 4 database
  24153. !:mime application/vnd.ms-works-db
  24154. !:apple ????AWDB
  24155. !:ext wdb/bdb
  24156. #??
  24157. >>88 ubequad 0xa40700c04fb932ba : Microsoft
  24158. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Word_Processor
  24159. >>>80 ubequad 0xb25aa40e0a9ed111 Works 5-6 document
  24160. !:mime application/vnd.ms-works
  24161. !:apple ????AWWP
  24162. !:ext wps
  24163. #??
  24164. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Publisher
  24165. >>88 ubequad 0x00c0000000000046 : Microsoft
  24166. >>>80 ubequad 0x0112020000000000 Publisher
  24167. !:mime application/vnd.ms-publisher
  24168. !:ext pub
  24169. #
  24170. # URL: http://fileformats.archiveteam.org/wiki/PPT
  24171. #??
  24172. >>88 ubequad 0xa90300aa00510ea3 : Microsoft
  24173. >>>80 ubequad 0x70ae7bea3bfbcd11 PowerPoint 95 presentation
  24174. !:mime application/vnd.ms-powerpoint
  24175. # https://www.macdisk.com/macsigen.php
  24176. !:apple ????PPT3
  24177. !:ext ppt/pot
  24178. #??
  24179. >>88 ubequad 0x86ea00aa00b929e8 : Microsoft
  24180. >>>80 ubequad 0x108d81649b4fcf11 PowerPoint 97-2003 presentation or template
  24181. !:mime application/vnd.ms-powerpoint
  24182. !:apple ????PPT3
  24183. # /autostart/template
  24184. !:ext ppt/pps/pot
  24185. #
  24186. # URL: https://en.wikipedia.org/wiki/Microsoft_Project
  24187. #??
  24188. >>88 ubequad 0xbe1100c04fb6faf1 : Microsoft
  24189. >>>80 ubequad 0x3a8fb774c8c8d111 Project
  24190. !:mime application/vnd.ms-project
  24191. !:ext mpp
  24192. #
  24193. # URL: http://fileformats.archiveteam.org/wiki/SHW_(Corel)
  24194. #???
  24195. >>88 ubequad 0x99ae04021c007002 : WordPerfect
  24196. >>>80 ubequad 0x62fe2e4099191b10 7-X3 presentation
  24197. !:mime application/x-corelpresentations
  24198. #!:mime application/x-shw-viewer
  24199. #!:mime image/x-presentations
  24200. !:ext shw
  24201. #
  24202. # URL: http://www.checkfilename.com/view-details/WordPerfect-Office-X3/RespageIndex/0/sTab/2/
  24203. >>>80 ubequad 0x60fe2e4099191b10 9 Graphic
  24204. #!:mime application/x-wpg
  24205. #!:mime image/x-wordperfect-graphics
  24206. !:mime image/x-wpg
  24207. # https://www.macdisk.com/macsigen.php "WPC2" for Wordperfect 2 *.wpd
  24208. !:apple ????WPC9
  24209. !:ext wpg
  24210. #
  24211. # URL: http://fileformats.archiveteam.org/wiki/StarOffice_binary_formats
  24212. >>88 ubequad 0x996104021c007002 : StarOffice
  24213. >>>80 ubequad 0x407e5cdc5cb31b10 StarWriter 3.0 document or template
  24214. # https://www.openoffice.org/framework/documentation/mimetypes/mimetypes.html
  24215. !:mime application/x-starwriter
  24216. !:ext sdw/vor
  24217. #
  24218. >>>80 ubequad 0xa03f543fa6b61b10 StarCalc 3.0 spreadsheet or template
  24219. !:mime application/x-starcalc
  24220. !:ext sdc/vor
  24221. #
  24222. >>>80 ubequad 0xe0aa10af6db31b10 StarDraw 3.0 drawing or template
  24223. !:mime application/x-starimpress
  24224. #!:mime application/x-stardraw
  24225. # sda ??
  24226. !:ext sdd/sda/vor
  24227. #??
  24228. >>88 ubequad 0x89cb008029e4b0b1 : StarOffice
  24229. >>>80 ubequad 0x41d461633542d011 StarCalc 4.0 spreadsheet or template
  24230. !:mime application/x-starcalc
  24231. !:ext sdc/vor
  24232. #
  24233. >>>80 ubequad 0x61b8a5c6d685d111 StarCalc 5.0 spreadsheet or template
  24234. !:mime application/vnd.stardivision.cal
  24235. !:ext sdc/vor
  24236. #
  24237. >>>80 ubequad 0xc03c2d011642d011 StarImpress 4.0 presentation or template
  24238. !:mime application/x-starimpress
  24239. !:ext sdd/vor
  24240. #??
  24241. >>88 ubequad 0xb12a04021c007002 : StarOffice
  24242. >>>80 ubequad 0x600459d4fd351c10 StarMath 3.0
  24243. !:mime application/x-starmath
  24244. !:ext smf
  24245. #??
  24246. >>88 ubequad 0x8e2c00001b4cc711 : StarOffice
  24247. >>>80 ubequad 0xe0999cfb6d2c1c10 StarChart 3.0
  24248. !:mime application/x-starchart
  24249. !:ext sds
  24250. #??
  24251. >>88 ubequad 0xa45e00a0249d57b1 : StarOffice
  24252. >>>80 ubequad 0xb0e9048b0e42d011 StarWriter 4.0 document or template
  24253. !:mime application/x-starwriter
  24254. !:ext sdw/vor
  24255. #??
  24256. >>88 ubequad 0x89ca008029e4b0b1 : StarOffice
  24257. >>>80 ubequad 0xe1b7b3022542d011 StarMath 4.0
  24258. !:mime application/x-starmath
  24259. !:ext smf
  24260. #
  24261. >>>80 ubequad 0xe0b7b3022542d011 StarChart 4.0
  24262. !:mime application/x-starchart
  24263. !:ext sds
  24264. #??
  24265. >>88 ubequad 0xa53f00a0249d57b1 : StarOffice
  24266. >>>80 ubequad 0x70c90a340de3d011 Master 4.0 document
  24267. !:mime application/x-starwriter-global
  24268. !:ext sgl
  24269. #??
  24270. >>88 ubequad 0x89d0008029e4b0b1 : StarOffice
  24271. >>>80 ubequad 0x40e6b5ffde85d111 StarMath 5.0
  24272. !:mime application/vnd.stardivision.math
  24273. !:ext smf
  24274. #
  24275. >>>80 ubequad 0xa005892ebd85d111 StarDraw 5.0 drawing or template
  24276. !:mime application/vnd.stardivision.draw
  24277. !:ext sda/vor
  24278. #
  24279. >>>80 ubequad 0x21725c56bc85d111 StarImpress 5.0 presentation or template
  24280. !:mime application/vnd.stardivision.impress
  24281. # sda is used for what?
  24282. !:ext sdd/vor/sda
  24283. #
  24284. >>>80 ubequad 0x214388bfdd85d111 StarChart 5.0
  24285. !:mime application/vnd.stardivision.chart
  24286. !:ext sds
  24287. # ??
  24288. >>88 ubequad 0xaab4006097da561a : StarOffice
  24289. >>>80 ubequad 0xd1f90cc2ae85d111 StarWriter 5.0 document or template
  24290. !:mime application/vnd.stardivision.writer
  24291. !:ext sdw/vor
  24292. #
  24293. >>>80 ubequad 0xd3f90cc2ae85d111 Master 5.0 document
  24294. !:mime application/vnd.stardivision.writer-global
  24295. !:ext sgl
  24296. #??
  24297. # URL: http://fileformats.archiveteam.org/wiki/FlashPix
  24298. >>88 ubequad 0x855300aa00a1f95b : Kodak
  24299. >>>80 ubequad 0x0067615654c1ce11 FlashPIX Image
  24300. !:mime image/vnd.fpx
  24301. !:apple ????FPix
  24302. !:ext fpx
  24303. # URL: https://en.wikipedia.org/wiki/SoftMaker_Office
  24304. >>88 ubequad 0x95f600a0cc3cca14 : PlanMaker
  24305. >>>80 ubequad 0x9174088a6452d411 document or template
  24306. !:mime application/vnd.softmaker.planmaker
  24307. # pmv for template https://www.file-extensions.org/pmv-file-extension
  24308. !:ext pmd/pmv
  24309. # remaining non null clsid
  24310. >>88 default x : UNKNOWN
  24311. !:mime application/x-ole-storage
  24312. >>>80 ubequad !0 \b, clsid 0x%16.16llx
  24313. >>>88 ubequad x \b%16.16llx
  24314. #------------------------------------------------------------------------------
  24315. # $File: olf,v 1.4 2009/09/19 16:28:11 christos Exp $
  24316. # olf: file(1) magic for OLF executables
  24317. #
  24318. # We have to check the byte order flag to see what byte order all the
  24319. # other stuff in the header is in.
  24320. #
  24321. # MIPS R3000 may also be for MIPS R2000.
  24322. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  24323. #
  24324. # Created by Erik Theisen <etheisen@openbsd.org>
  24325. # Based on elf from Daniel Quinlan <quinlan@yggdrasil.com>
  24326. 0 string \177OLF OLF
  24327. >4 byte 0 invalid class
  24328. >4 byte 1 32-bit
  24329. >4 byte 2 64-bit
  24330. >7 byte 0 invalid os
  24331. >7 byte 1 OpenBSD
  24332. >7 byte 2 NetBSD
  24333. >7 byte 3 FreeBSD
  24334. >7 byte 4 4.4BSD
  24335. >7 byte 5 Linux
  24336. >7 byte 6 SVR4
  24337. >7 byte 7 esix
  24338. >7 byte 8 Solaris
  24339. >7 byte 9 Irix
  24340. >7 byte 10 SCO
  24341. >7 byte 11 Dell
  24342. >7 byte 12 NCR
  24343. >5 byte 0 invalid byte order
  24344. >5 byte 1 LSB
  24345. >>16 leshort 0 no file type,
  24346. >>16 leshort 1 relocatable,
  24347. >>16 leshort 2 executable,
  24348. >>16 leshort 3 shared object,
  24349. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  24350. # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de>
  24351. >>16 leshort 4 core file
  24352. >>>(0x38+0xcc) string >\0 of '%s'
  24353. >>>(0x38+0x10) lelong >0 (signal %d),
  24354. >>16 leshort &0xff00 processor-specific,
  24355. >>18 leshort 0 no machine,
  24356. >>18 leshort 1 AT&T WE32100 - invalid byte order,
  24357. >>18 leshort 2 SPARC - invalid byte order,
  24358. >>18 leshort 3 Intel 80386,
  24359. >>18 leshort 4 Motorola 68000 - invalid byte order,
  24360. >>18 leshort 5 Motorola 88000 - invalid byte order,
  24361. >>18 leshort 6 Intel 80486,
  24362. >>18 leshort 7 Intel 80860,
  24363. >>18 leshort 8 MIPS R3000_BE - invalid byte order,
  24364. >>18 leshort 9 Amdahl - invalid byte order,
  24365. >>18 leshort 10 MIPS R3000_LE,
  24366. >>18 leshort 11 RS6000 - invalid byte order,
  24367. >>18 leshort 15 PA-RISC - invalid byte order,
  24368. >>18 leshort 16 nCUBE,
  24369. >>18 leshort 17 VPP500,
  24370. >>18 leshort 18 SPARC32PLUS,
  24371. >>18 leshort 20 PowerPC,
  24372. >>18 leshort 0x9026 Alpha,
  24373. >>20 lelong 0 invalid version
  24374. >>20 lelong 1 version 1
  24375. >>36 lelong 1 MathCoPro/FPU/MAU Required
  24376. >8 string >\0 (%s)
  24377. >5 byte 2 MSB
  24378. >>16 beshort 0 no file type,
  24379. >>16 beshort 1 relocatable,
  24380. >>16 beshort 2 executable,
  24381. >>16 beshort 3 shared object,
  24382. >>16 beshort 4 core file,
  24383. >>>(0x38+0xcc) string >\0 of '%s'
  24384. >>>(0x38+0x10) belong >0 (signal %d),
  24385. >>16 beshort &0xff00 processor-specific,
  24386. >>18 beshort 0 no machine,
  24387. >>18 beshort 1 AT&T WE32100,
  24388. >>18 beshort 2 SPARC,
  24389. >>18 beshort 3 Intel 80386 - invalid byte order,
  24390. >>18 beshort 4 Motorola 68000,
  24391. >>18 beshort 5 Motorola 88000,
  24392. >>18 beshort 6 Intel 80486 - invalid byte order,
  24393. >>18 beshort 7 Intel 80860,
  24394. >>18 beshort 8 MIPS R3000_BE,
  24395. >>18 beshort 9 Amdahl,
  24396. >>18 beshort 10 MIPS R3000_LE - invalid byte order,
  24397. >>18 beshort 11 RS6000,
  24398. >>18 beshort 15 PA-RISC,
  24399. >>18 beshort 16 nCUBE,
  24400. >>18 beshort 17 VPP500,
  24401. >>18 beshort 18 SPARC32PLUS,
  24402. >>18 beshort 20 PowerPC or cisco 4500,
  24403. >>18 beshort 21 cisco 7500,
  24404. >>18 beshort 24 cisco SVIP,
  24405. >>18 beshort 25 cisco 7200,
  24406. >>18 beshort 36 cisco 12000,
  24407. >>18 beshort 0x9026 Alpha,
  24408. >>20 belong 0 invalid version
  24409. >>20 belong 1 version 1
  24410. >>36 belong 1 MathCoPro/FPU/MAU Required
  24411. #------------------------------------------------------------------------------
  24412. # $File: openfst,v 1.1 2019/09/30 15:58:24 christos Exp $
  24413. # openfs: file(1) magic for OpenFST (Weighted finite-state tranducer library)
  24414. 0 long 0x7eb2fdd6 OpenFst binary FST data
  24415. >&0 pstring/l x \b, fst type: %s
  24416. >>&0 pstring/l x \b, arc type: %s
  24417. >>>&0 long x \b, version: %d
  24418. >>>>&20 quad x \b, num states: %lld
  24419. >>>>>&0 quad >0 \b, num arcs: %lld
  24420. 0 long 0x56515c OpenFst binary FAR data, far type: stlist
  24421. >4 long x \b, version: %d
  24422. 0 long 0x7eb2f35c OpenFst binary FAR data, far type: sttable
  24423. >4 long x \b, version: %d
  24424. #------------------------------------------------------------
  24425. # $File: opentimestamps,v 1.1 2019/05/27 01:27:31 christos Exp $
  24426. # OpenTimestamps related magic entries
  24427. # https://opentimestamps.org/
  24428. # https://en.wikipedia.org/wiki/OpenTimestamps
  24429. # "Emanuele Cisbani" <emanuele.cisbani@gmail.com>
  24430. #------------------------------------------------------------
  24431. # OpenTimestamps Proof .ots format.
  24432. # Magic is defined here:
  24433. # https://github.com/opentimestamps/python-opentimestamps/\
  24434. # blob/master/opentimestamps/core/timestamp.py#L273
  24435. 0 string \x00\x4f\x70\x65\x6e\x54\x69\x6d\x65\x73\x74\x61\x6d\x70\x73\x00 OpenTimestamps
  24436. >16 string \x00\x50\x72\x6f\x6f\x66\x00\xbf\x89\xe2\xe8\x84\xe8\x92\x94\x01 Proof
  24437. #------------------------------------------------------------------------------
  24438. # $File: os2,v 1.11 2020/08/30 16:22:20 christos Exp $
  24439. # os2: file(1) magic for OS/2 files
  24440. #
  24441. # Provided 1998/08/22 by
  24442. # David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
  24443. 1 search/100 InternetShortcut MS Windows 95 Internet shortcut text
  24444. >17 search/100 URL= (URL=<
  24445. >>&0 string x \b%s>)
  24446. # OS/2 URL objects
  24447. # Provided 1998/08/22 by
  24448. # David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
  24449. #0 string http: OS/2 URL object text
  24450. #>5 string >\ (WWW) <http:%s>
  24451. #0 string mailto: OS/2 URL object text
  24452. #>7 string >\ (email) <%s>
  24453. #0 string news: OS/2 URL object text
  24454. #>5 string >\ (Usenet) <%s>
  24455. #0 string ftp: OS/2 URL object text
  24456. #>4 string >\ (FTP) <ftp:%s>
  24457. #0 string file: OS/2 URL object text
  24458. #>5 string >\ (Local file) <%s>
  24459. # >>>>> OS/2 INF/HLP <<<<< (source: Daniel Dissett ddissett@netcom.com)
  24460. # URL: http://fileformats.archiveteam.org/wiki/INF/HLP_(OS/2)
  24461. # Reference: http://www.edm2.com/0308/inf.html
  24462. # Carl Hauser (chauser.parc@xerox.com) and
  24463. # Marcus Groeber (marcusg@ph-cip.uni-koeln.de)
  24464. # list the following header format in inf02a.doc:
  24465. #
  24466. # int16 ID; // ID magic word (5348h = "HS")
  24467. # int8 unknown1; // unknown purpose, could be third letter of ID
  24468. # int8 flags; // probably a flag word...
  24469. # // bit 0: set if INF style file
  24470. # // bit 4: set if HLP style file
  24471. # // patching this byte allows reading HLP files
  24472. # // using the VIEW command, while help files
  24473. # // seem to work with INF settings here as well.
  24474. # int16 hdrsize; // total size of header
  24475. # int16 unknown2; // unknown purpose
  24476. #
  24477. 0 string HSP\x01\x9b\x00 OS/2 INF
  24478. !:mime application/x-os2-inf
  24479. !:ext inf
  24480. >107 string >0 (%s)
  24481. 0 string HSP\x10\x9b\x00 OS/2 HLP
  24482. !:mime application/x-os2-hlp
  24483. !:ext hlp
  24484. >107 string >0 (%s)
  24485. # From: Joerg Jenderek
  24486. # URL: http://fileformats.archiveteam.org/wiki/MSG_(OS/2)
  24487. # Reference: https://github.com/OS2World/UTIL-SYSTEM-MKMSGF/blob/master/mkmsgf.h
  24488. # Note: created by MKMSGF.EXE. Text source can be recreated by E_MSGF
  24489. # example like OS001H.MSG
  24490. 0 string \xffMKMSGF\0 OS/2 help message
  24491. !:mime application/x-os2-msg
  24492. !:ext msg
  24493. # identifier[3] like: DOS NET REX SYS ...
  24494. >8 string x '%.3s'
  24495. # msgnumber: number of messages
  24496. >11 uleshort x \b, %u messages
  24497. # firstmsgnumber; number of the first message like: some times 0 often 1 169 1000 3502
  24498. >13 uleshort >1 \b, 1st number %u
  24499. # offset16bit; 1~Index table has 16-bit offsets (files<64k) 0~Index table has 32-bit offsets
  24500. >15 ubyte =0 \b, 32-bit
  24501. #>15 ubyte =1 \b, 16-bit
  24502. # version; file version: 2~new 0~old
  24503. >16 uleshort !2 \b, version %u
  24504. # indextaboffset; offset of index table: 1F~after header 0~no index table for version 0?
  24505. >18 uleshort >0
  24506. >>18 uleshort !0x1f \b, at 0x%x index
  24507. # 32-bit offset
  24508. >>15 ubyte =0
  24509. # offset with message table
  24510. >>>(18.s) ulelong x \b, at 0x%x
  24511. # 1st message
  24512. # http://www.os2museum.com/files/docs/os210ptk/os2-1.0-ptk-tools-1988.pdf
  24513. # message type: E~Error H~Help I~Information P~Prompt W~Warning ?
  24514. >>>>(&-4.l) ubyte x %c-type
  24515. >>>>>&0 string x %s
  24516. # 16-bit offset
  24517. >>15 ubyte =1
  24518. # msgnum; message number
  24519. >>>(18.s) uleshort x \b, number %u
  24520. # msgindex; offset of message from begin of file
  24521. >>>(18.s+2) uleshort x at 0x%x
  24522. # message type E H I P W ?
  24523. >>>>(&-2.s) ubyte x %c-type
  24524. # skip newline carriage return
  24525. >>>>>&0 ubeshort =0x0D0a
  24526. >>>>>>&0 string x %s
  24527. >>>>>&0 ubeshort !0x0D0a
  24528. >>>>>>&-2 string x %s
  24529. # for version 0 index table apparently at offset 1F
  24530. >16 uleshort 0
  24531. >>15 ubyte 1
  24532. # 1st message 16-bit
  24533. >>>0x1F uleshort x \b, at 0x%x
  24534. # message type: E~Error H~Help I~Information P~Prompt W~Warning ?
  24535. >>>>(0x1F.s) ubyte x %c-type
  24536. >>>>>&0 string x %s
  24537. # 2nd message 16-bit
  24538. >>>0x21 uleshort x \b, at 0x%x
  24539. >>>>(0x21.s) ubyte x %c-type
  24540. >>>>>&0 string x %s
  24541. # 3rd message 16-bit
  24542. >>>0x23 uleshort x \b, at 0x%x
  24543. >>>>(0x23.s) ubyte x %c-type
  24544. >>>>>&0 string x %s
  24545. # version 0 32-bit
  24546. >>15 ubyte 0
  24547. # 1st message 32-bit
  24548. >>>0x1f ulelong x \b, at 0x%x
  24549. >>>>(0x1F.l) ubyte x %c-type
  24550. >>>>>&0 string x %s
  24551. # 2nd message 32-bit
  24552. >>>0x23 ulelong x \b, at 0x%x
  24553. >>>>(0x23.l) ubyte x %c-type
  24554. >>>>>&0 string x %s
  24555. # 3rd message 32-bit
  24556. >>>0x27 ulelong x \b, AT 0x%x
  24557. >>>>(0x27.l) ubyte x %c-type
  24558. >>>>>&0 string x %s
  24559. # countryinfo; offset of country info block: 0 for version 0
  24560. >20 uleshort !0 \b, at 0x%x countryinfo
  24561. # nextcoutryinfo
  24562. >>22 uleshort >0 \b, at 0x%x next
  24563. # reserved[5]; Must be 0
  24564. >>25 ulelong !0 \b, RESERVED 0x%x
  24565. >>(20.s) use os2-msg-info
  24566. # display country info block of MKMSGF message file
  24567. 0 name os2-msg-info
  24568. # bytesperchar; bytes per char: 1~SBCS 2~DBCS
  24569. >0 ubyte >1 \b, %u bytes/char
  24570. # reserved; Not known
  24571. >1 uleshort !0 \b, reserved 0x%x
  24572. # langfamilyID; language family ID like: 0~? 1~Arabic ... 7~German ... 9~English ... 34~Slovene
  24573. >3 uleshort >0 \b, language %u
  24574. # langversionID; like: 7_1~German 7_2~Swiss German 12_1~French 12_3~Canadian French
  24575. >>5 uleshort x \b_%u
  24576. # langfamilyID too high. This should not happen
  24577. >3 uleshort >34 (invalid language)
  24578. # codepagesnumber; number of codepages like: 1 2 ... 16
  24579. >7 uleshort x \b, %u code page
  24580. # plural s
  24581. >7 uleshort >1 \bs
  24582. # too many number of codepages. This should not happen
  24583. >7 uleshort >16 (Too many)
  24584. # codepages[16]; codepages list like 437 850 ...
  24585. >7 uleshort <17
  24586. # 1st code page
  24587. >>9 uleshort >0 %u
  24588. # possible 2nd code page number
  24589. >>>7 uleshort >1
  24590. >>>>11 uleshort x %u
  24591. # filename[260]; name of file like: dbaseos2.msg dde4c01e.msg os2ldr.mgr xdfh.msg ...
  24592. >41 string x \b, %s
  24593. # OS/2 INI (this is a guess)
  24594. 0 string \xff\xff\xff\xff\x14\0\0\0 OS/2 INI
  24595. !:mime application/x-os2-ini
  24596. !:ext ini
  24597. #------------------------------------------------------------------------------
  24598. # $File: os400,v 1.5 2009/09/19 16:28:11 christos Exp $
  24599. # os400: file(1) magic for IBM OS/400 files
  24600. #
  24601. # IBM OS/400 (i5/OS) Save file (SAVF) - gerardo.cacciari@gmail.com
  24602. # In spite of its quite variable format (due to internal memory page
  24603. # length differences between CISC and RISC versions of the OS) the
  24604. # SAVF structure hasn't suitable offsets to identify the catalog
  24605. # header in the first descriptor where there are some useful infos,
  24606. # so we must search in a somewhat large area for a particular string
  24607. # that represents the EBCDIC encoding of 'QSRDSSPC' (save/restore
  24608. # descriptor space) preceded by a two byte constant.
  24609. #
  24610. 1090 search/7393 \x19\xDB\xD8\xE2\xD9\xC4\xE2\xE2\xD7\xC3 IBM OS/400 save file data
  24611. >&212 byte 0x01 \b, created with SAVOBJ
  24612. >&212 byte 0x02 \b, created with SAVLIB
  24613. >&212 byte 0x07 \b, created with SAVCFG
  24614. >&212 byte 0x08 \b, created with SAVSECDTA
  24615. >&212 byte 0x0A \b, created with SAVSECDTA
  24616. >&212 byte 0x0B \b, created with SAVDLO
  24617. >&212 byte 0x0D \b, created with SAVLICPGM
  24618. >&212 byte 0x11 \b, created with SAVCHGOBJ
  24619. >&213 byte 0x44 \b, at least V5R4 to open
  24620. >&213 byte 0x43 \b, at least V5R3 to open
  24621. >&213 byte 0x42 \b, at least V5R2 to open
  24622. >&213 byte 0x41 \b, at least V5R1 to open
  24623. >&213 byte 0x40 \b, at least V4R5 to open
  24624. >&213 byte 0x3F \b, at least V4R4 to open
  24625. >&213 byte 0x3E \b, at least V4R3 to open
  24626. >&213 byte 0x3C \b, at least V4R2 to open
  24627. >&213 byte 0x3D \b, at least V4R1M4 to open
  24628. >&213 byte 0x3B \b, at least V4R1 to open
  24629. >&213 byte 0x3A \b, at least V3R7 to open
  24630. >&213 byte 0x35 \b, at least V3R6 to open
  24631. >&213 byte 0x36 \b, at least V3R2 to open
  24632. >&213 byte 0x34 \b, at least V3R1 to open
  24633. >&213 byte 0x31 \b, at least V3R0M5 to open
  24634. >&213 byte 0x30 \b, at least V2R3 to open
  24635. #------------------------------------------------------------------------------
  24636. # $File: os9,v 1.8 2017/03/17 21:35:28 christos Exp $
  24637. #
  24638. # Copyright (c) 1996 Ignatios Souvatzis. All rights reserved.
  24639. #
  24640. # Redistribution and use in source and binary forms, with or without
  24641. # modification, are permitted provided that the following conditions
  24642. # are met:
  24643. # 1. Redistributions of source code must retain the above copyright
  24644. # notice, this list of conditions and the following disclaimer.
  24645. # 2. Redistributions in binary form must reproduce the above copyright
  24646. # notice, this list of conditions and the following disclaimer in the
  24647. # documentation and/or other materials provided with the distribution.
  24648. #
  24649. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  24650. # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  24651. # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  24652. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  24653. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  24654. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  24655. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  24656. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  24657. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  24658. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24659. #
  24660. #
  24661. #
  24662. # OS9/6809 module descriptions:
  24663. #
  24664. 0 beshort 0x87CD OS9/6809 module:
  24665. #
  24666. >6 byte&0x0f 0x00 non-executable
  24667. >6 byte&0x0f 0x01 machine language
  24668. >6 byte&0x0f 0x02 BASIC I-code
  24669. >6 byte&0x0f 0x03 Pascal P-code
  24670. >6 byte&0x0f 0x04 C I-code
  24671. >6 byte&0x0f 0x05 COBOL I-code
  24672. >6 byte&0x0f 0x06 Fortran I-code
  24673. #
  24674. >6 byte&0xf0 0x10 program executable
  24675. >6 byte&0xf0 0x20 subroutine
  24676. >6 byte&0xf0 0x30 multi-module
  24677. >6 byte&0xf0 0x40 data module
  24678. #
  24679. >6 byte&0xf0 0xC0 system module
  24680. >6 byte&0xf0 0xD0 file manager
  24681. >6 byte&0xf0 0xE0 device driver
  24682. >6 byte&0xf0 0xF0 device descriptor
  24683. #
  24684. # OS9/m68k stuff (to be continued)
  24685. #
  24686. 0 beshort 0x4AFC OS9/68K module:
  24687. #
  24688. # attr
  24689. >0x14 byte&0x80 0x80 re-entrant
  24690. >0x14 byte&0x40 0x40 ghost
  24691. >0x14 byte&0x20 0x20 system-state
  24692. #
  24693. # lang:
  24694. #
  24695. >0x13 byte 1 machine language
  24696. >0x13 byte 2 BASIC I-code
  24697. >0x13 byte 3 Pascal P-code
  24698. >0x13 byte 4 C I-code
  24699. >0x13 byte 5 COBOL I-code
  24700. >0x13 byte 6 Fortran I-code
  24701. #
  24702. #
  24703. # type:
  24704. #
  24705. >0x12 byte 1 program executable
  24706. >0x12 byte 2 subroutine
  24707. >0x12 byte 3 multi-module
  24708. >0x12 byte 4 data module
  24709. >0x12 byte 11 trap library
  24710. >0x12 byte 12 system module
  24711. >0x12 byte 13 file manager
  24712. >0x12 byte 14 device driver
  24713. >0x12 byte 15 device descriptor
  24714. #------------------------------------------------------------------------------
  24715. # $File: osf1,v 1.7 2009/09/19 16:28:11 christos Exp $
  24716. #
  24717. # Mach magic number info
  24718. #
  24719. 0 long 0xefbe OSF/Rose object
  24720. # I386 magic number info
  24721. #
  24722. 0 short 0565 i386 COFF object
  24723. #------------------------------------------------------------------------------
  24724. # $File: palm,v 1.14 2019/04/19 00:42:27 christos Exp $
  24725. # palm: file(1) magic for PalmOS {.prc,.pdb}: applications, docfiles, and hacks
  24726. #
  24727. # Brian Lalor <blalor@hcirisc.cs.binghamton.edu>
  24728. # These are weak, byte 59 is not guaranteed to be 0 and there are
  24729. # 8 character identifiers at byte 60, one I found for appl is BIGb.
  24730. # What are the possibilities and where is this documented?
  24731. # The common header format for PalmOS .pdb/.prc files is
  24732. # {
  24733. # char name[ 32 ];
  24734. # Word attributes;
  24735. # Word version;
  24736. # DWord creationDate;
  24737. # DWord modificationDate;
  24738. # DWord lastBackupDate;
  24739. # DWord modificationNumber;
  24740. # DWord appInfoID;
  24741. # DWord sortInfoID;
  24742. # char type[4];
  24743. # char creator[4];
  24744. # DWord uniqueIDSeed;
  24745. # RecordListType recordList;
  24746. # };
  24747. #
  24748. # Datestamps are unsigned seconds since the MacOS epoch (Jan 1, 1904),
  24749. # or Unix/POSIX time + 2082844800.
  24750. 0 name aportisdoc
  24751. # date is supposed to be big-endian seconds since 1 Jan 1904, but many
  24752. # files contain the timestamp in little-endian or a completely
  24753. # nonsensical value...
  24754. #>36 bedate-2082844800 >0 \b, created %s
  24755. # compression: 1=uncomp, 2=orig, 0x4448=HuffDic
  24756. >(78.L) beshort =1 \b, uncompressed
  24757. # compressed
  24758. >(78.L) beshort >1
  24759. >>(78.L+4) belong x \b, %d bytes uncompressed
  24760. # appl
  24761. #60 string appl PalmOS application
  24762. #>0 string >\0 "%s"
  24763. # HACK
  24764. #60 string HACK HackMaster hack
  24765. #>0 string >\0 "%s"
  24766. # iSiloX e-book
  24767. 60 string SDocSilX iSiloX E-book
  24768. >0 string >\0 "%s"
  24769. # Mobipocket (www.mobipocket.com), donated by Carl Witty
  24770. # expanded by Ralf Brown
  24771. 60 string BOOKMOBI Mobipocket E-book
  24772. # MobiPocket stores a full title, pointed at by the belong at offset
  24773. # 0x54 in its header at (78.L), with length given by the belong at
  24774. # offset 0x58.
  24775. # there's no guarantee that the title string is null-terminated, but
  24776. # we currently can't specify a variable-length string where the length
  24777. # field is not at the start of the string; in practice, the data
  24778. # following the string always seems to start with a zero byte
  24779. >(78.L) belong x
  24780. >>&(&0x50.L-4) string >\0 "%s"
  24781. >0 use aportisdoc
  24782. >>(78.L+0x68) belong >0 \b, version %d
  24783. >>(78.L+0x1C) belong !0 \b, codepage %d
  24784. >>(78.L+0x0C) beshort >0 \b, encrypted (type %d)
  24785. # AportisDoc/PalmDOC
  24786. 60 string TEXtREAd AportisDoc/PalmDOC E-book
  24787. >0 string >\0 "%s"
  24788. >0 use aportisdoc
  24789. # Variety of PalmOS document types
  24790. # Michael-John Turner <mj@debian.org>
  24791. # Thanks to Hasan Umit Ezerce <humit@tr-net.net.tr> for his DocType
  24792. 60 string BVokBDIC BDicty PalmOS document
  24793. >0 string >\0 "%s"
  24794. 60 string DB99DBOS DB PalmOS document
  24795. >0 string >\0 "%s"
  24796. 60 string vIMGView FireViewer/ImageViewer PalmOS document
  24797. >0 string >\0 "%s"
  24798. 60 string PmDBPmDB HanDBase PalmOS document
  24799. >0 string >\0 "%s"
  24800. 60 string InfoINDB InfoView PalmOS document
  24801. >0 string >\0 "%s"
  24802. 60 string ToGoToGo iSilo PalmOS document
  24803. >0 string >\0 "%s"
  24804. 60 string JfDbJBas JFile PalmOS document
  24805. >0 string >\0 "%s"
  24806. 60 string JfDbJFil JFile Pro PalmOS document
  24807. >0 string >\0 "%s"
  24808. 60 string DATALSdb List PalmOS document
  24809. >0 string >\0 "%s"
  24810. 60 string Mdb1Mdb1 MobileDB PalmOS document
  24811. >0 string >\0 "%s"
  24812. 60 string PNRdPPrs PeanutPress PalmOS document
  24813. >0 string >\0 "%s"
  24814. 60 string DataPlkr Plucker PalmOS document
  24815. >0 string >\0 "%s"
  24816. 60 string DataSprd QuickSheet PalmOS document
  24817. >0 string >\0 "%s"
  24818. 60 string SM01SMem SuperMemo PalmOS document
  24819. >0 string >\0 "%s"
  24820. 60 string TEXtTlDc TealDoc PalmOS document
  24821. >0 string >\0 "%s"
  24822. 60 string InfoTlIf TealInfo PalmOS document
  24823. >0 string >\0 "%s"
  24824. 60 string DataTlMl TealMeal PalmOS document
  24825. >0 string >\0 "%s"
  24826. 60 string DataTlPt TealPaint PalmOS document
  24827. >0 string >\0 "%s"
  24828. 60 string dataTDBP ThinkDB PalmOS document
  24829. >0 string >\0 "%s"
  24830. 60 string TdatTide Tides PalmOS document
  24831. >0 string >\0 "%s"
  24832. 60 string ToRaTRPW TomeRaider PalmOS document
  24833. >0 string >\0 "%s"
  24834. # A GutenPalm zTXT etext for use on Palm Pilots (http://gutenpalm.sf.net)
  24835. # For version 1.xx zTXTs, outputs version and numbers of bookmarks and
  24836. # annotations.
  24837. # For other versions, just outputs version.
  24838. #
  24839. 60 string zTXT A GutenPalm zTXT e-book
  24840. >0 string >\0 "%s"
  24841. >(0x4E.L) byte 0
  24842. >>(0x4E.L+1) byte x (v0.%02d)
  24843. >(0x4E.L) byte 1
  24844. >>(0x4E.L+1) byte x (v1.%02d)
  24845. >>>(0x4E.L+10) beshort >0
  24846. >>>>(0x4E.L+10) beshort <2 - 1 bookmark
  24847. >>>>(0x4E.L+10) beshort >1 - %d bookmarks
  24848. >>>(0x4E.L+14) beshort >0
  24849. >>>>(0x4E.L+14) beshort <2 - 1 annotation
  24850. >>>>(0x4E.L+14) beshort >1 - %d annotations
  24851. >(0x4E.L) byte >1 (v%d.
  24852. >>(0x4E.L+1) byte x %02d)
  24853. # Palm OS .prc file types
  24854. 60 string libr
  24855. # flags, only bit 0 or bit 6
  24856. # https://en.wikipedia.org/wiki/PRC_%28Palm_OS%29
  24857. # https://web.mit.edu/tytso/www/pilot/prc-format.html
  24858. >0x20 beshort&0xffbe 0
  24859. >>0 string >\0 Palm OS dynamic library data "%s"
  24860. 60 string ptch Palm OS operating system patch data
  24861. >0 string >\0 "%s"
  24862. # Mobipocket (www.mobipocket.com), donated by Carl Witty
  24863. 60 string BOOKMOBI Mobipocket E-book
  24864. >0 string >\0 "%s"
  24865. #------------------------------------------------------------------------------
  24866. # $File: parix,v 1.5 2020/03/08 22:18:32 christos Exp $
  24867. #
  24868. # Parix COFF executables
  24869. # From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
  24870. #
  24871. 0 beshort&0xefff 0x8ACE PARIX
  24872. >0 byte&0xf0 0x80 T800
  24873. >0 byte&0xf0 0x90 T9000
  24874. >19 byte&0x02 0x02 executable
  24875. >19 byte&0x02 0x00 object
  24876. >19 byte&0x0c 0x00 not stripped
  24877. #------------------------------------------------------------------------------
  24878. # $File: parrot,v 1.2 2019/04/19 00:42:27 christos Exp $
  24879. # parrot: file(1) magic for Parrot Virtual Machine
  24880. # URL: https://www.lua.org/
  24881. # From: Lubomir Rintel <lkundrak@v3.sk>
  24882. # Compiled Parrot byte code
  24883. 0 string \376PBC\r\n\032\n Parrot bytecode
  24884. >64 byte x %d.
  24885. >72 byte x \b%d,
  24886. >8 byte >0 %d byte words,
  24887. >16 byte 0 little-endian,
  24888. >16 byte 1 big-endian,
  24889. >32 byte 0 IEEE-754 8 byte double floats,
  24890. >32 byte 1 x86 12 byte long double floats,
  24891. >32 byte 2 IEEE-754 16 byte long double floats,
  24892. >32 byte 3 MIPS 16 byte long double floats,
  24893. >32 byte 4 AIX 16 byte long double floats,
  24894. >32 byte 5 4-byte floats,
  24895. >40 byte x Parrot %d.
  24896. >48 byte x \b%d.
  24897. >56 byte x \b%d
  24898. #------------------------------------------------------------------------------
  24899. # $File: pascal,v 1.3 2020/06/07 18:10:26 christos Exp $
  24900. # pascal: file(1) magic for Pascal source
  24901. #
  24902. 0 search/8192 (input, Pascal source text
  24903. !:mime text/x-pascal
  24904. #0 regex \^program Pascal source text
  24905. #!:mime text/x-pascal
  24906. #0 regex \^record Pascal source text
  24907. #!:mime text/x-pascal
  24908. # Free Pascal
  24909. 0 string PPU Pascal unit
  24910. >3 string x \b, version %s
  24911. #------------------------------------------------------------------------------
  24912. # $File: pbf,v 1.3 2019/04/19 00:42:27 christos Exp $
  24913. # file(1) magic(5) data for OpenStreetMap
  24914. # OpenStreetMap Protocolbuffer Binary Format (.osm.pbf)
  24915. # https://wiki.openstreetmap.org/wiki/PBF_Format
  24916. # From: Markus Heidelberg <markus.heidelberg@web.de>
  24917. 0 belong&0xfffffff0 0
  24918. >4 beshort 0x0A09
  24919. >>6 string OSMHeader OpenStreetMap Protocolbuffer Binary Format
  24920. #------------------------------------------------------------------------------
  24921. # $File: pbm,v 1.6 2009/09/19 16:28:11 christos Exp $
  24922. # pbm: file(1) magic for Portable Bitmap files
  24923. #
  24924. # XXX - byte order?
  24925. #
  24926. 0 short 0x2a17 "compact bitmap" format (Poskanzer)
  24927. #------------------------------------------------------------------------------
  24928. # pc88: file(1) magic for the NEC Home Computer
  24929. # v1.0
  24930. # Fabio R. Schmidlin <sd-snatcher@users.sourceforge.net>
  24931. # PC88 2D disk image
  24932. 0x20 ulelong&0xFFFFFEFF 0x2A0
  24933. >0x10 string \0\0\0\0\0\0\0\0\0\0
  24934. >>0x280 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
  24935. >>>0x1A ubyte&0xEF 0
  24936. >>>>0x1B ubyte&0x8F 0
  24937. >>>>>0x1B ubyte&70 <0x40
  24938. >>>>>>0x1C ulelong >0x21
  24939. >>>>>>>0 regex [[:print:]]* NEC PC-88 disk image, name=%s
  24940. >>>>>>>>0x1B ubyte 0 \b, media=2D
  24941. >>>>>>>>0x1B ubyte 0x10 \b, media=2DD
  24942. >>>>>>>>0x1B ubyte 0x20 \b, media=2HD
  24943. >>>>>>>>0x1B ubyte 0x30 \b, media=1D
  24944. >>>>>>>>0x1B ubyte 0x40 \b, media=1DD
  24945. >>>>>>>>0x1A ubyte 0x10 \b, write-protected
  24946. #------------------------------------------------------------------------------
  24947. # pc98: file(1) magic for the MSX Home Computer
  24948. # v1.0
  24949. # Fabio R. Schmidlin <sd-snatcher@users.sourceforge.net>
  24950. # Maki-chan v1 Graphic format
  24951. # The image resolution should be X=(44.L - 40.L) and Y=(46.L - 42.L), but I couldn't find a way to do so
  24952. # http://www.jisyo.com/viewer/faq/maki_tech.htm
  24953. 0 string/b MAKI01 Maki-chan v1.
  24954. >6 ubyte|0x20 x \b%c image
  24955. >8 ubelong >0x40404040 \b, system ID:
  24956. >>8 byte x %c
  24957. >>9 byte x \b%c
  24958. >>10 byte x \b%c
  24959. >>11 byte x \b%c
  24960. >44 ubeshort x \b, %dx
  24961. >46 ubeshort x \b%d
  24962. >38 ubeshort&2 0 \b, 16 paletted RGB colors
  24963. >38 ubeshort&2 2 \b, 8 fixed RGB colors
  24964. >38 ubeshort&1 1 \b, 2:1 dot aspect ratio
  24965. # Maki-chan v2 Graphic format
  24966. # http://www.jisyo.com/viewer/faq/mag_tech.htm
  24967. # https://mooncore.eu/bunny/txt/makichan.htm
  24968. # http://metanest.jp/mag/mag.xhtml
  24969. 0 string/b MAKI02\ \ Maki-chan v2 image,
  24970. >8 byte x system ID: %c
  24971. >9 byte x \b%c
  24972. >10 byte x \b%c
  24973. >11 byte x \b%c,
  24974. >13 search/0x200 \x1A
  24975. #Maki-chan video modes are a bit messy and seems to have been expanded over the years without too much planing:
  24976. #1) When offset1(ubeshort) !=0x0344:
  24977. # 1.1) And offset3(ubyte).b7=0:
  24978. # - b0=pixel aspect ratio: 1=2:1 (note: this ignores that the machine's 1:1 pixel aspect ratio isn't really 1:1)
  24979. # - b1=number of colors: 0=16 colors, 1=8 colors
  24980. # - b2=Palette or fixed colors flag (called "analog" and "digital" in the doc): 0=Paletted, 1=Fixed colors encoded directly in the pixel data
  24981. # 1.2) And offset3(ubyte).B7=1:
  24982. # - b0=256 paletted colors
  24983. # - b1=256 fixed colors using the MSX SCR8 palette
  24984. #2) When offset1(ubeshort) =0x0344:
  24985. # - 256x212 image with 19268 YJK colors. The usual resolution and color information fields from the file must be ignored
  24986. >>&1 ubeshort 0x0344 256x212, 19268 fixed YJK colors
  24987. >>&1 ubeshort !0x0344
  24988. >>>&5 uleshort+1 x %dx
  24989. >>>&7 uleshort+1 x \b%d,
  24990. >>>&0 ubyte&0x86 0x00 16 paletted RGB colors
  24991. >>>&0 ubyte&0x86 0x02 8 paletted RGB colors
  24992. >>>&0 ubyte&0x86 0x04 16 fixed RGB colors
  24993. >>>&0 ubyte&0x86 0x06 8 fixed RGB colors
  24994. >>>&0 ubyte&0x81 0x80 256 paletted RGB colors
  24995. >>>&0 ubyte&0x81 0x81 256 fixed MSX-SCR8 colors
  24996. >>>&0 ubyte&0x01 1 \b, 2:1 dot aspect ratio
  24997. # XLD4 (Q4) picture
  24998. 11 string/b MAJYO XLD4(Q4) picture
  24999. # Yanagisawa Pi picture
  25000. #0 string Pi\x1A\0 Yanagisawa Pi picture
  25001. #>3 search/0x200 \x04
  25002. 0 string Pi
  25003. >2 search/0x200 \x1A
  25004. >>&0 ubyte 0
  25005. >>>&3 ubyte 4 Yanagisawa Pi 16 color picture,
  25006. >>>&4 byte x system ID: %c
  25007. >>>&5 byte x \b%c
  25008. >>>&6 byte x \b%c
  25009. >>>&7 byte x \b%c,
  25010. >>>&10 ubeshort x %dx
  25011. >>>&12 ubeshort x \b%d
  25012. >>>&3 ubyte 8 Yanagisawa Pi 256 color picture
  25013. >>>&4 byte x system ID: %c
  25014. >>>&5 byte x \b%c
  25015. >>>&6 byte x \b%c
  25016. >>>&7 byte x \b%c,
  25017. >>>&10 ubeshort x %dx
  25018. >>>&12 ubeshort x \b%d
  25019. #------------------------------------------------------------------------------
  25020. # $File: pcjr,v 1.1 2021/01/09 15:09:58 christos Exp $
  25021. # pcjr: file(1) magic for PCjr Cartridge image file format
  25022. # From: Francis Laniel <laniel_francis@privacyrequired.com>
  25023. 0 string PCjr
  25024. >0x80 beshort 0x55aa PCjr Cartridge image
  25025. >0x200 beshort 0x55aa PCjr Cartridge image
  25026. #------------------------------------------------------------------------------
  25027. # $File: pdf,v 1.15 2020/08/23 00:30:45 christos Exp $
  25028. # pdf: file(1) magic for Portable Document Format
  25029. #
  25030. 0 name pdf
  25031. >8 search /Count
  25032. >>&0 regex [0-9]+ \b, %s pages
  25033. >8 search/512 /Filter/FlateDecode/ (password protected)
  25034. 0 string %PDF- PDF document
  25035. !:mime application/pdf
  25036. !:strength +60
  25037. !:ext pdf
  25038. >5 byte x \b, version %c
  25039. >7 byte x \b.%c
  25040. >0 use pdf
  25041. 0 string \012%PDF- PDF document
  25042. !:mime application/pdf
  25043. !:strength +60
  25044. !:ext pdf
  25045. >6 byte x \b, version %c
  25046. >8 byte x \b.%c
  25047. >0 use pdf
  25048. 0 string \xef\xbb\xbf%PDF- PDF document (UTF-8)
  25049. !:mime application/pdf
  25050. !:strength +60
  25051. !:ext pdf
  25052. >6 byte x \b, version %c
  25053. >8 byte x \b.%c
  25054. >0 use pdf
  25055. # From: Nick Schmalenberger <nick@schmalenberger.us>
  25056. # Forms Data Format
  25057. 0 string %FDF- FDF document
  25058. !:mime application/vnd.fdf
  25059. !:strength +60
  25060. !:ext pdf
  25061. >5 byte x \b, version %c
  25062. >7 byte x \b.%c
  25063. 0 search/256 %PDF- PDF document
  25064. !:mime application/pdf
  25065. !:strength +60
  25066. !:ext pdf
  25067. >&0 byte x \b, version %c
  25068. >&2 byte x \b.%c
  25069. >0 use pdf
  25070. #------------------------------------------------------------------------------
  25071. # $File: pdp,v 1.11 2017/03/17 21:35:28 christos Exp $
  25072. # pdp: file(1) magic for PDP-11 executable/object and APL workspace
  25073. #
  25074. 0 lelong 0101555 PDP-11 single precision APL workspace
  25075. 0 lelong 0101554 PDP-11 double precision APL workspace
  25076. #
  25077. # PDP-11 a.out
  25078. #
  25079. 0 leshort 0407 PDP-11 executable
  25080. >8 leshort >0 not stripped
  25081. >15 byte >0 - version %d
  25082. # updated by Joerg Jenderek at Mar 2013
  25083. # GRR: line below too general as it catches also Windows precompiled setup information *.PNF
  25084. 0 leshort 0401
  25085. # skip *.PNF with WinDirPathOffset 58h
  25086. >68 ulelong !0x00000058 PDP-11 UNIX/RT ldp
  25087. # skip *.PNF with high byte of InfVersionDatumCount zero
  25088. #>>15 byte !0 PDP-11 UNIX/RT ldp
  25089. 0 leshort 0405 PDP-11 old overlay
  25090. 0 leshort 0410 PDP-11 pure executable
  25091. >8 leshort >0 not stripped
  25092. >15 byte >0 - version %d
  25093. 0 leshort 0411 PDP-11 separate I&D executable
  25094. >8 leshort >0 not stripped
  25095. >15 byte >0 - version %d
  25096. 0 leshort 0437 PDP-11 kernel overlay
  25097. # These last three are derived from 2.11BSD file(1)
  25098. 0 leshort 0413 PDP-11 demand-paged pure executable
  25099. >8 leshort >0 not stripped
  25100. 0 leshort 0430 PDP-11 overlaid pure executable
  25101. >8 leshort >0 not stripped
  25102. 0 leshort 0431 PDP-11 overlaid separate executable
  25103. >8 leshort >0 not stripped
  25104. #------------------------------------------------------------------------------
  25105. # $File: perl,v 1.26 2017/02/21 18:34:55 christos Exp $
  25106. # perl: file(1) magic for Larry Wall's perl language.
  25107. #
  25108. # The `eval' lines recognizes an outrageously clever hack.
  25109. # Keith Waclena <keith@cerberus.uchicago.edu>
  25110. # Send additions to <perl5-porters@perl.org>
  25111. 0 search/1024 eval\ "exec\ perl Perl script text
  25112. !:mime text/x-perl
  25113. 0 search/1024 eval\ "exec\ /bin/perl Perl script text
  25114. !:mime text/x-perl
  25115. 0 search/1024 eval\ "exec\ /usr/bin/perl Perl script text
  25116. !:mime text/x-perl
  25117. 0 search/1024 eval\ "exec\ /usr/local/bin/perl Perl script text
  25118. !:mime text/x-perl
  25119. 0 search/1024 eval\ 'exec\ perl Perl script text
  25120. !:mime text/x-perl
  25121. 0 search/1024 eval\ 'exec\ /bin/perl Perl script text
  25122. !:mime text/x-perl
  25123. 0 search/1024 eval\ 'exec\ /usr/bin/perl Perl script text
  25124. !:mime text/x-perl
  25125. 0 search/1024 eval\ 'exec\ /usr/local/bin/perl Perl script text
  25126. !:mime text/x-perl
  25127. 0 search/1024 eval\ '(exit\ $?0)'\ &&\ eval\ 'exec Perl script text
  25128. !:mime text/x-perl
  25129. 0 string #!/usr/bin/env\ perl Perl script text executable
  25130. !:mime text/x-perl
  25131. 0 string #!\ /usr/bin/env\ perl Perl script text executable
  25132. !:mime text/x-perl
  25133. 0 string #!
  25134. >0 regex \^#!.*/bin/perl([[:space:]].*)*$ Perl script text executable
  25135. !:mime text/x-perl
  25136. # by Dmitry V. Levin and Alexey Tourbin
  25137. # check the first line
  25138. 0 search/8192 package
  25139. >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; Perl5 module source text
  25140. !:strength + 40
  25141. # not 'p', check other lines
  25142. 0 search/8192 !p
  25143. >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *;
  25144. >>0 regex \^1\ *;|\^(use|sub|my)\ .*[(;{=] Perl5 module source text
  25145. !:strength + 75
  25146. # Perl POD documents
  25147. # From: Tom Hukins <tom@eborcom.com>
  25148. 0 search/1024/W \=pod\n Perl POD document text
  25149. 0 search/1024/W \n\=pod\n Perl POD document text
  25150. 0 search/1024/W \=head1\ Perl POD document text
  25151. 0 search/1024/W \n\=head1\ Perl POD document text
  25152. 0 search/1024/W \=head2\ Perl POD document text
  25153. 0 search/1024/W \n\=head2\ Perl POD document text
  25154. 0 search/1024/W \=encoding\ Perl POD document text
  25155. 0 search/1024/W \n\=encoding\ Perl POD document text
  25156. # Perl Storable data files.
  25157. 0 string perl-store perl Storable (v0.6) data
  25158. >4 byte >0 (net-order %d)
  25159. >>4 byte &01 (network-ordered)
  25160. >>4 byte =3 (major 1)
  25161. >>4 byte =2 (major 1)
  25162. 0 string pst0 perl Storable (v0.7) data
  25163. >4 byte >0
  25164. >>4 byte &01 (network-ordered)
  25165. >>4 byte =5 (major 2)
  25166. >>4 byte =4 (major 2)
  25167. >>5 byte >0 (minor %d)
  25168. # This is Debian #742949 by Zefram <zefram@fysh.org>:
  25169. # -----------------------------------------------------------
  25170. # The Perl module Hash::SharedMem
  25171. # <https://metacpan.org/release/Hash-SharedMem> defines a file format
  25172. # for a key/value store. Details of the file format are in the "DESIGN"
  25173. # file in the module distribution. Magic:
  25174. 0 bequad =0xa58afd185cbf5af7 Hash::SharedMem master file, big-endian
  25175. >8 bequad <0x1000000
  25176. >>15 byte >2 \b, line size 2^%d byte
  25177. >>14 byte >2 \b, page size 2^%d byte
  25178. >>13 byte &1
  25179. >>>13 byte >1 \b, max fanout %d
  25180. 0 lequad =0xa58afd185cbf5af7 Hash::SharedMem master file, little-endian
  25181. >8 lequad <0x1000000
  25182. >>8 byte >2 \b, line size 2^%d byte
  25183. >>9 byte >2 \b, page size 2^%d byte
  25184. >>10 byte &1
  25185. >>>10 byte >1 \b, max fanout %d
  25186. 0 bequad =0xc693dac5ed5e47c2 Hash::SharedMem data file, big-endian
  25187. >8 bequad <0x1000000
  25188. >>15 byte >2 \b, line size 2^%d byte
  25189. >>14 byte >2 \b, page size 2^%d byte
  25190. >>13 byte &1
  25191. >>>13 byte >1 \b, max fanout %d
  25192. 0 lequad =0xc693dac5ed5e47c2 Hash::SharedMem data file, little-endian
  25193. >8 lequad <0x1000000
  25194. >>8 byte >2 \b, line size 2^%d byte
  25195. >>9 byte >2 \b, page size 2^%d byte
  25196. >>10 byte &1
  25197. >>>10 byte >1 \b, max fanout %d
  25198. #------------------------------------------------------------------------------
  25199. # $File: pgf,v 1.3 2021/02/23 00:51:10 christos Exp $
  25200. # pgf: file(1) magic for Progressive Graphics File (PGF)
  25201. #
  25202. # <http://www.libpgf.org/uploads/media/PGF_Details_01.pdf>
  25203. # 2013 by Philipp Hahn <pmhahn debian org>
  25204. 0 string PGF Progressive Graphics image data,
  25205. !:mime image/x-pgf
  25206. >3 string 2 version %s,
  25207. >3 string 4 version %s,
  25208. >3 string 5 version %s,
  25209. >3 string 6 version %s,
  25210. # PGFPreHeader
  25211. #>>4 lelong x header size %d,
  25212. # PGFHeader
  25213. >>8 lelong x %d x
  25214. >>12 lelong x %d,
  25215. >>16 byte x %d levels,
  25216. >>17 byte x compression level %d,
  25217. >>18 byte x %d bpp,
  25218. >>19 byte x %d channels,
  25219. >>20 clear x
  25220. >>20 byte 0 bitmap,
  25221. >>20 byte 1 gray scale,
  25222. >>20 byte 2 indexed color,
  25223. >>20 byte 3 RGB color,
  25224. >>20 byte 4 CMYK color,
  25225. >>20 byte 5 HSL color,
  25226. >>20 byte 6 HSB color,
  25227. >>20 byte 7 multi-channel,
  25228. >>20 byte 8 duo tone,
  25229. >>20 byte 9 LAB color,
  25230. >>20 byte 10 gray scale 16,
  25231. >>20 byte 11 RGB color 48,
  25232. >>20 byte 12 LAB color 48,
  25233. >>20 byte 13 CMYK color 64,
  25234. >>20 byte 14 deep multi-channel,
  25235. >>20 byte 15 duo tone 16,
  25236. >>20 byte 17 RGBA color,
  25237. >>20 byte 18 gray scale 32,
  25238. >>20 byte 19 RGB color 12,
  25239. >>20 byte 20 RGB color 16,
  25240. >>20 byte 255 unknown format,
  25241. >>20 default x format
  25242. >>>20 byte x \b %d,
  25243. >>21 byte x %d bpc
  25244. # PGFPostHeader
  25245. # Level-Sizes
  25246. #>>(4.l+4) lelong x level 0 size: %d
  25247. #>>(4.l+8) lelong x level 1 size: %d
  25248. #>>(4.l+12) lelong x level 2 size: %d
  25249. #------------------------------------------------------------------------------
  25250. # $File: pgp,v 1.24 2020/10/14 21:07:29 christos Exp $
  25251. # pgp: file(1) magic for Pretty Good Privacy
  25252. # Handling of binary PGP keys is in pgp-binary-keys.
  25253. # see https://lists.gnupg.org/pipermail/gnupg-devel/1999-September/016052.html
  25254. #
  25255. 0 beshort 0xa600 PGP encrypted data
  25256. #!:mime application/pgp-encrypted
  25257. #0 string -----BEGIN\040PGP text/PGP armored data
  25258. !:mime text/PGP # encoding: armored data
  25259. #>15 string PUBLIC\040KEY\040BLOCK- public key block
  25260. #>15 string MESSAGE- message
  25261. #>15 string SIGNED\040MESSAGE- signed message
  25262. #>15 string PGP\040SIGNATURE- signature
  25263. # Update: Joerg Jenderek
  25264. # URL: http://en.wikipedia.org/wiki/Pretty_Good_Privacy
  25265. # Reference: https://reposcope.com/mimetype/application/pgp-keys
  25266. 2 string ---BEGIN\040PGP\040PRIVATE\040KEY\040BLOCK- PGP private key block
  25267. #!:mime text/PGP
  25268. !:mime application/pgp-keys
  25269. !:ext asc
  25270. 2 string ---BEGIN\040PGP\040PUBLIC\040KEY\040BLOCK- PGP public key block
  25271. !:mime application/pgp-keys
  25272. !:ext asc
  25273. >10 search/100 \n\n
  25274. >>&0 use pgp
  25275. 0 string -----BEGIN\040PGP\040MESSAGE- PGP message
  25276. # https://reposcope.com/mimetype/application/pgp-encrypted
  25277. #!:mime application/pgp
  25278. !:mime application/pgp-encrypted
  25279. !:ext asc
  25280. #!:ext asc/pgp/gpg
  25281. >10 search/100 \n\n
  25282. >>&0 use pgp
  25283. # Reference: https://www.gnupg.org/gph/en/manual/x135.html
  25284. 0 string -----BEGIN\040PGP\040SIGNED\040MESSAGE- PGP signed message
  25285. #!:mime text/plain
  25286. !:mime text/PGP
  25287. #!:mime application/pgp
  25288. !:ext asc
  25289. 0 string -----BEGIN\040PGP\040SIGNATURE- PGP signature
  25290. # https://reposcope.com/mimetype/application/pgp-signature
  25291. !:mime application/pgp-signature
  25292. !:ext asc
  25293. >10 search/100 \n\n
  25294. >>&0 use pgp
  25295. # Decode the type of the packet based on it's base64 encoding.
  25296. # Idea from Mark Martinec
  25297. # The specification is in RFC 4880, section 4.2 and 4.3:
  25298. # https://tools.ietf.org/html/rfc4880#section-4.2
  25299. 0 name pgp
  25300. >0 byte 0x67 Reserved (old)
  25301. >0 byte 0x68 Public-Key Encrypted Session Key (old)
  25302. >0 byte 0x69 Signature (old)
  25303. >0 byte 0x6a Symmetric-Key Encrypted Session Key (old)
  25304. >0 byte 0x6b One-Pass Signature (old)
  25305. >0 byte 0x6c Secret-Key (old)
  25306. >0 byte 0x6d Public-Key (old)
  25307. >0 byte 0x6e Secret-Subkey (old)
  25308. >0 byte 0x6f Compressed Data (old)
  25309. >0 byte 0x70 Symmetrically Encrypted Data (old)
  25310. >0 byte 0x71 Marker (old)
  25311. >0 byte 0x72 Literal Data (old)
  25312. >0 byte 0x73 Trust (old)
  25313. >0 byte 0x74 User ID (old)
  25314. >0 byte 0x75 Public-Subkey (old)
  25315. >0 byte 0x76 Unused (old)
  25316. >0 byte 0x77
  25317. >>1 byte&0xc0 0x00 Reserved
  25318. >>1 byte&0xc0 0x40 Public-Key Encrypted Session Key
  25319. >>1 byte&0xc0 0x80 Signature
  25320. >>1 byte&0xc0 0xc0 Symmetric-Key Encrypted Session Key
  25321. >0 byte 0x78
  25322. >>1 byte&0xc0 0x00 One-Pass Signature
  25323. >>1 byte&0xc0 0x40 Secret-Key
  25324. >>1 byte&0xc0 0x80 Public-Key
  25325. >>1 byte&0xc0 0xc0 Secret-Subkey
  25326. >0 byte 0x79
  25327. >>1 byte&0xc0 0x00 Compressed Data
  25328. >>1 byte&0xc0 0x40 Symmetrically Encrypted Data
  25329. >>1 byte&0xc0 0x80 Marker
  25330. >>1 byte&0xc0 0xc0 Literal Data
  25331. >0 byte 0x7a
  25332. >>1 byte&0xc0 0x00 Trust
  25333. >>1 byte&0xc0 0x40 User ID
  25334. >>1 byte&0xc0 0x80 Public-Subkey
  25335. >>1 byte&0xc0 0xc0 Unused [z%x]
  25336. >0 byte 0x30
  25337. >>1 byte&0xc0 0x00 Unused [0%x]
  25338. >>1 byte&0xc0 0x40 User Attribute
  25339. >>1 byte&0xc0 0x80 Sym. Encrypted and Integrity Protected Data
  25340. >>1 byte&0xc0 0xc0 Modification Detection Code
  25341. # magic signatures to detect PGP crypto material (from stef)
  25342. # detects and extracts metadata from:
  25343. # - symmetric encrypted packet header
  25344. # - RSA (e=65537) secret (sub-)keys
  25345. # 1024b RSA encrypted data
  25346. 0 string \x84\x8c\x03 PGP RSA encrypted session key -
  25347. >3 belong x keyid: %08X
  25348. >7 belong x %08X
  25349. >11 byte 0x01 RSA (Encrypt or Sign) 1024b
  25350. >11 byte 0x02 RSA Encrypt-Only 1024b
  25351. >12 string \x04\x00
  25352. >12 string \x03\xff
  25353. >12 string \x03\xfe
  25354. >12 string \x03\xfd
  25355. >12 string \x03\xfc
  25356. >12 string \x03\xfb
  25357. >12 string \x03\xfa
  25358. >12 string \x03\xf9
  25359. >142 byte 0xd2 .
  25360. # 2048b RSA encrypted data
  25361. 0 string \x85\x01\x0c\x03 PGP RSA encrypted session key -
  25362. >4 belong x keyid: %08X
  25363. >8 belong x %08X
  25364. >12 byte 0x01 RSA (Encrypt or Sign) 2048b
  25365. >12 byte 0x02 RSA Encrypt-Only 2048b
  25366. >13 string \x08\x00
  25367. >13 string \x07\xff
  25368. >13 string \x07\xfe
  25369. >13 string \x07\xfd
  25370. >13 string \x07\xfc
  25371. >13 string \x07\xfb
  25372. >13 string \x07\xfa
  25373. >13 string \x07\xf9
  25374. >271 byte 0xd2 .
  25375. # 3072b RSA encrypted data
  25376. 0 string \x85\x01\x8c\x03 PGP RSA encrypted session key -
  25377. >4 belong x keyid: %08X
  25378. >8 belong x %08X
  25379. >12 byte 0x01 RSA (Encrypt or Sign) 3072b
  25380. >12 byte 0x02 RSA Encrypt-Only 3072b
  25381. >13 string \x0c\x00
  25382. >13 string \x0b\xff
  25383. >13 string \x0b\xfe
  25384. >13 string \x0b\xfd
  25385. >13 string \x0b\xfc
  25386. >13 string \x0b\xfb
  25387. >13 string \x0b\xfa
  25388. >13 string \x0b\xf9
  25389. >399 byte 0xd2 .
  25390. # 4096b RSA encrypted data
  25391. 0 string \x85\x02\x0c\x03 PGP RSA encrypted session key -
  25392. >4 belong x keyid: %08X
  25393. >8 belong x %08X
  25394. >12 byte 0x01 RSA (Encrypt or Sign) 4096b
  25395. >12 byte 0x02 RSA Encrypt-Only 4096b
  25396. >13 string \x10\x00
  25397. >13 string \x0f\xff
  25398. >13 string \x0f\xfe
  25399. >13 string \x0f\xfd
  25400. >13 string \x0f\xfc
  25401. >13 string \x0f\xfb
  25402. >13 string \x0f\xfa
  25403. >13 string \x0f\xf9
  25404. >527 byte 0xd2 .
  25405. # 8192b RSA encrypted data
  25406. 0 string \x85\x04\x0c\x03 PGP RSA encrypted session key -
  25407. >4 belong x keyid: %08X
  25408. >8 belong x %08X
  25409. >12 byte 0x01 RSA (Encrypt or Sign) 8192b
  25410. >12 byte 0x02 RSA Encrypt-Only 8192b
  25411. >13 string \x20\x00
  25412. >13 string \x1f\xff
  25413. >13 string \x1f\xfe
  25414. >13 string \x1f\xfd
  25415. >13 string \x1f\xfc
  25416. >13 string \x1f\xfb
  25417. >13 string \x1f\xfa
  25418. >13 string \x1f\xf9
  25419. >1039 byte 0xd2 .
  25420. # 1024b Elgamal encrypted data
  25421. 0 string \x85\x01\x0e\x03 PGP Elgamal encrypted session key -
  25422. >4 belong x keyid: %08X
  25423. >8 belong x %08X
  25424. >12 byte 0x10 Elgamal Encrypt-Only 1024b.
  25425. >13 string \x04\x00
  25426. >13 string \x03\xff
  25427. >13 string \x03\xfe
  25428. >13 string \x03\xfd
  25429. >13 string \x03\xfc
  25430. >13 string \x03\xfb
  25431. >13 string \x03\xfa
  25432. >13 string \x03\xf9
  25433. # 2048b Elgamal encrypted data
  25434. 0 string \x85\x02\x0e\x03 PGP Elgamal encrypted session key -
  25435. >4 belong x keyid: %08X
  25436. >8 belong x %08X
  25437. >12 byte 0x10 Elgamal Encrypt-Only 2048b.
  25438. >13 string \x08\x00
  25439. >13 string \x07\xff
  25440. >13 string \x07\xfe
  25441. >13 string \x07\xfd
  25442. >13 string \x07\xfc
  25443. >13 string \x07\xfb
  25444. >13 string \x07\xfa
  25445. >13 string \x07\xf9
  25446. # 3072b Elgamal encrypted data
  25447. 0 string \x85\x03\x0e\x03 PGP Elgamal encrypted session key -
  25448. >4 belong x keyid: %08X
  25449. >8 belong x %08X
  25450. >12 byte 0x10 Elgamal Encrypt-Only 3072b.
  25451. >13 string \x0c\x00
  25452. >13 string \x0b\xff
  25453. >13 string \x0b\xfe
  25454. >13 string \x0b\xfd
  25455. >13 string \x0b\xfc
  25456. >13 string \x0b\xfb
  25457. >13 string \x0b\xfa
  25458. >13 string \x0b\xf9
  25459. # crypto algo mapper
  25460. 0 name crypto
  25461. >0 byte 0x00 Plaintext or unencrypted data
  25462. >0 byte 0x01 IDEA
  25463. >0 byte 0x02 TripleDES
  25464. >0 byte 0x03 CAST5 (128 bit key)
  25465. >0 byte 0x04 Blowfish (128 bit key, 16 rounds)
  25466. >0 byte 0x07 AES with 128-bit key
  25467. >0 byte 0x08 AES with 192-bit key
  25468. >0 byte 0x09 AES with 256-bit key
  25469. >0 byte 0x0a Twofish with 256-bit key
  25470. # hash algo mapper
  25471. 0 name hash
  25472. >0 byte 0x01 MD5
  25473. >0 byte 0x02 SHA-1
  25474. >0 byte 0x03 RIPE-MD/160
  25475. >0 byte 0x08 SHA256
  25476. >0 byte 0x09 SHA384
  25477. >0 byte 0x0a SHA512
  25478. >0 byte 0x0b SHA224
  25479. # display public key algorithms as human readable text
  25480. 0 name key_algo
  25481. >0 byte 0x01 RSA (Encrypt or Sign)
  25482. # keep old look of version 5.28 without parentheses
  25483. >0 byte 0x02 RSA Encrypt-Only
  25484. >0 byte 0x03 RSA (Sign-Only)
  25485. >0 byte 16 ElGamal (Encrypt-Only)
  25486. >0 byte 17 DSA
  25487. >0 byte 18 Elliptic Curve
  25488. >0 byte 19 ECDSA
  25489. >0 byte 20 ElGamal (Encrypt or Sign)
  25490. >0 byte 21 Diffie-Hellman
  25491. >0 default x
  25492. >>0 ubyte <22 unknown (pub %d)
  25493. # this should never happen
  25494. >>0 ubyte >21 invalid (%d)
  25495. # pgp symmetric encrypted data
  25496. 0 byte 0x8c PGP symmetric key encrypted data -
  25497. >1 byte 0x0d
  25498. >1 byte 0x0c
  25499. >2 byte 0x04
  25500. >3 use crypto
  25501. >4 byte 0x01 salted -
  25502. >>5 use hash
  25503. >>14 byte 0xd2 .
  25504. >>14 byte 0xc9 .
  25505. >4 byte 0x03 salted & iterated -
  25506. >>5 use hash
  25507. >>15 byte 0xd2 .
  25508. >>15 byte 0xc9 .
  25509. # encrypted keymaterial needs s2k & can be checksummed/hashed
  25510. 0 name chkcrypto
  25511. >0 use crypto
  25512. >1 byte 0x00 Simple S2K
  25513. >1 byte 0x01 Salted S2K
  25514. >1 byte 0x03 Salted&Iterated S2K
  25515. >2 use hash
  25516. # all PGP keys start with this prolog
  25517. # containing version, creation date, and purpose
  25518. 0 name keyprolog
  25519. >0 byte 0x04
  25520. >1 beldate x created on %s -
  25521. >5 byte 0x01 RSA (Encrypt or Sign)
  25522. >5 byte 0x02 RSA Encrypt-Only
  25523. # end of secret keys known signature
  25524. # contains e=65537 and the prolog to
  25525. # the encrypted parameters
  25526. 0 name keyend
  25527. >0 string \x00\x11\x01\x00\x01 e=65537
  25528. >5 use crypto
  25529. >5 byte 0xff checksummed
  25530. >>6 use chkcrypto
  25531. >5 byte 0xfe hashed
  25532. >>6 use chkcrypto
  25533. # PGP secret keys contain also the public parts
  25534. # these vary by bitsize of the key
  25535. 0 name x1024
  25536. >0 use keyprolog
  25537. >6 string \x03\xfe
  25538. >6 string \x03\xff
  25539. >6 string \x04\x00
  25540. >136 use keyend
  25541. 0 name x2048
  25542. >0 use keyprolog
  25543. >6 string \x80\x00
  25544. >6 string \x07\xfe
  25545. >6 string \x07\xff
  25546. >264 use keyend
  25547. 0 name x3072
  25548. >0 use keyprolog
  25549. >6 string \x0b\xfe
  25550. >6 string \x0b\xff
  25551. >6 string \x0c\x00
  25552. >392 use keyend
  25553. 0 name x4096
  25554. >0 use keyprolog
  25555. >6 string \x10\x00
  25556. >6 string \x0f\xfe
  25557. >6 string \x0f\xff
  25558. >520 use keyend
  25559. # \x00|\x1f[\xfe\xff]).{1024})'
  25560. 0 name x8192
  25561. >0 use keyprolog
  25562. >6 string \x20\x00
  25563. >6 string \x1f\xfe
  25564. >6 string \x1f\xff
  25565. >1032 use keyend
  25566. # depending on the size of the pkt
  25567. # we branch into the proper key size
  25568. # signatures defined as x{keysize}
  25569. 0 name pgpkey
  25570. >0 string \x01\xd8 1024b
  25571. >>2 use x1024
  25572. >0 string \x01\xeb 1024b
  25573. >>2 use x1024
  25574. >0 string \x01\xfb 1024b
  25575. >>2 use x1024
  25576. >0 string \x01\xfd 1024b
  25577. >>2 use x1024
  25578. >0 string \x01\xf3 1024b
  25579. >>2 use x1024
  25580. >0 string \x01\xee 1024b
  25581. >>2 use x1024
  25582. >0 string \x01\xfe 1024b
  25583. >>2 use x1024
  25584. >0 string \x01\xf4 1024b
  25585. >>2 use x1024
  25586. >0 string \x02\x0d 1024b
  25587. >>2 use x1024
  25588. >0 string \x02\x03 1024b
  25589. >>2 use x1024
  25590. >0 string \x02\x05 1024b
  25591. >>2 use x1024
  25592. >0 string \x02\x15 1024b
  25593. >>2 use x1024
  25594. >0 string \x02\x00 1024b
  25595. >>2 use x1024
  25596. >0 string \x02\x10 1024b
  25597. >>2 use x1024
  25598. >0 string \x02\x04 1024b
  25599. >>2 use x1024
  25600. >0 string \x02\x06 1024b
  25601. >>2 use x1024
  25602. >0 string \x02\x16 1024b
  25603. >>2 use x1024
  25604. >0 string \x03\x98 2048b
  25605. >>2 use x2048
  25606. >0 string \x03\xab 2048b
  25607. >>2 use x2048
  25608. >0 string \x03\xbb 2048b
  25609. >>2 use x2048
  25610. >0 string \x03\xbd 2048b
  25611. >>2 use x2048
  25612. >0 string \x03\xcd 2048b
  25613. >>2 use x2048
  25614. >0 string \x03\xb3 2048b
  25615. >>2 use x2048
  25616. >0 string \x03\xc3 2048b
  25617. >>2 use x2048
  25618. >0 string \x03\xc5 2048b
  25619. >>2 use x2048
  25620. >0 string \x03\xd5 2048b
  25621. >>2 use x2048
  25622. >0 string \x03\xae 2048b
  25623. >>2 use x2048
  25624. >0 string \x03\xbe 2048b
  25625. >>2 use x2048
  25626. >0 string \x03\xc0 2048b
  25627. >>2 use x2048
  25628. >0 string \x03\xd0 2048b
  25629. >>2 use x2048
  25630. >0 string \x03\xb4 2048b
  25631. >>2 use x2048
  25632. >0 string \x03\xc4 2048b
  25633. >>2 use x2048
  25634. >0 string \x03\xc6 2048b
  25635. >>2 use x2048
  25636. >0 string \x03\xd6 2048b
  25637. >>2 use x2048
  25638. >0 string \x05X 3072b
  25639. >>2 use x3072
  25640. >0 string \x05k 3072b
  25641. >>2 use x3072
  25642. >0 string \x05{ 3072b
  25643. >>2 use x3072
  25644. >0 string \x05} 3072b
  25645. >>2 use x3072
  25646. >0 string \x05\x8d 3072b
  25647. >>2 use x3072
  25648. >0 string \x05s 3072b
  25649. >>2 use x3072
  25650. >0 string \x05\x83 3072b
  25651. >>2 use x3072
  25652. >0 string \x05\x85 3072b
  25653. >>2 use x3072
  25654. >0 string \x05\x95 3072b
  25655. >>2 use x3072
  25656. >0 string \x05n 3072b
  25657. >>2 use x3072
  25658. >0 string \x05\x7e 3072b
  25659. >>2 use x3072
  25660. >0 string \x05\x80 3072b
  25661. >>2 use x3072
  25662. >0 string \x05\x90 3072b
  25663. >>2 use x3072
  25664. >0 string \x05t 3072b
  25665. >>2 use x3072
  25666. >0 string \x05\x84 3072b
  25667. >>2 use x3072
  25668. >0 string \x05\x86 3072b
  25669. >>2 use x3072
  25670. >0 string \x05\x96 3072b
  25671. >>2 use x3072
  25672. >0 string \x07[ 4096b
  25673. >>2 use x4096
  25674. >0 string \x07\x18 4096b
  25675. >>2 use x4096
  25676. >0 string \x07+ 4096b
  25677. >>2 use x4096
  25678. >0 string \x07; 4096b
  25679. >>2 use x4096
  25680. >0 string \x07= 4096b
  25681. >>2 use x4096
  25682. >0 string \x07M 4096b
  25683. >>2 use x4096
  25684. >0 string \x073 4096b
  25685. >>2 use x4096
  25686. >0 string \x07C 4096b
  25687. >>2 use x4096
  25688. >0 string \x07E 4096b
  25689. >>2 use x4096
  25690. >0 string \x07U 4096b
  25691. >>2 use x4096
  25692. >0 string \x07. 4096b
  25693. >>2 use x4096
  25694. >0 string \x07> 4096b
  25695. >>2 use x4096
  25696. >0 string \x07@ 4096b
  25697. >>2 use x4096
  25698. >0 string \x07P 4096b
  25699. >>2 use x4096
  25700. >0 string \x074 4096b
  25701. >>2 use x4096
  25702. >0 string \x07D 4096b
  25703. >>2 use x4096
  25704. >0 string \x07F 4096b
  25705. >>2 use x4096
  25706. >0 string \x07V 4096b
  25707. >>2 use x4096
  25708. >0 string \x0e[ 8192b
  25709. >>2 use x8192
  25710. >0 string \x0e\x18 8192b
  25711. >>2 use x8192
  25712. >0 string \x0e+ 8192b
  25713. >>2 use x8192
  25714. >0 string \x0e; 8192b
  25715. >>2 use x8192
  25716. >0 string \x0e= 8192b
  25717. >>2 use x8192
  25718. >0 string \x0eM 8192b
  25719. >>2 use x8192
  25720. >0 string \x0e3 8192b
  25721. >>2 use x8192
  25722. >0 string \x0eC 8192b
  25723. >>2 use x8192
  25724. >0 string \x0eE 8192b
  25725. >>2 use x8192
  25726. >0 string \x0eU 8192b
  25727. >>2 use x8192
  25728. >0 string \x0e. 8192b
  25729. >>2 use x8192
  25730. >0 string \x0e> 8192b
  25731. >>2 use x8192
  25732. >0 string \x0e@ 8192b
  25733. >>2 use x8192
  25734. >0 string \x0eP 8192b
  25735. >>2 use x8192
  25736. >0 string \x0e4 8192b
  25737. >>2 use x8192
  25738. >0 string \x0eD 8192b
  25739. >>2 use x8192
  25740. >0 string \x0eF 8192b
  25741. >>2 use x8192
  25742. >0 string \x0eV 8192b
  25743. >>2 use x8192
  25744. # PGP RSA (e=65537) secret (sub-)key header
  25745. 0 byte 0x97 PGP Secret Sub-key -
  25746. >1 use pgpkey
  25747. 0 byte 0x9d
  25748. # Update: Joerg Jenderek
  25749. # secret subkey packet (tag 7) with same structure as secret key packet (tag 5)
  25750. # skip Fetus.Sys16 CALIBUS.MAIN OrbFix.Sys16.Ex by looking for positive len
  25751. >1 ubeshort >0
  25752. #>1 ubeshort x \b, body length 0x%x
  25753. # next packet type often 88h,89h~(tag 2)~Signature Packet
  25754. #>>(1.S+3) ubyte x \b, next packet type 0x%x
  25755. # skip Dragon.SHR DEMO.INIT by looking for positive version
  25756. >>3 ubyte >0
  25757. # skip BUISSON.13 GUITAR1 by looking for low version number
  25758. >>>3 ubyte <5 PGP Secret Sub-key
  25759. # sub-key are normally part of secret key. So it does not occur as standalone file
  25760. #!:ext bin
  25761. # version 2,3~old 4~new . Comment following line for version 5.28 look
  25762. >>>>3 ubyte x (v%d)
  25763. >>>>3 ubyte x -
  25764. # old versions 2 or 3 but no real example found
  25765. >>>>3 ubyte <4
  25766. # 2 byte for key bits in version 5.28 look
  25767. >>>>>11 ubeshort x %db
  25768. >>>>>4 beldate x created on %s -
  25769. # old versions use 2 additional bytes after time stamp
  25770. #>>>>>8 ubeshort x 0x%x
  25771. # display key algorithm 1~RSA Encrypt|Sign - 21~Diffie-Hellman
  25772. >>>>>10 use key_algo
  25773. >>>>>(11.S/8) ubequad x
  25774. # look after first key
  25775. >>>>>>&5 use keyend
  25776. # new version
  25777. >>>>3 ubyte >3
  25778. >>>>>9 ubeshort x %db
  25779. >>>>>4 beldate x created on %s -
  25780. # display key algorithm
  25781. >>>>>8 use key_algo
  25782. >>>>>(9.S/8) ubequad x
  25783. # look after first key for something like s2k
  25784. >>>>>>&3 use keyend
  25785. #------------------------------------------------------------------------------
  25786. # $File: pgp-binary-keys,v 1.1 2020/10/14 21:07:29 christos Exp $
  25787. # pgp-binary-keys: This file handles pgp binary keys.
  25788. #
  25789. # An PGP certificate or message doesn't have a fixed header. Instead,
  25790. # they are sequences of packets:
  25791. #
  25792. # https://tools.ietf.org/html/rfc4880#section-4.3
  25793. #
  25794. # whose order conforms to a grammar:
  25795. #
  25796. # https://tools.ietf.org/html/rfc4880#section-11
  25797. #
  25798. # Happily most packets have a few fields that are constrained, which
  25799. # allow us to fingerprint them with relatively high certainty.
  25800. #
  25801. # A PGP packet is described by a single byte: the so-called CTB. The
  25802. # high-bit is always set. If bit 6 is set, then it is a so-called
  25803. # new-style CTB; if bit 6 is clear, then it is a so-called old-style
  25804. # CTB. Old-style CTBs have only four bits of type information; bits
  25805. # 1-0 are used to describe the length. New-style CTBs have 6 bits of
  25806. # type information.
  25807. #
  25808. # Following the CTB is the packet's length in bytes. If we blindly
  25809. # advance the file cursor by this amount past the end of the length
  25810. # information we come to the next packet.
  25811. #
  25812. # Data Structures
  25813. # ===============
  25814. #
  25815. # New Style CTB
  25816. # -------------
  25817. #
  25818. # https://tools.ietf.org/html/rfc4880#section-4.2.2
  25819. #
  25820. # 76543210
  25821. # ||\----/
  25822. # || tag
  25823. # |always 1
  25824. # always 1
  25825. #
  25826. # Tag bits 7 and 6 set
  25827. # 0 0xC0 -- Reserved - a packet tag MUST NOT have this value
  25828. # 1 0xC1 -- Public-Key Encrypted Session Key Packet
  25829. # 2 0xC2 -- Signature Packet
  25830. # 3 0xC3 -- Symmetric-Key Encrypted Session Key Packet
  25831. # 4 0xC4 -- One-Pass Signature Packet
  25832. # 5 0xC5 -- Secret-Key Packet
  25833. # 6 0xC6 -- Public-Key Packet
  25834. # 7 0xC7 -- Secret-Subkey Packet
  25835. # 8 0xC8 -- Compressed Data Packet
  25836. # 9 0xC9 -- Symmetrically Encrypted Data Packet
  25837. # 10 0xCA -- Marker Packet
  25838. # 11 0xCB -- Literal Data Packet
  25839. # 12 0xCC -- Trust Packet
  25840. # 13 0xCD -- User ID Packet
  25841. # 14 0xCE -- Public-Subkey Packet
  25842. # 17 0xD1 -- User Attribute Packet
  25843. # 18 0xD2 -- Sym. Encrypted and Integrity Protected Data Packet
  25844. # 19 0xD3 -- Modification Detection Code Packet
  25845. # 60 to 63 -- Private or Experimental Values
  25846. #
  25847. # The CTB is followed by the length header, which is densely encoded:
  25848. #
  25849. # if length[0] is:
  25850. # 0..191: one byte length (length[0])
  25851. # 192..223: two byte length ((length[0] - 192) * 256 + length[2] + 192
  25852. # 224..254: four byte length (big endian interpretation of length[1..5])
  25853. # 255: partial body encoding
  25854. #
  25855. # The partial body encoding is similar to HTTP's chunk encoding. It
  25856. # is only allowed for container packets (SEIP, Compressed Data and
  25857. # Literal).
  25858. #
  25859. # Old Style CTB
  25860. # -------------
  25861. #
  25862. # https://tools.ietf.org/html/rfc4880#section-4.2.1
  25863. #
  25864. # CTB:
  25865. #
  25866. # 76543210
  25867. # ||\--/\/
  25868. # || | length encoding
  25869. # || tag
  25870. # |always 0
  25871. # always 1
  25872. #
  25873. # Tag:
  25874. #
  25875. # Tag bit 7 set, bits 6, 1, 0 clear
  25876. # 0 0x80 -- Reserved - a packet tag MUST NOT have this value
  25877. # 1 0x84 -- Public-Key Encrypted Session Key Packet
  25878. # 2 0x88 -- Signature Packet
  25879. # 3 0x8C -- Symmetric-Key Encrypted Session Key Packet
  25880. # 4 0x90 -- One-Pass Signature Packet
  25881. # 5 0x94 -- Secret-Key Packet
  25882. # 6 0x98 -- Public-Key Packet
  25883. # 7 0x9C -- Secret-Subkey Packet
  25884. # 8 0xA0 -- Compressed Data Packet
  25885. # 9 0xA4 -- Symmetrically Encrypted Data Packet
  25886. # 10 0xA8 -- Marker Packet
  25887. # 11 0xAC -- Literal Data Packet
  25888. # 12 0xB0 -- Trust Packet
  25889. # 13 0xB4 -- User ID Packet
  25890. # 14 0xB8 -- Public-Subkey Packet
  25891. #
  25892. # Length encoding:
  25893. #
  25894. # Value
  25895. # 0 1 byte length (following byte is the length)
  25896. # 1 2 byte length (following two bytes are the length)
  25897. # 2 4 byte length (following four bytes are the length)
  25898. # 3 indeterminate length: natural end of packet, e.g., EOF
  25899. #
  25900. # An indeterminate length is only allowed for container packets
  25901. # (SEIP, Compressed Data and Literal).
  25902. #
  25903. # Certificates
  25904. # ------------
  25905. #
  25906. # We check the first three packets to determine if a sequence of
  25907. # OpenPGP packets is likely to be a certificate. The grammar allows
  25908. # the following prefixes:
  25909. #
  25910. # [Primary Key] [SIG] (EOF or another certificate)
  25911. # [Primary Key] [SIG] [User ID] [SIG]...
  25912. # [Primary Key] [SIG] [User Attribute] [SIG]...
  25913. # [Primary Key] [SIG] [Subkey] [SIG]...
  25914. # [Primary Key] [User ID] [SIG]...
  25915. # [Primary Key] [User Attribute] [SIG]...
  25916. # [Primary Key] [Subkey] [SIG]...
  25917. #
  25918. # Any number of marker packets are also allowed between each packet,
  25919. # but they are not normally used and we don't currently check for
  25920. # them.
  25921. #
  25922. # The keys and subkeys may be public or private.
  25923. #
  25924. # Key packets and signature packets are versioned. There are two
  25925. # packet versions that we need to worry about in practice: v3 and v4.
  25926. # v4 packets were introduced in RFC 2440, which was published in 1998.
  25927. # It also deprecated v3 packets. There are no actively used v3
  25928. # certificates (GnuPG removed the code to support them in November
  25929. # 2014). But there are v3 keys lying around and it is useful to
  25930. # identify them. The next version of OpenPGP will introduce v5 keys.
  25931. # The document has not yet been standardized so changes are still
  25932. # possible. But, for our purposes, it appears that v5 data structures
  25933. # will be identical to v4 data structures modulo the version number.
  25934. #
  25935. # https://tools.ietf.org/html/rfc2440
  25936. # https://lists.gnupg.org/pipermail/gnupg-announce/2014q4/000358.html
  25937. # https://www.ietf.org/id/draft-ietf-openpgp-rfc4880bis-09.html#name-key-material-packet
  25938. # The first packet has to be a public key or a secret key.
  25939. #
  25940. # New-Style Public Key
  25941. 0 ubyte =0xC6 OpenPGP Public Key
  25942. >&0 use primary_key_length_new
  25943. # New-Style Secret Key
  25944. 0 ubyte =0xC5 OpenPGP Secret Key
  25945. >&0 use primary_key_length_new
  25946. # Old-Style Public Key
  25947. 0 ubyte&0xFC =0x98 OpenPGP Public Key
  25948. >&-1 use primary_key_length_old
  25949. # Old-Style Secret Key
  25950. 0 ubyte&0xFC =0x94 OpenPGP Secret Key
  25951. >&-1 use primary_key_length_old
  25952. # Parse the length, check the packet's body and finally advance to the
  25953. # next packet.
  25954. # There are 4 different new-style length encodings, but the partial
  25955. # body encoding is only acceptable for the SEIP, Compressed Data, and
  25956. # Literal packets, which isn't valid for any packets in a certificate
  25957. # so we ignore it.
  25958. 0 name primary_key_length_new
  25959. >&0 ubyte <192
  25960. #>>&0 ubyte x (1 byte length encoding, %d bytes)
  25961. >>&0 use pgp_binary_key_pk_check
  25962. >>>&(&-1.B) use sig_or_component_1
  25963. >&0 ubyte >191
  25964. >>&-1 ubyte <225
  25965. # offset = ((offset[0] - 192) << 8) + offset[1] + 192 (for the length header)
  25966. # raw - (192 * 256 - 192)
  25967. # = 48960
  25968. #>>>&0 ubeshort x (2 byte length encoding, %d bytes)
  25969. >>>&1 use pgp_binary_key_pk_check
  25970. >>>>&(&-2.S-48960) use sig_or_component_1
  25971. >&0 ubyte =255
  25972. #>>&0 belong x (5 byte length encoding, %d bytes)
  25973. >>&4 use pgp_binary_key_pk_check
  25974. >>>&(&-4.L) use sig_or_component_1
  25975. # Partial body encoding (only valid for container packets).
  25976. # >&0 ubyte >224
  25977. # >>&0 ubyte <255 partial body encoding
  25978. # There are 4 different old-style length encodings, but the
  25979. # indeterminate length encoding is only acceptable for the SEIP,
  25980. # Compressed Data, and Literal packets, which isn't valid for any
  25981. # packets in a certificate.
  25982. 0 name primary_key_length_old
  25983. #>&0 ubyte x (ctb: %x)
  25984. >&0 ubyte&0x3 =0
  25985. #>>&0 ubyte x (1 byte length encoding, %d bytes)
  25986. >>&1 use pgp_binary_key_pk_check
  25987. >>>&(&-1.B) use sig_or_component_1
  25988. >&0 ubyte&0x3 =1
  25989. #>>&0 ubeshort x (2 byte length encoding, %d bytes)
  25990. >>&2 use pgp_binary_key_pk_check
  25991. >>>&(&-2.S) use sig_or_component_1
  25992. >&0 ubyte&0x3 =2
  25993. #>>&0 ubelong x (4 byte length encoding, %d bytes)
  25994. >>&4 use pgp_binary_key_pk_check
  25995. >>>&(&-4.L) use sig_or_component_1
  25996. # Check the Key.
  25997. #
  25998. # https://tools.ietf.org/html/rfc4880#section-5.5.2
  25999. 0 name pgp_binary_key_pk_check
  26000. # Valid versions are: 2, 3, 4. 5 is proposed in RFC 4880bis.
  26001. # Anticipate a v6 / v7 format that like v5 is compatible with v4.
  26002. # key format in a decade or so :D.
  26003. >&0 ubyte >1
  26004. >>&-1 ubyte <8
  26005. >>>&-1 byte x Version %d
  26006. # Check that keys were created after 1990.
  26007. # (1990 - 1970) * 365.2524 * 24 * 60 * 60 = 631156147
  26008. >>>&0 bedate >631156147 \b, Created %s
  26009. >>>>&-5 ubyte >3
  26010. >>>>>&4 use pgp_binary_key_algo
  26011. >>>>&-5 ubyte <4
  26012. >>>>>&6 use pgp_binary_key_algo
  26013. # Print out the key's algorithm and the number of bits, if this is
  26014. # relevant (ECC keys are a fixed size).
  26015. 0 name pgp_binary_key_algo
  26016. >0 clear x
  26017. >&0 ubyte =1 \b, RSA (Encrypt or Sign,
  26018. >>&0 ubeshort x \b %d bits)
  26019. >&0 ubyte =2 \b, RSA (Encrypt,
  26020. >>&0 ubeshort x \b %d bits)
  26021. >&0 ubyte =3 \b, RSA (Sign,
  26022. >>&0 ubeshort x \b %d bits)
  26023. >&0 ubyte =16 \b, El Gamal (Encrypt,
  26024. >>&0 ubeshort x \b %d bits)
  26025. >&0 ubyte =17 \b, DSA
  26026. >>&0 ubeshort x \b (%d bits)
  26027. >&0 ubyte =18 \b, ECDH
  26028. >&0 ubyte =19 \b, ECDSA
  26029. >&0 ubyte =20 \b, El Gamal (Encrypt or Sign,
  26030. >>&0 ubeshort x \b %d bits)
  26031. >&0 ubyte =22 \b, EdDSA
  26032. >&0 default x
  26033. >>&0 ubyte x \b, Unknown Algorithm (0x%x)
  26034. # Match all possible second packets.
  26035. 0 name sig_or_component_1
  26036. #>0 ubyte x (ctb: %x)
  26037. >&0 ubyte =0xC2
  26038. >>0 ubyte x \b; Signature
  26039. >>&0 use sig_or_component_1_length_new
  26040. >&0 ubyte =0xCD
  26041. >>0 ubyte x \b; User ID
  26042. >>&0 use sig_or_component_1_length_new
  26043. >&0 ubyte =0xCE
  26044. >>0 ubyte x \b; Public Subkey
  26045. >>&0 use sig_or_component_1_length_new
  26046. >&0 ubyte =0xC7
  26047. >>0 ubyte x \b; Secret Subkey
  26048. >>&0 use sig_or_component_1_length_new
  26049. >&0 ubyte =0xD1
  26050. >>0 ubyte x \b; User Attribute
  26051. >>&0 use sig_or_component_1_length_new
  26052. >&0 ubyte&0xFC =0x88
  26053. >>0 ubyte x \b; Signature
  26054. >>&-1 use sig_or_component_1_length_old
  26055. >&0 ubyte&0xFC =0xB4
  26056. >>0 ubyte x \b; User ID
  26057. >>&-1 use sig_or_component_1_length_old
  26058. >&0 ubyte&0xFC =0xB8
  26059. >>0 ubyte x \b; Public Subkey
  26060. >>&-1 use sig_or_component_1_length_old
  26061. >&0 ubyte&0xFC =0x9C
  26062. >>0 ubyte x \b; Secret Subkey
  26063. >>&-1 use sig_or_component_1_length_old
  26064. # Copy of 'primary_key_length_new', but calls cert_packet_3.
  26065. 0 name sig_or_component_1_length_new
  26066. >&0 ubyte <192
  26067. #>>&0 ubyte x (1 byte new length encoding, %d bytes)
  26068. >>&(&-1.B) use cert_packet_3
  26069. >&0 ubyte >191
  26070. >>&-1 ubyte <225
  26071. # offset = ((offset[0] - 192) << 8) + offset[1] + 192 + 1 (for the length header)
  26072. # raw - (192 * 256 - 192 - 1)
  26073. # = 48959
  26074. #>>>&-1 ubeshort x (2 byte new length encoding, %d bytes)
  26075. >>>&(&-1.S-48959) use cert_packet_3
  26076. >&0 ubyte =255
  26077. #>>&0 belong x (5 byte new length encoding, %d bytes)
  26078. >>&(&-4.L) use cert_packet_3
  26079. # Partial body encoding (only valid for container packets).
  26080. # >&0 ubyte >224
  26081. # >>&0 ubyte <255 partial body encoding
  26082. 0 name sig_or_component_1_length_old
  26083. #>&0 ubyte x (ctb: %x)
  26084. >&0 ubyte&0x3 =0
  26085. #>>&0 ubyte x (1 byte old length encoding, %d bytes)
  26086. >>&(&0.B+1) use cert_packet_3
  26087. >&0 ubyte&0x3 =1
  26088. #>>&0 ubeshort x (2 byte old length encoding, %d bytes)
  26089. >>&(&0.S+2) use cert_packet_3
  26090. >&0 ubyte&0x3 =2
  26091. #>>&0 ubelong x (4 byte old length encoding, %d bytes)
  26092. >>&(&0.L+4) use cert_packet_3
  26093. # Copy of above.
  26094. 0 name cert_packet_3
  26095. #>0 ubyte x (ctb: %x)
  26096. >&0 ubyte =0xC2
  26097. >>0 ubyte x \b; Signature
  26098. >>&0 use cert_packet_3_length_new
  26099. >&0 ubyte =0xCD
  26100. >>0 ubyte x \b; User ID
  26101. >>&0 use cert_packet_3_length_new
  26102. >&0 ubyte =0xCE
  26103. >>0 ubyte x \b; Public Subkey
  26104. >>&0 use cert_packet_3_length_new
  26105. >&0 ubyte =0xC7
  26106. >>0 ubyte x \b; Secret Subkey
  26107. >>&0 use cert_packet_3_length_new
  26108. >&0 ubyte =0xD1
  26109. >>0 ubyte x \b; User Attribute
  26110. >>&0 use cert_packet_3_length_new
  26111. >&0 ubyte&0xFC =0x88
  26112. >>0 ubyte x \b; Signature
  26113. >>&-1 use cert_packet_3_length_old
  26114. >&0 ubyte&0xFC =0xB4
  26115. >>0 ubyte x \b; User ID
  26116. >>&-1 use cert_packet_3_length_old
  26117. >&0 ubyte&0xFC =0xB8
  26118. >>0 ubyte x \b; Public Subkey
  26119. >>&-1 use cert_packet_3_length_old
  26120. >&0 ubyte&0xFC =0x9C
  26121. >>0 ubyte x \b; Secret Subkey
  26122. >>&-1 use cert_packet_3_length_old
  26123. # Copy of above.
  26124. 0 name cert_packet_3_length_new
  26125. >&0 ubyte <192
  26126. #>>&0 ubyte x (1 byte new length encoding, %d bytes)
  26127. >>&(&-1.B) use pgp_binary_keys_end
  26128. >&0 ubyte >191
  26129. >>&-1 ubyte <225
  26130. # offset = ((offset[0] - 192) << 8) + offset[1] + 192 + 1 (for the length header)
  26131. # raw - (192 * 256 - 192 - 1)
  26132. # = 48959
  26133. #>>>&-1 ubeshort x (2 byte new length encoding, %d bytes)
  26134. >>>&(&-1.S-48959) use pgp_binary_keys_end
  26135. >&0 ubyte =255
  26136. #>>&0 belong x (5 byte new length encoding, %d bytes)
  26137. >>&(&-4.L) use pgp_binary_keys_end
  26138. 0 name cert_packet_3_length_old
  26139. #>&0 ubyte x (ctb: %x)
  26140. >&0 ubyte&0x3 =0
  26141. #>>&0 ubyte x (1 byte old length encoding, %d bytes)
  26142. >>&(&0.B+1) use pgp_binary_keys_end
  26143. >&0 ubyte&0x3 =1
  26144. #>>&0 ubeshort x (2 byte old length encoding, %d bytes)
  26145. >>&(&0.S+2) use pgp_binary_keys_end
  26146. >&0 ubyte&0x3 =2
  26147. #>>&0 ubelong x (4 byte old length encoding, %d bytes)
  26148. >>&(&0.L+4) use pgp_binary_keys_end
  26149. # We managed to parse the first three packets of the certificate. Declare
  26150. # victory.
  26151. 0 name pgp_binary_keys_end
  26152. >0 byte x \b; OpenPGP Certificate
  26153. !:mime application/pgp-keys
  26154. !:ext pgp/gpg/pkr/asd
  26155. #------------------------------------------------------------------------------
  26156. # $File: pkgadd,v 1.6 2009/09/19 16:28:11 christos Exp $
  26157. # pkgadd: file(1) magic for SysV R4 PKG Datastreams
  26158. #
  26159. 0 string #\ PaCkAgE\ DaTaStReAm pkg Datastream (SVR4)
  26160. !:mime application/x-svr4-package
  26161. #------------------------------------------------------------------------------
  26162. # $File: plan9,v 1.5 2009/09/19 16:28:11 christos Exp $
  26163. # plan9: file(1) magic for AT&T Bell Labs' Plan 9 executables
  26164. # From: "Stefan A. Haubenthal" <polluks@web.de>
  26165. #
  26166. 0 belong 0x00000107 Plan 9 executable, Motorola 68k
  26167. 0 belong 0x000001EB Plan 9 executable, Intel 386
  26168. 0 belong 0x00000247 Plan 9 executable, Intel 960
  26169. 0 belong 0x000002AB Plan 9 executable, SPARC
  26170. 0 belong 0x00000407 Plan 9 executable, MIPS R3000
  26171. 0 belong 0x0000048B Plan 9 executable, AT&T DSP 3210
  26172. 0 belong 0x00000517 Plan 9 executable, MIPS R4000 BE
  26173. 0 belong 0x000005AB Plan 9 executable, AMD 29000
  26174. 0 belong 0x00000647 Plan 9 executable, ARM 7-something
  26175. 0 belong 0x000006EB Plan 9 executable, PowerPC
  26176. 0 belong 0x00000797 Plan 9 executable, MIPS R4000 LE
  26177. 0 belong 0x0000084B Plan 9 executable, DEC Alpha
  26178. #------------------------------------------------------------------------------
  26179. # $File: plus5,v 1.6 2009/09/19 16:28:11 christos Exp $
  26180. # plus5: file(1) magic for Plus Five's UNIX MUMPS
  26181. #
  26182. # XXX - byte order? Paging Hokey....
  26183. #
  26184. 0 short 0x259 mumps avl global
  26185. >2 byte >0 (V%d)
  26186. >6 byte >0 with %d byte name
  26187. >7 byte >0 and %d byte data cells
  26188. 0 short 0x25a mumps blt global
  26189. >2 byte >0 (V%d)
  26190. >8 short >0 - %d byte blocks
  26191. >15 byte 0x00 - P/D format
  26192. >15 byte 0x01 - P/K/D format
  26193. >15 byte 0x02 - K/D format
  26194. >15 byte >0x02 - Bad Flags
  26195. #------------------------------------------------------------------------------
  26196. # $File: pmem,v 1.3 2019/06/13 11:45:44 christos Exp $
  26197. # pmem: file(1) magic for Persistent Memory Development Kit pool files
  26198. #
  26199. 0 string PMEM
  26200. >4 string POOLSET Persistent Memory Poolset file
  26201. >>11 search REPLICA with replica
  26202. >4 regex LOG|BLK|OBJ Persistent Memory Pool file, type: %s,
  26203. >>8 lelong >0 version: 0x%x,
  26204. >>12 lelong x compat: 0x%x,
  26205. >>16 lelong x incompat: 0x%x,
  26206. >>20 lelong x ro_compat: 0x%x,
  26207. >>120 leqldate x crtime: %s,
  26208. >>128 lequad x alignment_desc: 0x%016llx,
  26209. >>136 clear x
  26210. >>136 byte 2 machine_class: 64-bit,
  26211. >>136 default x machine_class: unknown
  26212. >>>136 byte x (0x%d),
  26213. >>137 clear x
  26214. >>137 byte 1 data: little-endian,
  26215. >>137 byte 2 data: big-endian,
  26216. >>137 default x data: unknown
  26217. >>>137 byte x (0x%d),
  26218. >>138 byte !0 reserved[0]: %d,
  26219. >>139 byte !0 reserved[1]: %d,
  26220. >>140 byte !0 reserved[2]: %d,
  26221. >>141 byte !0 reserved[3]: %d,
  26222. >>142 clear x
  26223. >>142 leshort 62 machine: x86_64
  26224. >>142 leshort 183 machine: aarch64
  26225. >>142 default x machine: unknown
  26226. >>>142 leshort x (0x%d)
  26227. >4 string BLK
  26228. >>4096 lelong x \b, blk.bsize: %d
  26229. >4 string OBJ
  26230. >>4096 string >0 \b, obj.layout: '%s'
  26231. >>4096 string <0 \b, obj.layout: NULL
  26232. #------------------------------------------------------------------------------
  26233. # $File: polyml,v 1.2 2019/04/19 00:42:27 christos Exp $
  26234. # polyml: file(1) magic for PolyML
  26235. #
  26236. # PolyML
  26237. # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  26238. # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
  26239. # [0]: https://www.polyml.org/
  26240. # [1]: https://github.com/polyml/polyml/blob/master/\
  26241. # libpolyml/savestate.cpp#L146-L147
  26242. # [2]: https://github.com/polyml/polyml/blob/master/\
  26243. # libpolyml/savestate.cpp#L1262-L1263
  26244. # Type: Poly/ML saved data
  26245. # From: Matthew Fernandez <matthew.fernandez@gmail.com>
  26246. 0 string POLYSAVE Poly/ML saved state
  26247. >8 long x version %u
  26248. 0 string POLYMODU Poly/ML saved module
  26249. >8 long x version %u
  26250. #------------------------------------------------------------------------------
  26251. # $File: printer,v 1.29 2019/04/19 00:42:27 christos Exp $
  26252. # printer: file(1) magic for printer-formatted files
  26253. #
  26254. # PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com)
  26255. 0 string %! PostScript document text
  26256. !:mime application/postscript
  26257. !:apple ASPSTEXT
  26258. >2 string PS-Adobe- conforming
  26259. >>11 string >\0 DSC level %.3s
  26260. >>>15 string EPS \b, type %s
  26261. >>>15 string Query \b, type %s
  26262. >>>15 string ExitServer \b, type %s
  26263. >>>15 search/1000 %%LanguageLevel:\040
  26264. >>>>&0 string >\0 \b, Level %s
  26265. # Some PCs have the annoying habit of adding a ^D as a document separator
  26266. 0 string \004%! PostScript document text
  26267. !:mime application/postscript
  26268. !:apple ASPSTEXT
  26269. >3 string PS-Adobe- conforming
  26270. >>12 string >\0 DSC level %.3s
  26271. >>>16 string EPS \b, type %s
  26272. >>>16 string Query \b, type %s
  26273. >>>16 string ExitServer \b, type %s
  26274. >>>16 search/1000 %%LanguageLevel:\040
  26275. >>>>&0 string >\0 \b, Level %s
  26276. 0 string \033%-12345X%!PS PostScript document
  26277. # DOS EPS Binary File Header
  26278. # From: Ed Sznyter <ews@Black.Market.NET>
  26279. 0 belong 0xC5D0D3C6 DOS EPS Binary File
  26280. >4 long >0 Postscript starts at byte %d
  26281. >>8 long >0 length %d
  26282. >>>12 long >0 Metafile starts at byte %d
  26283. >>>>16 long >0 length %d
  26284. >>>20 long >0 TIFF starts at byte %d
  26285. >>>>24 long >0 length %d
  26286. # Summary: Adobe's PostScript Printer Description File
  26287. # Extension: .ppd
  26288. # Reference: https://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf, Section 3.8
  26289. # Submitted by: Yves Arrouye <arrouye@marin.fdn.fr>
  26290. #
  26291. 0 string *PPD-Adobe:\x20 PPD file
  26292. >&0 string x \b, version %s
  26293. # HP Printer Job Language
  26294. 0 string \033%-12345X@PJL HP Printer Job Language data
  26295. # HP Printer Job Language
  26296. # The header found on Win95 HP plot files is the "Silliest Thing possible"
  26297. # (TM)
  26298. # Every driver puts the language at some random position, with random case
  26299. # (LANGUAGE and Language)
  26300. # For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
  26301. # From: Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
  26302. #
  26303. 0 string \033%-12345X@PJL HP Printer Job Language data
  26304. >&0 string >\0 %s
  26305. >>&0 string >\0 %s
  26306. >>>&0 string >\0 %s
  26307. >>>>&0 string >\0 %s
  26308. #>15 string \ ENTER\ LANGUAGE\ =
  26309. #>31 string PostScript PostScript
  26310. # From: Stefan Thurner <thurners@nicsys.de>
  26311. 0 string \033%-12345X@PJL
  26312. >&0 search/10000 %! PJL encapsulated PostScript document text
  26313. # Rick Richardson <rickrich@gmail.com>
  26314. # For Fuji-Xerox Printers - HBPL stands for Host Based Printer Language
  26315. # For Oki Data Printers - HIPERC
  26316. # For Konica Minolta Printers - LAVAFLOW
  26317. # For Samsung Printers - QPDL
  26318. # For HP Printers - ZJS stands for Zenographics ZJStream
  26319. 0 string \033%-12345X@PJL HP Printer Job Language data
  26320. >0 search/10000 @PJL\ ENTER\ LANGUAGE=HBPL - HBPL
  26321. >0 search/10000 @PJL\ ENTER\ LANGUAGE=HIPERC - Oki Data HIPERC
  26322. >0 search/10000 @PJL\ ENTER\ LANGUAGE=LAVAFLOW - Konica Minolta LAVAFLOW
  26323. >0 search/10000 @PJL\ ENTER\ LANGUAGE=QPDL - Samsung QPDL
  26324. >0 search/10000 @PJL\ ENTER\ LANGUAGE\ =\ QPDL - Samsung QPDL
  26325. >0 search/10000 @PJL\ ENTER\ LANGUAGE=ZJS - HP ZJS
  26326. # HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com)
  26327. 0 string \033E\033 HP PCL printer data
  26328. >3 string \&l0A - default page size
  26329. >3 string \&l1A - US executive page size
  26330. >3 string \&l2A - US letter page size
  26331. >3 string \&l3A - US legal page size
  26332. >3 string \&l26A - A4 page size
  26333. >3 string \&l80A - Monarch envelope size
  26334. >3 string \&l81A - No. 10 envelope size
  26335. >3 string \&l90A - Intl. DL envelope size
  26336. >3 string \&l91A - Intl. C5 envelope size
  26337. >3 string \&l100A - Intl. B5 envelope size
  26338. >3 string \&l-81A - No. 10 envelope size (landscape)
  26339. >3 string \&l-90A - Intl. DL envelope size (landscape)
  26340. # IMAGEN printer-ready files:
  26341. 0 string @document( Imagen printer
  26342. # this only works if "language xxx" is first item in Imagen header.
  26343. >10 string language\ impress (imPRESS data)
  26344. >10 string language\ daisy (daisywheel text)
  26345. >10 string language\ diablo (daisywheel text)
  26346. >10 string language\ printer (line printer emulation)
  26347. >10 string language\ tektronix (Tektronix 4014 emulation)
  26348. # Add any other languages that your Imagen uses - remember
  26349. # to keep the word `text' if the file is human-readable.
  26350. # [GRR 950115: missing "postscript" or "ultrascript" (whatever it was called)]
  26351. #
  26352. # Now magic for IMAGEN font files...
  26353. 0 string Rast RST-format raster font data
  26354. >45 string >0 face %s
  26355. # From Jukka Ukkonen
  26356. 0 string \033[K\002\0\0\017\033(a\001\0\001\033(g Canon Bubble Jet BJC formatted data
  26357. # From <mike@flyn.org>
  26358. # These are the /etc/magic entries to decode data sent to an Epson printer.
  26359. 0 string \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P Epson Stylus Color 460 data
  26360. #------------------------------------------------------------------------------
  26361. # zenographics: file(1) magic for Zenographics ZjStream printer data
  26362. # Rick Richardson <rickrich@gmail.com>
  26363. 0 string JZJZ
  26364. >0x12 string ZZ Zenographics ZjStream printer data (big-endian)
  26365. 0 string ZJZJ
  26366. >0x12 string ZZ Zenographics ZjStream printer data (little-endian)
  26367. #------------------------------------------------------------------------------
  26368. # Oak Technologies printer stream
  26369. # Rick Richardson <rickrich@gmail.com>
  26370. 0 string OAK
  26371. >0x07 byte 0
  26372. >0x0b byte 0 Oak Technologies printer stream
  26373. # This would otherwise be recognized as PostScript - nick@debian.org
  26374. 0 string %!VMF SunClock's Vector Map Format data
  26375. #------------------------------------------------------------------------------
  26376. # HP LaserJet 1000 series downloadable firmware file
  26377. 0 string \xbe\xefABCDEFGH HP LaserJet 1000 series downloadable firmware
  26378. # From: Paolo <oopla@users.sf.net>
  26379. # Epson ESC/Page, ESC/PageColor
  26380. 0 string \x1b\x01@EJL Epson ESC/Page language printer data
  26381. #------------------------------------------------------------------------------
  26382. # $File: project,v 1.5 2017/03/17 21:35:28 christos Exp $
  26383. # project: file(1) magic for Project management
  26384. #
  26385. # Magic strings for ftnchek project files. Alexander Mai
  26386. 0 string FTNCHEK_\ P project file for ftnchek
  26387. >10 string 1 version 2.7
  26388. >10 string 2 version 2.8 to 2.10
  26389. >10 string 3 version 2.11 or later
  26390. #------------------------------------------------------------------------------
  26391. # $File: psdbms,v 1.8 2017/03/17 21:35:28 christos Exp $
  26392. # psdbms: file(1) magic for psdatabase
  26393. #
  26394. # Update: Joerg Jenderek
  26395. # GRR: line below too general as it catches also some Panorama database *.pan ,
  26396. # AppleWorks word processor
  26397. 0 belong&0xff00ffff 0x56000000
  26398. # assume version starts with digit
  26399. >1 regex/s =^[0-9] ps database
  26400. >>1 string >\0 version %s
  26401. # kernel name
  26402. >>4 string >\0 from kernel %s
  26403. #------------------------------------------------------------------------------
  26404. # $File: psl,v 1.3 2019/04/19 00:42:27 christos Exp $
  26405. # psl: file(1) magic for Public Suffix List representations
  26406. # From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  26407. # URL: https://publicsuffix.org
  26408. # see also: https://thread.gmane.org/gmane.network.dns.libpsl.bugs/162/focus=166
  26409. 0 search/512 \n\n//\ ===BEGIN\ ICANN\ DOMAINS===\n\n Public Suffix List data
  26410. 0 string .DAFSA@PSL_
  26411. >15 string \n Public Suffix List data (optimized)
  26412. >>11 byte >0x2f
  26413. >>>11 byte <0x3a (Version %c)
  26414. #------------------------------------------------------------------------------
  26415. # $File: pulsar,v 1.5 2009/09/19 16:28:12 christos Exp $
  26416. # pulsar: file(1) magic for Pulsar POP3 daemon binary files
  26417. #
  26418. # http://pulsar.sourceforge.net
  26419. # mailto:rok.papez@lugos.si
  26420. #
  26421. 0 belong 0x1ee7f11e Pulsar POP3 daemon mailbox cache file.
  26422. >4 ubelong x Version: %d.
  26423. >8 ubelong x \b%d
  26424. #------------------------------------------------------------------------------
  26425. # $File: pwsafe,v 1.2 2019/04/19 00:42:27 christos Exp $
  26426. # pwsafe: file(1) magic for passwordsafe file
  26427. #
  26428. # Password Safe
  26429. # http://passwordsafe.sourceforge.net/
  26430. # file format specs
  26431. # https://passwordsafe.svn.sourceforge.net/viewvc/passwordsafe/trunk/pwsafe/pwsafe/docs/formatV3.txt
  26432. # V2 https://passwordsafe.svn.sourceforge.net/viewvc/passwordsafe/trunk/pwsafe/pwsafe/docs/formatV2.txt
  26433. # V1 https://passwordsafe.svn.sourceforge.net/viewvc/passwordsafe/trunk/pwsafe/pwsafe/docs/notes.txt
  26434. # V2 and V1 have no easy identifier that I can find
  26435. # .psafe3
  26436. 0 string PWS3 Password Safe V3 database
  26437. #------------------------------------------------------------------------------
  26438. # $File: pyramid,v 1.7 2009/09/19 16:28:12 christos Exp $
  26439. # pyramid: file(1) magic for Pyramids
  26440. #
  26441. # XXX - byte order?
  26442. #
  26443. 0 long 0x50900107 Pyramid 90x family executable
  26444. 0 long 0x50900108 Pyramid 90x family pure executable
  26445. >16 long >0 not stripped
  26446. 0 long 0x5090010b Pyramid 90x family demand paged pure executable
  26447. >16 long >0 not stripped
  26448. #------------------------------------------------------------------------------
  26449. # $File: python,v 1.42 2020/06/04 00:22:50 christos Exp $
  26450. # python: file(1) magic for python
  26451. #
  26452. # Outlook puts """ too for urgent messages
  26453. # From: David Necas <yeti@physics.muni.cz>
  26454. # often the module starts with a multiline string
  26455. 0 string/t """ Python script text executable
  26456. # MAGIC as specified in Python/import.c (1.0 to 3.7)
  26457. # two bytes of magic followed by "\r\n" in little endian order
  26458. 0 belong 0x02099900 python 1.0 byte-compiled
  26459. !:mime text/x-bytecode.python
  26460. 0 belong 0x03099900 python 1.1/1.2 byte-compiled
  26461. !:mime text/x-bytecode.python
  26462. 0 belong 0x892e0d0a python 1.3 byte-compiled
  26463. !:mime text/x-bytecode.python
  26464. 0 belong 0x04170d0a python 1.4 byte-compiled
  26465. !:mime text/x-bytecode.python
  26466. 0 belong 0x994e0d0a python 1.5 byte-compiled
  26467. !:mime text/x-bytecode.python
  26468. 0 belong 0xfcc40d0a python 1.6 byte-compiled
  26469. !:mime text/x-bytecode.python
  26470. 0 belong 0xfdc40d0a python 1.6 byte-compiled
  26471. !:mime text/x-bytecode.python
  26472. 0 belong 0x87c60d0a python 2.0 byte-compiled
  26473. !:mime text/x-bytecode.python
  26474. 0 belong 0x88c60d0a python 2.0 byte-compiled
  26475. !:mime text/x-bytecode.python
  26476. 0 belong 0x2aeb0d0a python 2.1 byte-compiled
  26477. !:mime text/x-bytecode.python
  26478. 0 belong 0x2beb0d0a python 2.1 byte-compiled
  26479. !:mime text/x-bytecode.python
  26480. 0 belong 0x2ded0d0a python 2.2 byte-compiled
  26481. !:mime text/x-bytecode.python
  26482. 0 belong 0x2eed0d0a python 2.2 byte-compiled
  26483. !:mime text/x-bytecode.python
  26484. 0 belong 0x3bf20d0a python 2.3 byte-compiled
  26485. !:mime text/x-bytecode.python
  26486. 0 belong 0x3cf20d0a python 2.3 byte-compiled
  26487. !:mime text/x-bytecode.python
  26488. 0 belong 0x45f20d0a python 2.3 byte-compiled
  26489. !:mime text/x-bytecode.python
  26490. 0 belong 0x59f20d0a python 2.4 byte-compiled
  26491. !:mime text/x-bytecode.python
  26492. 0 belong 0x63f20d0a python 2.4 byte-compiled
  26493. !:mime text/x-bytecode.python
  26494. 0 belong 0x6df20d0a python 2.4 byte-compiled
  26495. !:mime text/x-bytecode.python
  26496. 0 belong 0x6ef20d0a python 2.4 byte-compiled
  26497. !:mime text/x-bytecode.python
  26498. 0 belong 0x77f20d0a python 2.5 byte-compiled
  26499. !:mime text/x-bytecode.python
  26500. 0 belong 0x81f20d0a python 2.5 byte-compiled
  26501. !:mime text/x-bytecode.python
  26502. 0 belong 0x8bf20d0a python 2.5 byte-compiled
  26503. !:mime text/x-bytecode.python
  26504. 0 belong 0x8cf20d0a python 2.5 byte-compiled
  26505. !:mime text/x-bytecode.python
  26506. 0 belong 0x95f20d0a python 2.5 byte-compiled
  26507. !:mime text/x-bytecode.python
  26508. 0 belong 0x9ff20d0a python 2.5 byte-compiled
  26509. !:mime text/x-bytecode.python
  26510. 0 belong 0xa9f20d0a python 2.5 byte-compiled
  26511. !:mime text/x-bytecode.python
  26512. 0 belong 0xb3f20d0a python 2.5 byte-compiled
  26513. !:mime text/x-bytecode.python
  26514. 0 belong 0xb4f20d0a python 2.5 byte-compiled
  26515. !:mime text/x-bytecode.python
  26516. 0 belong 0xc7f20d0a python 2.6 byte-compiled
  26517. !:mime text/x-bytecode.python
  26518. 0 belong 0xd1f20d0a python 2.6 byte-compiled
  26519. !:mime text/x-bytecode.python
  26520. 0 belong 0xd2f20d0a python 2.6 byte-compiled
  26521. !:mime text/x-bytecode.python
  26522. 0 belong 0xdbf20d0a python 2.7 byte-compiled
  26523. !:mime text/x-bytecode.python
  26524. 0 belong 0xe5f20d0a python 2.7 byte-compiled
  26525. !:mime text/x-bytecode.python
  26526. 0 belong 0xeff20d0a python 2.7 byte-compiled
  26527. !:mime text/x-bytecode.python
  26528. 0 belong 0xf9f20d0a python 2.7 byte-compiled
  26529. !:mime text/x-bytecode.python
  26530. 0 belong 0x03f30d0a python 2.7 byte-compiled
  26531. !:mime text/x-bytecode.python
  26532. 0 belong 0x04f30d0a python 2.7 byte-compiled
  26533. !:mime text/x-bytecode.python
  26534. 0 belong 0xb80b0d0a python 3.0 byte-compiled
  26535. !:mime text/x-bytecode.python
  26536. 0 belong 0xc20b0d0a python 3.0 byte-compiled
  26537. !:mime text/x-bytecode.python
  26538. 0 belong 0xcc0b0d0a python 3.0 byte-compiled
  26539. !:mime text/x-bytecode.python
  26540. 0 belong 0xd60b0d0a python 3.0 byte-compiled
  26541. !:mime text/x-bytecode.python
  26542. 0 belong 0xe00b0d0a python 3.0 byte-compiled
  26543. !:mime text/x-bytecode.python
  26544. 0 belong 0xea0b0d0a python 3.0 byte-compiled
  26545. !:mime text/x-bytecode.python
  26546. 0 belong 0xf40b0d0a python 3.0 byte-compiled
  26547. !:mime text/x-bytecode.python
  26548. 0 belong 0xf50b0d0a python 3.0 byte-compiled
  26549. !:mime text/x-bytecode.python
  26550. 0 belong 0xff0b0d0a python 3.0 byte-compiled
  26551. !:mime text/x-bytecode.python
  26552. 0 belong 0x090c0d0a python 3.0 byte-compiled
  26553. !:mime text/x-bytecode.python
  26554. 0 belong 0x130c0d0a python 3.0 byte-compiled
  26555. !:mime text/x-bytecode.python
  26556. 0 belong 0x1d0c0d0a python 3.0 byte-compiled
  26557. !:mime text/x-bytecode.python
  26558. 0 belong 0x1f0c0d0a python 3.0 byte-compiled
  26559. !:mime text/x-bytecode.python
  26560. 0 belong 0x270c0d0a python 3.0 byte-compiled
  26561. !:mime text/x-bytecode.python
  26562. 0 belong 0x3b0c0d0a python 3.0 byte-compiled
  26563. !:mime text/x-bytecode.python
  26564. 0 belong 0x450c0d0a python 3.1 byte-compiled
  26565. !:mime text/x-bytecode.python
  26566. 0 belong 0x4f0c0d0a python 3.1 byte-compiled
  26567. !:mime text/x-bytecode.python
  26568. 0 belong 0x580c0d0a python 3.2 byte-compiled
  26569. !:mime text/x-bytecode.python
  26570. 0 belong 0x620c0d0a python 3.2 byte-compiled
  26571. !:mime text/x-bytecode.python
  26572. 0 belong 0x6c0c0d0a python 3.2 byte-compiled
  26573. !:mime text/x-bytecode.python
  26574. 0 belong 0x760c0d0a python 3.3 byte-compiled
  26575. !:mime text/x-bytecode.python
  26576. 0 belong 0x800c0d0a python 3.3 byte-compiled
  26577. !:mime text/x-bytecode.python
  26578. 0 belong 0x8a0c0d0a python 3.3 byte-compiled
  26579. !:mime text/x-bytecode.python
  26580. 0 belong 0x940c0d0a python 3.3 byte-compiled
  26581. !:mime text/x-bytecode.python
  26582. 0 belong 0x9e0c0d0a python 3.3 byte-compiled
  26583. !:mime text/x-bytecode.python
  26584. 0 belong 0xb20c0d0a python 3.4 byte-compiled
  26585. !:mime text/x-bytecode.python
  26586. 0 belong 0xbc0c0d0a python 3.4 byte-compiled
  26587. !:mime text/x-bytecode.python
  26588. 0 belong 0xc60c0d0a python 3.4 byte-compiled
  26589. !:mime text/x-bytecode.python
  26590. 0 belong 0xd00c0d0a python 3.4 byte-compiled
  26591. !:mime text/x-bytecode.python
  26592. 0 belong 0xda0c0d0a python 3.4 byte-compiled
  26593. !:mime text/x-bytecode.python
  26594. 0 belong 0xe40c0d0a python 3.4 byte-compiled
  26595. !:mime text/x-bytecode.python
  26596. 0 belong 0xee0c0d0a python 3.4 byte-compiled
  26597. !:mime text/x-bytecode.python
  26598. 0 belong 0xf80c0d0a python 3.5.1- byte-compiled
  26599. !:mime text/x-bytecode.python
  26600. 0 belong 0x020d0d0a python 3.5.1- byte-compiled
  26601. !:mime text/x-bytecode.python
  26602. 0 belong 0x0c0d0d0a python 3.5.1- byte-compiled
  26603. !:mime text/x-bytecode.python
  26604. 0 belong 0x160d0d0a python 3.5.1- byte-compiled
  26605. !:mime text/x-bytecode.python
  26606. 0 belong 0x170d0d0a python 3.5.2+ byte-compiled
  26607. !:mime text/x-bytecode.python
  26608. 0 belong 0x200d0d0a python 3.6 byte-compiled
  26609. !:mime text/x-bytecode.python
  26610. 0 belong 0x210d0d0a python 3.6 byte-compiled
  26611. !:mime text/x-bytecode.python
  26612. 0 belong 0x2a0d0d0a python 3.6 byte-compiled
  26613. !:mime text/x-bytecode.python
  26614. 0 belong 0x2b0d0d0a python 3.6 byte-compiled
  26615. !:mime text/x-bytecode.python
  26616. 0 belong 0x2c0d0d0a python 3.6 byte-compiled
  26617. !:mime text/x-bytecode.python
  26618. 0 belong 0x2d0d0d0a python 3.6 byte-compiled
  26619. !:mime text/x-bytecode.python
  26620. 0 belong 0x2f0d0d0a python 3.6 byte-compiled
  26621. !:mime text/x-bytecode.python
  26622. 0 belong 0x300d0d0a python 3.6 byte-compiled
  26623. !:mime text/x-bytecode.python
  26624. 0 belong 0x310d0d0a python 3.6 byte-compiled
  26625. !:mime text/x-bytecode.python
  26626. 0 belong 0x320d0d0a python 3.6 byte-compiled
  26627. !:mime text/x-bytecode.python
  26628. 0 belong 0x330d0d0a python 3.6 byte-compiled
  26629. !:mime text/x-bytecode.python
  26630. 0 belong 0x3e0d0d0a python 3.7 byte-compiled
  26631. !:mime text/x-bytecode.python
  26632. 0 belong 0x3f0d0d0a python 3.7 byte-compiled
  26633. !:mime text/x-bytecode.python
  26634. 0 belong 0x400d0d0a python 3.7 byte-compiled
  26635. !:mime text/x-bytecode.python
  26636. 0 belong 0x410d0d0a python 3.7 byte-compiled
  26637. !:mime text/x-bytecode.python
  26638. 0 belong 0x420d0d0a python 3.7 byte-compiled
  26639. !:mime text/x-bytecode.python
  26640. 0 belong 0x480d0d0a python 3.8 byte-compiled
  26641. !:mime text/x-bytecode.python
  26642. 0 belong 0x490d0d0a python 3.8 byte-compiled
  26643. !:mime text/x-bytecode.python
  26644. 0 belong 0x520d0d0a python 3.8 byte-compiled
  26645. !:mime text/x-bytecode.python
  26646. 0 belong 0x530d0d0a python 3.8 byte-compiled
  26647. !:mime text/x-bytecode.python
  26648. 0 belong 0x540d0d0a python 3.8 byte-compiled
  26649. !:mime text/x-bytecode.python
  26650. 0 belong 0x550d0d0a python 3.8 byte-compiled
  26651. !:mime text/x-bytecode.python
  26652. 0 belong 0x5c0d0d0a python 3.9 byte-compiled
  26653. !:mime text/x-bytecode.python
  26654. 0 belong 0x5d0d0d0a python 3.9 byte-compiled
  26655. !:mime text/x-bytecode.python
  26656. 0 belong 0x5e0d0d0a python 3.9 byte-compiled
  26657. !:mime text/x-bytecode.python
  26658. 0 belong 0x5f0d0d0a python 3.9 byte-compiled
  26659. !:mime text/x-bytecode.python
  26660. 0 belong 0x600d0d0a python 3.9 byte-compiled
  26661. !:mime text/x-bytecode.python
  26662. 0 belong 0x610d0d0a python 3.9 byte-compiled
  26663. !:mime text/x-bytecode.python
  26664. 0 search/1/w #!\040/usr/bin/python Python script text executable
  26665. !:strength + 15
  26666. !:mime text/x-script.python
  26667. 0 search/1/w #!\040/usr/local/bin/python Python script text executable
  26668. !:strength + 15
  26669. !:mime text/x-script.python
  26670. 0 search/10/w #!\040/usr/bin/env\040python Python script text executable
  26671. !:strength + 15
  26672. !:mime text/x-script.python
  26673. # from module.submodule import func1, func2
  26674. 0 search/8192 import
  26675. >0 regex \^from[\040\t]+([A-Za-z0-9_]|\\.)+[\040\t]+import.*$ Python script text executable
  26676. !:strength + 15
  26677. !:mime text/x-script.python
  26678. # def __init__ (self, ...):
  26679. 0 search/4096 def\ __init__
  26680. >&0 search/64 self Python script text executable
  26681. !:strength + 15
  26682. !:mime text/x-script.python
  26683. # if __name__ == "__main__":
  26684. 0 search/4096 if\ __name__
  26685. >&0 search/64 '__main__' Python script text executable
  26686. >&0 search/64 "__main__" Python script text executable
  26687. !:strength + 15
  26688. !:mime text/x-script.python
  26689. # import module [as abrev]
  26690. 0 search/8192 import
  26691. >0 regex \^import\ [_[:alpha:]]+\ as\ [[:alpha:]][[:space:]]*$ Python script text executable
  26692. !:mime text/x-script.python
  26693. # comments
  26694. #0 search/4096 '''
  26695. #>&0 regex .*'''$ Python script text executable
  26696. #!:mime text/x-script.python
  26697. #0 search/4096 """
  26698. #>&0 regex .*"""$ Python script text executable
  26699. #!:mime text/x-script.python
  26700. # try:
  26701. # except: or finally:
  26702. # block
  26703. 0 search/4096 try:
  26704. >&0 regex \^[[:space:]]*except.*:$ Python script text executable
  26705. !:strength + 15
  26706. !:mime text/x-script.python
  26707. >&0 search/4096 finally: Python script text executable
  26708. !:mime text/x-script.python
  26709. # class name[(base classes,)]: [pass]
  26710. 0 search/8192 class
  26711. >0 regex \^class\ [_[:alpha:]]+(\\(.*\\))?(\ )*:([\ \t]+pass)?$ Python script text executable
  26712. !:strength + 15
  26713. !:mime text/x-script.python
  26714. # def name(*args, **kwargs):
  26715. 0 search/8192 def\
  26716. >0 regex \^[[:space:]]{0,50}def\ {1,50}[_a-zA-Z]{1,100}
  26717. >>&0 regex \\(([[:alpha:]*_,\ ]){0,255}\\):$ Python script text executable
  26718. !:strength + 15
  26719. !:mime text/x-script.python
  26720. # https://numpy.org/devdocs/reference/generated/numpy.lib.format.html
  26721. 0 string \223NUMPY NumPy data file
  26722. !:mime application/x-numpy-data
  26723. >6 byte x \b, version %d
  26724. >7 byte x \b.%d
  26725. #>8 leshort x \b, header length=%d
  26726. >10 string x \b, description %s
  26727. #------------------------------------------------------------------------------
  26728. # $File: qt,v 1.3 2019/04/19 00:42:27 christos Exp $
  26729. # qt: file(1) magic for Qt
  26730. # https://doc.qt.io/qt-5/resources.html
  26731. 0 string \<!DOCTYPE\040RCC\> Qt Resource Collection file
  26732. # https://qt.gitorious.org/qt/qtbase/source/\
  26733. # 5367fa356233da4c0f28172a8f817791525f5457:\
  26734. # src/tools/rcc/rcc.cpp#L840
  26735. 0 string qres\0\0 Qt Binary Resource file
  26736. 0 search/1024 The\040Resource\040Compiler\040for\040Qt Qt C-code resource file
  26737. # https://qt.gitorious.org/qt/qtbase/source/\
  26738. # 5367fa356233da4c0f28172a8f817791525f5457:\
  26739. # src/corelib/kernel/qtranslator.cpp#L62
  26740. 0 string \x3c\xb8\x64\x18\xca\xef\x9c\x95
  26741. >8 string \xcd\x21\x1c\xbf\x60\xa1\xbd\xdd Qt Translation file
  26742. #------------------------------------------------------------------------------
  26743. # $File: revision,v 1.11 2019/04/19 00:42:27 christos Exp $
  26744. # file(1) magic for revision control files
  26745. # From Hendrik Scholz <hendrik@scholz.net>
  26746. 0 string/t /1\ :pserver: cvs password text file
  26747. # Conary changesets
  26748. # From: Jonathan Smith <smithj@rpath.com>
  26749. 0 belong 0xea3f81bb Conary changeset data
  26750. # Type: Git bundles (git-bundle)
  26751. # From: Josh Triplett <josh@freedesktop.org>
  26752. 0 string #\ v2\ git\ bundle\n Git bundle
  26753. # Type: Git pack
  26754. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  26755. # Update: Joerg Jenderek
  26756. # URL: http://fileformats.archiveteam.org/wiki/Git
  26757. # reference: https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt
  26758. # The actual magic is 'PACK', but that clashes with Doom/Quake packs. However,
  26759. # those have a little-endian offset immediately following the magic 'PACK',
  26760. # the first byte of which is never 0, while the first byte of the Git pack
  26761. # version, since it's a tiny number stored in big-endian format, is always 0.
  26762. 0 string PACK
  26763. # GRR: line above is too general as it matches also PackDir archive ./acorn
  26764. # test for major version. Git 2017 accepts version number 2 or 3
  26765. >4 ubelong <9
  26766. # Acorn PackDir with method 0 compression has root like ADFS::HardDisc4.$.AsylumSrc
  26767. # or SystemDevice::foobar
  26768. >>9 search/13 ::
  26769. # but in git binary
  26770. >>9 default x Git pack
  26771. !:mime application/x-git
  26772. !:ext pack
  26773. # 4 GB limit implies unsigned integer
  26774. >>>4 ubelong x \b, version %u
  26775. >>>8 ubelong x \b, %u objects
  26776. # Type: Git pack index
  26777. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  26778. 0 string \377tOc Git pack index
  26779. >4 belong =2 \b, version 2
  26780. # Type: Git index file
  26781. # From: Frederic Briare <fbriere@fbriere.net>
  26782. 0 string DIRC Git index
  26783. >4 belong >0 \b, version %d
  26784. >>8 belong >0 \b, %d entries
  26785. # Type: Mercurial bundles
  26786. # From: Seo Sanghyeon <tinuviel@sparcs.kaist.ac.kr>
  26787. 0 string HG10 Mercurial bundle,
  26788. >4 string UN uncompressed
  26789. >4 string BZ bzip2 compressed
  26790. # Type: Subversion (SVN) dumps
  26791. # From: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
  26792. 0 string SVN-fs-dump-format-version: Subversion dumpfile
  26793. >28 string >\0 (version: %s)
  26794. # Type: Bazaar revision bundles and merge requests
  26795. # URL: https://www.bazaar-vcs.org/
  26796. # From: Jelmer Vernooij <jelmer@samba.org>
  26797. 0 string #\ Bazaar\ revision\ bundle\ v Bazaar Bundle
  26798. 0 string #\ Bazaar\ merge\ directive\ format Bazaar merge directive
  26799. #------------------------------------------------------------------------------
  26800. # $File: riff,v 1.42 2020/07/17 19:18:56 christos Exp $
  26801. # riff: file(1) magic for RIFF format
  26802. # See
  26803. #
  26804. # https://www.seanet.com/users/matts/riffmci/riffmci.htm
  26805. # http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/riffmci.pdf
  26806. # https://www.iana.org/assignments/wave-avi-codec-registry/wave-avi-codec-registry.xml
  26807. #
  26808. # audio format tag. Assume limits: max 1024 bit, 128 channels, 1 MHz
  26809. 0 name riff-wave
  26810. >0 leshort 0x01 \b, Microsoft PCM
  26811. >>14 leshort >0
  26812. >>>14 leshort <1024 \b, %d bit
  26813. >0 leshort 0x02 \b, Microsoft ADPCM
  26814. >0 leshort 0x03 \b, IEEE Float
  26815. >0 leshort 0x04 \b, Compaq VSELP
  26816. >0 leshort 0x05 \b, IBM CVSD
  26817. >0 leshort 0x06 \b, ITU G.711 A-law
  26818. >0 leshort 0x07 \b, ITU G.711 mu-law
  26819. >0 leshort 0x08 \b, Microsoft DTS
  26820. >0 leshort 0x10 \b, OKI ADPCM
  26821. >0 leshort 0x11 \b, IMA ADPCM
  26822. >0 leshort 0x12 \b, MediaSpace ADPCM
  26823. >0 leshort 0x13 \b, Sierra ADPCM
  26824. >0 leshort 0x14 \b, ITU G.723 ADPCM (Yamaha)
  26825. >0 leshort 0x15 \b, DSP Solutions DIGISTD
  26826. >0 leshort 0x16 \b, DSP Solutions DIGIFIX
  26827. >0 leshort 0x17 \b, Dialogic OKI ADPCM
  26828. >0 leshort 0x18 \b, MediaVision ADPCM
  26829. >0 leshort 0x19 \b, HP CU
  26830. >0 leshort 0x20 \b, Yamaha ADPCM
  26831. >0 leshort 0x21 \b, Speech Compression SONARC
  26832. >0 leshort 0x22 \b, DSP Group True Speech
  26833. >0 leshort 0x23 \b, Echo Speech EchoSC1
  26834. >0 leshort 0x24 \b, AudioFile AF36
  26835. >0 leshort 0x25 \b, APTX
  26836. >0 leshort 0x26 \b, AudioFile AF10
  26837. >0 leshort 0x27 \b, Prosody 1612
  26838. >0 leshort 0x28 \b, LRC
  26839. >0 leshort 0x30 \b, Dolby AC2
  26840. >0 leshort 0x31 \b, GSM 6.10
  26841. >0 leshort 0x32 \b, MSN Audio
  26842. >0 leshort 0x33 \b, Antex ADPCME
  26843. >0 leshort 0x34 \b, Control Res VQLPC
  26844. >0 leshort 0x35 \b, Digireal
  26845. >0 leshort 0x36 \b, DigiADPCM
  26846. >0 leshort 0x37 \b, Control Res CR10
  26847. >0 leshort 0x38 \b, NMS VBXADPCM
  26848. >0 leshort 0x39 \b, Roland RDAC
  26849. >0 leshort 0x3A \b, Echo Speech EchoSC3
  26850. >0 leshort 0x3B \b, Rockwell ADPCM
  26851. >0 leshort 0x3C \b, Rockwell Digitalk
  26852. >0 leshort 0x3D \b, Xebec
  26853. >0 leshort 0x40 \b, ITU G.721 ADPCM
  26854. >0 leshort 0x41 \b, ITU G.728 CELP
  26855. >0 leshort 0x42 \b, MSG723
  26856. >0 leshort 0x50 \b, MPEG
  26857. >0 leshort 0x52 \b, RT24
  26858. >0 leshort 0x53 \b, PAC
  26859. >0 leshort 0x55 \b, MPEG Layer 3
  26860. >0 leshort 0x59 \b, Lucent G.723
  26861. >0 leshort 0x60 \b, Cirrus
  26862. >0 leshort 0x61 \b, ESPCM
  26863. >0 leshort 0x62 \b, Voxware
  26864. >0 leshort 0x63 \b, Canopus Atrac
  26865. >0 leshort 0x64 \b, ITU G.726 ADPCM
  26866. >0 leshort 0x65 \b, ITU G.722 ADPCM
  26867. >0 leshort 0x66 \b, DSAT
  26868. >0 leshort 0x67 \b, DSAT Display
  26869. >0 leshort 0x69 \b, Voxware Byte Aligned
  26870. >0 leshort 0x70 \b, Voxware AC8
  26871. >0 leshort 0x71 \b, Voxware AC10
  26872. >0 leshort 0x72 \b, Voxware AC16
  26873. >0 leshort 0x73 \b, Voxware AC20
  26874. >0 leshort 0x74 \b, Voxware MetaVoice
  26875. >0 leshort 0x75 \b, Voxware MetaSound
  26876. >0 leshort 0x76 \b, Voxware RT29HW
  26877. >0 leshort 0x77 \b, Voxware VR12
  26878. >0 leshort 0x78 \b, Voxware VR18
  26879. >0 leshort 0x79 \b, Voxware TQ40
  26880. >0 leshort 0x80 \b, Softsound
  26881. >0 leshort 0x81 \b, Voxware TQ60
  26882. >0 leshort 0x82 \b, MSRT24
  26883. >0 leshort 0x83 \b, ITU G.729A
  26884. >0 leshort 0x84 \b, MVI MV12
  26885. >0 leshort 0x85 \b, DF G.726
  26886. >0 leshort 0x86 \b, DF GSM610
  26887. >0 leshort 0x88 \b, ISIAudio
  26888. >0 leshort 0x89 \b, Onlive
  26889. >0 leshort 0x91 \b, SBC24
  26890. >0 leshort 0x92 \b, Dolby AC3 S/PDIF
  26891. >0 leshort 0x97 \b, ZyXEL ADPCM
  26892. >0 leshort 0x98 \b, Philips LPCBB
  26893. >0 leshort 0x99 \b, Packed
  26894. >0 leshort 0x100 \b, Rhetorex ADPCM
  26895. >0 leshort 0x101 \b, BeCubed Software IRAT
  26896. >0 leshort 0x111 \b, Vivo G.723
  26897. >0 leshort 0x112 \b, Vivo Siren
  26898. >0 leshort 0x123 \b, Digital G.723
  26899. >0 leshort 0x200 \b, Creative ADPCM
  26900. >0 leshort 0x202 \b, Creative FastSpeech8
  26901. >0 leshort 0x203 \b, Creative FastSpeech10
  26902. >0 leshort 0x220 \b, Quarterdeck
  26903. >0 leshort 0x300 \b, FM Towns Snd
  26904. >0 leshort 0x400 \b, BTV Digital
  26905. >0 leshort 0x680 \b, VME VMPCM
  26906. >0 leshort 0x1000 \b, OLIGSM
  26907. >0 leshort 0x1001 \b, OLIADPCM
  26908. >0 leshort 0x1002 \b, OLICELP
  26909. >0 leshort 0x1003 \b, OLISBC
  26910. >0 leshort 0x1004 \b, OLIOPR
  26911. >0 leshort 0x1100 \b, LH Codec
  26912. >0 leshort 0x1400 \b, Norris
  26913. >0 leshort 0x1401 \b, ISIAudio
  26914. >0 leshort 0x1500 \b, Soundspace Music Compression
  26915. >0 leshort 0x2000 \b, AC3 DVM
  26916. >0 leshort 0x2001 \b, DTS
  26917. >2 leshort =1 \b, mono
  26918. >2 leshort =2 \b, stereo
  26919. >2 leshort >2
  26920. >>2 leshort <128 \b, %d channels
  26921. >4 lelong >0
  26922. >>4 lelong <1000000 %d Hz
  26923. # try to find "fmt "
  26924. 0 name riff-walk
  26925. >0 string fmt\x20
  26926. >>4 lelong >15
  26927. >>>8 use riff-wave
  26928. >0 string LIST
  26929. >>&(4.l+4) use riff-walk
  26930. >0 string DISP
  26931. >>&(4.l+4) use riff-walk
  26932. >0 string bext
  26933. >>&(4.l+4) use riff-walk
  26934. >0 string Fake
  26935. >>&(4.l+4) use riff-walk
  26936. >0 string fact
  26937. >>&(4.l+4) use riff-walk
  26938. >0 string VP8
  26939. >>11 byte 0x9d
  26940. >>>12 byte 0x01
  26941. >>>>13 byte 0x2a \b, VP8 encoding
  26942. >>>>>14 leshort&0x3fff x \b, %d
  26943. >>>>>16 leshort&0x3fff x \bx%d, Scaling:
  26944. >>>>>14 leshort&0xc000 0x0000 \b [none]
  26945. >>>>>14 leshort&0xc000 0x1000 \b [5/4]
  26946. >>>>>14 leshort&0xc000 0x2000 \b [5/3]
  26947. >>>>>14 leshort&0xc000 0x3000 \b [2]
  26948. >>>>>14 leshort&0xc000 0x0000 \bx[none]
  26949. >>>>>14 leshort&0xc000 0x1000 \bx[5/4]
  26950. >>>>>14 leshort&0xc000 0x2000 \bx[5/3]
  26951. >>>>>14 leshort&0xc000 0x3000 \bx[2]
  26952. >>>>>15 byte&0x80 =0x00 \b, YUV color
  26953. >>>>>15 byte&0x80 =0x80 \b, bad color specification
  26954. >>>>>15 byte&0x40 =0x40 \b, no clamping required
  26955. >>>>>15 byte&0x40 =0x00 \b, decoders should clamp
  26956. #>0 string x we got %s
  26957. #>>&(4.l+4) use riff-walk
  26958. # AVI section extended by Patrik Radman <patrik+file-magic@iki.fi>
  26959. #
  26960. 0 string RIFF RIFF (little-endian) data
  26961. # RIFF Palette format
  26962. # Update: Joerg Jenderek
  26963. # URL: https://en.wikipedia.org/wiki/Resource_Interchange_File_Format
  26964. # Reference: https://worms2d.info/Palette_file
  26965. # WAVE/AVI codec registry: https://www.iana.org/assignments/wave-avi-codec-registry/wave-avi-codec-registry.xml
  26966. >8 string PAL\ \b, palette
  26967. !:mime application/x-riff
  26968. # color palette by Microsoft Corporation
  26969. !:ext pal
  26970. # file size = chunk size + 8 in most cases
  26971. >>4 ulelong+8 x \b, %u bytes
  26972. # Extended PAL Format
  26973. >>12 string plth \b, extended
  26974. # Simple PAL Format
  26975. >>12 string data
  26976. # data chunk size = color entries * 4 + 4 + sometimes extra (4) appended bytes
  26977. >>>16 ulelong x \b, data size %u
  26978. # palVersion is always 0x0300
  26979. #>>>20 leshort x \b, version 0x%4.4x
  26980. # palNumEntries specifies the number of palette color entries
  26981. >>>22 uleshort x \b, %u entries
  26982. # after palPalEntry sized (number of color entries * 4 ) vector
  26983. >>>(22.s*4) ubequad x
  26984. # jump relative 22 ( 8 + 16) bytes forward points after end of file or to
  26985. # appended extra bytes like in http://safecolours.rigdenage.com/set(ms).zip/Protan(MS).pal
  26986. >>>>&16 ubelong x \b, extra bytes
  26987. >>>>>&-4 ubelong >0 0x%8.8x
  26988. # RIFF Device Independent Bitmap format
  26989. # URL: http://fileformats.archiveteam.org/wiki/RDIB
  26990. >8 string RDIB \b, device-independent bitmap
  26991. !:ext rdi/dib
  26992. >>16 string BM
  26993. >>>30 leshort 12 \b, OS/2 1.x format
  26994. >>>>34 leshort x \b, %d x
  26995. >>>>36 leshort x %d
  26996. >>>30 leshort 64 \b, OS/2 2.x format
  26997. >>>>34 leshort x \b, %d x
  26998. >>>>36 leshort x %d
  26999. >>>30 leshort 40 \b, Windows 3.x format
  27000. >>>>34 lelong x \b, %d x
  27001. >>>>38 lelong x %d x
  27002. >>>>44 leshort x %d
  27003. # RIFF MIDI format
  27004. # URL: http://fileformats.archiveteam.org/wiki/RIFF_MIDI
  27005. >8 string RMID \b, MIDI
  27006. # http://extension.nirsoft.net/rmi
  27007. !:mime audio/mid
  27008. #!:mime audio/x-rmid
  27009. !:ext rmi
  27010. # RIFF Multimedia Movie File format
  27011. # URL: http://fileformats.archiveteam.org/wiki/RIFF_Multimedia_Movie
  27012. >8 string RMMP \b, multimedia movie
  27013. !:mime video/x-mmm
  27014. !:ext mmm
  27015. # RIFF wrapper for MP3
  27016. >8 string RMP3 \b, MPEG Layer 3 audio
  27017. #!:mime audio/x-rmp3
  27018. # Microsoft WAVE format (*.wav)
  27019. # URL: http://fileformats.archiveteam.org/wiki/WAV
  27020. >8 string WAVE \b, WAVE audio
  27021. #!:mime audio/vnd.wave
  27022. !:mime audio/x-wav
  27023. # https://www.macdisk.com/macsigen.php
  27024. #!:apple ????WAVE
  27025. !:ext wav/wave
  27026. >>12 string >\0
  27027. >>>12 use riff-walk
  27028. # Update: Joerg Jenderek
  27029. # lower case for Corel Draw version 8 Bidi
  27030. >8 string/c cdr
  27031. # skip Corel CCX Clipart
  27032. >>8 string !CDRXcont
  27033. # Corel Draw Picture
  27034. >>>0 use corel-draw
  27035. # URL: http://fileformats.archiveteam.org/wiki/CCX_(Corel)
  27036. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/c/ccx-corel.trid.xml
  27037. >>8 string =CDRXcont \b, Corel Clipart
  27038. !:mime application/x-corel-ccx
  27039. !:ext ccx
  27040. # 3rd chunk data {Corel\040Binary\040Meta\040File}
  27041. #>>>20 string x \b, 3rd '%-s'
  27042. >>>4 ulelong+8 x \b, %u bytes
  27043. # From: Joerg Jenderek
  27044. # URL: https://en.wikipedia.org/wiki/CorelDRAW
  27045. # Reference: http://fileformats.archiveteam.org/wiki/CorelDRAW
  27046. # Picture templates created by newer software start with RIFF type CDT
  27047. >8 string CDT
  27048. >>0 use corel-draw
  27049. # Picture templates with version 4.4
  27050. >8 string CDST
  27051. >>0 use corel-draw
  27052. # pattern created by newer software start with RIFF type PAT
  27053. >8 string PAT
  27054. >>0 use corel-draw
  27055. # From: Joerg Jenderek
  27056. # URL: https://en.wikipedia.org/wiki/Corel_Designer
  27057. # Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer
  27058. >8 string DES
  27059. >>8 string !DESC
  27060. >>>0 use corel-des
  27061. # Corel Draw templates with version 12.5 or Corel Designer illustration 12
  27062. >>8 string =DESC
  27063. # MORE TESTS NEEDED HERE!
  27064. #>>>0 use corel-des
  27065. #>>>0 use corel-draw
  27066. >8 string NUNDROOT \b, Steinberg CuBase
  27067. # AVI == Audio Video Interleave
  27068. # Reference: http://fileformats.archiveteam.org/wiki/AVI
  27069. >8 string AVI\040 \b, AVI
  27070. # https://reposcope.com/mimetype/video/x-msvideo
  27071. !:mime video/x-msvideo
  27072. # https://www.iana.org/assignments/wave-avi-codec-registry/wave-avi-codec-registry.xml
  27073. #!:mime video/vnd.avi
  27074. !:ext avi/divx
  27075. >>12 string LIST
  27076. >>>20 string hdrlavih
  27077. >>>>&36 lelong x \b, %u x
  27078. >>>>&40 lelong x %u,
  27079. >>>>&4 lelong >1000000 <1 fps,
  27080. >>>>&4 lelong 1000000 1.00 fps,
  27081. >>>>&4 lelong 500000 2.00 fps,
  27082. >>>>&4 lelong 333333 3.00 fps,
  27083. >>>>&4 lelong 250000 4.00 fps,
  27084. >>>>&4 lelong 200000 5.00 fps,
  27085. >>>>&4 lelong 166667 6.00 fps,
  27086. >>>>&4 lelong 142857 7.00 fps,
  27087. >>>>&4 lelong 125000 8.00 fps,
  27088. >>>>&4 lelong 111111 9.00 fps,
  27089. >>>>&4 lelong 100000 10.00 fps,
  27090. # ]9.9,10.1[
  27091. >>>>&4 lelong <101010
  27092. >>>>>&-4 lelong >99010
  27093. >>>>>>&-4 lelong !100000 ~10 fps,
  27094. >>>>&4 lelong 83333 12.00 fps,
  27095. # ]11.9,12.1[
  27096. >>>>&4 lelong <84034
  27097. >>>>>&-4 lelong >82645
  27098. >>>>>>&-4 lelong !83333 ~12 fps,
  27099. >>>>&4 lelong 66667 15.00 fps,
  27100. # ]14.9,15.1[
  27101. >>>>&4 lelong <67114
  27102. >>>>>&-4 lelong >66225
  27103. >>>>>>&-4 lelong !66667 ~15 fps,
  27104. >>>>&4 lelong 50000 20.00 fps,
  27105. >>>>&4 lelong 41708 23.98 fps,
  27106. >>>>&4 lelong 41667 24.00 fps,
  27107. # ]23.9,24.1[
  27108. >>>>&4 lelong <41841
  27109. >>>>>&-4 lelong >41494
  27110. >>>>>>&-4 lelong !41708
  27111. >>>>>>>&-4 lelong !41667 ~24 fps,
  27112. >>>>&4 lelong 40000 25.00 fps,
  27113. # ]24.9,25.1[
  27114. >>>>&4 lelong <40161
  27115. >>>>>&-4 lelong >39841
  27116. >>>>>>&-4 lelong !40000 ~25 fps,
  27117. >>>>&4 lelong 33367 29.97 fps,
  27118. >>>>&4 lelong 33333 30.00 fps,
  27119. # ]29.9,30.1[
  27120. >>>>&4 lelong <33445
  27121. >>>>>&-4 lelong >33223
  27122. >>>>>>&-4 lelong !33367
  27123. >>>>>>>&-4 lelong !33333 ~30 fps,
  27124. >>>>&4 lelong <32224 >30 fps,
  27125. ##>>>>&4 lelong x (%lu)
  27126. ##>>>>&20 lelong x %lu frames,
  27127. # Note: The tests below assume that the AVI has 1 or 2 streams,
  27128. # "vids" optionally followed by "auds".
  27129. # (Should cover 99.9% of all AVIs.)
  27130. # assuming avih length = 56
  27131. >>>88 string LIST
  27132. >>>>96 string strlstrh
  27133. >>>>>108 string vids video:
  27134. >>>>>>&0 lelong 0 uncompressed
  27135. # skip past vids strh
  27136. >>>>>>(104.l+108) string strf
  27137. >>>>>>>(104.l+132) lelong 1 RLE 8bpp
  27138. >>>>>>>(104.l+132) string/c anim Intel RDX
  27139. >>>>>>>(104.l+132) string/c aur2 AuraVision Aura 2
  27140. >>>>>>>(104.l+132) string/c aura AuraVision Aura
  27141. >>>>>>>(104.l+132) string/c bt20 Brooktree MediaStream
  27142. >>>>>>>(104.l+132) string/c btcv Brooktree Composite Video
  27143. >>>>>>>(104.l+132) string/c cc12 Intel YUV12
  27144. >>>>>>>(104.l+132) string/c cdvc Canopus DV
  27145. >>>>>>>(104.l+132) string/c cham Winnov Caviara Cham
  27146. >>>>>>>(104.l+132) string/c cljr Proprietary YUV 4 pixels
  27147. >>>>>>>(104.l+132) string/c cmyk Common Data Format in Printing
  27148. >>>>>>>(104.l+132) string/c cpla Weitek 4:2:0 YUV Planar
  27149. >>>>>>>(104.l+132) string/c cvid Cinepak
  27150. >>>>>>>(104.l+132) string/c cwlt Microsoft Color WLT DIB
  27151. >>>>>>>(104.l+132) string/c cyuv Creative Labs YUV
  27152. >>>>>>>(104.l+132) string/c d261 H.261
  27153. >>>>>>>(104.l+132) string/c d263 H.263
  27154. >>>>>>>(104.l+132) string/c duck TrueMotion 1.0
  27155. >>>>>>>(104.l+132) string/c dve2 DVE-2 Videoconferencing
  27156. >>>>>>>(104.l+132) string/c fljp Field Encoded Motion JPEG
  27157. >>>>>>>(104.l+132) string/c fvf1 Fractal Video Frame
  27158. >>>>>>>(104.l+132) string/c gwlt Microsoft Greyscale WLT DIB
  27159. >>>>>>>(104.l+132) string/c h260 H.260
  27160. >>>>>>>(104.l+132) string/c h261 H.261
  27161. >>>>>>>(104.l+132) string/c h262 H.262
  27162. >>>>>>>(104.l+132) string/c h263 H.263
  27163. >>>>>>>(104.l+132) string/c h264 H.264
  27164. >>>>>>>(104.l+132) string/c h265 H.265
  27165. >>>>>>>(104.l+132) string/c h266 H.266
  27166. >>>>>>>(104.l+132) string/c h267 H.267
  27167. >>>>>>>(104.l+132) string/c h268 H.268
  27168. >>>>>>>(104.l+132) string/c h269 H.269
  27169. >>>>>>>(104.l+132) string/c i263 Intel I.263
  27170. >>>>>>>(104.l+132) string/c i420 Intel Indeo 4
  27171. >>>>>>>(104.l+132) string/c ian Intel RDX
  27172. >>>>>>>(104.l+132) string/c iclb CellB Videoconferencing Codec
  27173. >>>>>>>(104.l+132) string/c ilvc Intel Layered Video
  27174. >>>>>>>(104.l+132) string/c ilvr ITU-T H.263+
  27175. >>>>>>>(104.l+132) string/c iraw Intel YUV Uncompressed
  27176. >>>>>>>(104.l+132) string/c iv30 Intel Indeo 3
  27177. >>>>>>>(104.l+132) string/c iv31 Intel Indeo 3.1
  27178. >>>>>>>(104.l+132) string/c iv32 Intel Indeo 3.2
  27179. >>>>>>>(104.l+132) string/c iv33 Intel Indeo 3.3
  27180. >>>>>>>(104.l+132) string/c iv34 Intel Indeo 3.4
  27181. >>>>>>>(104.l+132) string/c iv35 Intel Indeo 3.5
  27182. >>>>>>>(104.l+132) string/c iv36 Intel Indeo 3.6
  27183. >>>>>>>(104.l+132) string/c iv37 Intel Indeo 3.7
  27184. >>>>>>>(104.l+132) string/c iv38 Intel Indeo 3.8
  27185. >>>>>>>(104.l+132) string/c iv39 Intel Indeo 3.9
  27186. >>>>>>>(104.l+132) string/c iv40 Intel Indeo 4.0
  27187. >>>>>>>(104.l+132) string/c iv41 Intel Indeo 4.1
  27188. >>>>>>>(104.l+132) string/c iv42 Intel Indeo 4.2
  27189. >>>>>>>(104.l+132) string/c iv43 Intel Indeo 4.3
  27190. >>>>>>>(104.l+132) string/c iv44 Intel Indeo 4.4
  27191. >>>>>>>(104.l+132) string/c iv45 Intel Indeo 4.5
  27192. >>>>>>>(104.l+132) string/c iv46 Intel Indeo 4.6
  27193. >>>>>>>(104.l+132) string/c iv47 Intel Indeo 4.7
  27194. >>>>>>>(104.l+132) string/c iv48 Intel Indeo 4.8
  27195. >>>>>>>(104.l+132) string/c iv49 Intel Indeo 4.9
  27196. >>>>>>>(104.l+132) string/c iv50 Intel Indeo 5.0
  27197. >>>>>>>(104.l+132) string/c mpeg MPEG 1 Video Frame
  27198. >>>>>>>(104.l+132) string/c mjpg Motion JPEG
  27199. >>>>>>>(104.l+132) string/c mp42 Microsoft MPEG-4 v2
  27200. >>>>>>>(104.l+132) string/c mp43 Microsoft MPEG-4 v3
  27201. >>>>>>>(104.l+132) string/c mrca MR Codec
  27202. >>>>>>>(104.l+132) string/c mrle Run Length Encoding
  27203. >>>>>>>(104.l+132) string/c msvc Microsoft Video 1
  27204. >>>>>>>(104.l+132) string/c phmo Photomotion
  27205. >>>>>>>(104.l+132) string/c qpeq QPEG 1.1 Format Video
  27206. >>>>>>>(104.l+132) string/c rgbt RGBT
  27207. >>>>>>>(104.l+132) string/c rle4 Run Length Encoded 4
  27208. >>>>>>>(104.l+132) string/c rle8 Run Length Encoded 8
  27209. >>>>>>>(104.l+132) string/c rt21 Intel Indeo 2.1
  27210. >>>>>>>(104.l+132) string/c rvx Intel RDX
  27211. >>>>>>>(104.l+132) string/c sdcc Sun Digital Camera Codec
  27212. >>>>>>>(104.l+132) string/c sfmc Crystal Net SFM Codec
  27213. >>>>>>>(104.l+132) string/c smsc SMSC
  27214. >>>>>>>(104.l+132) string/c smsd SMSD
  27215. >>>>>>>(104.l+132) string/c splc Splash Studios ACM Audio Codec
  27216. >>>>>>>(104.l+132) string/c sqz2 Microsoft VXtreme Video Codec
  27217. >>>>>>>(104.l+132) string/c sv10 Sorenson Video R1
  27218. >>>>>>>(104.l+132) string/c tlms TeraLogic Motion Intraframe Codec A
  27219. >>>>>>>(104.l+132) string/c tlst TeraLogic Motion Intraframe Codec B
  27220. >>>>>>>(104.l+132) string/c tm20 TrueMotion 2.0
  27221. >>>>>>>(104.l+132) string/c tmic TeraLogic Motion Intraframe Codec 2
  27222. >>>>>>>(104.l+132) string/c tmot TrueMotion Video Compression
  27223. >>>>>>>(104.l+132) string/c tr20 TrueMotion RT 2.0
  27224. >>>>>>>(104.l+132) string/c ulti Ultimotion
  27225. >>>>>>>(104.l+132) string/c uyvy UYVY 4:2:2 byte ordering
  27226. >>>>>>>(104.l+132) string/c v422 24-bit YUV 4:2:2 format
  27227. >>>>>>>(104.l+132) string/c v655 16-bit YUV 4:2:2 format
  27228. >>>>>>>(104.l+132) string/c vcr1 ATI VCR 1.0
  27229. >>>>>>>(104.l+132) string/c vcr2 ATI VCR 2.0
  27230. >>>>>>>(104.l+132) string/c vcr3 ATI VCR 3.0
  27231. >>>>>>>(104.l+132) string/c vcr4 ATI VCR 4.0
  27232. >>>>>>>(104.l+132) string/c vcr5 ATI VCR 5.0
  27233. >>>>>>>(104.l+132) string/c vcr6 ATI VCR 6.0
  27234. >>>>>>>(104.l+132) string/c vcr7 ATI VCR 7.0
  27235. >>>>>>>(104.l+132) string/c vcr8 ATI VCR 8.0
  27236. >>>>>>>(104.l+132) string/c vcr9 ATI VCR 9.0
  27237. >>>>>>>(104.l+132) string/c vdct Video Maker Pro DIB
  27238. >>>>>>>(104.l+132) string/c vids YUV 4:2:2 CCIR 601 for V422
  27239. >>>>>>>(104.l+132) string/c vivo Vivo H.263
  27240. >>>>>>>(104.l+132) string/c vixl VIXL
  27241. >>>>>>>(104.l+132) string/c vlv1 VLCAP.DRV
  27242. >>>>>>>(104.l+132) string/c wbvc W9960
  27243. >>>>>>>(104.l+132) string/c x263 mmioFOURCC('X','2','6','3')
  27244. >>>>>>>(104.l+132) string/c xlv0 XL Video Decoder
  27245. >>>>>>>(104.l+132) string/c y211 YUV 2:1:1 Packed
  27246. >>>>>>>(104.l+132) string/c y411 YUV 4:1:1 Packed
  27247. >>>>>>>(104.l+132) string/c y41b YUV 4:1:1 Planar
  27248. >>>>>>>(104.l+132) string/c y41p PC1 4:1:1
  27249. >>>>>>>(104.l+132) string/c y41t PC1 4:1:1 with transparency
  27250. >>>>>>>(104.l+132) string/c y42b YUV 4:2:2 Planar
  27251. >>>>>>>(104.l+132) string/c y42t PC1 4:2:2 with transparency
  27252. >>>>>>>(104.l+132) string/c yc12 Intel YUV12 Codec
  27253. >>>>>>>(104.l+132) string/c yuv8 Winnov Caviar YUV8
  27254. >>>>>>>(104.l+132) string/c yuv9 YUV9
  27255. >>>>>>>(104.l+132) string/c yuy2 YUY2 4:2:2 byte ordering packed
  27256. >>>>>>>(104.l+132) string/c yuyv BI_YUYV, Canopus
  27257. >>>>>>>(104.l+132) string/c fmp4 FFMpeg MPEG-4
  27258. >>>>>>>(104.l+132) string/c div3 DivX 3
  27259. >>>>>>>>112 string/c div3 Low-Motion
  27260. >>>>>>>>112 string/c div4 Fast-Motion
  27261. >>>>>>>(104.l+132) string/c divx DivX 4
  27262. >>>>>>>(104.l+132) string/c dx50 DivX 5
  27263. >>>>>>>(104.l+132) string/c xvid XviD
  27264. >>>>>>>(104.l+132) string/c h264 H.264
  27265. >>>>>>>(104.l+132) string/c wmv3 Windows Media Video 9
  27266. >>>>>>>(104.l+132) string/c h264 X.264 or H.264
  27267. >>>>>>>(104.l+132) lelong 0
  27268. ##>>>>>>>(104.l+132) string x (%.4s)
  27269. # skip past first (video) LIST
  27270. >>>>(92.l+96) string LIST
  27271. >>>>>(92.l+104) string strlstrh
  27272. >>>>>>(92.l+116) string auds \b, audio:
  27273. # auds strh length = 56:
  27274. >>>>>>>(92.l+172) string strf
  27275. >>>>>>>>(92.l+180) leshort 0x0001 uncompressed PCM
  27276. >>>>>>>>(92.l+180) leshort 0x0002 ADPCM
  27277. >>>>>>>>(92.l+180) leshort 0x0006 aLaw
  27278. >>>>>>>>(92.l+180) leshort 0x0007 uLaw
  27279. >>>>>>>>(92.l+180) leshort 0x0050 MPEG-1 Layer 1 or 2
  27280. >>>>>>>>(92.l+180) leshort 0x0055 MPEG-1 Layer 3
  27281. >>>>>>>>(92.l+180) leshort 0x2000 Dolby AC3
  27282. >>>>>>>>(92.l+180) leshort 0x0161 DivX
  27283. ##>>>>>>>>(92.l+180) leshort x (0x%.4x)
  27284. >>>>>>>>(92.l+182) leshort 1 (mono,
  27285. >>>>>>>>(92.l+182) leshort 2 (stereo,
  27286. >>>>>>>>(92.l+182) leshort >2 (%d channels,
  27287. >>>>>>>>(92.l+184) lelong x %d Hz)
  27288. # auds strh length = 64:
  27289. >>>>>>>(92.l+180) string strf
  27290. >>>>>>>>(92.l+188) leshort 0x0001 uncompressed PCM
  27291. >>>>>>>>(92.l+188) leshort 0x0002 ADPCM
  27292. >>>>>>>>(92.l+188) leshort 0x0055 MPEG-1 Layer 3
  27293. >>>>>>>>(92.l+188) leshort 0x2000 Dolby AC3
  27294. >>>>>>>>(92.l+188) leshort 0x0161 DivX
  27295. ##>>>>>>>>(92.l+188) leshort x (0x%.4x)
  27296. >>>>>>>>(92.l+190) leshort 1 (mono,
  27297. >>>>>>>>(92.l+190) leshort 2 (stereo,
  27298. >>>>>>>>(92.l+190) leshort >2 (%d channels,
  27299. >>>>>>>>(92.l+192) lelong x %d Hz)
  27300. # From: Joerg Jenderek
  27301. # URL: http://fileformats.archiveteam.org/wiki/VDR_(VirtualDub)
  27302. # Reference: http://sourceforge.net/projects/virtualdub/files/virtualdub-win/
  27303. # 1.10.4.35491/VirtualDub-1.10.4-src.7z/src/vdremote/Main.cpp
  27304. # VirtualDub link handler
  27305. >8 string VDRM \b, VirtualDub link
  27306. !:mime video/x-vdr
  27307. !:ext vdr
  27308. >>12 string PATH \b, PATH
  27309. # remote-path to video file
  27310. >>16 pstring/l x %s
  27311. # Animated Cursor format
  27312. # Update: Joerg Jenderek
  27313. # URL: http://fileformats.archiveteam.org/wiki/Windows_Animated_Cursor
  27314. # Reference: https://www.gdgsoft.com/anituner/help/aniformat.htm
  27315. >8 string ACON \b, animated cursor
  27316. !:mime application/x-navi-animation
  27317. # http://extension.nirsoft.net/ani
  27318. #!:mime image/ani
  27319. !:ext ani
  27320. # INAM tag followed by length of title
  27321. >>24 string INAM
  27322. >>>28 pstring/l x "%s"
  27323. # IART tag followed by length of author
  27324. >>>(28.l+32) ubelong 0x49415254
  27325. >>>>&0 pstring/l x %s
  27326. # SoundFont 2 <mpruett@sgi.com>
  27327. # URL: http://fileformats.archiveteam.org/wiki/SoundFont_2.0
  27328. >8 string sfbk \b, SoundFont/Bank
  27329. !:mime audio/x-sfbk
  27330. !:ext sf2
  27331. # MPEG-1 wrapped in a RIFF, apparently
  27332. # URL: http://file.fyicenter.com/17_Video_.DAT_File_Extension_for_VCD_Files.html
  27333. >8 string CDXA \b, wrapped MPEG-1 (CDXA)
  27334. !:mime video/x-cdxa
  27335. !:ext mpg/dat
  27336. # URL: http://fileformats.archiveteam.org/wiki/4X_IMA_ADPCM
  27337. >8 string 4XMV \b, 4X Movie file
  27338. !:mime video/x-4xmv
  27339. !:ext 4xm/4xa
  27340. # AMV-type AVI file: https://wiki.multimedia.cx/index.php?title=AMV
  27341. >8 string AMV\040 \b, AMV
  27342. # http://fileformats.archiveteam.org/wiki/MTV_Video_(.AMV)
  27343. !:mime video/x-amv
  27344. !:ext amv
  27345. #!:ext amv/mtv
  27346. # URL: http://fileformats.archiveteam.org/wiki/WebP
  27347. >8 string WEBP \b, Web/P image
  27348. !:mime image/webp
  27349. !:ext webp
  27350. >>12 use riff-walk
  27351. # From: Joerg Jenderek
  27352. # URL: http://fileformats.archiveteam.org/wiki/RIFF_MIDS
  27353. >8 string MIDS \b, MIDI Stream
  27354. !:mime audio/x-mids
  27355. !:ext mds
  27356. # From: Joerg Jenderek
  27357. # URL: http://mark0.net/soft-trid-e.html
  27358. # Reference: http://fileformats.archiveteam.org/wiki/Trd_(TRID)
  27359. >8 string TRID \b, TrID defs package
  27360. !:mime application/x-trid-trd
  27361. !:ext trd
  27362. # From: Joerg Jenderek
  27363. # URL: https://en.wikipedia.org/wiki/CorelDRAW
  27364. # Reference: http://fileformats.archiveteam.org/wiki/CorelDRAW
  27365. # Note: Since version 3 CorelDraw Pictures are RIFF based
  27366. # but data chunks remain proprietary.
  27367. # Since version 14 til 15 packed as "content/riffData.cdr" and
  27368. # since 16 "content/root.dat" in ZIP container
  27369. # TODO: distinguish templates with version 12.5 from Designer illustration 12
  27370. # display information of RIFF based Corel Draw pictures, templates and patterns
  27371. 0 name corel-draw
  27372. # display second chunk for debugging
  27373. #>8 string x \b, [8]=%.8s
  27374. >0 string x \b, Corel Draw
  27375. #!:mime image/x-coreldraw
  27376. !:mime application/vnd.corel-draw
  27377. # used by newer pictures templates
  27378. >>8 string CDT
  27379. # used by templates with newer versions since 16
  27380. >>>12 string =fver Picture template (root.dat)
  27381. !:ext dat
  27382. # used by templates with older versions with vrsn tag
  27383. >>>12 string !fver
  27384. # used by templates with older versions 14-15
  27385. >>>>11 string >E Picture template (riffData.cdr)
  27386. !:ext cdr
  27387. # used by templates with older versions 11-13
  27388. >>>>11 string <F Picture template
  27389. !:ext cdt/cdrt
  27390. # used by older templates with version 4.4
  27391. >>8 string CDST Picture template
  27392. !:ext cdt
  27393. # used by templates with version 12.5
  27394. >>8 string DESC Picture template
  27395. !:ext cdt
  27396. # used by newer patterns with version 22
  27397. >>8 string PAT Pattern
  27398. !:ext dat
  27399. # remaining older templates, patterns, drawings
  27400. >>8 default x
  27401. # pattern with old version 4.y
  27402. >>>26 ulelong =0x0000206C Pattern
  27403. !:ext pat
  27404. # pattern with newer versions
  27405. >>>26 ulelong =0x00000D2C Pattern
  27406. !:ext pat
  27407. # remaining older templates or pictures
  27408. >>>26 default x
  27409. # used by older versions 5 - 15
  27410. >>>>12 string =vrsn
  27411. # 4th chunk size unequal 282Ch only found for CDR
  27412. >>>>>26 ulelong !0x0000282c Picture
  27413. !:ext cdr
  27414. >>>>>26 default x Picture or template
  27415. !:ext cdr/cdt
  27416. # used by newer versions since 16
  27417. >>>>12 string =fver Picture (root.dat)
  27418. !:ext dat
  27419. # version marked by 1 ASCII char: space~3, ... , F~15, ... , N~22, ... R~22 template
  27420. >11 string x \b, version
  27421. >11 string >\040 '%-.1s'
  27422. >0 use corel-version
  27423. >4 ulelong+8 x \b, %u bytes
  27424. #
  27425. # display numeric version of RIFF based Corel after 3rd RIFF tag
  27426. 0 name corel-version
  27427. # for debugging purpose; vrsn for short content; fver for 16 byte size
  27428. #>12 string x \b, TAG "%-4.4s"
  27429. # 1st data chunk length 2 implies short content version
  27430. >16 ulelong 2
  27431. # vrsn chunk short content interpreted by MajorVersion * 100 + MinorVersion
  27432. >>20 uleshort/100 x %u
  27433. >>20 uleshort%100 >0 \b.%u
  27434. # for debugging purpose display next chunk like: DISP LIST
  27435. #>>22 string x \b, 4th "%-4.4s"
  27436. #>>26 ulelong x \b, 4th SIZE 0x%x
  27437. # for debugging purpose display 5th chunk like: LIST DISP ccmm osfp
  27438. #>>(26.l+30) string x \b, 5th "%-4.4s"
  27439. # 1st data chunk length 10h implies 16 byte content with version info
  27440. >16 ulelong 0x10
  27441. >>34 ubyte x %u
  27442. >>>33 ubyte >0 \b.%u
  27443. # display information of RIFF based Corel Design formats
  27444. 0 name corel-des
  27445. # display second chunk for debugging
  27446. #>8 string x \b, [8]=%.8s
  27447. >12 string x \b, Corel DESIGNER
  27448. !:mime image/x-corel-des
  27449. #!:mime application/x-vnd.corel.designer.document
  27450. # used by Corel Designer with newer versions since 16
  27451. >12 string =fver graphics (root.dat)
  27452. !:ext dat
  27453. # used by Corel Designer templates with older versions with vrsn tag
  27454. >12 string !fver
  27455. # used by Corel Designer with versions 14-15
  27456. >>11 string >D graphics (riffData.cdr)
  27457. !:ext cdr
  27458. # used by Corel Designer with versions 10-12
  27459. >>11 string <E graphics
  27460. !:ext des
  27461. # version indicated by last ASCII char of second chunk tag
  27462. >11 string x \b, version '%-.1s'
  27463. # but vrsn short content is not always version indicator
  27464. # exceptions: 'A'~11.4 'B'~12 'C'~12.5
  27465. >11 string >D
  27466. >>0 use corel-version
  27467. # for debugging purpose display next chunk like: DISP LIST
  27468. #>>22 string x \b, 4th "%-4.4s"
  27469. #>>26 ulelong x \b, 4th SIZE 0x%x
  27470. # for debugging purpose display 5th chunk like: LIST osfp
  27471. #>>(26.l+30) string x \b, 5th "%-4.4s"
  27472. >4 ulelong+8 x \b, %u bytes
  27473. #
  27474. # XXX - some of the below may only appear in little-endian form.
  27475. #
  27476. # Also "MV93" appears to be for one form of Macromedia Director
  27477. # files, and "GDMF" appears to be another multimedia format.
  27478. #
  27479. 0 string RIFX RIFF (big-endian) data
  27480. # RIFF Palette format
  27481. >8 string PAL \b, palette
  27482. >>16 beshort x \b, version %d
  27483. >>18 beshort x \b, %d entries
  27484. # RIFF Device Independent Bitmap format
  27485. >8 string RDIB \b, device-independent bitmap
  27486. >>16 string BM
  27487. >>>30 beshort 12 \b, OS/2 1.x format
  27488. >>>>34 beshort x \b, %d x
  27489. >>>>36 beshort x %d
  27490. >>>30 beshort 64 \b, OS/2 2.x format
  27491. >>>>34 beshort x \b, %d x
  27492. >>>>36 beshort x %d
  27493. >>>30 beshort 40 \b, Windows 3.x format
  27494. >>>>34 belong x \b, %d x
  27495. >>>>38 belong x %d x
  27496. >>>>44 beshort x %d
  27497. # RIFF MIDI format
  27498. >8 string RMID \b, MIDI
  27499. # RIFF Multimedia Movie File format
  27500. >8 string RMMP \b, multimedia movie
  27501. # Microsoft WAVE format (*.wav)
  27502. >8 string WAVE \b, WAVE audio
  27503. >>20 leshort 1 \b, Microsoft PCM
  27504. >>>34 leshort >0 \b, %d bit
  27505. >>22 beshort =1 \b, mono
  27506. >>22 beshort =2 \b, stereo
  27507. >>22 beshort >2 \b, %d channels
  27508. >>24 belong >0 %d Hz
  27509. # Corel Draw Picture big endian not tested by real examples
  27510. #>8 string CDRA \b, Corel Draw Picture
  27511. #>8 string CDR6 \b, Corel Draw Picture, version 6
  27512. >8 string CDR
  27513. >>0 use \^corel-draw
  27514. # AVI == Audio Video Interleave
  27515. >8 string AVI\040 \b, AVI
  27516. # Animated Cursor format
  27517. >8 string ACON \b, animated cursor
  27518. # Notation Interchange File Format (big-endian only)
  27519. >8 string NIFF \b, Notation Interchange File Format
  27520. # SoundFont 2 <mpruett@sgi.com>
  27521. >8 string sfbk SoundFont/Bank
  27522. #------------------------------------------------------------------------------
  27523. # Sony Wave64
  27524. # see http://www.vcs.de/fileadmin/user_upload/MBS/PDF/Whitepaper/Informations_about_Sony_Wave64.pdf
  27525. # 128 bit RIFF-GUID { 66666972-912E-11CF-A5D6-28DB04C10000 } in little-endian
  27526. 0 string riff\x2E\x91\xCF\x11\xA5\xD6\x28\xDB\x04\xC1\x00\x00 Sony Wave64 RIFF data
  27527. # 128 bit + total file size (64 bits) so 24 bytes
  27528. # then WAVE-GUID { 65766177-ACF3-11D3-8CD1-00C04F8EDB8A }
  27529. >24 string wave\xF3\xAC\xD3\x11\x8C\xD1\x00\xC0\x4F\x8E\xDB\x8A \b, WAVE 64 audio
  27530. !:mime audio/x-w64
  27531. # FMT-GUID { 20746D66-ACF3-11D3-8CD1-00C04F8EDB8A }
  27532. >>40 search/256 fmt\x20\xF3\xAC\xD3\x11\x8C\xD1\x00\xC0\x4F\x8E\xDB\x8A \b
  27533. >>>&10 leshort =1 \b, mono
  27534. >>>&10 leshort =2 \b, stereo
  27535. >>>&10 leshort >2 \b, %d channels
  27536. >>>&12 lelong >0 %d Hz
  27537. #------------------------------------------------------------------------------
  27538. # MBWF/RF64
  27539. # see EBU TECH 3306 https://tech.ebu.ch/docs/tech/tech3306-2009.pdf
  27540. 0 string RF64\xff\xff\xff\xffWAVEds64 MBWF/RF64 audio
  27541. !:mime audio/x-wav
  27542. >40 search/256 fmt\x20 \b
  27543. >>&6 leshort =1 \b, mono
  27544. >>&6 leshort =2 \b, stereo
  27545. >>&6 leshort >2 \b, %d channels
  27546. >>&8 lelong >0 %d Hz
  27547. #------------------------------------------------------------------------------
  27548. # $File: rpi,v 1.2 2019/10/02 02:07:30 christos Exp $
  27549. # rpi: file(1) magic for Raspberry Pi images
  27550. -44 lelong 0
  27551. >4 lelong 0
  27552. >>8 lelong 1
  27553. >>12 lelong 4
  27554. >>>16 string 283x
  27555. >>>>20 lelong 1
  27556. >>>>>24 lelong 4
  27557. >>>>>>28 string DTOK
  27558. >>>>>>>32 lelong 44
  27559. >>>>>>>>36 lelong 4
  27560. >>>>>>>>>40 string RPTL Raspberry PI kernel image
  27561. -56 lelong 0
  27562. >4 lelong 0
  27563. >>8 lelong 1
  27564. >>12 lelong 4
  27565. >>>16 string 283x
  27566. >>>>20 lelong 1
  27567. >>>>>24 lelong 4
  27568. >>>>>>28 string DTOK
  27569. >>>>>>>32 lelong 1
  27570. >>>>>>>>36 lelong 4
  27571. >>>>>>>>>40 string DDTK8
  27572. >>>>>>>>>>48 lelong 4
  27573. >>>>>>>>>>>52 string RPTL Raspberry PI kernel image
  27574. #------------------------------------------------------------------------------
  27575. # $File: rpm,v 1.12 2013/01/11 16:45:23 christos Exp $
  27576. #
  27577. # RPM: file(1) magic for Red Hat Packages Erik Troan (ewt@redhat.com)
  27578. #
  27579. 0 belong 0xedabeedb RPM
  27580. !:mime application/x-rpm
  27581. >4 byte x v%d
  27582. >5 byte x \b.%d
  27583. >6 beshort 1 src
  27584. >6 beshort 0 bin
  27585. >>8 beshort 1 i386/x86_64
  27586. >>8 beshort 2 Alpha/Sparc64
  27587. >>8 beshort 3 Sparc
  27588. >>8 beshort 4 MIPS
  27589. >>8 beshort 5 PowerPC
  27590. >>8 beshort 6 68000
  27591. >>8 beshort 7 SGI
  27592. >>8 beshort 8 RS6000
  27593. >>8 beshort 9 IA64
  27594. >>8 beshort 10 Sparc64
  27595. >>8 beshort 11 MIPSel
  27596. >>8 beshort 12 ARM
  27597. >>8 beshort 13 MiNT
  27598. >>8 beshort 14 S/390
  27599. >>8 beshort 15 S/390x
  27600. >>8 beshort 16 PowerPC64
  27601. >>8 beshort 17 SuperH
  27602. >>8 beshort 18 Xtensa
  27603. >>8 beshort 255 noarch
  27604. >>10 string x %s
  27605. #delta RPM Daniel Novotny (dnovotny@redhat.com)
  27606. 0 string drpm Delta RPM
  27607. !:mime application/x-rpm
  27608. >12 string x %s
  27609. >>8 beshort 11 MIPSel
  27610. >>8 beshort 12 ARM
  27611. >>8 beshort 13 MiNT
  27612. >>8 beshort 14 S/390
  27613. >>8 beshort 15 S/390x
  27614. >>8 beshort 16 PowerPC64
  27615. >>8 beshort 17 SuperH
  27616. >>8 beshort 18 Xtensa
  27617. >>10 string x %s
  27618. #------------------------------------------------------------------------------
  27619. # $File: rpmsg,v 1.1 2019/04/19 00:40:47 christos Exp $
  27620. # rpmsg: file(1) magic for restricted-permission messages (or "rights-protected" messages)
  27621. # see https://en.wikipedia.org/wiki/Rpmsg
  27622. 0 string \x76\xe8\x04\x60\xc4\x11\xe3\x86 rpmsg Restricted Permission Message
  27623. #------------------------------------------------------------------------------
  27624. # $File: rst,v 1.3 2020/04/27 01:50:36 christos Exp $
  27625. # rst: ReStructuredText http://docutils.sourceforge.net/rst.html
  27626. 0 search/256 \=\=
  27627. !:strength + 30
  27628. >&0 regex/256 \^[\=]+$
  27629. >>&0 search/512 :Author: ReStructuredText file
  27630. >>&0 default x
  27631. >>>&0 regex/512 \^\\.\\.[A-Za-z] ReStructuredText file
  27632. !:ext rst
  27633. #------------------------------------------------------------------------------
  27634. # $File: rtf,v 1.9 2020/12/12 20:01:47 christos Exp $
  27635. # rtf: file(1) magic for Rich Text Format (RTF)
  27636. #
  27637. # Duncan P. Simpson, D.P.Simpson@dcs.warwick.ac.uk
  27638. # Update: Joerg Jenderek
  27639. # URL: https://en.wikipedia.org/wiki/Rich_Text_Format
  27640. # Reference: http://www.snake.net/software/RTF/RTF-Spec-1.7.rtf
  27641. # http://www.kleinlercher.at/tools/Windows_Protocols/Word2007RTFSpec9.pdf
  27642. 0 string {\\rtf
  27643. # skip DROID fmt-355-signature-id-522.rtf by looking for valid version
  27644. >5 ubyte !0xAB
  27645. # skip also \ in DROID fmt-50-signature-id-158.rtf by looking for valid version
  27646. >>5 ubyte !0x5C Rich Text Format data
  27647. !:mime text/rtf
  27648. !:apple ????RTF
  27649. !:ext rtf
  27650. >>>0 use rtf-info
  27651. # display information like version, language and code page of RTF
  27652. 0 name rtf-info
  27653. # 1 mostly, 2 for newer Pocket Word documents, space for test like fdo78502.rtf, { for some urtf
  27654. >5 ubyte !0x7b \b, version %c
  27655. # The word for character set must precede any text or most other control words
  27656. >6 string \\mac \b, Apple Macintosh
  27657. >6 string \\pc
  27658. # control word \pca
  27659. >>9 ubyte =0x61 \b, IBM PS/2, code page 850
  27660. >>9 ubyte !0x61 \b, IBM PC, code page 437
  27661. # unknown character set or ANSI later after control words like
  27662. # \adeflang1025 \info \title \author \category \manager
  27663. # "Burow, Steffanie - Im Tal des Schneeleoparden.rtf"
  27664. #>6 search/105 \\ansi \b, ANSI
  27665. >6 search/502 \\ansi \b, ANSI
  27666. >6 default x \b, unknown character set
  27667. # look for explicit codepage keyword
  27668. # "Burow, Steffanie - Im Tal des Schneeleoparden.rtf"
  27669. #>5 search/110 \\ansicpg
  27670. >5 search/500 \\ansicpg
  27671. # skip unknown or buggy codepage string 0 like in fdo78502.rtf
  27672. >>&0 ubyte !0x30 \b, code page
  27673. # codepage string: 437~United States IBM, ..., 1252~WesternEuropean, ..., 57011~Punjabi
  27674. >>>&-1 string x %-.3s
  27675. # skip space or \ and display possible 4th digit of code page string
  27676. >>>&2 ubyte >0x2F
  27677. >>>>&-1 ubyte <0x3A \b%c
  27678. # possible 5th digit of code page string
  27679. >>>>>&0 ubyte >0x2F
  27680. >>>>>>&-1 ubyte <0x3A \b%c
  27681. # look again at version byte to use default clause
  27682. >5 ubyte x
  27683. # Default language ID for South Asian/Middle Eastern text
  27684. # language ID: 1025, ..., 1065~Persian, ..., 2057~English_UnitedKingdom, ..., 58380~French_NorthAfrica
  27685. # Readme-0.72-Persian.rtf
  27686. #>6 search/1 \\adeflang \b, default middle east language ID
  27687. >>6 search/497 \\adeflang \b, default middle east language ID
  27688. # https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a
  27689. >>>&0 string x %.4s
  27690. # skip \ and NL and show possible 5th digit of language string
  27691. >>>&4 ubyte >0x2F
  27692. >>>>&-1 ubyte <0x3A \b%c
  27693. # else look for default language to be used when the \plain control word is encountered
  27694. >>6 default x
  27695. # "Burow, Steffanie - Im Tal des Schneeleoparden.rtf"
  27696. #>>>6 search/127 \\deflang
  27697. >>>6 search/505 \\deflang
  27698. >>>>&0 string >0 \b, default language ID %-.4s
  27699. # possible 5th digit of language string
  27700. >>>>&4 ubyte >0x2F
  27701. >>>>>&-1 ubyte <0x3A \b%c
  27702. # Reference: http://latex2rtf.sourceforge.net/rtfspec_63.html
  27703. # Note: no real world example found
  27704. 0 string {\\urtf Rich Text Format unicoded data
  27705. !:mime text/rtf
  27706. #!:apple ????RTF
  27707. !:ext rtf
  27708. >1 use rtf-info
  27709. # URL: https://en.wikipedia.org/wiki/Microsoft_Word
  27710. # Reference: http://fileformats.archiveteam.org/wiki/Microsoft_Word
  27711. # Note: called by TrID "Pocket Word document"
  27712. # by PlanMaker "Pocket Word-Handheld PC" for pwd
  27713. # by PlanMaker "Pocket Word-Pocket PC" for psw
  27714. 0 string {\\pwd Pocket Word document or template
  27715. # by SoftMaker Office http://extension.nirsoft.net/pwd
  27716. #!:mime application/msword
  27717. # https://reposcope.com/mimetype/application/x-pocket-word
  27718. !:mime application/x-pocket-word
  27719. # PWD for Handheld PC variant and PSW for Pocket PC variant
  27720. # PWT for template
  27721. !:ext pwd/psw/pwt
  27722. >0 use rtf-info
  27723. #------------------------------------------------------------------------------
  27724. # $File: ruby,v 1.10 2019/07/21 09:40:17 christos Exp $
  27725. # ruby: file(1) magic for Ruby scripting language
  27726. # URL: https://www.ruby-lang.org/
  27727. # From: Reuben Thomas <rrt@sc3d.org>
  27728. # Ruby scripts
  27729. 0 search/1/w #!\ /usr/bin/ruby Ruby script text executable
  27730. !:strength + 15
  27731. !:mime text/x-ruby
  27732. 0 search/1/w #!\ /usr/local/bin/ruby Ruby script text executable
  27733. !:strength + 15
  27734. !:mime text/x-ruby
  27735. 0 search/1 #!/usr/bin/env\ ruby Ruby script text executable
  27736. !:strength + 15
  27737. !:mime text/x-ruby
  27738. 0 search/1 #!\ /usr/bin/env\ ruby Ruby script text executable
  27739. !:strength + 15
  27740. !:mime text/x-ruby
  27741. # What looks like ruby, but does not have a shebang
  27742. # (modules and such)
  27743. # From: Lubomir Rintel <lkundrak@v3.sk>
  27744. 0 search/8192 require
  27745. >0 regex \^[[:space:]]*require[[:space:]]'[A-Za-z_/.]+'
  27746. >>0 regex def\ [a-z]|\ do$
  27747. >>>&0 regex \^[[:space:]]*end([[:space:]]+[;#].*)?$ Ruby script text
  27748. !:strength + 30
  27749. !:mime text/x-ruby
  27750. 0 regex \^[[:space:]]*(class|module)[[:space:]][A-Z]
  27751. >0 regex (modul|includ)e\ [A-Z]|def\ [a-z]
  27752. >>&0 regex \^[[:space:]]*end([[:space:]]+[;#].*)?$ Ruby script text
  27753. !:strength + 30
  27754. !:mime text/x-ruby
  27755. # Classes with no modules or defs, beats simple ASCII
  27756. 0 regex \^[[:space:]]*(class|module)[[:space:]][A-Z]
  27757. >&0 regex \^[[:space:]]*end([[:space:]]+[;#if].*)?$ Ruby script text
  27758. !:strength + 10
  27759. !:mime text/x-ruby
  27760. # Looks for function definition to balance python magic
  27761. # def name (args)
  27762. # end
  27763. 0 search/8192 def\
  27764. >0 regex \^[[:space:]]*def\ [a-z]|def\ [[:alpha:]]+::[a-z]
  27765. >>&0 regex \^[[:space:]]*end([[:space:]]+[;#].*)?$ Ruby script text
  27766. !:strength + 10
  27767. !:mime text/x-ruby
  27768. 0 search/8192 require
  27769. >0 regex \^[[:space:]]*require[[:space:]]'[A-Za-z_/.]+' Ruby script text
  27770. !:mime text/x-ruby
  27771. 0 search/8192 include
  27772. >0 regex \^[[:space:]]*include\ ([A-Z]+[a-z]*(::))+ Ruby script text
  27773. !:mime text/x-ruby
  27774. #------------------------------------------------------------------------------
  27775. # $File: sc,v 1.6 2009/09/19 16:28:12 christos Exp $
  27776. # sc: file(1) magic for "sc" spreadsheet
  27777. #
  27778. 38 string Spreadsheet sc spreadsheet file
  27779. !:mime application/x-sc
  27780. #------------------------------------------------------------------------------
  27781. # $File: sccs,v 1.8 2020/06/20 21:32:52 christos Exp $
  27782. # sccs: file(1) magic for SCCS archives
  27783. #
  27784. # SCCS v4 archive structure:
  27785. # \001h01207
  27786. # \001s 00276/00000/00000
  27787. # \001d D 1.1 87/09/23 08:09:20 ian 1 0
  27788. # \001c date and time created 87/09/23 08:09:20 by ian
  27789. # \001e
  27790. # \001u
  27791. # \001U
  27792. # ... etc.
  27793. # Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
  27794. # *Sigh*. And these both came from various parts of the USG.
  27795. # Maybe we should just switch everybody from SCCS to RCS!
  27796. # Further, you can't just say '\001h0', because the five-digit number
  27797. # is a checksum that could (presumably) have any leading digit,
  27798. # Fortunately we have regular expression matching:
  27799. 0 string \001h
  27800. >2 regex [0-9][0-9][0-9][0-9][0-9]$
  27801. >>8 string \001s\040 SCCS v4 archive data
  27802. >2 string V6,sum= SCCS v6 archive data
  27803. #------------------------------------------------------------------------------
  27804. # $File: scientific,v 1.13 2019/04/19 00:42:27 christos Exp $
  27805. # scientific: file(1) magic for scientific formats
  27806. #
  27807. # From: Joe Krahn <krahn@niehs.nih.gov>
  27808. ########################################################
  27809. # CCP4 data and plot files:
  27810. 0 string MTZ\040 MTZ reflection file
  27811. 92 string PLOT%%84 Plot84 plotting file
  27812. >52 byte 1 , Little-endian
  27813. >55 byte 1 , Big-endian
  27814. ########################################################
  27815. # Electron density MAP/MASK formats
  27816. 0 string EZD_MAP NEWEZD Electron Density Map
  27817. 109 string MAP\040( Old EZD Electron Density Map
  27818. 0 string/c :-)\040Origin BRIX Electron Density Map
  27819. >170 string >0 , Sigma:%.12s
  27820. #>4 string >0 %.178s
  27821. #>4 addr x %.178s
  27822. 7 string 18\040!NTITLE XPLOR ASCII Electron Density Map
  27823. 9 string \040!NTITLE\012\040REMARK CNS ASCII electron density map
  27824. 208 string MAP\040 CCP4 Electron Density Map
  27825. # Assumes same stamp for float and double (normal case)
  27826. >212 byte 17 \b, Big-endian
  27827. >212 byte 34 \b, VAX format
  27828. >212 byte 68 \b, Little-endian
  27829. >212 byte 85 \b, Convex native
  27830. ############################################################
  27831. # X-Ray Area Detector images
  27832. 0 string R-AXIS4\ \ \ R-Axis Area Detector Image:
  27833. >796 lelong <20 Little-endian, IP #%d,
  27834. >>768 lelong >0 Size=%dx
  27835. >>772 lelong >0 \b%d
  27836. >796 belong <20 Big-endian, IP #%d,
  27837. >>768 belong >0 Size=%dx
  27838. >>772 belong >0 \b%d
  27839. 0 string RAXIS\ \ \ \ \ R-Axis Area Detector Image, Win32:
  27840. >796 lelong <20 Little-endian, IP #%d,
  27841. >>768 lelong >0 Size=%dx
  27842. >>772 lelong >0 \b%d
  27843. >796 belong <20 Big-endian, IP #%d,
  27844. >>768 belong >0 Size=%dx
  27845. >>772 belong >0 \b%d
  27846. 1028 string MMX\000\000\000\000\000\000\000\000\000\000\000\000\000 MAR Area Detector Image,
  27847. >1072 ulong >1 Compressed(%d),
  27848. >1100 ulong >1 %d headers,
  27849. >1104 ulong >0 %d x
  27850. >1108 ulong >0 %d,
  27851. >1120 ulong >0 %d bits/pixel
  27852. # Type: GEDCOM genealogical (family history) data
  27853. # From: Giuseppe Bilotta
  27854. 0 search/1/c 0\ HEAD GEDCOM genealogy text
  27855. >&0 search 1\ GEDC
  27856. >>&0 search 2\ VERS version
  27857. >>>&1 string >\0 %s
  27858. # From: Phil Endecott <phil05@chezphil.org>
  27859. 0 string \000\060\000\040\000\110\000\105\000\101\000\104 GEDCOM data
  27860. 0 string \060\000\040\000\110\000\105\000\101\000\104\000 GEDCOM data
  27861. 0 string \376\377\000\060\000\040\000\110\000\105\000\101\000\104 GEDCOM data
  27862. 0 string \377\376\060\000\040\000\110\000\105\000\101\000\104\000 GEDCOM data
  27863. # PDB: Protein Data Bank files
  27864. # Adam Buchbinder <adam.buchbinder@gmail.com>
  27865. #
  27866. # https://www.wwpdb.org/documentation/format32/sect2.html
  27867. # https://www.ch.ic.ac.uk/chemime/
  27868. #
  27869. # The PDB file format is fixed-field, 80 columns. From the spec:
  27870. #
  27871. # COLS DATA
  27872. # 1 - 6 "HEADER"
  27873. # 11 - 50 String(40)
  27874. # 51 - 59 Date
  27875. # 63 - 66 IDcode
  27876. #
  27877. # Thus, positions 7-10, 60-62 and 67-80 are spaces. The Date must be in the
  27878. # format DD-MMM-YY, e.g., 01-JAN-70, and the IDcode consists of numbers and
  27879. # uppercase letters. However, examples have been seen without the date string,
  27880. # e.g., the example on the chemime site.
  27881. 0 string HEADER\ \ \ \040
  27882. >&0 regex/1l \^.{40}
  27883. >>&0 regex/1l [0-9]{2}-[A-Z]{3}-[0-9]{2}\ {3}
  27884. >>>&0 regex/1ls [A-Z0-9]{4}.{14}$
  27885. >>>>&0 regex/1l [A-Z0-9]{4} Protein Data Bank data, ID Code %s
  27886. !:mime chemical/x-pdb
  27887. >>>>0 regex/1l [0-9]{2}-[A-Z]{3}-[0-9]{2} \b, %s
  27888. # Type: GDSII Stream file
  27889. 0 belong 0x00060002 GDSII Stream file
  27890. >4 byte 0x00
  27891. >>5 byte x version %d.0
  27892. >4 byte >0x00 version %d
  27893. >>5 byte x \b.%d
  27894. # Type: LXT (interLaced eXtensible Trace)
  27895. # chrysn <chrysn@fsfe.org>
  27896. 0 beshort 0x0138 interLaced eXtensible Trace (LXT) file
  27897. >2 beshort >0 (Version %u)
  27898. #------------------------------------------------------------------------------
  27899. # $File: securitycerts,v 1.4 2009/09/19 16:28:12 christos Exp $
  27900. 0 search/1 -----BEGIN\ CERTIFICATE------ RFC1421 Security Certificate text
  27901. 0 search/1 -----BEGIN\ NEW\ CERTIFICATE RFC1421 Security Certificate Signing Request text
  27902. 0 belong 0xedfeedfe Sun 'jks' Java Keystore File data
  27903. 0 string \0volume_key volume_key escrow packet
  27904. # Type: SE Linux policy modules *.pp reference policy
  27905. # for Fedora 5 to 9, RHEL5, and Debian Etch and Lenny.
  27906. # URL: https://doc.coker.com.au/computers/selinux-magic
  27907. # From: Russell Coker <russell@coker.com.au>
  27908. 0 lelong 0xf97cff8f SE Linux modular policy
  27909. >4 lelong x version %d,
  27910. >8 lelong x %d sections,
  27911. >>(12.l) lelong 0xf97cff8d
  27912. >>>(12.l+27) lelong x mod version %d,
  27913. >>>(12.l+31) lelong 0 Not MLS,
  27914. >>>(12.l+31) lelong 1 MLS,
  27915. >>>(12.l+23) lelong 2
  27916. >>>>(12.l+47) string >\0 module name %s
  27917. >>>(12.l+23) lelong 1 base
  27918. 1 string policy_module( SE Linux policy module source
  27919. 2 string policy_module( SE Linux policy module source
  27920. 0 string ##\ <summary> SE Linux policy interface source
  27921. #0 search gen_context( SE Linux policy file contexts
  27922. #0 search gen_sens( SE Linux policy MLS constraints source
  27923. #------------------------------------------------------------------------------
  27924. # $File: sendmail,v 1.11 2019/04/19 00:42:27 christos Exp $
  27925. # sendmail: file(1) magic for sendmail config files
  27926. #
  27927. # XXX - byte order?
  27928. #
  27929. # Update: Joerg Jenderek
  27930. # GRR: this test is too general as it catches also
  27931. # READ.ME.FIRST.AWP Sendmail frozen configuration
  27932. # - version ====|====|====|====|====|====|====|====|====|====|====|====|===
  27933. # Email_23_f217153422.ts Sendmail frozen configuration
  27934. # - version \330jK\354
  27935. 0 byte 046
  27936. # https://www.sendmail.com/sm/open_source/docs/older_release_notes/
  27937. # freezed configuration file (dbm format?) created from sendmal.cf with -bz
  27938. # by older sendmail. til version 8.6 support for frozen configuration files is removed
  27939. # valid version numbers look like "7.14.4" and should be similar to output of commands
  27940. # "sendmail -d0 -bt < /dev/null |grep -i Version" or "egrep '^DZ' /etc/sendmail.cf"
  27941. >16 regex/s =^[0-78][0-9.]{4} Sendmail frozen configuration
  27942. # normally only /etc/sendmail.fc or /var/adm/sendmail/sendmail.fc
  27943. !:ext fc
  27944. >>16 string >\0 - version %s
  27945. 0 short 0x271c
  27946. # look for valid version number
  27947. >16 regex/s =^[0-78][0-9.]{4} Sendmail frozen configuration
  27948. !:ext fc
  27949. >>16 string >\0 - version %s
  27950. #------------------------------------------------------------------------------
  27951. # sendmail: file(1) magic for sendmail m4(1) files
  27952. #
  27953. # From Hendrik Scholz <hendrik@scholz.net>
  27954. # i.e. files in /usr/share/sendmail/cf/
  27955. #
  27956. 0 string divert(-1)\n sendmail m4 text file
  27957. #------------------------------------------------------------------------------
  27958. # $File: sequent,v 1.14 2019/04/19 00:42:27 christos Exp $
  27959. # sequent: file(1) magic for Sequent machines
  27960. #
  27961. # Sequent information updated by Don Dwiggins <atsun!dwiggins>.
  27962. # For Sequent's multiprocessor systems (incomplete).
  27963. 0 lelong 0x00ea BALANCE NS32000 .o
  27964. >16 lelong >0 not stripped
  27965. >124 lelong >0 version %d
  27966. 0 lelong 0x10ea BALANCE NS32000 executable (0 @ 0)
  27967. >16 lelong >0 not stripped
  27968. >124 lelong >0 version %d
  27969. 0 lelong 0x20ea BALANCE NS32000 executable (invalid @ 0)
  27970. >16 lelong >0 not stripped
  27971. >124 lelong >0 version %d
  27972. 0 lelong 0x30ea BALANCE NS32000 standalone executable
  27973. >16 lelong >0 not stripped
  27974. >124 lelong >0 version %d
  27975. #
  27976. # Symmetry information added by Jason Merrill <jason@jarthur.claremont.edu>.
  27977. # Symmetry magic nums will not be reached if DOS COM comes before them;
  27978. # byte 0xeb is matched before these get a chance.
  27979. 0 leshort 0x12eb SYMMETRY i386 .o
  27980. >16 lelong >0 not stripped
  27981. >124 lelong >0 version %d
  27982. 0 leshort 0x22eb SYMMETRY i386 executable (0 @ 0)
  27983. >16 lelong >0 not stripped
  27984. >124 lelong >0 version %d
  27985. 0 leshort 0x32eb SYMMETRY i386 executable (invalid @ 0)
  27986. >16 lelong >0 not stripped
  27987. >124 lelong >0 version %d
  27988. # https://en.wikipedia.org/wiki/Sequent_Computer_Systems
  27989. # below test line conflicts with MS-DOS 2.11 floppies and Acronis loader
  27990. #0 leshort 0x42eb SYMMETRY i386 standalone executable
  27991. 0 leshort 0x42eb
  27992. # skip unlike negative version
  27993. >124 lelong >-1
  27994. # assuming version 28867614 is very low probable
  27995. >>124 lelong !28867614 SYMMETRY i386 standalone executable
  27996. >>>16 lelong >0 not stripped
  27997. >>>124 lelong >0 version %d
  27998. #------------------------------------------------------------------------------
  27999. # $File: sereal,v 1.3 2015/02/05 19:14:45 christos Exp $
  28000. # sereal: file(1) magic the Sereal binary serialization format
  28001. #
  28002. # From: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  28003. #
  28004. # See the specification of the format at
  28005. # https://github.com/Sereal/Sereal/blob/master/sereal_spec.pod#document-header-format
  28006. #
  28007. # I'd have liked to do the byte&0xF0 matching against 0, 1, 2 ... by
  28008. # doing (byte&0xF0)>>4 here, but unfortunately that's not
  28009. # supported. So when we print out a message about an unknown format
  28010. # we'll print out e.g. 0x30 instead of the more human-readable
  28011. # 0x30>>4.
  28012. #
  28013. # See https://github.com/Sereal/Sereal/commit/35372ae01d in the
  28014. # Sereal.git repository for test Sereal data.
  28015. 0 name sereal
  28016. >4 byte&0x0F x (version %d,
  28017. >4 byte&0xF0 0x00 uncompressed)
  28018. >4 byte&0xF0 0x10 compressed with non-incremental Snappy)
  28019. >4 byte&0xF0 0x20 compressed with incremental Snappy)
  28020. >4 byte&0xF0 >0x20 unknown subformat, flag: %d>>4)
  28021. 0 string/b \=srl Sereal data packet
  28022. !:mime application/sereal
  28023. >&0 use sereal
  28024. 0 string/b \=\xF3rl Sereal data packet
  28025. !:mime application/sereal
  28026. >&0 use sereal
  28027. 0 string/b \=\xC3\xB3rl Sereal data packet, UTF-8 encoded
  28028. !:mime application/sereal
  28029. >&0 use sereal
  28030. #------------------------------------------------------------------------------
  28031. # $File: sgi,v 1.23 2018/05/29 02:26:56 christos Exp $
  28032. # sgi: file(1) magic for Silicon Graphics operating systems and applications
  28033. #
  28034. # Executable images are handled either in aout (for old-style a.out
  28035. # files for 68K; they are indistinguishable from other big-endian 32-bit
  28036. # a.out files) or in mips (for MIPS ECOFF and Ucode files)
  28037. #
  28038. # kbd file definitions
  28039. 0 string kbd!map kbd map file
  28040. >8 byte >0 Ver %d:
  28041. >10 short >0 with %d table(s)
  28042. 0 beshort 0x8765 disk quotas file
  28043. 0 beshort 0x0506 IRIS Showcase file
  28044. >2 byte 0x49 -
  28045. >3 byte x - version %d
  28046. 0 beshort 0x0226 IRIS Showcase template
  28047. >2 byte 0x63 -
  28048. >3 byte x - version %d
  28049. 0 belong 0x5343464d IRIS Showcase file
  28050. >4 byte x - version %d
  28051. 0 belong 0x5443464d IRIS Showcase template
  28052. >4 byte x - version %d
  28053. 0 belong 0xdeadbabe IRIX Parallel Arena
  28054. >8 belong >0 - version %d
  28055. # core files
  28056. #
  28057. # 32bit core file
  28058. 0 belong 0xdeadadb0 IRIX core dump
  28059. >4 belong 1 of
  28060. >16 string >\0 '%s'
  28061. # 64bit core file
  28062. 0 belong 0xdeadad40 IRIX 64-bit core dump
  28063. >4 belong 1 of
  28064. >16 string >\0 '%s'
  28065. # N32bit core file
  28066. 0 belong 0xbabec0bb IRIX N32 core dump
  28067. >4 belong 1 of
  28068. >16 string >\0 '%s'
  28069. # New style crash dump file
  28070. 0 string \x43\x72\x73\x68\x44\x75\x6d\x70 IRIX vmcore dump of
  28071. >36 string >\0 '%s'
  28072. # Trusted IRIX info
  28073. 0 string SGIAUDIT SGI Audit file
  28074. >8 byte x - version %d
  28075. >9 byte x \b.%d
  28076. #
  28077. 0 string WNGZWZSC Wingz compiled script
  28078. 0 string WNGZWZSS Wingz spreadsheet
  28079. 0 string WNGZWZHP Wingz help file
  28080. #
  28081. 0 string #Inventor\040V IRIS Inventor 1.0 file
  28082. 0 string #Inventor\040V2 Open Inventor 2.0 file
  28083. # GLF is OpenGL stream encoding
  28084. 0 string glfHeadMagic(); GLF_TEXT
  28085. 4 belong 0x7d000000 GLF_BINARY_LSB_FIRST
  28086. !:strength -30
  28087. 4 belong 0x0000007d GLF_BINARY_MSB_FIRST
  28088. !:strength -30
  28089. # GLS is OpenGL stream encoding; GLS is the successor of GLF
  28090. 0 string glsBeginGLS( GLS_TEXT
  28091. 4 belong 0x10000000 GLS_BINARY_LSB_FIRST
  28092. !:strength -30
  28093. 4 belong 0x00000010 GLS_BINARY_MSB_FIRST
  28094. !:strength -30
  28095. # Performance Co-Pilot file types
  28096. 0 string PmNs PCP compiled namespace (V.0)
  28097. 0 string PmN PCP compiled namespace
  28098. >3 string >\0 (V.%1.1s)
  28099. #3 lelong 0x84500526 PCP archive
  28100. 3 belong 0x84500526 PCP archive
  28101. >7 byte x (V.%d)
  28102. #>20 lelong -2 temporal index
  28103. #>20 lelong -1 metadata
  28104. #>20 lelong 0 log volume #0
  28105. #>20 lelong >0 log volume #%d
  28106. >20 belong -2 temporal index
  28107. >20 belong -1 metadata
  28108. >20 belong 0 log volume #0
  28109. >20 belong >0 log volume #%d
  28110. >24 string >\0 host: %s
  28111. 0 string PCPFolio PCP
  28112. >9 string Version: Archive Folio
  28113. >18 string >\0 (V.%s)
  28114. 0 string #pmchart PCP pmchart view
  28115. >9 string Version
  28116. >17 string >\0 (V%-3.3s)
  28117. 0 string #kmchart PCP kmchart view
  28118. >9 string Version
  28119. >17 string >\0 (V.%s)
  28120. 0 string pmview PCP pmview config
  28121. >7 string Version
  28122. >15 string >\0 (V%-3.3s)
  28123. 0 string #pmlogger PCP pmlogger config
  28124. >10 string Version
  28125. >18 string >\0 (V%1.1s)
  28126. 0 string #pmdahotproc PCP pmdahotproc config
  28127. >13 string Version
  28128. >21 string >\0 (V%-3.3s)
  28129. 0 string PcPh PCP Help
  28130. >4 string 1 Index
  28131. >4 string 2 Text
  28132. >5 string >\0 (V.%1.1s)
  28133. 0 string #pmieconf-rules PCP pmieconf rules
  28134. >16 string >\0 (V.%1.1s)
  28135. 3 string pmieconf-pmie PCP pmie config
  28136. >17 string >\0 (V.%1.1s)
  28137. 0 string MMV PCP memory mapped values
  28138. >4 long x (V.%d)
  28139. # SpeedShop data files
  28140. 0 lelong 0x13130303 SpeedShop data file
  28141. # mdbm files
  28142. 0 lelong 0x01023962 mdbm file, version 0 (obsolete)
  28143. 0 string mdbm mdbm file,
  28144. >5 byte x version %d,
  28145. >6 byte x 2^%d pages,
  28146. >7 byte x pagesize 2^%d,
  28147. >17 byte x hash %d,
  28148. >11 byte x dataformat %d
  28149. # Alias Maya files
  28150. 0 string/t //Maya\040ASCII Alias Maya Ascii File,
  28151. >13 string >\0 version %s
  28152. 8 string MAYAFOR4 Alias Maya Binary File,
  28153. >32 string >\0 version %s scene
  28154. 8 string MayaFOR4 Alias Maya Binary File,
  28155. >32 string >\0 version %s scene
  28156. 8 string CIMG Alias Maya Image File
  28157. 8 string DEEP Alias Maya Image File
  28158. #------------------------------------------------------------------------------
  28159. # $File: sgml,v 1.42 2020/12/12 20:01:47 christos Exp $
  28160. # Type: SVG Vectorial Graphics
  28161. # From: Noel Torres <tecnico@ejerciciosresueltos.com>
  28162. 0 string \<?xml\ version=
  28163. >14 regex ['"\ \t]*[0-9.]+['"\ \t]*
  28164. >>19 search/4096 \<svg SVG Scalable Vector Graphics image
  28165. !:mime image/svg+xml
  28166. >>19 search/4096 \<gnc-v2 GnuCash file
  28167. !:mime application/x-gnucash
  28168. 0 string \<svg SVG Scalable Vector Graphics image
  28169. !:mime image/svg+xml
  28170. # Sitemap file
  28171. 0 string/t \<?xml\ version=
  28172. >14 regex ['"\ \t]*[0-9.]+['"\ \t]*
  28173. >>19 search/4096 \<urlset XML Sitemap document text
  28174. !:mime application/xml-sitemap
  28175. # OpenStreetMap XML (.osm)
  28176. # https://wiki.openstreetmap.org/wiki/OSM_XML
  28177. # From: Markus Heidelberg <markus.heidelberg@web.de>
  28178. 0 string \<?xml\ version=
  28179. >14 regex ['"\ \t]*[0-9.]+['"\ \t]*
  28180. >>19 search/4096 \<osm OpenStreetMap XML data
  28181. # xhtml
  28182. 0 string/t \<?xml\ version="
  28183. >19 search/4096/cWbt \<!doctype\ html XHTML document text
  28184. >>15 string >\0 (version %.3s)
  28185. !:mime text/html
  28186. 0 string/t \<?xml\ version='
  28187. >19 search/4096/cWbt \<!doctype\ html XHTML document text
  28188. >>15 string >\0 (version %.3s)
  28189. !:mime text/html
  28190. 0 string/t \<?xml\ version="
  28191. >19 search/4096/cWbt \<html broken XHTML document text
  28192. >>15 string >\0 (version %.3s)
  28193. !:mime text/html
  28194. #------------------------------------------------------------------------------
  28195. # sgml: file(1) magic for Standard Generalized Markup Language
  28196. # HyperText Markup Language (HTML) is an SGML document type,
  28197. # from Daniel Quinlan (quinlan@yggdrasil.com)
  28198. # adapted to string extensions by Anthon van der Neut <anthon@mnt.org)
  28199. 0 search/4096/cWt \<!doctype\ html HTML document text
  28200. !:mime text/html
  28201. !:strength + 5
  28202. # SVG document
  28203. # https://www.w3.org/TR/SVG/single-page.html
  28204. 0 search/4096/cWbt \<!doctype\ svg SVG XML document
  28205. !:mime image/svg+xml
  28206. !:strength + 5
  28207. 0 search/4096/cwt \<head\> HTML document text
  28208. !:mime text/html
  28209. !:strength + 5
  28210. 0 search/4096/cWt \<head\ HTML document text
  28211. !:mime text/html
  28212. !:strength + 5
  28213. 0 search/4096/cwt \<title\> HTML document text
  28214. !:mime text/html
  28215. !:strength + 5
  28216. 0 search/4096/cWt \<title\ HTML document text
  28217. !:mime text/html
  28218. !:strength + 5
  28219. 0 search/4096/cwt \<html\> HTML document text
  28220. !:mime text/html
  28221. !:strength + 5
  28222. 0 search/4096/cWt \<html\ HTML document text
  28223. !:mime text/html
  28224. !:strength + 5
  28225. 0 search/4096/cwt \<script\> HTML document text
  28226. !:mime text/html
  28227. !:strength + 5
  28228. 0 search/4096/cWt \<script\ HTML document text
  28229. !:mime text/html
  28230. !:strength + 5
  28231. 0 search/4096/cwt \<style\> HTML document text
  28232. !:mime text/html
  28233. !:strength + 5
  28234. 0 search/4096/cWt \<style\ HTML document text
  28235. !:mime text/html
  28236. !:strength + 5
  28237. 0 search/4096/cwt \<table\> HTML document text
  28238. !:mime text/html
  28239. !:strength + 5
  28240. 0 search/4096/cWt \<table\ HTML document text
  28241. !:mime text/html
  28242. !:strength + 5
  28243. 0 search/4096/cwt \<a\ href= HTML document text
  28244. !:mime text/html
  28245. !:strength + 5
  28246. # Extensible markup language (XML), a subset of SGML
  28247. # from Marc Prud'hommeaux (marc@apocalypse.org)
  28248. 0 search/1/cwt \<?xml XML document text
  28249. !:mime text/xml
  28250. !:strength + 5
  28251. 0 string/t \<?xml\ version\ " XML
  28252. !:mime text/xml
  28253. !:strength + 5
  28254. 0 string/t \<?xml\ version=" XML
  28255. !:mime text/xml
  28256. !:strength + 5
  28257. >15 string/t >\0 %.3s document text
  28258. >>23 search/1 \<xsl:stylesheet (XSL stylesheet)
  28259. >>24 search/1 \<xsl:stylesheet (XSL stylesheet)
  28260. 0 string/t \<?xml\ version=' XML
  28261. !:mime text/xml
  28262. !:strength + 5
  28263. >15 string/t >\0 %.3s document text
  28264. >>23 search/1 \<xsl:stylesheet (XSL stylesheet)
  28265. >>24 search/1 \<xsl:stylesheet (XSL stylesheet)
  28266. 0 search/1/wt \<?XML broken XML document text
  28267. !:mime text/xml
  28268. !:strength - 10
  28269. # SGML, mostly from rph@sq
  28270. 0 search/4096/cwt \<!doctype exported SGML document text
  28271. 0 search/4096/cwt \<!subdoc exported SGML subdocument text
  28272. 0 search/4096/cwt \<!-- exported SGML document text
  28273. !:strength - 10
  28274. # Web browser cookie files
  28275. # (Mozilla, Galeon, Netscape 4, Konqueror..)
  28276. # Ulf Harnhammar <ulfh@update.uu.se>
  28277. 0 search/1 #\ HTTP\ Cookie\ File Web browser cookie text
  28278. 0 search/1 #\ Netscape\ HTTP\ Cookie\ File Netscape cookie text
  28279. 0 search/1 #\ KDE\ Cookie\ File Konqueror cookie text
  28280. # XML-based format representing braille pages in a digital format.
  28281. #
  28282. # Specification:
  28283. # http://files.pef-format.org/specifications/pef-2008-1/pef-specification.html
  28284. #
  28285. # Simon Aittamaa <simon.aittamaa@gmail.com>
  28286. 0 string \<?xml\ version=
  28287. >14 regex ['"\ \t]*[0-9.]+['"\ \t]*
  28288. >>19 search/4096 \<pef Portable Embosser Format
  28289. !:mime application/x-pef+xml
  28290. #------------------------------------------------------------------------
  28291. # $File: sharc,v 1.8 2017/03/17 21:35:28 christos Exp $
  28292. # file(1) magic for sharc files
  28293. #
  28294. # SHARC DSP, MIDI SysEx and RiscOS filetype definitions added by
  28295. # FutureGroove Music (dsp@futuregroove.de)
  28296. #------------------------------------------------------------------------
  28297. #0 string Draw RiscOS Drawfile
  28298. #0 string PACK RiscOS PackdDir archive
  28299. #------------------------------------------------------------------------
  28300. # SHARC DSP stuff (based on the FGM SHARC DSP SDK)
  28301. #0 string =! Assembler source
  28302. #0 string Analog ADi asm listing file
  28303. 0 string .SYSTEM SHARC architecture file
  28304. 0 string .system SHARC architecture file
  28305. 0 leshort 0x521C SHARC COFF binary
  28306. >2 leshort >1 , %d sections
  28307. >>12 lelong >0 , not stripped
  28308. #------------------------------------------------------------------------------
  28309. # $File: sinclair,v 1.6 2015/11/14 13:38:35 christos Exp $
  28310. # sinclair: file(1) sinclair QL
  28311. # additions to /etc/magic by Thomas M. Ott (ThMO)
  28312. # Sinclair QL floppy disk formats (ThMO)
  28313. 0 string =QL5 QL disk dump data,
  28314. >3 string =A 720 KB,
  28315. >3 string =B 1.44 MB,
  28316. >3 string =C 3.2 MB,
  28317. >4 string >\0 label:%.10s
  28318. # Sinclair QL OS dump (ThMO)
  28319. 0 belong =0x30000
  28320. >49124 belong <47104
  28321. >>49128 belong <47104
  28322. >>>49132 belong <47104
  28323. >>>>49136 belong <47104 QL OS dump data,
  28324. >>>>>49148 string >\0 type %.3s,
  28325. >>>>>49142 string >\0 version %.4s
  28326. # Sinclair QL firmware executables (ThMO)
  28327. 0 string NqNqNq`\004 QL firmware executable (BCPL)
  28328. # Sinclair QL libraries (was ThMO)
  28329. 0 beshort 0xFB01 QDOS object
  28330. >2 pstring x '%s'
  28331. # Sinclair QL executables (was ThMO)
  28332. 4 belong 0x4AFB QDOS executable
  28333. >9 pstring x '%s'
  28334. # Sinclair QL ROM (ThMO)
  28335. 0 belong =0x4AFB0001 QL plugin-ROM data,
  28336. >9 pstring =\0 un-named
  28337. >9 pstring >\0 named: %s
  28338. # Type: SiSU Markup Language
  28339. # URL: http://www.sisudoc.org/
  28340. # From: Ralph Amissah <ralph.amissah@gmail.com>
  28341. 0 regex \^%?[\ \t]*SiSU[\ \t]+insert SiSU text insert
  28342. >5 regex [0-9.]+ %s
  28343. 0 regex \^%[\ \t]+SiSU[\ \t]+master SiSU text master
  28344. >5 regex [0-9.]+ %s
  28345. 0 regex \^%?[\ \t]*SiSU[\ \t]+text SiSU text
  28346. >5 regex [0-9.]+ %s
  28347. 0 regex \^%?[\ \t]*SiSU[\ \t][0-9.]+ SiSU text
  28348. >5 regex [0-9.]+ %s
  28349. 0 regex \^%*[\ \t]*sisu-[0-9.]+ SiSU text
  28350. >5 regex [0-9.]+ %s
  28351. #------------------------------------------------------------------------------
  28352. # $File: sketch,v 1.5 2017/03/17 21:35:28 christos Exp $
  28353. # Sketch Drawings: http://sketch.sourceforge.net/
  28354. # From: Edwin Mons <e@ik.nu>
  28355. 0 search/1 ##Sketch Sketch document text
  28356. #-----------------------------------------------
  28357. # $File: smalltalk,v 1.5 2009/09/19 16:28:12 christos Exp $
  28358. # GNU Smalltalk image, starting at version 1.6.2
  28359. # From: catull_us@yahoo.com
  28360. #
  28361. 0 string GSTIm\0\0 GNU SmallTalk
  28362. # little-endian
  28363. >7 byte&1 =0 LE image version
  28364. >>10 byte x %d.
  28365. >>9 byte x \b%d.
  28366. >>8 byte x \b%d
  28367. #>>12 lelong x , data: %ld
  28368. #>>16 lelong x , table: %ld
  28369. #>>20 lelong x , memory: %ld
  28370. # big-endian
  28371. >7 byte&1 =1 BE image version
  28372. >>8 byte x %d.
  28373. >>9 byte x \b%d.
  28374. >>10 byte x \b%d
  28375. #>>12 belong x , data: %ld
  28376. #>>16 belong x , table: %ld
  28377. #>>20 belong x , memory: %ld
  28378. #------------------------------------------------------------------------------
  28379. # $File: smile,v 1.1 2011/08/17 17:37:18 christos Exp $
  28380. # smile: file(1) magic for Smile serialization
  28381. #
  28382. # The Smile serialization format uses a 4-byte header:
  28383. #
  28384. # Constant byte #0: 0x3A (ASCII ':')
  28385. # Constant byte #1: 0x29 (ASCII ')')
  28386. # Constant byte #2: 0x0A (ASCII linefeed, '\n')
  28387. # Variable byte #3, consisting of bits:
  28388. # Bits 4-7 (4 MSB): 4-bit version number
  28389. # Bits 3: Reserved
  28390. # Bit 2 (mask 0x04): Whether raw binary (unescaped 8-bit) values may be present in content
  28391. # Bit 1 (mask 0x02): Whether shared String value checking was enabled during encoding, default false
  28392. # Bit 0 (mask 0x01): Whether shared property name checking was enabled during encoding, default true
  28393. #
  28394. # Reference: http://wiki.fasterxml.com/SmileFormatSpec
  28395. # Created by: Pierre-Alexandre Meyer <pierre@mouraf.org>
  28396. # Detection
  28397. 0 string :)\n Smile binary data
  28398. # Versioning
  28399. >3 byte&0xF0 x version %d:
  28400. # Properties
  28401. >3 byte&0x04 0x04 binary raw,
  28402. >3 byte&0x04 0x00 binary encoded,
  28403. >3 byte&0x02 0x02 shared String values enabled,
  28404. >3 byte&0x02 0x00 shared String values disabled,
  28405. >3 byte&0x01 0x01 shared field names enabled
  28406. >3 byte&0x01 0x00 shared field names disabled
  28407. #------------------------------------------------------------------------------
  28408. # $File: sniffer,v 1.29 2021/03/13 18:51:51 christos Exp $
  28409. # sniffer: file(1) magic for packet capture files
  28410. #
  28411. # From: guy@alum.mit.edu (Guy Harris)
  28412. #
  28413. #
  28414. # Microsoft Network Monitor 1.x capture files.
  28415. #
  28416. 0 string RTSS NetMon capture file
  28417. >5 byte x - version %d
  28418. >4 byte x \b.%d
  28419. >6 leshort 0 (Unknown)
  28420. >6 leshort 1 (Ethernet)
  28421. >6 leshort 2 (Token Ring)
  28422. >6 leshort 3 (FDDI)
  28423. >6 leshort 4 (ATM)
  28424. >6 leshort >4 (type %d)
  28425. #
  28426. # Microsoft Network Monitor 2.x capture files.
  28427. #
  28428. 0 string GMBU NetMon capture file
  28429. >5 byte x - version %d
  28430. >4 byte x \b.%d
  28431. >6 leshort 0 (Unknown)
  28432. >6 leshort 1 (Ethernet)
  28433. >6 leshort 2 (Token Ring)
  28434. >6 leshort 3 (FDDI)
  28435. >6 leshort 4 (ATM)
  28436. >6 leshort 5 (IP-over-IEEE 1394)
  28437. >6 leshort 6 (802.11)
  28438. >6 leshort 7 (Raw IP)
  28439. >6 leshort 8 (Raw IP)
  28440. >6 leshort 9 (Raw IP)
  28441. >6 leshort >9 (type %d)
  28442. #
  28443. # Network General Sniffer capture files.
  28444. # Sorry, make that "Network Associates Sniffer capture files."
  28445. # Sorry, make that "Network General old DOS Sniffer capture files."
  28446. #
  28447. 0 string TRSNIFF\040data\040\040\040\040\032 Sniffer capture file
  28448. >33 byte 2 (compressed)
  28449. >23 leshort x - version %d
  28450. >25 leshort x \b.%d
  28451. >32 byte 0 (Token Ring)
  28452. >32 byte 1 (Ethernet)
  28453. >32 byte 2 (ARCNET)
  28454. >32 byte 3 (StarLAN)
  28455. >32 byte 4 (PC Network broadband)
  28456. >32 byte 5 (LocalTalk)
  28457. >32 byte 6 (Znet)
  28458. >32 byte 7 (Internetwork Analyzer)
  28459. >32 byte 9 (FDDI)
  28460. >32 byte 10 (ATM)
  28461. #
  28462. # Cinco Networks NetXRay capture files.
  28463. # Sorry, make that "Network General Sniffer Basic capture files."
  28464. # Sorry, make that "Network Associates Sniffer Basic capture files."
  28465. # Sorry, make that "Network Associates Sniffer Basic, and Windows
  28466. # Sniffer Pro", capture files."
  28467. # Sorry, make that "Network General Sniffer capture files."
  28468. # Sorry, make that "NetScout Sniffer capture files."
  28469. #
  28470. 0 string XCP\0 NetXRay capture file
  28471. >4 string >\0 - version %s
  28472. >44 leshort 0 (Ethernet)
  28473. >44 leshort 1 (Token Ring)
  28474. >44 leshort 2 (FDDI)
  28475. >44 leshort 3 (WAN)
  28476. >44 leshort 8 (ATM)
  28477. >44 leshort 9 (802.11)
  28478. #
  28479. # "libpcap" capture files.
  28480. # https://www.tcpdump.org/manpages/pcap-savefile.5.html
  28481. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  28482. # the main program that uses that format, but there are other programs
  28483. # that use "libpcap", or that use the same capture file format.)
  28484. #
  28485. 0 name pcap-be
  28486. >4 beshort x - version %d
  28487. >6 beshort x \b.%d
  28488. # clear that continuation level match
  28489. >20 clear x
  28490. >20 belong&0x03FFFFFF 0 (No link-layer encapsulation
  28491. >20 belong&0x03FFFFFF 1 (Ethernet
  28492. >20 belong&0x03FFFFFF 2 (3Mb Ethernet
  28493. >20 belong&0x03FFFFFF 3 (AX.25
  28494. >20 belong&0x03FFFFFF 4 (ProNET
  28495. >20 belong&0x03FFFFFF 5 (CHAOS
  28496. >20 belong&0x03FFFFFF 6 (Token Ring
  28497. >20 belong&0x03FFFFFF 7 (BSD ARCNET
  28498. >20 belong&0x03FFFFFF 8 (SLIP
  28499. >20 belong&0x03FFFFFF 9 (PPP
  28500. >20 belong&0x03FFFFFF 10 (FDDI
  28501. >20 belong&0x03FFFFFF 11 (RFC 1483 ATM
  28502. >20 belong&0x03FFFFFF 12 (Raw IP
  28503. >20 belong&0x03FFFFFF 13 (BSD/OS SLIP
  28504. >20 belong&0x03FFFFFF 14 (BSD/OS PPP
  28505. >20 belong&0x03FFFFFF 19 (Linux ATM Classical IP
  28506. >20 belong&0x03FFFFFF 50 (PPP or Cisco HDLC
  28507. >20 belong&0x03FFFFFF 51 (PPP-over-Ethernet
  28508. >20 belong&0x03FFFFFF 99 (Symantec Enterprise Firewall
  28509. >20 belong&0x03FFFFFF 100 (RFC 1483 ATM
  28510. >20 belong&0x03FFFFFF 101 (Raw IP
  28511. >20 belong&0x03FFFFFF 102 (BSD/OS SLIP
  28512. >20 belong&0x03FFFFFF 103 (BSD/OS PPP
  28513. >20 belong&0x03FFFFFF 104 (BSD/OS Cisco HDLC
  28514. >20 belong&0x03FFFFFF 105 (802.11
  28515. >20 belong&0x03FFFFFF 106 (Linux Classical IP over ATM
  28516. >20 belong&0x03FFFFFF 107 (Frame Relay
  28517. >20 belong&0x03FFFFFF 108 (OpenBSD loopback
  28518. >20 belong&0x03FFFFFF 109 (OpenBSD IPsec encrypted
  28519. >20 belong&0x03FFFFFF 112 (Cisco HDLC
  28520. >20 belong&0x03FFFFFF 113 (Linux cooked v1
  28521. >20 belong&0x03FFFFFF 114 (LocalTalk
  28522. >20 belong&0x03FFFFFF 117 (OpenBSD PFLOG
  28523. >20 belong&0x03FFFFFF 119 (802.11 with Prism header
  28524. >20 belong&0x03FFFFFF 122 (RFC 2625 IP over Fibre Channel
  28525. >20 belong&0x03FFFFFF 123 (SunATM
  28526. >20 belong&0x03FFFFFF 127 (802.11 with radiotap header
  28527. >20 belong&0x03FFFFFF 129 (Linux ARCNET
  28528. >20 belong&0x03FFFFFF 130 (Juniper Multi-Link PPP
  28529. >20 belong&0x03FFFFFF 131 (Juniper Multi-Link Frame Relay
  28530. >20 belong&0x03FFFFFF 132 (Juniper Encryption Services PIC
  28531. >20 belong&0x03FFFFFF 133 (Juniper GGSN PIC
  28532. >20 belong&0x03FFFFFF 134 (Juniper FRF.16 Frame Relay
  28533. >20 belong&0x03FFFFFF 135 (Juniper ATM2 PIC
  28534. >20 belong&0x03FFFFFF 136 (Juniper Advanced Services PIC
  28535. >20 belong&0x03FFFFFF 137 (Juniper ATM1 PIC
  28536. >20 belong&0x03FFFFFF 138 (Apple IP over IEEE 1394
  28537. >20 belong&0x03FFFFFF 139 (SS7 MTP2 with pseudo-header
  28538. >20 belong&0x03FFFFFF 140 (SS7 MTP2
  28539. >20 belong&0x03FFFFFF 141 (SS7 MTP3
  28540. >20 belong&0x03FFFFFF 142 (SS7 SCCP
  28541. >20 belong&0x03FFFFFF 143 (DOCSIS
  28542. >20 belong&0x03FFFFFF 144 (Linux IrDA
  28543. >20 belong&0x03FFFFFF 147 (Private use 0
  28544. >20 belong&0x03FFFFFF 148 (Private use 1
  28545. >20 belong&0x03FFFFFF 149 (Private use 2
  28546. >20 belong&0x03FFFFFF 150 (Private use 3
  28547. >20 belong&0x03FFFFFF 151 (Private use 4
  28548. >20 belong&0x03FFFFFF 152 (Private use 5
  28549. >20 belong&0x03FFFFFF 153 (Private use 6
  28550. >20 belong&0x03FFFFFF 154 (Private use 7
  28551. >20 belong&0x03FFFFFF 155 (Private use 8
  28552. >20 belong&0x03FFFFFF 156 (Private use 9
  28553. >20 belong&0x03FFFFFF 157 (Private use 10
  28554. >20 belong&0x03FFFFFF 158 (Private use 11
  28555. >20 belong&0x03FFFFFF 159 (Private use 12
  28556. >20 belong&0x03FFFFFF 160 (Private use 13
  28557. >20 belong&0x03FFFFFF 161 (Private use 14
  28558. >20 belong&0x03FFFFFF 162 (Private use 15
  28559. >20 belong&0x03FFFFFF 163 (802.11 with AVS header
  28560. >20 belong&0x03FFFFFF 164 (Juniper Passive Monitor PIC
  28561. >20 belong&0x03FFFFFF 165 (BACnet MS/TP
  28562. >20 belong&0x03FFFFFF 166 (PPPD
  28563. >20 belong&0x03FFFFFF 167 (Juniper PPPoE
  28564. >20 belong&0x03FFFFFF 168 (Juniper PPPoE/ATM
  28565. >20 belong&0x03FFFFFF 169 (GPRS LLC
  28566. >20 belong&0x03FFFFFF 170 (GPF-T
  28567. >20 belong&0x03FFFFFF 171 (GPF-F
  28568. >20 belong&0x03FFFFFF 174 (Juniper PIC Peer
  28569. >20 belong&0x03FFFFFF 175 (Ethernet with Endace ERF header
  28570. >20 belong&0x03FFFFFF 176 (Packet-over-SONET with Endace ERF header
  28571. >20 belong&0x03FFFFFF 177 (Linux LAPD
  28572. >20 belong&0x03FFFFFF 178 (Juniper Ethernet
  28573. >20 belong&0x03FFFFFF 179 (Juniper PPP
  28574. >20 belong&0x03FFFFFF 180 (Juniper Frame Relay
  28575. >20 belong&0x03FFFFFF 181 (Juniper C-HDLC
  28576. >20 belong&0x03FFFFFF 182 (FRF.16 Frame Relay
  28577. >20 belong&0x03FFFFFF 183 (Juniper Voice PIC
  28578. >20 belong&0x03FFFFFF 184 (Arinc 429
  28579. >20 belong&0x03FFFFFF 185 (Arinc 653 Interpartition Communication
  28580. >20 belong&0x03FFFFFF 186 (USB with FreeBSD header
  28581. >20 belong&0x03FFFFFF 187 (Bluetooth HCI H4
  28582. >20 belong&0x03FFFFFF 188 (802.16 MAC Common Part Sublayer
  28583. >20 belong&0x03FFFFFF 189 (Linux USB
  28584. >20 belong&0x03FFFFFF 190 (Controller Area Network (CAN) v. 2.0B
  28585. >20 belong&0x03FFFFFF 191 (802.15.4 with Linux padding
  28586. >20 belong&0x03FFFFFF 192 (PPI
  28587. >20 belong&0x03FFFFFF 193 (802.16 MAC Common Part Sublayer plus radiotap header
  28588. >20 belong&0x03FFFFFF 194 (Juniper Integrated Service Module
  28589. >20 belong&0x03FFFFFF 195 (802.15.4 with FCS
  28590. >20 belong&0x03FFFFFF 196 (SITA
  28591. >20 belong&0x03FFFFFF 197 (Endace ERF
  28592. >20 belong&0x03FFFFFF 198 (Ethernet with u10 Networks pseudo-header
  28593. >20 belong&0x03FFFFFF 199 (IPMB
  28594. >20 belong&0x03FFFFFF 200 (Juniper Secure Tunnel
  28595. >20 belong&0x03FFFFFF 201 (Bluetooth HCI H4 with pseudo-header
  28596. >20 belong&0x03FFFFFF 202 (AX.25 with KISS header
  28597. >20 belong&0x03FFFFFF 203 (LAPD
  28598. >20 belong&0x03FFFFFF 204 (PPP with direction pseudo-header
  28599. >20 belong&0x03FFFFFF 205 (Cisco HDLC with direction pseudo-header
  28600. >20 belong&0x03FFFFFF 206 (Frame Relay with direction pseudo-header
  28601. >20 belong&0x03FFFFFF 209 (Linux IPMB
  28602. >20 belong&0x03FFFFFF 215 (802.15.4 with non-ASK PHY header
  28603. >20 belong&0x03FFFFFF 216 (Linux evdev events
  28604. >20 belong&0x03FFFFFF 219 (MPLS with label as link-layer header
  28605. >20 belong&0x03FFFFFF 220 (Memory-mapped Linux USB
  28606. >20 belong&0x03FFFFFF 221 (DECT
  28607. >20 belong&0x03FFFFFF 222 (AOS Space Data Link protocol
  28608. >20 belong&0x03FFFFFF 223 (Wireless HART
  28609. >20 belong&0x03FFFFFF 224 (Fibre Channel FC-2
  28610. >20 belong&0x03FFFFFF 225 (Fibre Channel FC-2 with frame delimiters
  28611. >20 belong&0x03FFFFFF 226 (Solaris IPNET
  28612. >20 belong&0x03FFFFFF 227 (SocketCAN
  28613. >20 belong&0x03FFFFFF 228 (Raw IPv4
  28614. >20 belong&0x03FFFFFF 229 (Raw IPv6
  28615. >20 belong&0x03FFFFFF 230 (802.15.4 without FCS
  28616. >20 belong&0x03FFFFFF 231 (D-Bus messages
  28617. >20 belong&0x03FFFFFF 232 (Juniper Virtual Server
  28618. >20 belong&0x03FFFFFF 233 (Juniper SRX E2E
  28619. >20 belong&0x03FFFFFF 234 (Juniper Fibre Channel
  28620. >20 belong&0x03FFFFFF 235 (DVB-CI
  28621. >20 belong&0x03FFFFFF 236 (MUX27010
  28622. >20 belong&0x03FFFFFF 237 (STANAG 5066 D_PDUs
  28623. >20 belong&0x03FFFFFF 238 (Juniper ATM CEMIC
  28624. >20 belong&0x03FFFFFF 239 (Linux netfilter log messages
  28625. >20 belong&0x03FFFFFF 240 (Hilscher netAnalyzer
  28626. >20 belong&0x03FFFFFF 241 (Hilscher netAnalyzer with delimiters
  28627. >20 belong&0x03FFFFFF 242 (IP-over-Infiniband
  28628. >20 belong&0x03FFFFFF 243 (MPEG-2 Transport Stream packets
  28629. >20 belong&0x03FFFFFF 244 (ng4t ng40
  28630. >20 belong&0x03FFFFFF 245 (NFC LLCP
  28631. >20 belong&0x03FFFFFF 246 (Packet filter state syncing
  28632. >20 belong&0x03FFFFFF 247 (InfiniBand
  28633. >20 belong&0x03FFFFFF 248 (SCTP
  28634. >20 belong&0x03FFFFFF 249 (USB with USBPcap header
  28635. >20 belong&0x03FFFFFF 250 (Schweitzer Engineering Laboratories RTAC packets
  28636. >20 belong&0x03FFFFFF 251 (Bluetooth Low Energy air interface
  28637. >20 belong&0x03FFFFFF 252 (Wireshark Upper PDU export
  28638. >20 belong&0x03FFFFFF 253 (Linux netlink
  28639. >20 belong&0x03FFFFFF 254 (Bluetooth Linux Monitor
  28640. >20 belong&0x03FFFFFF 255 (Bluetooth Basic Rate/Enhanced Data Rate baseband packets
  28641. >20 belong&0x03FFFFFF 256 (Bluetooth Low Energy air interface with pseudo-header
  28642. >20 belong&0x03FFFFFF 257 (PROFIBUS data link layer
  28643. >20 belong&0x03FFFFFF 258 (Apple DLT_PKTAP
  28644. >20 belong&0x03FFFFFF 259 (Ethernet with 802.3 Clause 65 EPON preamble
  28645. >20 belong&0x03FFFFFF 260 (IPMI trace packets
  28646. >20 belong&0x03FFFFFF 261 (Z-Wave RF profile R1 and R2 packets
  28647. >20 belong&0x03FFFFFF 262 (Z-Wave RF profile R3 packets
  28648. >20 belong&0x03FFFFFF 263 (WattStopper Digital Lighting Mngmt/Legrand Nitoo Open Proto
  28649. >20 belong&0x03FFFFFF 264 (ISO 14443 messages
  28650. >20 belong&0x03FFFFFF 265 (IEC 62106 Radio Data System groups
  28651. >20 belong&0x03FFFFFF 266 (USB with Darwin header
  28652. >20 belong&0x03FFFFFF 267 (OpenBSD DLT_OPENFLOW
  28653. >20 belong&0x03FFFFFF 268 (IBM SDLC frames
  28654. >20 belong&0x03FFFFFF 269 (TI LLN sniffer frames
  28655. >20 belong&0x03FFFFFF 271 (Linux vsock
  28656. >20 belong&0x03FFFFFF 272 (Nordic Semiconductor Bluetooth LE sniffer frames
  28657. >20 belong&0x03FFFFFF 273 (Excentis XRA-31 DOCSIS 3.1 RF sniffer frames
  28658. >20 belong&0x03FFFFFF 274 (802.3br mPackets
  28659. >20 belong&0x03FFFFFF 275 (DisplayPort AUX channel monitoring data
  28660. >20 belong&0x03FFFFFF 276 (Linux cooked v2
  28661. >20 belong&0x03FFFFFF 278 (OpenVizsla USB
  28662. >20 belong&0x03FFFFFF 279 (Elektrobit High Speed Capture and Replay (EBHSCR)
  28663. >20 belong&0x03FFFFFF 281 (Broadcom tag
  28664. >20 belong&0x03FFFFFF 282 (Broadcom tag (prepended)
  28665. >20 belong&0x03FFFFFF 284 (Marvell DSA
  28666. >20 belong&0x03FFFFFF 285 (Marvell EDSA
  28667. >20 belong&0x03FFFFFF 286 (ELEE lawful intercept
  28668. >20 belong&0x03FFFFFF 287 (Z-Wave serial
  28669. >20 belong&0x03FFFFFF 288 (USB 2.0
  28670. >20 belong&0x03FFFFFF 289 (ATSC ALP
  28671. >20 belong&0x03FFFFFF 290 (Event Tracing for Windows
  28672. # print default match
  28673. >20 default x
  28674. >>20 belong x (linktype#%u
  28675. >16 belong x \b, capture length %u)
  28676. # packets time stamps in seconds and microseconds.
  28677. 0 ubelong 0xa1b2c3d4 pcap capture file, microseconds ts (big-endian)
  28678. !:mime application/vnd.tcpdump.pcap
  28679. >0 use pcap-be
  28680. 0 ulelong 0xa1b2c3d4 pcap capture file, microsecond ts (little-endian)
  28681. !:mime application/vnd.tcpdump.pcap
  28682. >0 use \^pcap-be
  28683. # packets time stamps in seconds and nanoseconds.
  28684. 0 ubelong 0xa1b23c4d pcap capture file, nanosecond ts (big-endian)
  28685. !:mime application/vnd.tcpdump.pcap
  28686. >0 use pcap-be
  28687. 0 ulelong 0xa1b23c4d pcap capture file, nanosecond ts (little-endian)
  28688. !:mime application/vnd.tcpdump.pcap
  28689. >0 use \^pcap-be
  28690. #
  28691. # "libpcap"-with-Alexey-Kuznetsov's-patches capture files.
  28692. #
  28693. 0 ubelong 0xa1b2cd34 pcap capture file, microsecond ts, extensions (big-endian)
  28694. >0 use pcap-be
  28695. 0 ulelong 0xa1b2cd34 pcap capture file, microsecond ts, extensions (little-endian)
  28696. >0 use \^pcap-be
  28697. #
  28698. # "pcapng" capture files.
  28699. # https://github.com/pcapng/pcapng
  28700. # Pcapng files can contain multiple sections. Printing the endianness,
  28701. # snaplen, or other information from the first SHB may be misleading.
  28702. #
  28703. 0 ubelong 0x0a0d0d0a
  28704. >8 ubelong 0x1a2b3c4d pcapng capture file
  28705. >>12 beshort x - version %d
  28706. >>14 beshort x \b.%d
  28707. 0 ulelong 0x0a0d0d0a
  28708. >8 ulelong 0x1a2b3c4d pcapng capture file
  28709. >>12 leshort x - version %d
  28710. >>14 leshort x \b.%d
  28711. #
  28712. # AIX "iptrace" capture files.
  28713. #
  28714. 0 string iptrace\0401.0 AIX iptrace capture file
  28715. 0 string iptrace\0402.0 AIX iptrace capture file
  28716. #
  28717. # Novell LANalyzer capture files.
  28718. #
  28719. 0 leshort 0x1001 Novell LANalyzer capture file
  28720. 0 leshort 0x1007 Novell LANalyzer capture file
  28721. #
  28722. # HP-UX "nettl" capture files.
  28723. #
  28724. 0 string \x54\x52\x00\x64\x00 HP/UX nettl capture file
  28725. #
  28726. # RADCOM WAN/LAN Analyzer capture files.
  28727. #
  28728. 0 string \x42\xd2\x00\x34\x12\x66\x22\x88 RADCOM WAN/LAN Analyzer capture file
  28729. #
  28730. # NetStumbler log files. Not really packets, per se, but about as
  28731. # close as you can get. These are log files from NetStumbler, a
  28732. # Windows program, that scans for 802.11b networks.
  28733. #
  28734. 0 string NetS NetStumbler log file
  28735. >8 lelong x \b, %d stations found
  28736. #
  28737. # *Peek tagged capture files.
  28738. #
  28739. 0 string \177ver EtherPeek/AiroPeek/OmniPeek capture file
  28740. #
  28741. # Visual Networks traffic capture files.
  28742. #
  28743. 0 string \x05VNF Visual Networks traffic capture file
  28744. #
  28745. # Network Instruments Observer capture files.
  28746. #
  28747. 0 string ObserverPktBuffe Network Instruments Observer capture file
  28748. #
  28749. # Files from Accellent Group's 5View products.
  28750. #
  28751. 0 string \xaa\xaa\xaa\xaa 5View capture file
  28752. #------------------------------------------------------------------------------
  28753. # $File: softquad,v 1.13 2009/09/19 16:28:12 christos Exp $
  28754. # softquad: file(1) magic for SoftQuad Publishing Software
  28755. #
  28756. # Author/Editor and RulesBuilder
  28757. #
  28758. # XXX - byte order?
  28759. #
  28760. 0 string \<!SQ\ DTD> Compiled SGML rules file
  28761. >9 string >\0 Type %s
  28762. 0 string \<!SQ\ A/E> A/E SGML Document binary
  28763. >9 string >\0 Type %s
  28764. 0 string \<!SQ\ STS> A/E SGML binary styles file
  28765. >9 string >\0 Type %s
  28766. 0 short 0xc0de Compiled PSI (v1) data
  28767. 0 short 0xc0da Compiled PSI (v2) data
  28768. >3 string >\0 (%s)
  28769. # Binary sqtroff font/desc files...
  28770. 0 short 0125252 SoftQuad DESC or font file binary
  28771. >2 short >0 - version %d
  28772. # Bitmaps...
  28773. 0 search/1 SQ\ BITMAP1 SoftQuad Raster Format text
  28774. #0 string SQ\ BITMAP2 SoftQuad Raster Format data
  28775. # sqtroff intermediate language (replacement for ditroff int. lang.)
  28776. 0 string X\ SoftQuad troff Context intermediate
  28777. >2 string 495 for AT&T 495 laser printer
  28778. >2 string hp for Hewlett-Packard LaserJet
  28779. >2 string impr for IMAGEN imPRESS
  28780. >2 string ps for PostScript
  28781. # From: Michael Piefel <piefel@debian.org>
  28782. # sqtroff intermediate language (replacement for ditroff int. lang.)
  28783. 0 string X\ 495 SoftQuad troff Context intermediate for AT&T 495 laser printer
  28784. 0 string X\ hp SoftQuad troff Context intermediate for HP LaserJet
  28785. 0 string X\ impr SoftQuad troff Context intermediate for IMAGEN imPRESS
  28786. 0 string X\ ps SoftQuad troff Context intermediate for PostScript
  28787. #------------------------------------------------------------------------------
  28788. # $File: sosi,v 1.2 2021/02/23 00:51:10 christos Exp $
  28789. # SOSI
  28790. # Summary: Systematic Organization of Spatial Information
  28791. # Long description: Norwegian text based map format
  28792. # File extension: .sos
  28793. # Full name: Petter Reinholdtsen (pere@hungry.com)
  28794. # Reference: https://en.wikipedia.org/wiki/SOSI
  28795. #
  28796. # Example SOSI files available from
  28797. # https://trac.osgeo.org/gdal/ticket/3638
  28798. # https://nedlasting.geonorge.no/geonorge/Basisdata/N50Kartdata/SOSI/
  28799. # https://nedlasting.geonorge.no/geonorge/Samferdsel/Elveg/SOSI/
  28800. #
  28801. # Start with optional comments (from "!" to the next line end)
  28802. # followed by ".HODE" and end with "\n.SLUTT" followed by an optional
  28803. # separator (any number of " ", "\t", "\n" or "\r"), might have BOM at
  28804. # the start and following ".HODE" near the start there is "..OMR=C3=85DE"
  28805. # (either UTF-8, ISO-8859-1 or some 7 bit Norwegian charset based on
  28806. # ASCII) , "..TRANSPAR", "..TEGNSETT " followed by the charset and a
  28807. # separator, as well as "..SOSI-VERSJON " followed by the format
  28808. # version and a separator.
  28809. #
  28810. # FIXME figure out how to accept any of [space], [tab], [newline] and
  28811. # [carriage return] as separators, not only line end.
  28812. # Not searching for full "OMR=C3=85DE" to match also for non-UTF-8
  28813. # character sets
  28814. 0 search ..OMR
  28815. >0 search ..TRANSPAR
  28816. >>0 search .HODE SOSI map data
  28817. >>>&0 search ..SOSI-VERSJON
  28818. >>>>&1 string x \b, version %s
  28819. # FIXME could not figure out way to make a match for .SLUTT at the end required
  28820. #>-7 string \n.SLUTT slutt
  28821. #>-8 string \n.SLUTT\n slutt-nl
  28822. #>-9 string \n.SLUTT\r\n slutt-crnl2
  28823. !:mime text/vnd.sosi
  28824. !:ext sos
  28825. #------------------------------------------------------------------------------
  28826. # $File: spec,v 1.4 2009/09/19 16:28:12 christos Exp $
  28827. # spec: file(1) magic for SPEC raw results (*.raw, *.rsf)
  28828. #
  28829. # Cloyce D. Spradling <cloyce@headgear.org>
  28830. 0 string spec SPEC
  28831. >4 string .cpu CPU
  28832. >>8 string <: \b%.4s
  28833. >>12 string . raw result text
  28834. 17 string version=SPECjbb SPECjbb
  28835. >32 string <: \b%.4s
  28836. >>37 string <: v%.4s raw result text
  28837. 0 string BEGIN\040SPECWEB SPECweb
  28838. >13 string <: \b%.2s
  28839. >>15 string _SSL \b_SSL
  28840. >>>20 string <: v%.4s raw result text
  28841. >>16 string <: v%.4s raw result text
  28842. #------------------------------------------------------------------------------
  28843. # $File: spectrum,v 1.8 2017/09/11 23:51:12 christos Exp $
  28844. # spectrum: file(1) magic for Spectrum emulator files.
  28845. #
  28846. # John Elliott <jce@seasip.demon.co.uk>
  28847. #
  28848. # Spectrum +3DOS header
  28849. #
  28850. 0 string PLUS3DOS\032 Spectrum +3 data
  28851. >15 byte 0 - BASIC program
  28852. >15 byte 1 - number array
  28853. >15 byte 2 - character array
  28854. >15 byte 3 - memory block
  28855. >>16 belong 0x001B0040 (screen)
  28856. >15 byte 4 - Tasword document
  28857. >15 string TAPEFILE - ZXT tapefile
  28858. #
  28859. # Tape file. This assumes the .TAP starts with a Spectrum-format header,
  28860. # which nearly all will.
  28861. #
  28862. # Update: Sanity-check string contents to be printable.
  28863. # -Adam Buchbinder <adam.buchbinder@gmail.com>
  28864. #
  28865. 0 string \023\000\000
  28866. >4 string >\0
  28867. >>4 string <\177 Spectrum .TAP data "%-10.10s"
  28868. >>>3 byte 0 - BASIC program
  28869. >>>3 byte 1 - number array
  28870. >>>3 byte 2 - character array
  28871. >>>3 byte 3 - memory block
  28872. >>>>14 belong 0x001B0040 (screen)
  28873. # The following three blocks are from pak21-spectrum@srcf.ucam.org
  28874. # TZX tape images
  28875. 0 string ZXTape!\x1a Spectrum .TZX data
  28876. >8 byte x version %d
  28877. >9 byte x \b.%d
  28878. # RZX input recording files
  28879. 0 string RZX! Spectrum .RZX data
  28880. >4 byte x version %d
  28881. >5 byte x \b.%d
  28882. # Floppy disk images
  28883. 0 string MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data
  28884. 0 string MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data
  28885. 0 string EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data
  28886. 0 string SINCLAIR Spectrum .SCL Betadisk image
  28887. # Hard disk images
  28888. 0 string RS-IDE\x1a Spectrum .HDF hard disk image
  28889. >7 byte x \b, version 0x%02x
  28890. # SZX snapshots (fuse and spectaculator)
  28891. # Martin M. S. Pedersen <martin@linux.com>
  28892. # http://www.spectaculator.com/docs/zx-state/header.shtml
  28893. #
  28894. 0 string ZXST zx-state snapshot
  28895. >4 byte x version %d
  28896. >5 byte x \b.%d
  28897. >>6 byte 0 16k ZX Spectrum
  28898. >>6 byte 1 48k ZX Spectrum/ZX Spectrum+
  28899. >>6 byte 2 ZX Spectrum 128
  28900. >>6 byte 3 ZX Spectrum +2
  28901. >>6 byte 4 ZX Spectrum +2A/+2B
  28902. >>6 byte 5 ZX Spectrum +3
  28903. >>6 byte 6 ZX Spectrum +3e
  28904. >>6 byte 7 Pentagon 128
  28905. >>6 byte 8 Timex Sinclair TC2048
  28906. >>6 byte 9 Timex Sinclair TC2068
  28907. >>6 byte 10 Scorpion ZS-256
  28908. >>6 byte 11 ZX Spectrum SE
  28909. >>6 byte 12 Timex Sinclair TS2068
  28910. >>6 byte 13 Pentagon 512
  28911. >>6 byte 14 Pentagon 1024
  28912. >>6 byte 15 48k ZX Spectrum (NTSC)
  28913. >>6 byte 16 ZX Spectrum 12Ke
  28914. >>>7 byte 1 (alternate timings)
  28915. #------------------------------------------------------------------------------
  28916. # $File: sql,v 1.22 2019/04/19 00:42:27 christos Exp $
  28917. # sql: file(1) magic for SQL files
  28918. #
  28919. # From: "Marty Leisner" <mleisner@eng.mc.xerox.com>
  28920. # Recognize some MySQL files.
  28921. # Elan Ruusamae <glen@delfi.ee>, added MariaDB signatures
  28922. # from https://bazaar.launchpad.net/~maria-captains/maria/5.5/view/head:/support-files/magic
  28923. #
  28924. 0 beshort 0xfe01 MySQL table definition file
  28925. >2 byte x Version %d
  28926. >3 byte 0 \b, type UNKNOWN
  28927. >3 byte 1 \b, type DIAM_ISAM
  28928. >3 byte 2 \b, type HASH
  28929. >3 byte 3 \b, type MISAM
  28930. >3 byte 4 \b, type PISAM
  28931. >3 byte 5 \b, type RMS_ISAM
  28932. >3 byte 6 \b, type HEAP
  28933. >3 byte 7 \b, type ISAM
  28934. >3 byte 8 \b, type MRG_ISAM
  28935. >3 byte 9 \b, type MYISAM
  28936. >3 byte 10 \b, type MRG_MYISAM
  28937. >3 byte 11 \b, type BERKELEY_DB
  28938. >3 byte 12 \b, type INNODB
  28939. >3 byte 13 \b, type GEMINI
  28940. >3 byte 14 \b, type NDBCLUSTER
  28941. >3 byte 15 \b, type EXAMPLE_DB
  28942. >3 byte 16 \b, type CSV_DB
  28943. >3 byte 17 \b, type FEDERATED_DB
  28944. >3 byte 18 \b, type BLACKHOLE_DB
  28945. >3 byte 19 \b, type PARTITION_DB
  28946. >3 byte 20 \b, type BINLOG
  28947. >3 byte 21 \b, type SOLID
  28948. >3 byte 22 \b, type PBXT
  28949. >3 byte 23 \b, type TABLE_FUNCTION
  28950. >3 byte 24 \b, type MEMCACHE
  28951. >3 byte 25 \b, type FALCON
  28952. >3 byte 26 \b, type MARIA
  28953. >3 byte 27 \b, type PERFORMANCE_SCHEMA
  28954. >3 byte 127 \b, type DEFAULT
  28955. >0x0033 ulong x \b, MySQL version %d
  28956. 0 belong&0xffffff00 0xfefe0500 MySQL ISAM index file
  28957. >3 byte x Version %d
  28958. 0 belong&0xffffff00 0xfefe0600 MySQL ISAM compressed data file
  28959. >3 byte x Version %d
  28960. 0 belong&0xffffff00 0xfefe0700 MySQL MyISAM index file
  28961. >3 byte x Version %d
  28962. >14 beshort x \b, %d key parts
  28963. >16 beshort x \b, %d unique key parts
  28964. >18 byte x \b, %d keys
  28965. >28 bequad x \b, %lld records
  28966. >36 bequad x \b, %lld deleted records
  28967. 0 belong&0xffffff00 0xfefe0800 MySQL MyISAM compressed data file
  28968. >3 byte x Version %d
  28969. 0 belong&0xffffff00 0xfefe0900 MySQL Maria index file
  28970. >3 byte x Version %d
  28971. 0 belong&0xffffff00 0xfefe0a00 MySQL Maria compressed data file
  28972. >3 byte x Version %d
  28973. 0 belong&0xffffff00 0xfefe0c00
  28974. >4 string MACF MySQL Maria control file
  28975. >>3 byte x Version %d
  28976. 0 string \376bin MySQL replication log,
  28977. >9 long x server id %d
  28978. >8 byte 1
  28979. >>13 long 69 \b, MySQL V3.2.3
  28980. >>>19 string x \b, server version %s
  28981. >>13 long 75 \b, MySQL V4.0.2-V4.1
  28982. >>>25 string x \b, server version %s
  28983. >8 byte 15 MySQL V5+,
  28984. >>25 string x server version %s
  28985. >4 string MARIALOG MySQL Maria transaction log file
  28986. >>3 byte x Version %d
  28987. #------------------------------------------------------------------------------
  28988. # iRiver H Series database file
  28989. # From Ken Guest <ken@linux.ie>
  28990. # As observed from iRivNavi.iDB and unencoded firmware
  28991. #
  28992. 0 string iRivDB iRiver Database file
  28993. >11 string >\0 Version %s
  28994. >39 string iHP-100 [H Series]
  28995. #------------------------------------------------------------------------------
  28996. # SQLite database files
  28997. # Ken Guest <ken@linux.ie>, Ty Sarna, Zack Weinberg
  28998. #
  28999. # Version 1 used GDBM internally; its files cannot be distinguished
  29000. # from other GDBM files.
  29001. #
  29002. # Version 2 used this format:
  29003. 0 string **\ This\ file\ contains\ an\ SQLite SQLite 2.x database
  29004. # Version 3 of SQLite allows applications to embed their own "user version"
  29005. # number in the database at offset 60. Later, SQLite added an "application id"
  29006. # at offset 68 that is preferred over "user version" for indicating the
  29007. # associated application.
  29008. #
  29009. 0 string SQLite\ format\ 3 SQLite 3.x database
  29010. !:mime application/x-sqlite3
  29011. # seldom found extension sqlite3 like in SyncData.sqlite3
  29012. # db
  29013. # Avira Antivir use extension "dbe" like in avevtdb.dbe, avguard_tchk.dbe
  29014. # Unfortunately extension sqlite also used for other databases starting with string
  29015. # "TTCONTAINER" like in tracks.sqlite contentconsumer.sqlite contentproducerrepository.sqlite
  29016. # and with string "ZV-zlib" in like extra.sqlite
  29017. !:ext sqlite/sqlite3/db/dbe
  29018. >60 belong =0x5f4d544e (Monotone source repository)
  29019. >68 belong =0x0f055112 (Fossil checkout)
  29020. >68 belong =0x0f055113 (Fossil global configuration)
  29021. >68 belong =0x0f055111 (Fossil repository)
  29022. >68 belong =0x42654462 (Bentley Systems BeSQLite Database)
  29023. >68 belong =0x42654c6e (Bentley Systems Localization File)
  29024. >68 belong =0x47504b47 (OGC GeoPackage file)
  29025. >68 default x
  29026. >>68 belong !0 \b, application id %u
  29027. >>60 belong !0 \b, user version %d
  29028. >96 belong x \b, last written using SQLite version %d
  29029. # SQLite Write-Ahead Log from SQLite version >= 3.7.0
  29030. # https://www.sqlite.org/fileformat.html#walformat
  29031. 0 belong&0xfffffffe 0x377f0682 SQLite Write-Ahead Log,
  29032. !:ext sqlite-wal/db-wal
  29033. >4 belong x version %d
  29034. # SQLite Rollback Journal
  29035. # https://www.sqlite.org/fileformat.html#rollbackjournal
  29036. 0 string \xd9\xd5\x05\xf9\x20\xa1\x63\xd7 SQLite Rollback Journal
  29037. # Panasonic channel list database svl.bin or svl.db added by Joerg Jenderek
  29038. # https://github.com/PredatH0r/ChanSort
  29039. 0 string PSDB\0 Panasonic channel list DataBase
  29040. !:ext db/bin
  29041. #!:mime application/x-db-svl-panasonic
  29042. >126 string SQLite\ format\ 3
  29043. #!:mime application/x-panasonic-sqlite3
  29044. >>&-15 indirect x \b; contains
  29045. # H2 Database from https://www.h2database.com/
  29046. 0 string --\ H2\ 0.5/B\ --\ \n H2 Database file
  29047. # Type: OpenSSH key files
  29048. # From: Nicolas Collignon <tsointsoin@gmail.com>
  29049. 0 string SSH\ PRIVATE\ KEY OpenSSH RSA1 private key,
  29050. >28 string >\0 version %s
  29051. 0 string -----BEGIN\ OPENSSH\ PRIVATE\ KEY----- OpenSSH private key
  29052. 0 string ssh-dss\ OpenSSH DSA public key
  29053. 0 string ssh-rsa\ OpenSSH RSA public key
  29054. 0 string ecdsa-sha2-nistp256 OpenSSH ECDSA public key
  29055. 0 string ecdsa-sha2-nistp384 OpenSSH ECDSA public key
  29056. 0 string ecdsa-sha2-nistp521 OpenSSH ECDSA public key
  29057. 0 string ssh-ed25519 OpenSSH ED25519 public key
  29058. 0 string SSHKRL\n\0
  29059. >8 ubelong 1 OpenSSH key/certificate revocation list, format %u
  29060. >>12 ubequad x \b, version %llx
  29061. >>>20 beqdate x \b, generated %s
  29062. # From: Joerg Jenderek
  29063. # URL: https://en.wikipedia.org/wiki/PuTTY
  29064. # Reference: https://the.earth.li/~sgtatham/putty/latest/putty-0.73.tar.gz
  29065. # /sshpubk.c
  29066. 0 string PuTTY-User-Key-File- PuTTY Private Key File
  29067. #!:mime text/plain
  29068. # https://github.com/github/putty/blob/master/windows/installer.wxs
  29069. !:mime application/x-putty-private-key
  29070. !:ext ppk
  29071. # version 1 or 2
  29072. >20 string x \b, version %.1s
  29073. # name of the algorithm like: ssh-dss ssh-rsa ecdsa-sha2-nistp256 ssh-ed25519
  29074. >23 string x \b, algorithm %s
  29075. # next line says "Encryption: " plus an encryption type like aes256-cbc or none
  29076. >32 search/13 Encryption:\040 \b, Encryption
  29077. >>&0 string x %s
  29078. # next line says "Comment: " plus the comment string
  29079. >>>&0 search/3 Comment:\040
  29080. >>>>&0 string x "%s"
  29081. #------------------------------------------------------------------------------
  29082. # $File: ssl,v 1.5 2017/12/29 04:00:07 christos Exp $
  29083. # ssl: file(1) magic for SSL file formats
  29084. # Type: OpenSSL certificates/key files
  29085. # From: Nicolas Collignon <tsointsoin@gmail.com>
  29086. 0 string -----BEGIN\040CERTIFICATE----- PEM certificate
  29087. 0 string -----BEGIN\040CERTIFICATE\040REQ PEM certificate request
  29088. 0 string -----BEGIN\040RSA\040PRIVATE PEM RSA private key
  29089. 0 string -----BEGIN\040DSA\040PRIVATE PEM DSA private key
  29090. 0 string -----BEGIN\040EC\040PRIVATE PEM EC private key
  29091. 0 string -----BEGIN\040ECDSA\040PRIVATE PEM ECDSA private key
  29092. # From Luc Gommans
  29093. # OpenSSL enc file (recognized by a magic string preceding the password's salt)
  29094. 0 string Salted__ openssl enc'd data with salted password
  29095. # Using the -a or -base64 option, OpenSSL will base64-encode the data.
  29096. 0 string U2FsdGVkX1 openssl enc'd data with salted password, base64 encoded
  29097. #------------------------------------------------------------------------------
  29098. # $File: statistics,v 1.2 2020/10/08 17:51:53 christos Exp $
  29099. # statistics: file(1) magic for statistics related software
  29100. #
  29101. # From Remy Rampin
  29102. # Stata is a statistical software tool that was created in 1985. While I
  29103. # don't personally use it, data files in its native (proprietary) format
  29104. # are common (.dta files).
  29105. #
  29106. # Because they are so common, especially in statistical and social
  29107. # sciences, Stata files and SPSS files can be opened by a lot of modern
  29108. # software, for example Python's pandas package provides built-in
  29109. # support for them (read_stata() and read_spss()).
  29110. #
  29111. # I noticed that the magic database includes an entry for SPSS files but
  29112. # not Stata files. Stata files for Stata 13 and newer (formats 117, 118,
  29113. # and 119) always begin with the string "<stata_dta><header>" as per
  29114. # https://www.stata.com/help.cgi?dta#definition
  29115. #
  29116. # The format version number always follows, for example:
  29117. # <stata_dta><header><release>117</release>
  29118. # <stata_dta><header><release>118</release>
  29119. #
  29120. # Therefore the following line would do the trick:
  29121. # 0 string <stata_dta><header> Stata Data File
  29122. #
  29123. # (I'm sure the version number could be captured as well but I did not
  29124. # manage this without a regex)
  29125. #
  29126. # Unfortunately the previous formats (created by Stata before 13, which
  29127. # was released 2013) are harder to recognize. Format 115 starts with the
  29128. # four bytes 0x73010100 or 0x73020100, format 114 with 0x72010100 or
  29129. # 0x72020100, format 113 with 0x71010101 or 0x71020101.
  29130. #
  29131. # For additional reference, the Library of Congress website has an entry
  29132. # for the Stata Data File Format 118:
  29133. # https://www.loc.gov/preservation/digital/formats/fdd/fdd000471.shtml
  29134. #
  29135. # Example of those files can be found on Zenodo:
  29136. # https://zenodo.org/search?page=1&size=20&q=&file_type=dta
  29137. 0 string \<stata_dta\>\<header\>\<release\> Stata Data File
  29138. >&0 regex [0-9]* (Release %s)
  29139. #------------------------------------------------------------------------------
  29140. # $File: sun,v 1.28 2019/04/19 00:42:27 christos Exp $
  29141. # sun: file(1) magic for Sun machines
  29142. #
  29143. # Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
  29144. # releases. (5.x uses ELF.) Entries for executables without an
  29145. # architecture type, used before the 68020-based Sun-3's came out,
  29146. # are in aout, as they're indistinguishable from other big-endian
  29147. # 32-bit a.out files.
  29148. #
  29149. 0 belong&077777777 0600413 a.out SunOS SPARC demand paged
  29150. >0 byte &0x80
  29151. >>20 belong <4096 shared library
  29152. >>20 belong =4096 dynamically linked executable
  29153. >>20 belong >4096 dynamically linked executable
  29154. >0 byte ^0x80 executable
  29155. >16 belong >0 not stripped
  29156. 0 belong&077777777 0600410 a.out SunOS SPARC pure
  29157. >0 byte &0x80 dynamically linked executable
  29158. >0 byte ^0x80 executable
  29159. >16 belong >0 not stripped
  29160. 0 belong&077777777 0600407 a.out SunOS SPARC
  29161. >0 byte &0x80 dynamically linked executable
  29162. >0 byte ^0x80 executable
  29163. >16 belong >0 not stripped
  29164. 0 belong&077777777 0400413 a.out SunOS mc68020 demand paged
  29165. >0 byte &0x80
  29166. >>20 belong <4096 shared library
  29167. >>20 belong =4096 dynamically linked executable
  29168. >>20 belong >4096 dynamically linked executable
  29169. >0 byte ^0x80 executable
  29170. >16 belong >0 not stripped
  29171. 0 belong&077777777 0400410 a.out SunOS mc68020 pure
  29172. >0 byte &0x80 dynamically linked executable
  29173. >0 byte ^0x80 executable
  29174. >16 belong >0 not stripped
  29175. 0 belong&077777777 0400407 a.out SunOS mc68020
  29176. >0 byte &0x80 dynamically linked executable
  29177. >0 byte ^0x80 executable
  29178. >16 belong >0 not stripped
  29179. 0 belong&077777777 0200413 a.out SunOS mc68010 demand paged
  29180. >0 byte &0x80
  29181. >>20 belong <4096 shared library
  29182. >>20 belong =4096 dynamically linked executable
  29183. >>20 belong >4096 dynamically linked executable
  29184. >0 byte ^0x80 executable
  29185. >16 belong >0 not stripped
  29186. 0 belong&077777777 0200410 a.out SunOS mc68010 pure
  29187. >0 byte &0x80 dynamically linked executable
  29188. >0 byte ^0x80 executable
  29189. >16 belong >0 not stripped
  29190. 0 belong&077777777 0200407 a.out SunOS mc68010
  29191. >0 byte &0x80 dynamically linked executable
  29192. >0 byte ^0x80 executable
  29193. >16 belong >0 not stripped
  29194. #
  29195. # Core files. "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
  29196. # binary executed in compatibility mode under SunOS 5.x".
  29197. #
  29198. 0 belong 0x080456 SunOS core file
  29199. >4 belong 432 (SPARC)
  29200. >>132 string >\0 from '%s'
  29201. >>116 belong =3 (quit)
  29202. >>116 belong =4 (illegal instruction)
  29203. >>116 belong =5 (trace trap)
  29204. >>116 belong =6 (abort)
  29205. >>116 belong =7 (emulator trap)
  29206. >>116 belong =8 (arithmetic exception)
  29207. >>116 belong =9 (kill)
  29208. >>116 belong =10 (bus error)
  29209. >>116 belong =11 (segmentation violation)
  29210. >>116 belong =12 (bad argument to system call)
  29211. >>116 belong =29 (resource lost)
  29212. >>120 belong x (T=%dK,
  29213. >>124 belong x D=%dK,
  29214. >>128 belong x S=%dK)
  29215. >4 belong 826 (68K)
  29216. >>128 string >\0 from '%s'
  29217. >4 belong 456 (SPARC 4.x BCP)
  29218. >>152 string >\0 from '%s'
  29219. # Sun SunPC
  29220. 0 long 0xfa33c08e SunPC 4.0 Hard Disk
  29221. 0 string #SUNPC_CONFIG SunPC 4.0 Properties Values
  29222. # Sun snoop (see RFC 1761, which describes the capture file format,
  29223. # RFC 3827, which describes some additional datalink types, and
  29224. # https://www.iana.org/assignments/snoop-datalink-types/snoop-datalink-types.xml,
  29225. # which is the IANA registry of Snoop datalink types)
  29226. #
  29227. 0 string snoop Snoop capture file
  29228. >8 belong >0 - version %d
  29229. >12 belong 0 (IEEE 802.3)
  29230. >12 belong 1 (IEEE 802.4)
  29231. >12 belong 2 (IEEE 802.5)
  29232. >12 belong 3 (IEEE 802.6)
  29233. >12 belong 4 (Ethernet)
  29234. >12 belong 5 (HDLC)
  29235. >12 belong 6 (Character synchronous)
  29236. >12 belong 7 (IBM channel-to-channel adapter)
  29237. >12 belong 8 (FDDI)
  29238. >12 belong 9 (Other)
  29239. >12 belong 10 (type %d)
  29240. >12 belong 11 (type %d)
  29241. >12 belong 12 (type %d)
  29242. >12 belong 13 (type %d)
  29243. >12 belong 14 (type %d)
  29244. >12 belong 15 (type %d)
  29245. >12 belong 16 (Fibre Channel)
  29246. >12 belong 17 (ATM)
  29247. >12 belong 18 (ATM Classical IP)
  29248. >12 belong 19 (type %d)
  29249. >12 belong 20 (type %d)
  29250. >12 belong 21 (type %d)
  29251. >12 belong 22 (type %d)
  29252. >12 belong 23 (type %d)
  29253. >12 belong 24 (type %d)
  29254. >12 belong 25 (type %d)
  29255. >12 belong 26 (IP over Infiniband)
  29256. >12 belong >26 (type %d)
  29257. #---------------------------------------------------------------------------
  29258. # The following entries have been tested by Duncan Laurie <duncan@sun.com> (a
  29259. # lead Sun/Cobalt developer) who agrees that they are good and worthy of
  29260. # inclusion.
  29261. # Boot ROM images for Sun/Cobalt Linux server appliances
  29262. 0 string Cobalt\ Networks\ Inc.\nFirmware\ v Paged COBALT boot rom
  29263. >38 string x V%.4s
  29264. # New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
  29265. # at the very end where file(1) can't get it.
  29266. 0 string CRfs COBALT boot rom data (Flat boot rom or file system)
  29267. #------------------------------------------------------------------------------
  29268. # $File: sylk,v 1.1 2020/04/05 22:18:34 christos Exp $
  29269. # sylk: file(1) magic for SYLK text files
  29270. # From: Joerg Jenderek
  29271. # URL: https://en.wikipedia.org/wiki/SYmbolic_LinK_%28SYLK%29
  29272. # http://fileformats.archiveteam.org/wiki/SYLK
  29273. # Note: called by TrID "SYLK - SYmbolic LinK data",
  29274. # by DROID "Microsoft Symbolic Link (SYLK) File"
  29275. # by FreeDesktop.org "spreadsheet interchange document"
  29276. 0 string ID;P
  29277. # skip short DROID x-fmt-106-signature-id-603.slk
  29278. >7 ubyte >0 spreadsheet interchange document
  29279. # https://reposcope.com/mimetype/text/spreadsheet
  29280. #!:mime text/spreadsheet
  29281. # https://reposcope.com/mimetype/application/x-sylk by Gnumeric
  29282. !:mime application/x-sylk
  29283. !:ext slk/sylk
  29284. >>4 ubyte >037 \b, created by
  29285. # Gnumeric, pmw~PlanMaker, CALCOOO32~LibreOffice OpenOffice, SCALC3~StarOffice
  29286. # MP~Multiplan, XL~Excel WXL~Excel Windows
  29287. >>>4 string Gnumeric Gnumeric
  29288. >>>4 string pmw PlanMaker
  29289. >>>4 string CALCOOO32 Libre/OpenOffice Calc
  29290. >>>4 string SCALC3 StarOffice Calc
  29291. >>>4 string XL Excel
  29292. # Excel, version probably running on Windows
  29293. >>>4 string WXL Excel
  29294. # not tested
  29295. >>>4 string MP Multiplan
  29296. # unknown spreadsheet software
  29297. >>>4 default x
  29298. >>>>4 string x %s
  29299. #------------------------------------------------------------------------------
  29300. # msx: file(1) magic for the SymbOS operating system
  29301. # http://www.symbos.de
  29302. # Fabio R. Schmidlin <frs@pop.com.br>
  29303. # SymbOS EXE file
  29304. 0x30 string SymExe SymbOS executable
  29305. >0x36 ubyte x v%c
  29306. >0x37 ubyte x \b.%c
  29307. >0xF string x \b, name: %s
  29308. # SymbOS DOX document
  29309. 0 string INFOq\0 SymbOS DOX document
  29310. # Symbos driver
  29311. 0 string SMD1 SymbOS driver
  29312. >19 byte x \b, name: %c
  29313. >20 byte x \b%c
  29314. >21 byte x \b%c
  29315. >22 byte x \b%c
  29316. >23 byte x \b%c
  29317. >24 byte x \b%c
  29318. >25 byte x \b%c
  29319. >26 byte x \b%c
  29320. >27 byte x \b%c
  29321. >28 byte x \b%c
  29322. >29 byte x \b%c
  29323. >30 byte x \b%c
  29324. >31 byte x \b%c
  29325. # Symbos video
  29326. 0 string SymVid SymbOS video
  29327. >6 ubyte x v%c
  29328. >7 ubyte x \b.%c
  29329. # Soundtrakker 128 ST2 music
  29330. 0 byte 0
  29331. >0xC string \x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x40\x00 Soundtrakker 128 ST2 music,
  29332. >>1 string x name: %s
  29333. #------------------------------------------------------------------------
  29334. # $File: sysex,v 1.10 2019/04/19 00:42:27 christos Exp $
  29335. # sysex: file(1) magic for MIDI sysex files
  29336. #
  29337. # GRR: original 1 byte test at offset was too general as it catches also many FATs of DOS filesystems
  29338. # where real SYStem EXclusive messages at offset 1 are limited to seven bits
  29339. # https://en.wikipedia.org/wiki/MIDI
  29340. 0 ubeshort&0xFF80 0xF000 SysEx File -
  29341. # North American Group
  29342. >1 byte 0x01 Sequential
  29343. >1 byte 0x02 IDP
  29344. >1 byte 0x03 OctavePlateau
  29345. >1 byte 0x04 Moog
  29346. >1 byte 0x05 Passport
  29347. >1 byte 0x06 Lexicon
  29348. >1 byte 0x07 Kurzweil/Future Retro
  29349. >>3 byte 0x77 777
  29350. >>4 byte 0x00 Bank
  29351. >>4 byte 0x01 Song
  29352. >>5 byte 0x0f 16
  29353. >>5 byte 0x0e 15
  29354. >>5 byte 0x0d 14
  29355. >>5 byte 0x0c 13
  29356. >>5 byte 0x0b 12
  29357. >>5 byte 0x0a 11
  29358. >>5 byte 0x09 10
  29359. >>5 byte 0x08 9
  29360. >>5 byte 0x07 8
  29361. >>5 byte 0x06 7
  29362. >>5 byte 0x05 6
  29363. >>5 byte 0x04 5
  29364. >>5 byte 0x03 4
  29365. >>5 byte 0x02 3
  29366. >>5 byte 0x01 2
  29367. >>5 byte 0x00 1
  29368. >>5 byte 0x10 (ALL)
  29369. >>2 byte x \b, Channel %d
  29370. >1 byte 0x08 Fender
  29371. >1 byte 0x09 Gulbransen
  29372. >1 byte 0x0a AKG
  29373. >1 byte 0x0b Voyce
  29374. >1 byte 0x0c Waveframe
  29375. >1 byte 0x0d ADA
  29376. >1 byte 0x0e Garfield
  29377. >1 byte 0x0f Ensoniq
  29378. >1 byte 0x10 Oberheim
  29379. >>2 byte 0x06 Matrix 6 series
  29380. >>3 byte 0x0A Dump (All)
  29381. >>3 byte 0x01 Dump (Bank)
  29382. >>4 belong 0x0002040E Matrix 1000
  29383. >>>11 byte <2 User bank %d
  29384. >>>11 byte >1 Preset bank %d
  29385. >1 byte 0x11 Apple
  29386. >1 byte 0x12 GreyMatter
  29387. >1 byte 0x14 PalmTree
  29388. >1 byte 0x15 JLCooper
  29389. >1 byte 0x16 Lowrey
  29390. >1 byte 0x17 AdamsSmith
  29391. >1 byte 0x18 E-mu
  29392. >1 byte 0x19 Harmony
  29393. >1 byte 0x1a ART
  29394. >1 byte 0x1b Baldwin
  29395. >1 byte 0x1c Eventide
  29396. >1 byte 0x1d Inventronics
  29397. >1 byte 0x1f Clarity
  29398. # European Group
  29399. >1 byte 0x21 SIEL
  29400. >1 byte 0x22 Synthaxe
  29401. >1 byte 0x24 Hohner
  29402. >1 byte 0x25 Twister
  29403. >1 byte 0x26 Solton
  29404. >1 byte 0x27 Jellinghaus
  29405. >1 byte 0x28 Southworth
  29406. >1 byte 0x29 PPG
  29407. >1 byte 0x2a JEN
  29408. >1 byte 0x2b SSL
  29409. >1 byte 0x2c AudioVertrieb
  29410. >1 byte 0x2f ELKA
  29411. >>3 byte 0x09 EK-44
  29412. >1 byte 0x30 Dynacord
  29413. >1 byte 0x31 Jomox
  29414. >1 byte 0x33 Clavia
  29415. >1 byte 0x39 Soundcraft
  29416. # Some Waldorf info from http://Stromeko.Synth.net/Downloads#WaldorfDocs
  29417. >1 byte 0x3e Waldorf
  29418. >>2 byte 0x00 microWave
  29419. >>2 byte 0x0E microwave2 / XT
  29420. >>2 byte 0x0F Q / Q+
  29421. >>3 byte =0 (default id)
  29422. >>3 byte >0 (
  29423. >>>3 byte <0x7F \bdevice %d)
  29424. >>>3 byte =0x7F \bbroadcast id)
  29425. >>3 byte 0x7f Microwave I
  29426. >>>4 byte 0x00 SNDR (Sound Request)
  29427. >>>4 byte 0x10 SNDD (Sound Dump)
  29428. >>>4 byte 0x20 SNDP (Sound Parameter Change)
  29429. >>>4 byte 0x30 SNDQ (Sound Parameter Inquiry)
  29430. >>>4 byte 0x70 BOOT (Sound Reserved)
  29431. >>>4 byte 0x01 MULR (Multi Request)
  29432. >>>4 byte 0x11 MULD (Multi Dump)
  29433. >>>4 byte 0x21 MULP (Multi Parameter Change)
  29434. >>>4 byte 0x31 MULQ (Multi Parameter Inquiry)
  29435. >>>4 byte 0x71 OS (Multi Reserved)
  29436. >>>4 byte 0x02 DRMR (Drum Map Request)
  29437. >>>4 byte 0x12 DRMD (Drum Map Dump)
  29438. >>>4 byte 0x22 DRMP (Drum Map Parameter Change)
  29439. >>>4 byte 0x32 DRMQ (Drum Map Parameter Inquiry)
  29440. >>>4 byte 0x72 BIN (Drum Map Reserved)
  29441. >>>4 byte 0x03 PATR (Sequencer Pattern Request)
  29442. >>>4 byte 0x13 PATD (Sequencer Pattern Dump)
  29443. >>>4 byte 0x23 PATP (Sequencer Pattern Parameter Change)
  29444. >>>4 byte 0x33 PATQ (Sequencer Pattern Parameter Inquiry)
  29445. >>>4 byte 0x73 AFM (Sequencer Pattern Reserved)
  29446. >>>4 byte 0x04 GLBR (Global Parameter Request)
  29447. >>>4 byte 0x14 GLBD (Global Parameter Dump)
  29448. >>>4 byte 0x24 GLBP (Global Parameter Parameter Change)
  29449. >>>4 byte 0x34 GLBQ (Global Parameter Parameter Inquiry)
  29450. >>>4 byte 0x07 MODR (Mode Parameter Request)
  29451. >>>4 byte 0x17 MODD (Mode Parameter Dump)
  29452. >>>4 byte 0x27 MODP (Mode Parameter Parameter Change)
  29453. >>>4 byte 0x37 MODQ (Mode Parameter Parameter Inquiry)
  29454. >>2 byte 0x10 microQ
  29455. >>>4 byte 0x00 SNDR (Sound Request)
  29456. >>>4 byte 0x10 SNDD (Sound Dump)
  29457. >>>4 byte 0x20 SNDP (Sound Parameter Change)
  29458. >>>4 byte 0x30 SNDQ (Sound Parameter Inquiry)
  29459. >>>4 byte 0x70 (Sound Reserved)
  29460. >>>4 byte 0x01 MULR (Multi Request)
  29461. >>>4 byte 0x11 MULD (Multi Dump)
  29462. >>>4 byte 0x21 MULP (Multi Parameter Change)
  29463. >>>4 byte 0x31 MULQ (Multi Parameter Inquiry)
  29464. >>>4 byte 0x71 OS (Multi Reserved)
  29465. >>>4 byte 0x02 DRMR (Drum Map Request)
  29466. >>>4 byte 0x12 DRMD (Drum Map Dump)
  29467. >>>4 byte 0x22 DRMP (Drum Map Parameter Change)
  29468. >>>4 byte 0x32 DRMQ (Drum Map Parameter Inquiry)
  29469. >>>4 byte 0x72 BIN (Drum Map Reserved)
  29470. >>>4 byte 0x04 GLBR (Global Parameter Request)
  29471. >>>4 byte 0x14 GLBD (Global Parameter Dump)
  29472. >>>4 byte 0x24 GLBP (Global Parameter Parameter Change)
  29473. >>>4 byte 0x34 GLBQ (Global Parameter Parameter Inquiry)
  29474. >>2 byte 0x11 rackAttack
  29475. >>>4 byte 0x00 SNDR (Sound Parameter Request)
  29476. >>>4 byte 0x10 SNDD (Sound Parameter Dump)
  29477. >>>4 byte 0x20 SNDP (Sound Parameter Parameter Change)
  29478. >>>4 byte 0x30 SNDQ (Sound Parameter Parameter Inquiry)
  29479. >>>4 byte 0x01 PRGR (Program Parameter Request)
  29480. >>>4 byte 0x11 PRGD (Program Parameter Dump)
  29481. >>>4 byte 0x21 PRGP (Program Parameter Parameter Change)
  29482. >>>4 byte 0x31 PRGQ (Program Parameter Parameter Inquiry)
  29483. >>>4 byte 0x71 OS (Program Parameter Reserved)
  29484. >>>4 byte 0x03 PATR (Pattern Parameter Request)
  29485. >>>4 byte 0x13 PATD (Pattern Parameter Dump)
  29486. >>>4 byte 0x23 PATP (Pattern Parameter Parameter Change)
  29487. >>>4 byte 0x33 PATQ (Pattern Parameter Parameter Inquiry)
  29488. >>>4 byte 0x04 GLBR (Global Parameter Request)
  29489. >>>4 byte 0x14 GLBD (Global Parameter Dump)
  29490. >>>4 byte 0x24 GLBP (Global Parameter Parameter Change)
  29491. >>>4 byte 0x34 GLBQ (Global Parameter Parameter Inquiry)
  29492. >>>4 byte 0x05 EFXR (FX Parameter Request)
  29493. >>>4 byte 0x15 EFXD (FX Parameter Dump)
  29494. >>>4 byte 0x25 EFXP (FX Parameter Parameter Change)
  29495. >>>4 byte 0x35 EFXQ (FX Parameter Parameter Inquiry)
  29496. >>>4 byte 0x07 MODR (Mode Command Request)
  29497. >>>4 byte 0x17 MODD (Mode Command Dump)
  29498. >>>4 byte 0x27 MODP (Mode Command Parameter Change)
  29499. >>>4 byte 0x37 MODQ (Mode Command Parameter Inquiry)
  29500. >>2 byte 0x03 Wave
  29501. >>>4 byte 0x00 SBPR (Soundprogram)
  29502. >>>4 byte 0x01 SAPR (Performance)
  29503. >>>4 byte 0x02 SWAVE (Wave)
  29504. >>>4 byte 0x03 SWTBL (Wave control table)
  29505. >>>4 byte 0x04 SVT (Velocity Curve)
  29506. >>>4 byte 0x05 STT (Tuning Table)
  29507. >>>4 byte 0x06 SGLB (Global Parameters)
  29508. >>>4 byte 0x07 SARRMAP (Performance Program Change Map)
  29509. >>>4 byte 0x08 SBPRMAP (Sound Program Change Map)
  29510. >>>4 byte 0x09 SBPRPAR (Sound Parameter)
  29511. >>>4 byte 0x0A SARRPAR (Performance Parameter)
  29512. >>>4 byte 0x0B SINSPAR (Instrument/External Parameter)
  29513. >>>4 byte 0x0F SBULK (Bulk Switch on/off)
  29514. # Japanese Group
  29515. >1 byte 0x40 Kawai
  29516. >>3 byte 0x20 K1
  29517. >>3 byte 0x22 K4
  29518. >1 byte 0x41 Roland
  29519. >>3 byte 0x14 D-50
  29520. >>3 byte 0x2b U-220
  29521. >>3 byte 0x02 TR-707
  29522. >1 byte 0x42 Korg
  29523. >>3 byte 0x19 M1
  29524. >1 byte 0x43 Yamaha
  29525. >1 byte 0x44 Casio
  29526. >1 byte 0x46 Kamiya
  29527. >1 byte 0x47 Akai
  29528. >1 byte 0x48 Victor
  29529. >1 byte 0x49 Mesosha
  29530. >1 byte 0x4b Fujitsu
  29531. >1 byte 0x4c Sony
  29532. >1 byte 0x4e Teac
  29533. >1 byte 0x50 Matsushita
  29534. >1 byte 0x51 Fostex
  29535. >1 byte 0x52 Zoom
  29536. >1 byte 0x54 Matsushita
  29537. >1 byte 0x57 Acoustic tech. lab.
  29538. # https://www.midi.org/techspecs/manid.php
  29539. >1 belong&0xffffff00 0x00007400 Ta Horng
  29540. >1 belong&0xffffff00 0x00007500 e-Tek
  29541. >1 belong&0xffffff00 0x00007600 E-Voice
  29542. >1 belong&0xffffff00 0x00007700 Midisoft
  29543. >1 belong&0xffffff00 0x00007800 Q-Sound
  29544. >1 belong&0xffffff00 0x00007900 Westrex
  29545. >1 belong&0xffffff00 0x00007a00 Nvidia*
  29546. >1 belong&0xffffff00 0x00007b00 ESS
  29547. >1 belong&0xffffff00 0x00007c00 Mediatrix
  29548. >1 belong&0xffffff00 0x00007d00 Brooktree
  29549. >1 belong&0xffffff00 0x00007e00 Otari
  29550. >1 belong&0xffffff00 0x00007f00 Key Electronics
  29551. >1 belong&0xffffff00 0x00010000 Shure
  29552. >1 belong&0xffffff00 0x00010100 AuraSound
  29553. >1 belong&0xffffff00 0x00010200 Crystal
  29554. >1 belong&0xffffff00 0x00010300 Rockwell
  29555. >1 belong&0xffffff00 0x00010400 Silicon Graphics
  29556. >1 belong&0xffffff00 0x00010500 Midiman
  29557. >1 belong&0xffffff00 0x00010600 PreSonus
  29558. >1 belong&0xffffff00 0x00010800 Topaz
  29559. >1 belong&0xffffff00 0x00010900 Cast Lightning
  29560. >1 belong&0xffffff00 0x00010a00 Microsoft
  29561. >1 belong&0xffffff00 0x00010b00 Sonic Foundry
  29562. >1 belong&0xffffff00 0x00010c00 Line 6
  29563. >1 belong&0xffffff00 0x00010d00 Beatnik Inc.
  29564. >1 belong&0xffffff00 0x00010e00 Van Koerving
  29565. >1 belong&0xffffff00 0x00010f00 Altech Systems
  29566. >1 belong&0xffffff00 0x00011000 S & S Research
  29567. >1 belong&0xffffff00 0x00011100 VLSI Technology
  29568. >1 belong&0xffffff00 0x00011200 Chromatic
  29569. >1 belong&0xffffff00 0x00011300 Sapphire
  29570. >1 belong&0xffffff00 0x00011400 IDRC
  29571. >1 belong&0xffffff00 0x00011500 Justonic Tuning
  29572. >1 belong&0xffffff00 0x00011600 TorComp
  29573. >1 belong&0xffffff00 0x00011700 Newtek Inc.
  29574. >1 belong&0xffffff00 0x00011800 Sound Sculpture
  29575. >1 belong&0xffffff00 0x00011900 Walker Technical
  29576. >1 belong&0xffffff00 0x00011a00 Digital Harmony
  29577. >1 belong&0xffffff00 0x00011b00 InVision
  29578. >1 belong&0xffffff00 0x00011c00 T-Square
  29579. >1 belong&0xffffff00 0x00011d00 Nemesys
  29580. >1 belong&0xffffff00 0x00011e00 DBX
  29581. >1 belong&0xffffff00 0x00011f00 Syndyne
  29582. >1 belong&0xffffff00 0x00012000 Bitheadz
  29583. >1 belong&0xffffff00 0x00012100 Cakewalk
  29584. >1 belong&0xffffff00 0x00012200 Staccato
  29585. >1 belong&0xffffff00 0x00012300 National Semicon.
  29586. >1 belong&0xffffff00 0x00012400 Boom Theory
  29587. >1 belong&0xffffff00 0x00012500 Virtual DSP Corp
  29588. >1 belong&0xffffff00 0x00012600 Antares
  29589. >1 belong&0xffffff00 0x00012700 Angel Software
  29590. >1 belong&0xffffff00 0x00012800 St Louis Music
  29591. >1 belong&0xffffff00 0x00012900 Lyrrus dba G-VOX
  29592. >1 belong&0xffffff00 0x00012a00 Ashley Audio
  29593. >1 belong&0xffffff00 0x00012b00 Vari-Lite
  29594. >1 belong&0xffffff00 0x00012c00 Summit Audio
  29595. >1 belong&0xffffff00 0x00012d00 Aureal Semicon.
  29596. >1 belong&0xffffff00 0x00012e00 SeaSound
  29597. >1 belong&0xffffff00 0x00012f00 U.S. Robotics
  29598. >1 belong&0xffffff00 0x00013000 Aurisis
  29599. >1 belong&0xffffff00 0x00013100 Nearfield Multimedia
  29600. >1 belong&0xffffff00 0x00013200 FM7 Inc.
  29601. >1 belong&0xffffff00 0x00013300 Swivel Systems
  29602. >1 belong&0xffffff00 0x00013400 Hyperactive
  29603. >1 belong&0xffffff00 0x00013500 MidiLite
  29604. >1 belong&0xffffff00 0x00013600 Radical
  29605. >1 belong&0xffffff00 0x00013700 Roger Linn
  29606. >1 belong&0xffffff00 0x00013800 Helicon
  29607. >1 belong&0xffffff00 0x00013900 Event
  29608. >1 belong&0xffffff00 0x00013a00 Sonic Network
  29609. >1 belong&0xffffff00 0x00013b00 Realtime Music
  29610. >1 belong&0xffffff00 0x00013c00 Apogee Digital
  29611. >1 belong&0xffffff00 0x00202b00 Medeli Electronics
  29612. >1 belong&0xffffff00 0x00202c00 Charlie Lab
  29613. >1 belong&0xffffff00 0x00202d00 Blue Chip Music
  29614. >1 belong&0xffffff00 0x00202e00 BEE OH Corp
  29615. >1 belong&0xffffff00 0x00202f00 LG Semicon America
  29616. >1 belong&0xffffff00 0x00203000 TESI
  29617. >1 belong&0xffffff00 0x00203100 EMAGIC
  29618. >1 belong&0xffffff00 0x00203200 Behringer
  29619. >1 belong&0xffffff00 0x00203300 Access Music
  29620. >1 belong&0xffffff00 0x00203400 Synoptic
  29621. >1 belong&0xffffff00 0x00203500 Hanmesoft Corp
  29622. >1 belong&0xffffff00 0x00203600 Terratec
  29623. >1 belong&0xffffff00 0x00203700 Proel SpA
  29624. >1 belong&0xffffff00 0x00203800 IBK MIDI
  29625. >1 belong&0xffffff00 0x00203900 IRCAM
  29626. >1 belong&0xffffff00 0x00203a00 Propellerhead Software
  29627. >1 belong&0xffffff00 0x00203b00 Red Sound Systems
  29628. >1 belong&0xffffff00 0x00203c00 Electron ESI AB
  29629. >1 belong&0xffffff00 0x00203d00 Sintefex Audio
  29630. >1 belong&0xffffff00 0x00203e00 Music and More
  29631. >1 belong&0xffffff00 0x00203f00 Amsaro
  29632. >1 belong&0xffffff00 0x00204000 CDS Advanced Technology
  29633. >1 belong&0xffffff00 0x00204100 Touched by Sound
  29634. >1 belong&0xffffff00 0x00204200 DSP Arts
  29635. >1 belong&0xffffff00 0x00204300 Phil Rees Music
  29636. >1 belong&0xffffff00 0x00204400 Stamer Musikanlagen GmbH
  29637. >1 belong&0xffffff00 0x00204500 Soundart
  29638. >1 belong&0xffffff00 0x00204600 C-Mexx Software
  29639. >1 belong&0xffffff00 0x00204700 Klavis Tech.
  29640. >1 belong&0xffffff00 0x00204800 Noteheads AB
  29641. 0 string T707 Roland TR-707 Data
  29642. #------------------------------------------------------------------------------
  29643. # file: file(1) magic for Tcl scripting language
  29644. # URL: https://www.tcl.tk/
  29645. # From: gustaf neumann
  29646. # Tcl scripts
  29647. 0 search/1/w #!\ /usr/bin/tcl Tcl script text executable
  29648. !:mime text/x-tcl
  29649. 0 search/1/w #!\ /usr/local/bin/tcl Tcl script text executable
  29650. !:mime text/x-tcl
  29651. 0 search/1 #!/usr/bin/env\ tcl Tcl script text executable
  29652. !:mime text/x-tcl
  29653. 0 search/1 #!\ /usr/bin/env\ tcl Tcl script text executable
  29654. !:mime text/x-tcl
  29655. 0 search/1/w #!\ /usr/bin/wish Tcl/Tk script text executable
  29656. !:mime text/x-tcl
  29657. 0 search/1/w #!\ /usr/local/bin/wish Tcl/Tk script text executable
  29658. !:mime text/x-tcl
  29659. 0 search/1 #!/usr/bin/env\ wish Tcl/Tk script text executable
  29660. !:mime text/x-tcl
  29661. 0 search/1 #!\ /usr/bin/env\ wish Tcl/Tk script text executable
  29662. !:mime text/x-tcl
  29663. # check the first line
  29664. 0 search/1 package\ req
  29665. >0 regex \^package[\ \t]+req Tcl script
  29666. # not 'p', check other lines
  29667. 0 search/1 !p
  29668. >0 regex \^package[\ \t]+req Tcl script
  29669. #------------------------------------------------------------------------------
  29670. # $File: teapot,v 1.4 2009/09/19 16:28:12 christos Exp $
  29671. # teapot: file(1) magic for "teapot" spreadsheet
  29672. #
  29673. 0 string #!teapot\012xdr teapot work sheet (XDR format)
  29674. #------------------------------------------------------------------------------
  29675. # $File: terminfo,v 1.12 2021/02/23 00:51:10 christos Exp $
  29676. # terminfo: file(1) magic for terminfo
  29677. #
  29678. # URL: https://invisible-island.net/ncurses/man/term.5.html
  29679. # URL: https://invisible-island.net/ncurses/man/scr_dump.5.html
  29680. #
  29681. # Workaround for Targa image type by Joerg Jenderek
  29682. # GRR: line below too general as it catches also
  29683. # Targa image type 1 with 26 long identification field
  29684. # and HELP.DSK
  29685. 0 string \032\001
  29686. # 5th character of terminal name list, but not Targa image pixel size (15 16 24 32)
  29687. >16 ubyte >32
  29688. # namelist, if more than 1 separated by "|" like "st|stterm| simpleterm 0.4.1"
  29689. >>12 regex \^[a-zA-Z0-9][a-zA-Z0-9.][^|]* Compiled terminfo entry "%-s"
  29690. !:mime application/x-terminfo
  29691. # no extension
  29692. #!:ext
  29693. #
  29694. #------------------------------------------------------------------------------
  29695. # The following was added for ncurses6 development:
  29696. #------------------------------------------------------------------------------
  29697. #
  29698. 0 string \036\002
  29699. # imitate the legacy compiled-format, to get the entry-name printed
  29700. >16 ubyte >32
  29701. # namelist, if more than 1 separated by "|" like "st|stterm| simpleterm 0. 4.1"
  29702. >>12 regex \^[a-zA-Z0-9][a-zA-Z0-9.][^|]* Compiled 32-bit terminfo entry "%-s"
  29703. !:mime application/x-terminfo2
  29704. #
  29705. # While the compiled terminfo uses little-endian format regardless of
  29706. # platform, SystemV screen dumps do not. They came later, and that detail was
  29707. # overlooked.
  29708. #
  29709. # AIX and HPUX use the SVr4 big-endian format
  29710. # Solaris uses the SVr3 formats (sparc and x86 differ endian-ness)
  29711. 0 beshort 0433 SVr2 curses screen image, big-endian
  29712. 0 beshort 0434 SVr3 curses screen image, big-endian
  29713. 0 beshort 0435 SVr4 curses screen image, big-endian
  29714. #
  29715. 0 leshort 0433 SVr2 curses screen image, little-endian
  29716. 0 leshort 0434 SVr3 curses screen image, little-endian
  29717. 0 leshort 0435 SVr4 curses screen image, little-endian
  29718. #
  29719. # Rather than SVr4, Solaris "xcurses" writes this header:
  29720. 0 regex \^MAX=[0-9]+,[0-9]+$
  29721. >1 regex \^BEG=[0-9]+,[0-9]+$
  29722. >2 regex \^SCROLL=[0-9]+,[0-9]+$
  29723. >3 regex \^VMIN=[0-9]+$
  29724. >4 regex \^VTIME=[0-9]+$
  29725. >5 regex \^FLAGS=0x[[:xdigit:]]+$
  29726. >6 regex \^FG=[0-9],[0-9]+$
  29727. >7 regex \^BG=[0-9]+,[0-9]+, Solaris xcurses screen image
  29728. #
  29729. # ncurses5 (and before) did not use a magic number, making screen dumps "data".
  29730. # ncurses6 (2015) uses this format, ignoring byte-order
  29731. 0 string \210\210\210\210ncurses ncurses6 screen image
  29732. #
  29733. # PDCurses added this in 2005
  29734. 0 string PDC\001 PDCurses screen image
  29735. #------------------------------------------------------------------------------
  29736. # $File: tex,v 1.21 2019/04/19 00:42:27 christos Exp $
  29737. # tex: file(1) magic for TeX files
  29738. #
  29739. # XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
  29740. #
  29741. # From <conklin@talisman.kaleida.com>
  29742. # Although we may know the offset of certain text fields in TeX DVI
  29743. # and font files, we can't use them reliably because they are not
  29744. # zero terminated. [but we do anyway, christos]
  29745. 0 string \367\002 TeX DVI file
  29746. !:mime application/x-dvi
  29747. >16 string >\0 (%s)
  29748. 0 string \367\203 TeX generic font data
  29749. 0 string \367\131 TeX packed font data
  29750. >3 string >\0 (%s)
  29751. 0 string \367\312 TeX virtual font data
  29752. 0 search/1 This\ is\ TeX, TeX transcript text
  29753. 0 search/1 This\ is\ METAFONT, METAFONT transcript text
  29754. # There is no way to detect TeX Font Metric (*.tfm) files without
  29755. # breaking them apart and reading the data. The following patterns
  29756. # match most *.tfm files generated by METAFONT or afm2tfm.
  29757. 2 string \000\021 TeX font metric data
  29758. !:mime application/x-tex-tfm
  29759. >33 string >\0 (%s)
  29760. 2 string \000\022 TeX font metric data
  29761. !:mime application/x-tex-tfm
  29762. >33 string >\0 (%s)
  29763. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  29764. 0 search/1 \\input\ texinfo Texinfo source text
  29765. !:mime text/x-texinfo
  29766. 0 search/1 This\ is\ Info\ file GNU Info text
  29767. !:mime text/x-info
  29768. # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
  29769. 0 search/4096 \\input TeX document text
  29770. !:mime text/x-tex
  29771. !:strength + 15
  29772. 0 search/4096 \\begin LaTeX document text
  29773. !:mime text/x-tex
  29774. !:strength + 15
  29775. 0 search/4096 \\section LaTeX document text
  29776. !:mime text/x-tex
  29777. !:strength + 18
  29778. 0 search/4096 \\setlength LaTeX document text
  29779. !:mime text/x-tex
  29780. !:strength + 15
  29781. 0 search/4096 \\documentstyle LaTeX document text
  29782. !:mime text/x-tex
  29783. !:strength + 18
  29784. 0 search/4096 \\chapter LaTeX document text
  29785. !:mime text/x-tex
  29786. !:strength + 18
  29787. 0 search/4096 \\documentclass LaTeX 2e document text
  29788. !:mime text/x-tex
  29789. !:strength + 15
  29790. 0 search/4096 \\relax LaTeX auxiliary file
  29791. !:mime text/x-tex
  29792. !:strength + 15
  29793. 0 search/4096 \\contentsline LaTeX table of contents
  29794. !:mime text/x-tex
  29795. !:strength + 15
  29796. 0 search/4096 %\ -*-latex-*- LaTeX document text
  29797. !:mime text/x-tex
  29798. # Tex document, from Hendrik Scholz <hendrik@scholz.net>
  29799. 0 search/1 \\ifx TeX document text
  29800. # Index and glossary files
  29801. 0 search/4096 \\indexentry LaTeX raw index file
  29802. 0 search/4096 \\begin{theindex} LaTeX sorted index
  29803. 0 search/4096 \\glossaryentry LaTeX raw glossary
  29804. 0 search/4096 \\begin{theglossary} LaTeX sorted glossary
  29805. 0 search/4096 This\ is\ makeindex Makeindex log file
  29806. # End of TeX
  29807. #------------------------------------------------------------------------------
  29808. # file(1) magic for BibTex text files
  29809. # From Hendrik Scholz <hendrik@scholz.net>
  29810. 0 search/1/c @article{ BibTeX text file
  29811. 0 search/1/c @book{ BibTeX text file
  29812. 0 search/1/c @inbook{ BibTeX text file
  29813. 0 search/1/c @incollection{ BibTeX text file
  29814. 0 search/1/c @inproceedings{ BibTeX text file
  29815. 0 search/1/c @manual{ BibTeX text file
  29816. 0 search/1/c @misc{ BibTeX text file
  29817. 0 search/1/c @preamble{ BibTeX text file
  29818. 0 search/1/c @phdthesis{ BibTeX text file
  29819. 0 search/1/c @techreport{ BibTeX text file
  29820. 0 search/1/c @unpublished{ BibTeX text file
  29821. 73 search/1 %%%\ \ BibTeX-file{ BibTex text file (with full header)
  29822. 73 search/1 %%%\ \ @BibTeX-style-file{ BibTeX style text file (with full header)
  29823. 0 search/1 %\ BibTeX\ standard\ bibliography\ BibTeX standard bibliography style text file
  29824. 0 search/1 %\ BibTeX\ ` BibTeX custom bibliography style text file
  29825. 0 search/1 @c\ @mapfile{ TeX font aliases text file
  29826. 0 string #LyX LyX document text
  29827. # ConTeXt documents
  29828. # https://wiki.contextgarden.net/
  29829. 0 search/4096 \\setupcolors[ ConTeXt document text
  29830. !:strength + 15
  29831. 0 search/4096 \\definecolor[ ConTeXt document text
  29832. !:strength + 15
  29833. 0 search/4096 \\setupinteraction[ ConTeXt document text
  29834. !:strength + 15
  29835. 0 search/4096 \\useURL[ ConTeXt document text
  29836. !:strength + 15
  29837. 0 search/4096 \\setuppapersize[ ConTeXt document text
  29838. !:strength + 15
  29839. 0 search/4096 \\setuplayout[ ConTeXt document text
  29840. !:strength + 15
  29841. 0 search/4096 \\setupfooter[ ConTeXt document text
  29842. !:strength + 15
  29843. 0 search/4096 \\setupfootertexts[ ConTeXt document text
  29844. !:strength + 15
  29845. 0 search/4096 \\setuppagenumbering[ ConTeXt document text
  29846. !:strength + 15
  29847. 0 search/4096 \\setupbodyfont[ ConTeXt document text
  29848. !:strength + 15
  29849. 0 search/4096 \\setuphead[ ConTeXt document text
  29850. !:strength + 15
  29851. 0 search/4096 \\setupitemize[ ConTeXt document text
  29852. !:strength + 15
  29853. 0 search/4096 \\setupwhitespace[ ConTeXt document text
  29854. !:strength + 15
  29855. 0 search/4096 \\setupindenting[ ConTeXt document text
  29856. !:strength + 15
  29857. #------------------------------------------------------------------------------
  29858. # $File: tgif,v 1.7 2010/09/20 19:03:46 rrt Exp $
  29859. # file(1) magic for tgif(1) files
  29860. # From Hendrik Scholz <hendrik@scholz.net>
  29861. 0 string %TGIF\ Tgif file version
  29862. >6 string x %s
  29863. #------------------------------------------------------------------------------
  29864. # $File: ti-8x,v 1.8 2020/02/12 22:13:01 christos Exp $
  29865. # ti-8x: file(1) magic for the TI-8x and TI-9x Graphing Calculators.
  29866. #
  29867. # From: Ryan McGuire (rmcguire@freenet.columbus.oh.us).
  29868. #
  29869. # Update: Romain Lievin (roms@lpg.ticalc.org).
  29870. #
  29871. # NOTE: This list is not complete.
  29872. # Files for the TI-80 and TI-81 are pretty rare. I'm not going to put the
  29873. # program/group magic numbers in here because I cannot find any.
  29874. 0 string **TI80** TI-80 Graphing Calculator File.
  29875. 0 string **TI81** TI-81 Graphing Calculator File.
  29876. #
  29877. # Magic Numbers for the TI-73
  29878. #
  29879. 0 string **TI73** TI-73 Graphing Calculator
  29880. >0x00003B byte 0x00 (real number)
  29881. >0x00003B byte 0x01 (list)
  29882. >0x00003B byte 0x02 (matrix)
  29883. >0x00003B byte 0x03 (equation)
  29884. >0x00003B byte 0x04 (string)
  29885. >0x00003B byte 0x05 (program)
  29886. >0x00003B byte 0x06 (assembly program)
  29887. >0x00003B byte 0x07 (picture)
  29888. >0x00003B byte 0x08 (gdb)
  29889. >0x00003B byte 0x0C (complex number)
  29890. >0x00003B byte 0x0F (window settings)
  29891. >0x00003B byte 0x10 (zoom)
  29892. >0x00003B byte 0x11 (table setup)
  29893. >0x00003B byte 0x13 (backup)
  29894. # Magic Numbers for the TI-82
  29895. #
  29896. 0 string **TI82** TI-82 Graphing Calculator
  29897. >0x00003B byte 0x00 (real)
  29898. >0x00003B byte 0x01 (list)
  29899. >0x00003B byte 0x02 (matrix)
  29900. >0x00003B byte 0x03 (Y-variable)
  29901. >0x00003B byte 0x05 (program)
  29902. >0x00003B byte 0x06 (protected prgm)
  29903. >0x00003B byte 0x07 (picture)
  29904. >0x00003B byte 0x08 (gdb)
  29905. >0x00003B byte 0x0B (window settings)
  29906. >0x00003B byte 0x0C (window settings)
  29907. >0x00003B byte 0x0D (table setup)
  29908. >0x00003B byte 0x0E (screenshot)
  29909. >0x00003B byte 0x0F (backup)
  29910. #
  29911. # Magic Numbers for the TI-83
  29912. #
  29913. 0 string **TI83** TI-83 Graphing Calculator
  29914. >0x00003B byte 0x00 (real)
  29915. >0x00003B byte 0x01 (list)
  29916. >0x00003B byte 0x02 (matrix)
  29917. >0x00003B byte 0x03 (Y-variable)
  29918. >0x00003B byte 0x04 (string)
  29919. >0x00003B byte 0x05 (program)
  29920. >0x00003B byte 0x06 (protected prgm)
  29921. >0x00003B byte 0x07 (picture)
  29922. >0x00003B byte 0x08 (gdb)
  29923. >0x00003B byte 0x0B (window settings)
  29924. >0x00003B byte 0x0C (window settings)
  29925. >0x00003B byte 0x0D (table setup)
  29926. >0x00003B byte 0x0E (screenshot)
  29927. >0x00003B byte 0x13 (backup)
  29928. #
  29929. # Magic Numbers for the TI-83+
  29930. #
  29931. 0 string **TI83F* TI-83+ Graphing Calculator
  29932. >0x00003B byte 0x00 (real number)
  29933. >0x00003B byte 0x01 (list)
  29934. >0x00003B byte 0x02 (matrix)
  29935. >0x00003B byte 0x03 (equation)
  29936. >0x00003B byte 0x04 (string)
  29937. >0x00003B byte 0x05 (program)
  29938. >0x00003B byte 0x06 (assembly program)
  29939. >0x00003B byte 0x07 (picture)
  29940. >0x00003B byte 0x08 (gdb)
  29941. >0x00003B byte 0x0C (complex number)
  29942. >0x00003B byte 0x0F (window settings)
  29943. >0x00003B byte 0x10 (zoom)
  29944. >0x00003B byte 0x11 (table setup)
  29945. >0x00003B byte 0x13 (backup)
  29946. >0x00003B byte 0x15 (application variable)
  29947. >0x00003B byte 0x17 (group of variable)
  29948. #
  29949. # Magic Numbers for the TI-85
  29950. #
  29951. 0 string **TI85** TI-85 Graphing Calculator
  29952. >0x00003B byte 0x00 (real number)
  29953. >0x00003B byte 0x01 (complex number)
  29954. >0x00003B byte 0x02 (real vector)
  29955. >0x00003B byte 0x03 (complex vector)
  29956. >0x00003B byte 0x04 (real list)
  29957. >0x00003B byte 0x05 (complex list)
  29958. >0x00003B byte 0x06 (real matrix)
  29959. >0x00003B byte 0x07 (complex matrix)
  29960. >0x00003B byte 0x08 (real constant)
  29961. >0x00003B byte 0x09 (complex constant)
  29962. >0x00003B byte 0x0A (equation)
  29963. >0x00003B byte 0x0C (string)
  29964. >0x00003B byte 0x0D (function GDB)
  29965. >0x00003B byte 0x0E (polar GDB)
  29966. >0x00003B byte 0x0F (parametric GDB)
  29967. >0x00003B byte 0x10 (diffeq GDB)
  29968. >0x00003B byte 0x11 (picture)
  29969. >0x00003B byte 0x12 (program)
  29970. >0x00003B byte 0x13 (range)
  29971. >0x00003B byte 0x17 (window settings)
  29972. >0x00003B byte 0x18 (window settings)
  29973. >0x00003B byte 0x19 (window settings)
  29974. >0x00003B byte 0x1A (window settings)
  29975. >0x00003B byte 0x1B (zoom)
  29976. >0x00003B byte 0x1D (backup)
  29977. >0x00003B byte 0x1E (unknown)
  29978. >0x00003B byte 0x2A (equation)
  29979. >0x000032 string ZS4 - ZShell Version 4 File.
  29980. >0x000032 string ZS3 - ZShell Version 3 File.
  29981. #
  29982. # Magic Numbers for the TI-86
  29983. #
  29984. 0 string **TI86** TI-86 Graphing Calculator
  29985. >0x00003B byte 0x00 (real number)
  29986. >0x00003B byte 0x01 (complex number)
  29987. >0x00003B byte 0x02 (real vector)
  29988. >0x00003B byte 0x03 (complex vector)
  29989. >0x00003B byte 0x04 (real list)
  29990. >0x00003B byte 0x05 (complex list)
  29991. >0x00003B byte 0x06 (real matrix)
  29992. >0x00003B byte 0x07 (complex matrix)
  29993. >0x00003B byte 0x08 (real constant)
  29994. >0x00003B byte 0x09 (complex constant)
  29995. >0x00003B byte 0x0A (equation)
  29996. >0x00003B byte 0x0C (string)
  29997. >0x00003B byte 0x0D (function GDB)
  29998. >0x00003B byte 0x0E (polar GDB)
  29999. >0x00003B byte 0x0F (parametric GDB)
  30000. >0x00003B byte 0x10 (diffeq GDB)
  30001. >0x00003B byte 0x11 (picture)
  30002. >0x00003B byte 0x12 (program)
  30003. >0x00003B byte 0x13 (range)
  30004. >0x00003B byte 0x17 (window settings)
  30005. >0x00003B byte 0x18 (window settings)
  30006. >0x00003B byte 0x19 (window settings)
  30007. >0x00003B byte 0x1A (window settings)
  30008. >0x00003B byte 0x1B (zoom)
  30009. >0x00003B byte 0x1D (backup)
  30010. >0x00003B byte 0x1E (unknown)
  30011. >0x00003B byte 0x2A (equation)
  30012. #
  30013. # Magic Numbers for the TI-89
  30014. #
  30015. 0 string **TI89** TI-89 Graphing Calculator
  30016. >0x000048 byte 0x00 (expression)
  30017. >0x000048 byte 0x04 (list)
  30018. >0x000048 byte 0x06 (matrix)
  30019. >0x000048 byte 0x0A (data)
  30020. >0x000048 byte 0x0B (text)
  30021. >0x000048 byte 0x0C (string)
  30022. >0x000048 byte 0x0D (graphic data base)
  30023. >0x000048 byte 0x0E (figure)
  30024. >0x000048 byte 0x10 (picture)
  30025. >0x000048 byte 0x12 (program)
  30026. >0x000048 byte 0x13 (function)
  30027. >0x000048 byte 0x14 (macro)
  30028. >0x000048 byte 0x1C (zipped)
  30029. >0x000048 byte 0x21 (assembler)
  30030. #
  30031. # Magic Numbers for the TI-92
  30032. #
  30033. 0 string **TI92** TI-92 Graphing Calculator
  30034. >0x000048 byte 0x00 (expression)
  30035. >0x000048 byte 0x04 (list)
  30036. >0x000048 byte 0x06 (matrix)
  30037. >0x000048 byte 0x0A (data)
  30038. >0x000048 byte 0x0B (text)
  30039. >0x000048 byte 0x0C (string)
  30040. >0x000048 byte 0x0D (graphic data base)
  30041. >0x000048 byte 0x0E (figure)
  30042. >0x000048 byte 0x10 (picture)
  30043. >0x000048 byte 0x12 (program)
  30044. >0x000048 byte 0x13 (function)
  30045. >0x000048 byte 0x14 (macro)
  30046. >0x000048 byte 0x1D (backup)
  30047. #
  30048. # Magic Numbers for the TI-92+/V200
  30049. #
  30050. 0 string **TI92P* TI-92+/V200 Graphing Calculator
  30051. >0x000048 byte 0x00 (expression)
  30052. >0x000048 byte 0x04 (list)
  30053. >0x000048 byte 0x06 (matrix)
  30054. >0x000048 byte 0x0A (data)
  30055. >0x000048 byte 0x0B (text)
  30056. >0x000048 byte 0x0C (string)
  30057. >0x000048 byte 0x0D (graphic data base)
  30058. >0x000048 byte 0x0E (figure)
  30059. >0x000048 byte 0x10 (picture)
  30060. >0x000048 byte 0x12 (program)
  30061. >0x000048 byte 0x13 (function)
  30062. >0x000048 byte 0x14 (macro)
  30063. >0x000048 byte 0x1C (zipped)
  30064. >0x000048 byte 0x21 (assembler)
  30065. #
  30066. # Magic Numbers for the TI-73/83+/89/92+/V200 FLASH upgrades
  30067. #
  30068. #0x0000016 string Advanced TI-XX Graphing Calculator (FLASH)
  30069. 0 string **TIFL** TI-XX Graphing Calculator (FLASH)
  30070. >8 byte >0 - Revision %d
  30071. >>9 byte x \b.%d,
  30072. >12 byte >0 Revision date %02x
  30073. >>13 byte x \b/%02x
  30074. >>14 beshort x \b/%04x,
  30075. >17 string >/0 name: '%s',
  30076. >48 byte 0x74 device: TI-73,
  30077. >48 byte 0x73 device: TI-83+,
  30078. >48 byte 0x98 device: TI-89,
  30079. >48 byte 0x88 device: TI-92+,
  30080. >49 byte 0x23 type: OS upgrade,
  30081. >49 byte 0x24 type: application,
  30082. >49 byte 0x25 type: certificate,
  30083. >49 byte 0x3e type: license,
  30084. >74 lelong >0 size: %d bytes
  30085. # VTi & TiEmu skins (TI Graphing Calculators).
  30086. # From: Romain Lievin (roms@lpg.ticalc.org).
  30087. # Magic Numbers for the VTi skins
  30088. 0 string VTI Virtual TI skin
  30089. >3 string v - Version
  30090. >>4 byte >0 \b %c
  30091. >>6 byte x \b.%c
  30092. # Magic Numbers for the TiEmu skins
  30093. 0 string TiEmu TiEmu skin
  30094. >6 string v - Version
  30095. >>7 byte >0 \b %c
  30096. >>9 byte x \b.%c
  30097. >>10 byte x \b%c
  30098. #------------------------------------------------------------------------------
  30099. # $File: timezone,v 1.12 2020/12/28 15:59:23 christos Exp $
  30100. # timezone: file(1) magic for timezone data
  30101. #
  30102. # from Daniel Quinlan (quinlan@yggdrasil.com)
  30103. # this should work on Linux, SunOS, and maybe others
  30104. # Added new official magic number for recent versions of the Olson code
  30105. 0 string TZif timezone data
  30106. >4 byte 0 \b, old version
  30107. >4 byte >0 \b, version %c
  30108. >20 belong 0 \b, no gmt time flags
  30109. >20 belong 1 \b, 1 gmt time flag
  30110. >20 belong >1 \b, %d gmt time flags
  30111. >24 belong 0 \b, no std time flags
  30112. >24 belong 1 \b, 1 std time flag
  30113. >24 belong >1 \b, %d std time flags
  30114. >28 belong 0 \b, no leap seconds
  30115. >28 belong 1 \b, 1 leap second
  30116. >28 belong >1 \b, %d leap seconds
  30117. >32 belong 0 \b, no transition times
  30118. >32 belong 1 \b, 1 transition time
  30119. >32 belong >1 \b, %d transition times
  30120. >36 belong 0 \b, no local time types
  30121. >36 belong 1 \b, 1 local time type
  30122. >36 belong >1 \b, %d local time types
  30123. >40 belong 0 \b, no abbreviation chars
  30124. >40 belong 1 \b, 1 abbreviation char
  30125. >40 belong >1 \b, %d abbreviation chars
  30126. 0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0 old timezone data
  30127. 0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\2\0 old timezone data
  30128. 0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\3\0 old timezone data
  30129. 0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0 old timezone data
  30130. 0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0 old timezone data
  30131. 0 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0 old timezone data
  30132. #------------------------------------------------------------------------------
  30133. # $File: tplink,v 1.6 2020/12/12 20:01:47 christos Exp $
  30134. # tplink: File magic for openwrt firmware files
  30135. # URL: https://wiki.openwrt.org/doc/techref/header
  30136. # Reference: https://git.openwrt.org/?p=openwrt.git;a=blob;f=tools/firmware-utils/src/mktplinkfw.c
  30137. # From: Joerg Jenderek
  30138. # check for valid header version 1 or 2
  30139. 0 ulelong <3
  30140. >0 ulelong !0
  30141. # test for header padding with nulls
  30142. >>0x100 long 0
  30143. # skip Norton Commander Cleanup Utility NCCLEAN.INI by looking for valid vendor
  30144. >>>4 ubelong >0x1F000000
  30145. # skip user.dbt by looking for positive hardware id
  30146. >>>>0x40 ubeshort >0
  30147. >>>>>0 use firmware-tplink
  30148. 0 name firmware-tplink
  30149. >0 ubyte x firmware
  30150. !:mime application/x-tplink-bin
  30151. !:ext bin
  30152. # hardware id like 10430001 07410001 09410004 09410006
  30153. >0x40 ubeshort x %x
  30154. >0x42 ubeshort x v%x
  30155. # hardware revision like 1
  30156. >0x44 ubelong !1 (revision %u)
  30157. # vendor_name[24] like OpenWrt or TP-LINK Technologies
  30158. >4 string x %.24s
  30159. # fw_version[36] like r49389 or ver. 1.0
  30160. >0x1c string x %.36s
  30161. # header version 1 or 2
  30162. >0 ubyte !1 V%X
  30163. # ver_hi.ver_mid.ver_lo
  30164. >0x98 long !0 \b, version
  30165. >>0x98 ubeshort x %u
  30166. >>0x9A ubeshort x \b.%u
  30167. >>0x9C ubeshort x \b.%u
  30168. # region code 0~universal 1~US
  30169. >0x48 ubelong x
  30170. #>>0x48 ubelong 0 (universal)
  30171. >>0x48 ubelong 1 (US)
  30172. >>0x48 ubelong >1 (region %u)
  30173. # total length of the firmware. not always true
  30174. >0x7C ubelong x \b, %u bytes or less
  30175. # unknown 1
  30176. >0x48 ubelong !0 \b, UNKNOWN1 0x%x
  30177. # md5sum1[16]
  30178. #>0x4c ubequad x \b, MD5 %llx
  30179. #>>0x54 ubequad x \b%llx
  30180. # unknown 2
  30181. >0x5c ubelong !0 \b, UNKNOWN2 0x%x
  30182. # md5sum2[16]
  30183. #>0x60 ubequad !0 \b, 2nd MD5 %llx
  30184. #>>0x68 ubequad x \b%llx
  30185. # unknown 3
  30186. >0x70 ubelong !0 \b, UNKNOWN3 0x%x
  30187. # kernel load address
  30188. #>0x74 ubelong x \b, 0x%x load
  30189. # kernel entry point
  30190. #>0x78 ubelong x \b, 0x%x entry
  30191. # kernel data offset. 200h means direct after header
  30192. >0x80 ubelong x \b, at 0x%x
  30193. # kernel data length and 1 space
  30194. >0x84 ubelong x %u bytes
  30195. # look for kernel type (gzip compressed vmlinux.bin by ./compress)
  30196. >(0x80.L) indirect x
  30197. # root file system data offset
  30198. # WRONG in 5.35 with above indirect expression
  30199. >0x88 ubelong x \b, at 0x%x
  30200. # rootfs data length and 1 space
  30201. >0x8C ubelong x %u bytes
  30202. # in 5.32 only true for offset ~< FILE_BYTES_MAX=9 MB defined in ../../src/file.h
  30203. >(0x88.L) indirect x
  30204. # 'qshs' for wr940nv1_en_3_13_7_up(111228).bin
  30205. #>(0x88.L) string x \b, file system '%.4s'
  30206. #>(0x88.L) ubequad x \b, file system 0x%llx
  30207. # bootloader data offset
  30208. >0x90 ubelong !0 \b, at 0x%x
  30209. # bootloader data length only reasonable if bootloader offset not null
  30210. >>0x94 ubelong !0 %u bytes
  30211. # pad[354] should be 354 null bytes.
  30212. #>0x9E ubequad !0 \b, padding 0x%llx
  30213. # But at 0x120 18 non null bytes in examples like
  30214. # wr940nv4_eu_3_16_9_up_boot(160620).bin
  30215. # wr940nv6_us_3_18_1_up_boot(171030).bin
  30216. #>0x120 ubequad !0 \b, other padding 0x%llx
  30217. #------------------------------------------------------------------------------
  30218. # $File: troff,v 1.13 2020/05/30 23:12:34 christos Exp $
  30219. # troff: file(1) magic for *roff
  30220. #
  30221. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  30222. # troff input
  30223. 0 search/1 .\\" troff or preprocessor input text
  30224. !:mime text/troff
  30225. 0 search/1 '\\" troff or preprocessor input text
  30226. !:mime text/troff
  30227. 0 search/1 '.\\" troff or preprocessor input text
  30228. !:mime text/troff
  30229. 0 search/1 \\" troff or preprocessor input text
  30230. !:mime text/troff
  30231. #0 search/1 ''' troff or preprocessor input text
  30232. #!:mime text/troff
  30233. 0 regex/20l \^\\.[A-Za-z][A-Za-z0-9][\ \t] troff or preprocessor input text
  30234. !:mime text/troff
  30235. 0 regex/20l \^\\.[A-Za-z][A-Za-z0-9]$ troff or preprocessor input text
  30236. !:mime text/troff
  30237. # ditroff intermediate output text
  30238. 0 search/1 x\ T ditroff output text
  30239. >4 search/1 cat for the C/A/T phototypesetter
  30240. >4 search/1 ps for PostScript
  30241. >4 search/1 dvi for DVI
  30242. >4 search/1 ascii for ASCII
  30243. >4 search/1 lj4 for LaserJet 4
  30244. >4 search/1 latin1 for ISO 8859-1 (Latin 1)
  30245. >4 search/1 X75 for xditview at 75dpi
  30246. >>7 search/1 -12 (12pt)
  30247. >4 search/1 X100 for xditview at 100dpi
  30248. >>8 search/1 -12 (12pt)
  30249. # output data formats
  30250. 0 string \100\357 very old (C/A/T) troff output data
  30251. #------------------------------------------------------------------------------
  30252. # $File: tuxedo,v 1.4 2009/09/19 16:28:13 christos Exp $
  30253. # tuxedo: file(1) magic for BEA TUXEDO data files
  30254. #
  30255. # from Ian Springer <ispringer@hotmail.com>
  30256. #
  30257. 0 string \0\0\1\236\0\0\0\0\0\0\0\0\0\0\0\0 BEA TUXEDO DES mask data
  30258. #------------------------------------------------------------------------------
  30259. # $File: typeset,v 1.8 2009/09/19 16:28:13 christos Exp $
  30260. # typeset: file(1) magic for other typesetting
  30261. #
  30262. 0 string Interpress/Xerox Xerox InterPress data
  30263. >16 string / (version
  30264. >>17 string >\0 %s)
  30265. #------------------------------------------------------------------------------
  30266. # $File: unicode,v 1.7 2019/02/19 20:34:42 christos Exp $
  30267. # Unicode: BOM prefixed text files - Adrian Havill <havill@turbolinux.co.jp>
  30268. # These types are recognised in file_ascmagic so these encodings can be
  30269. # treated by text patterns. Missing types are already dealt with internally.
  30270. #
  30271. 0 string +/v8 Unicode text, UTF-7
  30272. 0 string +/v9 Unicode text, UTF-7
  30273. 0 string +/v+ Unicode text, UTF-7
  30274. 0 string +/v/ Unicode text, UTF-7
  30275. 0 string \335\163\146\163 Unicode text, UTF-8-EBCDIC
  30276. 0 string \000\000\376\377 Unicode text, UTF-32, big-endian
  30277. 0 string \377\376\000\000 Unicode text, UTF-32, little-endian
  30278. 0 string \016\376\377 Unicode text, SCSU (Standard Compression Scheme for Unicode)
  30279. #------------------------------------------------------------------------------
  30280. # $File: unisig,v 1.1 2020/04/09 19:05:44 christos Exp $
  30281. # unisig: file(1) magic for files carrying a uniform signature (Unisig)
  30282. # From: Lassi Kortela, John Cowan
  30283. # URL: https://github.com/unisig
  30284. #
  30285. 0 string \xDC\xDC\x0D\x0A\x1A\x0A\x00 Unisig:
  30286. >7 ubyte =0 UUID
  30287. >>8 guid x %s
  30288. >7 ubyte >0 URI
  30289. >>7 pstring x %s
  30290. #------------------------------------------------------------------------------
  30291. # $File: unknown,v 1.8 2013/01/09 22:37:24 christos Exp $
  30292. # unknown: file(1) magic for unknown machines
  30293. #
  30294. # 0x107 is 0407, 0x108 is 0410, and 0x109 is 0411; those are all PDP-11
  30295. # (executable, pure, and split I&D, respectively), but the PDP-11 version
  30296. # doesn't have the "version %ld", which may be a bogus COFFism (I don't
  30297. # think there was ever COFF for the PDP-11).
  30298. #
  30299. # 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
  30300. # long, as it would be on a VAX. In any case, that could collide with
  30301. # VAX demand-paged files, as the magic number is little-endian on those
  30302. # binaries, so the first 16 bits of the file would contain 0x10B.
  30303. #
  30304. # Therefore, those entries are commented out.
  30305. #
  30306. # 0x10C is 0414 and 0x10E is 0416; those *are* unknown.
  30307. #
  30308. #0 short 0x107 unknown machine executable
  30309. #>8 short >0 not stripped
  30310. #>15 byte >0 - version %ld
  30311. #0 short 0x108 unknown pure executable
  30312. #>8 short >0 not stripped
  30313. #>15 byte >0 - version %ld
  30314. #0 short 0x109 PDP-11 separate I&D
  30315. #>8 short >0 not stripped
  30316. #>15 byte >0 - version %ld
  30317. #0 short 0x10b unknown pure executable
  30318. #>8 short >0 not stripped
  30319. #>15 byte >0 - version %ld
  30320. 0 long 0x10c unknown demand paged pure executable
  30321. >16 long >0 not stripped
  30322. 0 long 0x10e unknown readable demand paged pure executable
  30323. #------------------------------------------------------------------------------
  30324. # $File: usd,v 1.2 2020/05/21 22:17:00 christos Exp $
  30325. #
  30326. # From Christian Schmidbauer
  30327. #
  30328. # https://github.com/PixarAnimationStudios/USD
  30329. # USD crate file
  30330. # https://github.com/PixarAnimationStudios/USD/blob/ebac0a8b6703f4fa1c27115f1f013bb9819662f4/pxr/usd/usd/crateFile.h#L441-L450
  30331. 0 string PXR-USDC USD crate
  30332. >8 byte x \b, version %x.
  30333. >9 byte x \b%x.
  30334. >10 byte x \b%x
  30335. !:ext usd
  30336. # USD ASCII file
  30337. 0 string #usda\040 USD ASCII
  30338. >6 string x \b, version %s
  30339. !:mime text/plain
  30340. !:ext usd
  30341. #------------------------------------------------------------------------------
  30342. # $File: uterus,v 1.3 2014/04/30 21:41:02 christos Exp $
  30343. # file(1) magic for uterus files
  30344. # http://freecode.com/projects/uterus
  30345. #
  30346. 0 string UTE+ uterus file
  30347. >4 string v \b, version
  30348. >5 byte x %c
  30349. >6 string . \b.
  30350. >7 byte x \b%c
  30351. >8 string \<\> \b, big-endian
  30352. >>16 belong >0 \b, slut size %u
  30353. >8 string \>\< \b, litte-endian
  30354. >>16 lelong >0 \b, slut size %u
  30355. >10 byte &8 \b, compressed
  30356. #------------------------------------------------------------------------------
  30357. # $File: uuencode,v 1.8 2019/12/14 20:40:26 christos Exp $
  30358. # uuencode: file(1) magic for ASCII-encoded files
  30359. #
  30360. # GRR: the first line of xxencoded files is identical to that in uuencoded
  30361. # files, but the first character in most subsequent lines is 'h' instead of
  30362. # 'M'. (xxencoding uses lowercase letters in place of most of uuencode's
  30363. # punctuation and survives BITNET gateways better.) If regular expressions
  30364. # were supported, this entry could possibly be split into two with
  30365. # "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
  30366. 0 search/1 begin\ uuencoded or xxencoded text
  30367. # btoa(1) is an alternative to uuencode that requires less space.
  30368. 0 search/1 xbtoa\ Begin btoa'd text
  30369. # ship(1) is another, much cooler alternative to uuencode.
  30370. # Greg Roelofs, newt@uchicago.edu
  30371. 0 search/1 $\012ship ship'd binary text
  30372. # bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
  30373. # Greg Roelofs, newt@uchicago.edu
  30374. 0 search/1 Decode\ the\ following\ with\ bdeco bencoded News text
  30375. # GRR: handle BASE64
  30376. #------------------------------------------------------------------------------
  30377. # $File: vacuum-cleaner,v 1.1 2015/11/14 13:38:35 christos Exp $
  30378. # vacuum cleaner magic by Thomas M. Ott (ThMO)
  30379. #
  30380. # navigation map for LG robot vacuum cleaner models VR62xx, VR64xx, VR63xx
  30381. # file: MAPDATAyyyymmddhhmmss_xxxxxx_cc.blk
  30382. # -> yyyymmdd: year, month, day of cleaning
  30383. # -> hhmmss: hour, minute, second of cleaning
  30384. # -> xxxxxx: 6 digits
  30385. # -> cc: cleaning runs counter
  30386. # size: 136044 bytes
  30387. #
  30388. # struct maphdr {
  30389. # int32_t map_cnt; /* 0: single map */
  30390. # int32_t min_ceil; /* 4: 100 mm == 10 cm == min. ceil */
  30391. # int32_t max_ceil; /* 8: 10000 mm == 100 m == max. ceil */
  30392. # int32_t max_climb; /* 12: 50 mm = 5 cm == max. height to climb */
  30393. # int32_t unknown; /* 16: 50000 ??? */
  30394. # int32_t cell_bytes; /* 20: # of bytes for cells per block */
  30395. # int32_t block_max; /* 24: 1000 == max. # of blocks */
  30396. # int32_t route_max; /* 28: 1000 == max. # of routes */
  30397. # int32_t used_blocks; /* 32: 5/45/33/... == # of block entries used! */
  30398. # int32_t cell_dim; /* 36: 10 == cell dimension */
  30399. # int32_t clock_tick; /* 40: 100 == clock ticks */
  30400. # #if 0
  30401. # struct { /* 44: 1000 blocks for 10x10 cells */
  30402. # int32_t yoffset;
  30403. # int32_t xoffset;
  30404. # int32_t posxy;
  30405. # int32_t timecode;
  30406. # } blocks[ 1000];
  30407. # char cells[ 1000* 100]; /* 16044: 1000 10x10 cells */
  30408. # int16_t routes[ 1000* 10]; /* 116044: 1000 10-routes */
  30409. # #endif
  30410. # };
  30411. 0 lelong =1
  30412. >4 lelong =100
  30413. >>8 lelong =10000
  30414. >>>12 lelong =50
  30415. >>>>16 lelong =50000
  30416. >>>>>20 lelong =100
  30417. >>>>>>24 lelong =1000
  30418. >>>>>>>28 lelong =1000
  30419. >>>>>>>>36 lelong =10
  30420. >>>>>>>>>40 lelong =100
  30421. >>>>>>>>>>32 lelong x LG robot VR6[234]xx %dm^2 navigation
  30422. >>>>>>>>>>136040 lelong =-1 reuse map data
  30423. >>>>>>>>>>136040 lelong =0 map data
  30424. >>>>>>>>>>136040 lelong >0 spurious map data
  30425. >>>>>>>>>>136040 lelong <-1 spurious map data
  30426. #------------------------------------------------------------------------------
  30427. # $File: varied.out,v 1.23 2014/04/30 21:41:02 christos Exp $
  30428. # varied.out: file(1) magic for various USG systems
  30429. #
  30430. # Herewith many of the object file formats used by USG systems.
  30431. # Most have been moved to files for a particular processor,
  30432. # and deleted if they duplicate other entries.
  30433. #
  30434. 0 short 0610 Perkin-Elmer executable
  30435. # AMD 29K
  30436. 0 beshort 0572 amd 29k coff noprebar executable
  30437. 0 beshort 01572 amd 29k coff prebar executable
  30438. 0 beshort 0160007 amd 29k coff archive
  30439. # Cray
  30440. 6 beshort 0407 unicos (cray) executable
  30441. # Ultrix 4.3
  30442. 596 string \130\337\377\377 Ultrix core file
  30443. >600 string >\0 from '%s'
  30444. # BeOS and MAcOS PEF executables
  30445. # From: hplus@zilker.net (Jon Watte)
  30446. 0 string Joy!peffpwpc header for PowerPC PEF executable
  30447. #
  30448. # ava assembler/linker Uros Platise <uros.platise@ijs.si>
  30449. 0 string avaobj AVR assembler object code
  30450. >7 string >\0 version '%s'
  30451. # gnu gmon magic From: Eugen Dedu <dedu@ese-metz.fr>
  30452. 0 string gmon GNU prof performance data
  30453. >4 long x - version %d
  30454. # From: Dave Pearson <davep@davep.org>
  30455. # Harbour <URL:http://harbour-project.org/> HRB files.
  30456. 0 string \xc0HRB Harbour HRB file
  30457. >4 leshort x version %d
  30458. # Harbour HBV files
  30459. 0 string \xc0HBV Harbour variable dump file
  30460. >4 leshort x version %d
  30461. # From: Alex Beregszaszi <alex@fsn.hu>
  30462. # 0 string exec BugOS executable
  30463. # 0 string pack BugOS archive
  30464. # From: Jason Spence <jspence@lightconsulting.com>
  30465. # Generated by the "examples" in STM's ST40 devkit, and derived code.
  30466. 0 lelong 0x13a9f17e ST40 component image format
  30467. >4 string >\0 \b, name '%s'
  30468. #------------------------------------------------------------------------------
  30469. # $File: varied.script,v 1.13 2019/10/11 14:35:29 christos Exp $
  30470. # varied.script: file(1) magic for various interpreter scripts
  30471. 0 string/t #!\ / a
  30472. >3 string >\0 %s script text executable
  30473. !:strength / 2
  30474. 0 string/b #!\ / a
  30475. >3 string >\0 %s script executable (binary data)
  30476. !:strength / 2
  30477. 0 string/t #!\t/ a
  30478. >3 string >\0 %s script text executable
  30479. !:strength / 2
  30480. 0 string/b #!\t/ a
  30481. >3 string >\0 %s script executable (binary data)
  30482. !:strength / 2
  30483. 0 string/t #!/ a
  30484. >2 string >\0 %s script text executable
  30485. !:strength / 2
  30486. 0 string/b #!/ a
  30487. >2 string >\0 %s script executable (binary data)
  30488. !:strength / 2
  30489. 0 string/t #!\ script text executable
  30490. >3 string >\0 for %s
  30491. !:strength / 2
  30492. 0 string/b #!\ script executable
  30493. >3 string >\0 for %s (binary data)
  30494. !:strength / 2
  30495. # using env
  30496. 0 string/t #!/usr/bin/env a
  30497. >15 string/t >\0 %s script text executable
  30498. !:strength / 10
  30499. 0 string/b #!/usr/bin/env a
  30500. >15 string/b >\0 %s script executable (binary data)
  30501. !:strength / 10
  30502. 0 string/t #!\ /usr/bin/env a
  30503. >16 string/t >\0 %s script text executable
  30504. !:strength / 10
  30505. 0 string/b #!\ /usr/bin/env a
  30506. >16 string/b >\0 %s script executable (binary data)
  30507. !:strength / 10
  30508. # From: arno <arenevier@fdn.fr>
  30509. # mozilla xpconnect typelib
  30510. # see https://www.mozilla.org/scriptable/typelib_file.html
  30511. 0 string XPCOM\nTypeLib\r\n\032 XPConnect Typelib
  30512. >0x10 byte x version %d
  30513. >>0x11 byte x \b.%d
  30514. #------------------------------------------------------------------------------
  30515. # $File: vax,v 1.10 2019/10/04 18:07:46 christos Exp $
  30516. # vax: file(1) magic for VAX executable/object and APL workspace
  30517. #
  30518. 0 lelong 0101557 VAX single precision APL workspace
  30519. 0 lelong 0101556 VAX double precision APL workspace
  30520. #
  30521. # VAX a.out (BSD; others collide with 386 and other 32-bit little-endian
  30522. # executables, and are handled in aout)
  30523. #
  30524. 0 lelong 0420 a.out VAX demand paged (first page unmapped) pure executable
  30525. >16 lelong >0 not stripped
  30526. #
  30527. # VAX COFF
  30528. #
  30529. # The `versions' were commented out, but have been un-commented out.
  30530. # (Was the problem just one of endianness?)
  30531. #
  30532. 0 leshort 0570
  30533. >2 uleshort <100 VAX COFF executable, sections %d
  30534. >>4 ledate x \b, created %s
  30535. >>12 lelong >0 \b, not stripped
  30536. >>22 leshort >0 \b, version %d
  30537. 0 leshort 0575
  30538. >2 uleshort <100 VAX COFF pure executable, sections %d
  30539. >>4 ledate x \b, created %s
  30540. >>12 lelong >0 \b, not stripped
  30541. >>22 leshort >0 \b, version %d
  30542. #------------------------------------------------------------------------------
  30543. # $File: vicar,v 1.4 2009/09/19 16:28:13 christos Exp $
  30544. # vicar: file(1) magic for VICAR files.
  30545. #
  30546. # From: Ossama Othman <othman@astrosun.tn.cornell.edu
  30547. # VICAR is JPL's in-house spacecraft image processing program
  30548. # VICAR image
  30549. 0 string LBLSIZE= VICAR image data
  30550. >32 string BYTE \b, 8 bits = VAX byte
  30551. >32 string HALF \b, 16 bits = VAX word = Fortran INTEGER*2
  30552. >32 string FULL \b, 32 bits = VAX longword = Fortran INTEGER*4
  30553. >32 string REAL \b, 32 bits = VAX longword = Fortran REAL*4
  30554. >32 string DOUB \b, 64 bits = VAX quadword = Fortran REAL*8
  30555. >32 string COMPLEX \b, 64 bits = VAX quadword = Fortran COMPLEX*8
  30556. # VICAR label file
  30557. 43 string SFDU_LABEL VICAR label file
  30558. #------------------------------------------------------------------------------
  30559. # $File: virtual,v 1.13 2021/02/23 00:51:10 christos Exp $
  30560. # From: James Nobis <quel@quelrod.net>
  30561. # Microsoft hard disk images for:
  30562. # Virtual Server
  30563. # Virtual PC
  30564. # VirtualBox
  30565. # URL: http://fileformats.archiveteam.org/wiki/VHD_(Virtual_Hard_Disk)
  30566. # Reference: https://download.microsoft.com/download/f/f/e/ffef50a5-07dd-4cf8-aaa3-442c0673a029/
  30567. # Virtual%20Hard%20Disk%20Format%20Spec_10_18_06.doc
  30568. 0 string connectix Microsoft Disk Image, Virtual Server or Virtual PC
  30569. # alternative shorter names
  30570. #0 string connectix Microsoft Virtual Hard Disk image
  30571. #0 string connectix Microsoft Virtual HD image
  30572. !:mime application/x-virtualbox-vhd
  30573. !:ext vhd
  30574. # Features is a bit field used to indicate specific feature support
  30575. #>8 ubelong !0x00000002 \b, Features 0x%x
  30576. # Reserved. This bit must always be set to 1.
  30577. #>8 ubelong &0x00000002 \b, Reserved 0x%x
  30578. # File Format Version for the current specification 0x00010000
  30579. #>12 ubelong !0x00010000 \b, Version 0x%8.8x
  30580. # Data Offset only found 0x200
  30581. #>16 ubequad !0x200 \b, Data Offset 0x%llx
  30582. #>16 ubequad x \b, at 0x%llx
  30583. # Dynamic Disk Header cookie like cxsparse
  30584. #>(16.Q) string x "%-.8s"
  30585. # This field contains a Unicode string (UTF-16) of the parent hard disk filename
  30586. #>(16.Q+64) ubequad x \b, parent name 0x%llx
  30587. # Creator Application
  30588. # vpc~Microsoft Virtual PC, vs~Microsoft Virtual Server, vbox~VirtualBox, d2v~disk2vhd
  30589. >28 string x \b, Creator %-4.4s
  30590. # Creator Version: 0x00010000~Virtual Server 2004, 0x00050000~Virtual PC 2004
  30591. # holds the major/minor version of the application that created the image
  30592. >32 ubeshort x %x
  30593. >34 ubeshort x \b.%x
  30594. #>32 ubelong x \b, Version 0x%8.8x
  30595. # Creator Host OS: 0x5769326B~Windows (Wi2k), 0x4D616320~Macintosh (Mac)
  30596. >36 ubelong x (
  30597. >>36 ubelong 0x5769326B \bW2k
  30598. >>36 ubelong 0x4D616320 \bMac
  30599. >>36 default x \b0x
  30600. >>>36 ubelong x \b%8.8x
  30601. # creation Time in seconds since 1 Jan 2000 UTC~946684800 sec. since Unix Epoch
  30602. >24 bedate+946684800 x \b) %s
  30603. # Original Size
  30604. #>40 ubequad x \b, o.-Size 0x%llx
  30605. # Current Size is same as original size, but change when disk is expanded
  30606. #>48 ubequad x \b, Size 0x%llx
  30607. >48 ubequad x \b, %llu bytes
  30608. # Disk Geometry: cylinder, heads, and sectors/track for hard disk
  30609. #>56 ubeshort x \b, Cylinder 0x%x
  30610. >56 ubeshort x \b, CHS %u
  30611. # Heads
  30612. #>58 ubyte x \b, Heads 0x%x
  30613. >58 ubyte x \b/%u
  30614. # Sectors per track
  30615. #>59 ubyte x \b, Sectors 0x%x
  30616. >59 ubyte x \b/%u
  30617. # Disk Type: 3~Dynamic hard disk
  30618. >60 ubelong !0x3 \b, type 0x%x
  30619. # Checksum
  30620. #>64 ubelong x \b, cksum 0x%x
  30621. # universally unique identifier (UUID) to associate a parent with its differencing image
  30622. #>68 ubequad x \b, id 0x%16.16llx
  30623. #>76 ubequad x \b-%16.16llx
  30624. # Saved State: 1~Saved State
  30625. >84 ubyte !0 \b, State 0x%x
  30626. # Reserved 427 bytes with nils
  30627. #>85 ubequad !0 \b, Reserved 0x%16.16llx
  30628. # From: Joerg Jenderek
  30629. # URL: https://msdn.microsoft.com/en-us/library/mt740058.aspx
  30630. # Reference: https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/
  30631. # MS-VHDX/[MS-VHDX].pdf
  30632. # Note: extends the VHD format with new capabilities, such as a 16TB maximum size
  30633. # TODO: find and display values like virtual size, disk size, cluster_size, etc
  30634. # display id in GUID format
  30635. #
  30636. # VHDX_FILE_IDENTIFIER signature 0x656C696678646876
  30637. 0 string vhdxfile
  30638. # VHDX_HEADER signature. 1 header is stored at offset 64KB and the other at 128KB
  30639. >0x10000 string head Microsoft Disk Image eXtended
  30640. #>0x20000 string head \b, 2nd header
  30641. #!:mime application/x-virtualbox-vhdx
  30642. !:ext vhdx
  30643. # Creator[256] like "QEMU v3.0.0", "Microsoft Windows 6.3.9600.18512"
  30644. >>8 lestring16 x \b, by %.256s
  30645. # The Checksum field is a CRC-32C hash over the entire 4 KB structure
  30646. #>>0x10004 ulelong x \b, CRC 0x%x
  30647. # SequenceNumber
  30648. >>0x10008 ulequad x \b, sequence 0x%llx
  30649. # FileWriteGuid
  30650. #>>0x10010 ubequad x \b, file id 0x%llx
  30651. #>>>0x10018 ubequad x \b-%llx
  30652. # DataWriteGuid
  30653. #>>0x10020 ubequad x \b, data id 0x%llx
  30654. #>>>0x10028 ubequad x \b-%llx
  30655. # LogGuid. If this field is zero, then the log is empty or has no valid entries
  30656. >>0x10030 ubequad >0 \b, log id 0x%llx
  30657. >>>0x10038 ubequad x \b-%llx
  30658. # LogVersion. If not 0 there is a log to replay
  30659. >>0x10040 uleshort >0 \b, LogVersion 0x%x
  30660. # Version. This field must be set to 1
  30661. >>0x10042 uleshort !1 \b, Version 0x%x
  30662. # LogLength must be multiples of 1 MB
  30663. >>0x10044 ulelong/1048576 >1 \b, LogLength %u MB
  30664. # LogOffset (normally 0x100000 when log direct after header); multiples of 1 MB
  30665. >>0x10048 ulequad !0x100000 \b, LogOffset 0x%llx
  30666. # Log Entry Signature must be 0x65676F6C~loge
  30667. >>(0x10048.q) ulelong !0x65676F6C \b, NO Log Signature
  30668. >>(0x10048.q) ulelong =0x65676F6C \b; LOG
  30669. # Log Entry Checksum
  30670. #>>>(0x10048.q+4) ulelong x \b, Log CRC 0x%x
  30671. # Log Entry Length must be a multiple of 4 KB
  30672. >>>(0x10048.q+8) ulelong/1024 >4 \b, EntryLength %u KB
  30673. # Log Entry Tail must be a multiple of 4 KB
  30674. #>>>(0x10048.q+12) ulelong x \b, Tail 0x%x
  30675. # Log Entry SequenceNumber
  30676. #>>>(0x10048.q+16) ulequad x \b, # 0x%llx
  30677. # Log Entry DescriptorCount may be zero. only 4 bytes in other docs instead 8
  30678. #>>>(0x10048.q+24) ulelong x \b, DescriptorCount 0x%llx
  30679. # Log Entry Reserved must be set to 0
  30680. >>>(0x10048.q+28) ulelong !0 \b, Reserved 0x%x
  30681. # Log Entry LogGuid
  30682. #>>>(0x10048.q+32) ubequad x \b, Log id 0x%llx
  30683. #>>>(0x10048.q+40) ubequad x \b-%llx
  30684. # Log Entry FlushedFileOffset should VHDX size when entry is written.
  30685. #>>>(0x10048.q+48) ulequad x \b, FlushedFileOffset %llu
  30686. # Log Entry LastFileOffset
  30687. #>>>(0x10048.q+56) ulequad x \b, LastFileOffset %llu
  30688. # filling
  30689. #>>>(0x10048.q+64) ulequad >0 \b, filling %llx
  30690. # Reserved[4016]
  30691. #>>0x10050 ulequad >0 \b, Reserved 0x%llx
  30692. # VHDX_REGION_TABLE_HEADER Signature 0x69676572~regi at offset 192 KB and 256 KB
  30693. >0x30000 ulelong !0x69676572 \b, 1st region INVALID
  30694. >0x30000 ulelong =0x69676572 \b; region
  30695. # region Checksum. CRC-32C hash over the entire 64-KB table
  30696. #>>0x30004 ulelong x \b, CRC 0x%x
  30697. # The EntryCount specifies number of valid entries; Found 2; This must be =< 2047.
  30698. >>0x30008 ulelong x \b, %u entries
  30699. # reserved must be zero
  30700. #>>0x3000C ulelong !0 \b, RESERVED 0x%x
  30701. # Region Table Entry starts with identifier for the object. often BAT id
  30702. >>0x30010 use vhdx-id
  30703. # FileOffset
  30704. >>0x30020 ulequad x \b, at 0x%llx
  30705. # Length. Specifies the length of the object within the file
  30706. #>>0x30028 ulelong x \b, Length 0x%x
  30707. # 1 means region entry is required. if region not recognized, then REFUSE to load VHDX
  30708. >>0x3002C ulelong x \b, Required %u
  30709. # 2nd region entry often metadata id
  30710. >>0x30030 use vhdx-id
  30711. # 2nd entry FileOffset
  30712. >>0x30040 ulequad x \b, at 0x%llx
  30713. # 1 means region entry is required. if region not recognized, then REFUSE to load VHDX
  30714. >>0x3004C ulelong x \b, Required %u
  30715. # 2nd region
  30716. >>0x40000 ulelong !0x69676572 \b, 2nd region INVALID
  30717. # check in vhdx images for known id and show names instead hexadecimal
  30718. 0 name vhdx-id
  30719. # https://www.windowstricks.in/online-windows-guid-converter
  30720. # 2DC27766-F623-4200-9D64-115E9BFD4A08 BAT GUID
  30721. # 6677C22D23F600429D64115E9BFD4A08 BAT ID
  30722. >0 ubequad =0x6677C22D23F60042
  30723. >>8 ubequad =0x9D64115E9BFD4A08 \b, id BAT
  30724. # no BAT id
  30725. >>8 default x
  30726. >>>0 use vhdx-id-hex
  30727. # 8B7CA206-4790-4B9A-B8FE-575F050F886E Metadata region GUID
  30728. # 06A27C8B90479A4BB8FE575F050F886E Metadata region ID
  30729. >0 ubequad =0x06A27C8B90479A4B
  30730. >>8 ubequad =0xB8FE575F050F886E \b, id Metadata
  30731. # no Metadata id
  30732. >>8 default x
  30733. >>>0 use vhdx-id-hex
  30734. # 2FA54224-CD1B-4876-B211-5DBED83BF4B8 Virtual Disk Size GUID
  30735. # 2442A52F1BCD7648B2115DBED83BF4B8 Virtual Disk Size ID
  30736. # value "virtual size" can be verified by command `qemu-img info `
  30737. >0 ubequad =0x2442A52F1BCD7648
  30738. >>8 ubequad =0xB2115DBED83BF4B8 \b, id vsize
  30739. # no Virtual Disk Size ID
  30740. >>8 default x
  30741. >>>0 use vhdx-id-hex
  30742. # other ids
  30743. >0 default x
  30744. >>0 use vhdx-id-hex
  30745. # in vhdx images show id as hexadecimal
  30746. 0 name vhdx-id-hex
  30747. >0 ubequad x \b, ID 0x%16.16llx
  30748. >8 ubequad x \b-%16.16llx
  30749. #
  30750. # libvirt
  30751. # From: Philipp Hahn <hahn@univention.de>
  30752. 0 string LibvirtQemudSave Libvirt QEMU Suspend Image
  30753. >0x10 lelong x \b, version %u
  30754. >0x14 lelong x \b, XML length %u
  30755. >0x18 lelong 1 \b, running
  30756. >0x1c lelong 1 \b, compressed
  30757. 0 string LibvirtQemudPart Libvirt QEMU partial Suspend Image
  30758. # From: Alex Beregszaszi <alex@fsn.hu>
  30759. 0 string/b COWD VMWare3
  30760. >4 byte 3 disk image
  30761. >>32 lelong x (%d/
  30762. >>36 lelong x \b%d/
  30763. >>40 lelong x \b%d)
  30764. >4 byte 2 undoable disk image
  30765. >>32 string >\0 (%s)
  30766. 0 string/b VMDK VMware4 disk image
  30767. 0 string/b KDMV VMware4 disk image
  30768. #--------------------------------------------------------------------
  30769. # Qemu Emulator Images
  30770. # Lines written by Friedrich Schwittay (f.schwittay@yousable.de)
  30771. # Updated by Adam Buchbinder (adam.buchbinder@gmail.com)
  30772. # Made by reading sources, reading documentation, and doing trial and error
  30773. # on existing QCOW files
  30774. 0 string/b QFI\xFB
  30775. # Uncomment the following line to display Magic (only used for debugging
  30776. # this magic number)
  30777. #>0 string/b x , Magic: %s
  30778. # There are currently 2 Versions: "1" and "2".
  30779. # https://www.gnome.org/~markmc/qcow-image-format-version-1.html
  30780. >4 belong !1 QEMU QCOW2 Image
  30781. >4 belong 1 QEMU QCOW Image (v1)
  30782. # Using the existence of the Backing File Offset to determine whether
  30783. # to read Backing File Information
  30784. >>12 belong >0 \b, has backing file (
  30785. # Note that this isn't a null-terminated string; the length is actually
  30786. # (16.L). Assuming a null-terminated string happens to work usually, but it
  30787. # may spew junk until it reaches a \0 in some cases.
  30788. >>>(12.L) string >\0 \bpath %s
  30789. # Modification time of the Backing File
  30790. # Really useful if you want to know if your backing
  30791. # file is still usable together with this image
  30792. >>>>20 bedate >0 \b, mtime %s)
  30793. >>>>20 default x \b)
  30794. # Size is stored in bytes in a big-endian u64.
  30795. >>24 bequad x \b, %lld bytes
  30796. # 1 for AES encryption, 0 for none.
  30797. >>36 belong 1 \b, AES-encrypted
  30798. # https://www.gnome.org/~markmc/qcow-image-format.html
  30799. >4 belong 2 (v2)
  30800. # Using the existence of the Backing File Offset to determine whether
  30801. # to read Backing File Information
  30802. >>8 bequad >0 \b, has backing file
  30803. # Note that this isn't a null-terminated string; the length is actually
  30804. # (16.L). Assuming a null-terminated string happens to work usually, but it
  30805. # may spew junk until it reaches a \0 in some cases. Also, since there's no
  30806. # .Q modifier, we just use the bottom four bytes as an offset. Note that if
  30807. # the file is over 4G, and the backing file path is stored after the first 4G,
  30808. # the wrong filename will be printed. (This should be (8.Q), when that syntax
  30809. # is introduced.)
  30810. >>>(12.L) string >\0 (path %s)
  30811. >>24 bequad x \b, %lld bytes
  30812. >>32 belong 1 \b, AES-encrypted
  30813. >4 belong 3 (v3)
  30814. # Using the existence of the Backing File Offset to determine whether
  30815. # to read Backing File Information
  30816. >>8 bequad >0 \b, has backing file
  30817. # Note that this isn't a null-terminated string; the length is actually
  30818. # (16.L). Assuming a null-terminated string happens to work usually, but it
  30819. # may spew junk until it reaches a \0 in some cases. Also, since there's no
  30820. # .Q modifier, we just use the bottom four bytes as an offset. Note that if
  30821. # the file is over 4G, and the backing file path is stored after the first 4G,
  30822. # the wrong filename will be printed. (This should be (8.Q), when that syntax
  30823. # is introduced.)
  30824. >>>(12.L) string >\0 (path %s)
  30825. >>24 bequad x \b, %lld bytes
  30826. >>32 belong 1 \b, AES-encrypted
  30827. >4 default x (unknown version)
  30828. 0 string/b QEVM QEMU suspend to disk image
  30829. # QEMU QED Image
  30830. # https://wiki.qemu.org/Features/QED/Specification
  30831. 0 string/b QED\0 QEMU QED Image
  30832. # VDI Image
  30833. # Sun xVM VirtualBox Disk Image
  30834. # From: Richard W.M. Jones <rich@annexia.org>
  30835. # VirtualBox Disk Image
  30836. 0x40 ulelong 0xbeda107f VirtualBox Disk Image
  30837. >0x44 uleshort >0 \b, major %u
  30838. >0x46 uleshort >0 \b, minor %u
  30839. >0 string >\0 (%s)
  30840. >368 lequad x \b, %lld bytes
  30841. 0 string/b Bochs\ Virtual\ HD\ Image Bochs disk image,
  30842. >32 string x type %s,
  30843. >48 string x subtype %s
  30844. 0 lelong 0x02468ace Bochs Sparse disk image
  30845. #------------------------------------------------------------------------------
  30846. # $File: virtutech,v 1.4 2009/09/19 16:28:13 christos Exp $
  30847. # Virtutech Compressed Random Access File Format
  30848. #
  30849. # From <gustav@virtutech.com>
  30850. 0 string \211\277\036\203 Virtutech CRAFF
  30851. >4 belong x v%d
  30852. >20 belong 0 uncompressed
  30853. >20 belong 1 bzipp2ed
  30854. >20 belong 2 gzipped
  30855. >24 belong 0 not clean
  30856. #------------------------------------------------------------------------------
  30857. # $File: visx,v 1.5 2009/09/19 16:28:13 christos Exp $
  30858. # visx: file(1) magic for Visx format files
  30859. #
  30860. 0 short 0x5555 VISX image file
  30861. >2 byte 0 (zero)
  30862. >2 byte 1 (unsigned char)
  30863. >2 byte 2 (short integer)
  30864. >2 byte 3 (float 32)
  30865. >2 byte 4 (float 64)
  30866. >2 byte 5 (signed char)
  30867. >2 byte 6 (bit-plane)
  30868. >2 byte 7 (classes)
  30869. >2 byte 8 (statistics)
  30870. >2 byte 10 (ascii text)
  30871. >2 byte 15 (image segments)
  30872. >2 byte 100 (image set)
  30873. >2 byte 101 (unsigned char vector)
  30874. >2 byte 102 (short integer vector)
  30875. >2 byte 103 (float 32 vector)
  30876. >2 byte 104 (float 64 vector)
  30877. >2 byte 105 (signed char vector)
  30878. >2 byte 106 (bit plane vector)
  30879. >2 byte 121 (feature vector)
  30880. >2 byte 122 (feature vector library)
  30881. >2 byte 124 (chain code)
  30882. >2 byte 126 (bit vector)
  30883. >2 byte 130 (graph)
  30884. >2 byte 131 (adjacency graph)
  30885. >2 byte 132 (adjacency graph library)
  30886. >2 string .VISIX (ascii text)
  30887. #------------------------------------------------------------------------------
  30888. # $File: vms,v 1.10 2017/03/17 21:35:28 christos Exp $
  30889. # vms: file(1) magic for VMS executables (experimental)
  30890. #
  30891. # VMS .exe formats, both VAX and AXP (Greg Roelofs, newt@uchicago.edu)
  30892. # GRR 950122: I'm just guessing on these, based on inspection of the headers
  30893. # of three executables each for Alpha and VAX architectures. The VAX files
  30894. # all had headers similar to this:
  30895. #
  30896. # 00000 b0 00 30 00 44 00 60 00 00 00 00 00 30 32 30 35 ..0.D.`.....0205
  30897. # 00010 01 01 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 ................
  30898. #
  30899. 0 string \xb0\0\x30\0 VMS VAX executable
  30900. >44032 string PK\003\004 \b, Info-ZIP SFX archive v5.12 w/decryption
  30901. #
  30902. # The AXP files all looked like this, except that the byte at offset 0x22
  30903. # was 06 in some of them and 07 in others:
  30904. #
  30905. # 00000 03 00 00 00 00 00 00 00 ec 02 00 00 10 01 00 00 ................
  30906. # 00010 68 00 00 00 98 00 00 00 b8 00 00 00 00 00 00 00 h...............
  30907. # 00020 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  30908. # 00030 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
  30909. # 00040 00 00 00 00 ff ff ff ff ff ff ff ff 02 00 00 00 ................
  30910. #
  30911. # GRR this test is still too general as it catches example adressen.dbt
  30912. 0 belong 0x03000000
  30913. >8 ubelong 0xec020000 VMS Alpha executable
  30914. >>75264 string PK\003\004 \b, Info-ZIP SFX archive v5.12 w/decryption
  30915. #------------------------------------------------------------------------------
  30916. # $File: vmware,v 1.8 2017/03/17 21:35:28 christos Exp $
  30917. # VMware specific files (deducted from version 1.1 and log file entries)
  30918. # Anthon van der Neut (anthon@mnt.org)
  30919. 0 belong 0x4d52564e VMware nvram
  30920. #------------------------------------------------------------------------------
  30921. # $File: vorbis,v 1.26 2020/08/22 18:30:55 christos Exp $
  30922. # vorbis: file(1) magic for Ogg/Vorbis files
  30923. #
  30924. # From Felix von Leitner <leitner@fefe.de>
  30925. # Extended by Beni Cherniavsky <cben@crosswinds.net>
  30926. # Further extended by Greg Wooledge <greg@wooledge.org>
  30927. #
  30928. # Most (everything but the number of channels and bitrate) is commented
  30929. # out with `##' as it's not interesting to the average user. The most
  30930. # probable things advanced users would want to uncomment are probably
  30931. # the number of comments and the encoder version.
  30932. #
  30933. # FIXME: The first match has been made a search, so that it can skip
  30934. # over prepended ID3 tags. This will work for MIME type detection, but
  30935. # won't work for detecting other properties of the file (they all need
  30936. # to be made relative to the search). In any case, if the file has ID3
  30937. # tags, the ID3 information will be printed, not the Ogg information,
  30938. # so until that's fixed, this doesn't matter.
  30939. # FIXME[2]: Disable the above for now, since search assumes text mode.
  30940. #
  30941. # --- Ogg Framing ---
  30942. #0 search/1000 OggS Ogg data
  30943. 0 string OggS Ogg data
  30944. >4 byte !0 UNKNOWN REVISION %u
  30945. ##>4 byte 0 revision 0
  30946. >4 byte 0
  30947. ##>>14 lelong x (Serial %lX)
  30948. # non-Vorbis content: FLAC (Free Lossless Audio Codec, http://flac.sourceforge.net)
  30949. >>28 string \x7fFLAC \b, FLAC audio
  30950. # non-Vorbis content: Theora
  30951. !:mime audio/ogg
  30952. >>28 string \x80theora \b, Theora video
  30953. !:mime video/ogg
  30954. # non-Vorbis content: Kate
  30955. >>28 string \x80kate\0\0\0\0 \b, Kate (Karaoke and Text)
  30956. !:mime application/ogg
  30957. >>>37 ubyte x v%u
  30958. >>>38 ubyte x \b.%u,
  30959. >>>40 byte 0 utf8 encoding,
  30960. >>>40 byte !0 unknown character encoding,
  30961. >>>60 string >\0 language %s,
  30962. >>>60 string \0 no language set,
  30963. >>>76 string >\0 category %s
  30964. >>>76 string \0 no category set
  30965. # non-Vorbis content: Skeleton
  30966. >>28 string fishead\0 \b, Skeleton
  30967. !:mime video/ogg
  30968. >>>36 leshort x v%u
  30969. >>>40 leshort x \b.%u
  30970. # non-Vorbis content: Speex
  30971. >>28 string Speex\ \ \ \b, Speex audio
  30972. !:mime audio/ogg
  30973. # non-Vorbis content: OGM
  30974. >>28 string \x01video\0\0\0 \b, OGM video
  30975. !:mime video/ogg
  30976. >>>37 string/c div3 (DivX 3)
  30977. >>>37 string/c divx (DivX 4)
  30978. >>>37 string/c dx50 (DivX 5)
  30979. >>>37 string/c xvid (XviD)
  30980. # --- First vorbis packet - general header ---
  30981. >>28 string \x01vorbis \b, Vorbis audio,
  30982. !:mime audio/ogg
  30983. >>>35 lelong !0 UNKNOWN VERSION %u,
  30984. ##>>>35 lelong 0 version 0,
  30985. >>>35 lelong 0
  30986. >>>>39 ubyte 1 mono,
  30987. >>>>39 ubyte 2 stereo,
  30988. >>>>39 ubyte >2 %u channels,
  30989. >>>>40 lelong x %u Hz
  30990. # Minimal, nominal and maximal bitrates specified when encoding
  30991. >>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \b,
  30992. # The above tests if at least one of these is specified:
  30993. >>>>>52 lelong !-1
  30994. # Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
  30995. # instead of -1.
  30996. # Vorbis 1.0 uses 0 instead of -1.
  30997. >>>>>>52 lelong !0
  30998. >>>>>>>52 lelong !-1000
  30999. >>>>>>>>52 lelong x <%u
  31000. >>>>>48 lelong !-1
  31001. >>>>>>48 lelong x ~%u
  31002. >>>>>44 lelong !-1
  31003. >>>>>>44 lelong !-1000
  31004. >>>>>>>44 lelong !0
  31005. >>>>>>>>44 lelong x >%u
  31006. >>>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff bps
  31007. # -- Second vorbis header packet - the comments
  31008. # A kludge to read the vendor string. It's a counted string, not a
  31009. # zero-terminated one, so file(1) can't read it in a generic way.
  31010. # libVorbis is the only one existing currently, so I detect specifically
  31011. # it. The interesting value is the cvs date (8 digits decimal).
  31012. # Post-RC1 Ogg files have the second header packet (and thus the version)
  31013. # in a different place, so we must use an indirect offset.
  31014. >>>(84.b+85) string \x03vorbis
  31015. >>>>(84.b+96) string/c Xiphophorus\ libVorbis\ I \b, created by: Xiphophorus libVorbis I
  31016. >>>>>(84.b+120) string >00000000
  31017. # Map to beta version numbers:
  31018. >>>>>>(84.b+120) string <20000508 (<beta1, prepublic)
  31019. >>>>>>(84.b+120) string 20000508 (1.0 beta 1 or beta 2)
  31020. >>>>>>(84.b+120) string >20000508
  31021. >>>>>>>(84.b+120) string <20001031 (beta2-3)
  31022. >>>>>>(84.b+120) string 20001031 (1.0 beta 3)
  31023. >>>>>>(84.b+120) string >20001031
  31024. >>>>>>>(84.b+120) string <20010225 (beta3-4)
  31025. >>>>>>(84.b+120) string 20010225 (1.0 beta 4)
  31026. >>>>>>(84.b+120) string >20010225
  31027. >>>>>>>(84.b+120) string <20010615 (beta4-RC1)
  31028. >>>>>>(84.b+120) string 20010615 (1.0 RC1)
  31029. >>>>>>(84.b+120) string 20010813 (1.0 RC2)
  31030. >>>>>>(84.b+120) string 20010816 (RC2 - Garf tuned v1)
  31031. >>>>>>(84.b+120) string 20011014 (RC2 - Garf tuned v2)
  31032. >>>>>>(84.b+120) string 20011217 (1.0 RC3)
  31033. >>>>>>(84.b+120) string 20011231 (1.0 RC3)
  31034. # Some pre-1.0 CVS snapshots still had "Xiphphorus"...
  31035. >>>>>>(84.b+120) string >20011231 (pre-1.0 CVS)
  31036. # For the 1.0 release, Xiphophorus is replaced by Xiph.Org
  31037. >>>>(84.b+96) string/c Xiph.Org\ libVorbis\ I \b, created by: Xiph.Org libVorbis I
  31038. >>>>>(84.b+117) string >00000000
  31039. >>>>>>(84.b+117) string <20020717 (pre-1.0 CVS)
  31040. >>>>>>(84.b+117) string 20020717 (1.0)
  31041. >>>>>>(84.b+117) string 20030909 (1.0.1)
  31042. >>>>>>(84.b+117) string 20040629 (1.1.0 RC1)
  31043. >>>>>>(84.b+117) string 20050304 (1.1.2)
  31044. >>>>>>(84.b+117) string 20070622 (1.2.0)
  31045. >>>>>>(84.b+117) string 20090624 (1.2.2)
  31046. >>>>>>(84.b+117) string 20090709 (1.2.3)
  31047. >>>>>>(84.b+117) string 20100325 (1.3.1)
  31048. >>>>>>(84.b+117) string 20101101 (1.3.2)
  31049. >>>>>>(84.b+117) string 20120203 (1.3.3)
  31050. >>>>>>(84.b+117) string 20140122 (1.3.4)
  31051. >>>>>>(84.b+117) string 20150105 (1.3.5)
  31052. # non-Vorbis content: Opus https://tools.ietf.org/html/rfc7845#section-5
  31053. >>28 string OpusHead \b, Opus audio,
  31054. !:mime audio/ogg
  31055. >>>36 ubyte >0x0F UNKNOWN VERSION %u,
  31056. >>>36 ubyte&0x0F !0 version 0.%u,
  31057. >>>>46 ubyte >1
  31058. >>>>>46 ubyte !255 unknown channel mapping family %u,
  31059. >>>>>37 ubyte x %u channels
  31060. >>>>46 ubyte 0
  31061. >>>>>37 ubyte 1 mono
  31062. >>>>>37 ubyte 2 stereo
  31063. >>>>46 ubyte 1
  31064. >>>>>37 ubyte 1 mono
  31065. >>>>>37 ubyte 2 stereo
  31066. >>>>>37 ubyte 3 linear surround
  31067. >>>>>37 ubyte 4 quadraphonic
  31068. >>>>>37 ubyte 5 5.0 surround
  31069. >>>>>37 ubyte 6 5.1 surround
  31070. >>>>>37 ubyte 7 6.1 surround
  31071. >>>>>37 ubyte 8 7.1 surround
  31072. >>>>40 lelong !0 \b, %u Hz (Input Sample Rate)
  31073. #------------------------------------------------------------------------------
  31074. # $File: vxl,v 1.4 2009/09/19 16:28:13 christos Exp $
  31075. # VXL: file(1) magic for VXL binary IO data files
  31076. #
  31077. # from Ian Scott <scottim@sf.net>
  31078. #
  31079. # VXL is a collection of C++ libraries for Computer Vision.
  31080. # See the vsl chapter in the VXL Book for more info
  31081. # http://www.isbe.man.ac.uk/public_vxl_doc/books/vxl/book.html
  31082. # http:/vxl.sf.net
  31083. 2 lelong 0x472b2c4e VXL data file,
  31084. >0 leshort >0 schema version no %d
  31085. #------------------------------------------------------------------------------
  31086. # $File: warc,v 1.4 2019/04/19 00:42:27 christos Exp $
  31087. # warc: file(1) magic for WARC files
  31088. 0 string WARC/ WARC Archive
  31089. >5 string x version %.4s
  31090. !:mime application/warc
  31091. #------------------------------------------------------------------------------
  31092. # Arc File Format from Internet Archive
  31093. # see https://www.archive.org/web/researcher/ArcFileFormat.php
  31094. 0 string filedesc:// Internet Archive File
  31095. !:mime application/x-ia-arc
  31096. >11 search/256 \x0A \b
  31097. >>&0 ubyte >0 \b version %c
  31098. #------------------------------------------------------------------------------
  31099. # weak: file(1) magic for very weak magic entries, disabled by default
  31100. #
  31101. # These entries are so weak that they might interfere identification of
  31102. # other formats. Example include:
  31103. # - Only identify for 1 or 2 bytes
  31104. # - Match against very wide range of values
  31105. # - Match against generic word in some spoken languages (e.g. English)
  31106. # Summary: Computer Graphics Metafile
  31107. # Extension: .cgm
  31108. #0 beshort&0xffe0 0x0020 binary Computer Graphics Metafile
  31109. #0 beshort 0x3020 character Computer Graphics Metafile
  31110. #0 string =!! Bennet Yee's "face" format
  31111. #------------------------------------------------------------------------------
  31112. # $File: web,v 1.1 2020/05/17 19:14:28 christos Exp $
  31113. # http://www.rdfhdt.org/
  31114. # From Christoph Biedl
  31115. # http://www.rdfhdt.org/hdt-internals/
  31116. # https://github.com/rdfhdt/hdt-cpp
  31117. 0 string $HDT\x01 HDT file (binary compressed indexed RDF triples) type 1
  31118. !:mime application/vnd.hdt
  31119. !:ext hdt
  31120. #------------------------------------------------------------------------------
  31121. # $File: webassembly,v 1.3 2019/04/19 00:42:27 christos Exp $
  31122. # webassembly: file(1) magic for WebAssembly modules
  31123. #
  31124. # WebAssembly is a virtual architecture developed by a W3C Community
  31125. # Group at https://webassembly.org/. The file extension is .wasm, and
  31126. # the MIME type is application/wasm.
  31127. #
  31128. # https://webassembly.org/docs/binary-encoding/ is the main
  31129. # document describing the binary format.
  31130. # From: Pip Cet <pipcet@gmail.com> and Joel Martin
  31131. 0 string \0asm WebAssembly (wasm) binary module
  31132. >4 lelong =1 version %#x (MVP)
  31133. >4 lelong >1 version %#x
  31134. #------------------------------------------------------------------------------
  31135. # $File: windows,v 1.36 2021/02/05 22:29:07 christos Exp $
  31136. # windows: file(1) magic for Microsoft Windows
  31137. #
  31138. # This file is mainly reserved for files where programs
  31139. # using them are run almost always on MS Windows 3.x or
  31140. # above, or files only used exclusively in Windows OS,
  31141. # where there is no better category to allocate for.
  31142. # For example, even though WinZIP almost run on Windows
  31143. # only, it is better to treat them as "archive" instead.
  31144. # For format usable in DOS, such as generic executable
  31145. # format, please specify under "msdos" file.
  31146. #
  31147. # Summary: Outlook Express DBX file
  31148. # Extension: .dbx
  31149. # Created by: Christophe Monniez
  31150. 0 string \xCF\xAD\x12\xFE MS Outlook Express DBX file
  31151. >4 byte =0xC5 \b, message database
  31152. >4 byte =0xC6 \b, folder database
  31153. >4 byte =0xC7 \b, account information
  31154. >4 byte =0x30 \b, offline database
  31155. # Summary: Windows crash dump
  31156. # Extension: .dmp
  31157. # Created by: Andreas Schuster (https://computer.forensikblog.de/)
  31158. # Reference (1): https://computer.forensikblog.de/en/2008/02/64bit_magic.html
  31159. # Modified by (1): Abel Cheung (Avoid match with first 4 bytes only)
  31160. 0 string PAGE
  31161. >4 string DUMP MS Windows 32bit crash dump
  31162. >>0x05c byte 0 \b, no PAE
  31163. >>0x05c byte 1 \b, PAE
  31164. >>0xf88 lelong 1 \b, full dump
  31165. >>0xf88 lelong 2 \b, kernel dump
  31166. >>0xf88 lelong 3 \b, small dump
  31167. >>0x068 lelong x \b, %d pages
  31168. >4 string DU64 MS Windows 64bit crash dump
  31169. >>0xf98 lelong 1 \b, full dump
  31170. >>0xf98 lelong 2 \b, kernel dump
  31171. >>0xf98 lelong 3 \b, small dump
  31172. >>0x090 lequad x \b, %lld pages
  31173. # Summary: Vista Event Log
  31174. # Extension: .evtx
  31175. # Created by: Andreas Schuster (https://computer.forensikblog.de/)
  31176. # Reference (1): https://computer.forensikblog.de/en/2007/05/some_magic.html
  31177. 0 string ElfFile\0 MS Windows Vista Event Log
  31178. >0x2a leshort x \b, %d chunks
  31179. >>0x10 lelong x \b (no. %d in use)
  31180. >0x18 lelong >1 \b, next record no. %d
  31181. >0x18 lelong =1 \b, empty
  31182. >0x78 lelong &1 \b, DIRTY
  31183. >0x78 lelong &2 \b, FULL
  31184. # Summary: Windows System Deployment Image
  31185. # Created by: Joerg Jenderek
  31186. # URL: http://en.wikipedia.org/wiki/System_Deployment_Image
  31187. # Reference: http://skolk.livejournal.com/1320.html
  31188. 0 string $SDI
  31189. >4 string 0001 System Deployment Image
  31190. !:mime application/x-ms-sdi
  31191. #!:mime application/octet-stream
  31192. # \Boot\boot.sdi
  31193. !:ext sdi
  31194. # MDBtype: 0~Unspecified 1~RAM 2~ROM
  31195. >>8 ulequad !0 \b, MDBtype 0x%llx
  31196. # BootCodeOffset
  31197. >>16 ulequad !0 \b, BootCodeOffset 0x%llx
  31198. # BootCodeSize
  31199. >>24 ulequad !0 \b, BootCodeSize 0x%llx
  31200. # VendorID
  31201. >>32 ulequad !0 \b, VendorID 0x%llx
  31202. # DeviceID
  31203. >>40 ulequad !0 \b, DeviceID 0x%llx
  31204. # DeviceModel
  31205. >>48 ulequad !0 \b, DeviceModel 0x%llx
  31206. >>>56 ulequad !0 \b%llx
  31207. # DeviceRole
  31208. >>64 ulequad !0 \b, DeviceRole 0x%llx
  31209. # Reserved1; reserved fields and gaps between BLOBs are padded with \0
  31210. #>>72 ulequad !0 \b, Reserved1 0x%llx
  31211. # RuntimeGUID
  31212. >>80 ulequad !0 \b, RuntimeGUID 0x%llx
  31213. >>>88 ulequad !0 \b%llx
  31214. # RuntimeOEMrev
  31215. >>96 ulequad !0 \b, RuntimeOEMrev 0x%llx
  31216. # Reserved2
  31217. #>>104 ulequad !0 \b, Reserved2 0x%llx
  31218. # BLOB alignment value in pages, as specified in sdimgr /pack: 1~4K 2~8k
  31219. >>112 ulequad !0 \b, PageAlignment %llu
  31220. # Reserved3[48]
  31221. #>>120 ulequad !0 \b, Reserved3 0x%llx
  31222. # SDI checksum 39h
  31223. >>0x1f8 ulequad x \b, checksum 0x%llx
  31224. # BLOBtype[8] \0-padded: PART, WIM , BOOT, LOAD, DISK
  31225. >>0x400 string >\0 \b, type %-3.8s
  31226. # 0~non-filesystem 7~NTFS 6~BIGFAT
  31227. >>>0x420 ulequad !0 (0x%llx)
  31228. # ATTRibutes
  31229. >>>0x408 ulequad !0 0x%llx attributes
  31230. # Offset
  31231. >>>0x410 ulequad x at 0x%llx
  31232. # print 1 space after size and then handles NTFS boot sector by ./filesystems
  31233. >>>0x418 ulequad >0 %llu bytes
  31234. >>>>(0x410.l) indirect x
  31235. # 2nd BLOB: WIM
  31236. >>0x440 string >\0 \b, type %-3.8s
  31237. >>>0x428 ulequad !0 (0x%llx)
  31238. # ATTRibutes
  31239. >>>0x448 ulequad !0 0x%llx attributes
  31240. # Offset
  31241. >>>0x450 ulequad x at 0x%llx
  31242. >>>0x458 ulequad >0 %llu bytes
  31243. >>>>(0x450.l) indirect x
  31244. # 3rd BLOB
  31245. >>0x480 string >\0 \b, type %-3.8s
  31246. # Summary: Windows boot status log BOOTSTAT.DAT
  31247. # From: Joerg Jenderek
  31248. # Reference: https://www.geoffchappell.com/notes/windows/boot/bsd.htm
  31249. # Note: mainly refers to older Windows Vista, sometimes
  31250. # BOOTSTAT.DAT only contains nulls or invalid data
  31251. # checking for valid version below 5
  31252. 0 ulelong <5
  31253. # skip many ISO images by checking for valid 64 KiB file size
  31254. >8 ulelong =0x00010000
  31255. >>0 use bootstat-dat
  31256. # display information of BOOTSTAT.DAT
  31257. 0 name bootstat-dat
  31258. >0 ulelong x Windows boot log
  31259. #!:mime application/octet-stream
  31260. !:mime application/x-ms-dat
  31261. # BOOTSTAT.DAT in BOOT subdirectory
  31262. !:ext dat
  31263. # apparently a version number: 2 for older like Vista, 3, 4 Windows 10
  31264. >0 ulelong >2 \b, version %u
  31265. # apparently the size of the header: often 10h in older Windows, 14h, 18h
  31266. >4 ulelong !0x10 \b, header size 0x%x
  31267. #>4 ulelong !0x10 \b, header size %u
  31268. # apparently the size of the file: always 0x00010000~64KiB
  31269. # the file is acceptable to BOOTMGR only if it is exactly 64 KiB
  31270. >8 ulelong !0x00010000 \b, file size 0x%x
  31271. # size of valid data, in bytes: C8h 50h 172h 5D5Ch
  31272. >0xc ulelong x \b, 0x%x valid bytes
  31273. # skip header and jump to first bootstat entry and display information
  31274. >(0x4.l-1) ubyte x
  31275. >>&0 use bootstat-entry
  31276. # jump to first entry again because pointer are bad after "use"
  31277. >(0x4.l-1) ubyte x
  31278. # by 1st entry size jump to 2nd entry and display information
  31279. >>&(&0x18.l-1) ubyte x
  31280. >>>&0 use bootstat-entry
  31281. # jump to possible 3rd boot entry and display information
  31282. # >(0x4.l-1) ubyte x
  31283. # >>&(&0x18.l-1) ubyte x
  31284. # >>>&(&0x18.l-1) ubyte x
  31285. # >>>>&0 use bootstat-entry
  31286. # display BOOTSTAT.DAT entry
  31287. 0 name bootstat-entry
  31288. #>0x00 ubequad x \b, ENTRY %16.16llx
  31289. # size of entry, in bytes: 40h(init) 78h(launced) 9Ch
  31290. #>0x18 ulelong x \b; entry size %u
  31291. >0x18 ulelong x \b; entry size 0x%x
  31292. # time stamp, in seconds
  31293. >0x00 ulelong x \b, 0x%x seconds
  31294. # always zero, significance unknown
  31295. >0x04 ulelong !0 \b, not null %u
  31296. # GUID of event source; but empty if event source is BOOTMGR
  31297. >0x08 ubequad !0 \b, GUID 0x%16.16llx
  31298. >>0x10 ubequad x \b%16.16llx
  31299. # severity code: 1~informational 3~errors
  31300. >0x1C ulelong !1 \b, severity 0x%x
  31301. # apparently a version number: 2
  31302. >0x20 ulelong !2 \b, version %u
  31303. # event identifier 1~log file initialised 11h~boot application launched
  31304. #>0x24 ulelong x \b, event 0x%x
  31305. >0x24 ulelong !1
  31306. >>0x24 ulelong !0x11 \b, event 0x%x
  31307. # entry data; size depends on event identifier
  31308. #>0x28 ubequad x \b, data 0x%16.16llx
  31309. >0x24 ulelong =0x1 \b, Init
  31310. # always 0, significance unknown
  31311. >>0x34 uleshort !0 \b, not null %u
  31312. # always 7, significance unknown
  31313. >>0x36 uleshort !7 \b, not seven %u
  31314. # year
  31315. >>0x28 uleshort x %u
  31316. # month
  31317. >>0x2A uleshort x \b-%u
  31318. # day
  31319. >>0x2C uleshort x \b-%u
  31320. # hour
  31321. >>0x2E uleshort x %u
  31322. # minute
  31323. >>0x30 uleshort x \b:%u
  31324. # second
  31325. >>0x32 uleshort x \b:%u
  31326. # boot application launched
  31327. >0x24 ulelong =0x11 \b, launched
  31328. # type of start: 0 normally, 1 or 2 maybe in a recovery sequence
  31329. >>0x38 uleshort !0 \b, type %u
  31330. # pathname of boot application, as null-terminated Unicode string; typically
  31331. # \Windows\system32\winload.exe \Windows\system32\winload.efi
  31332. >>0x3C lestring16 x %s
  31333. # Summary: Windows Error Report text files
  31334. # URL: https://en.wikipedia.org/wiki/Windows_Error_Reporting
  31335. # Reference: https://www.nirsoft.net/utils/app_crash_view.html
  31336. # Created by: Joerg Jenderek
  31337. # Note: in directories %ProgramData%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
  31338. # %LOCALAPPDATA%\Microsoft\Windows\WER\{ReportArchive,ReportQueue}
  31339. 0 lestring16 Version=
  31340. >22 lestring16 EventType Windows Error Report
  31341. !:mime text/plain
  31342. # Report.wer
  31343. !:ext wer
  31344. # Summary: Windows 3.1 group files
  31345. # Extension: .grp
  31346. # Created by: unknown
  31347. 0 string \120\115\103\103 MS Windows 3.1 group files
  31348. # Summary: Old format help files
  31349. # URL: https://en.wikipedia.org/wiki/WinHelp
  31350. # Reference: https://www.oocities.org/mwinterhoff/helpfile.htm
  31351. # Update: Joerg Jenderek
  31352. # Created by: Dirk Jagdmann <doj@cubic.org>
  31353. #
  31354. # check and then display version and date inside MS Windows HeLP file fragment
  31355. 0 name help-ver-date
  31356. # look for Magic of SYSTEMHEADER
  31357. >0 leshort 0x036C
  31358. # version Major 1 for right file fragment
  31359. >>4 leshort 1 Windows
  31360. # print non empty string above to avoid error message
  31361. # Warning: Current entry does not yet have a description for adding a MIME type
  31362. !:mime application/winhelp
  31363. !:ext hlp
  31364. # version Minor of help file format is hint for windows version
  31365. >>>2 leshort 0x0F 3.x
  31366. >>>2 leshort 0x15 3.0
  31367. >>>2 leshort 0x21 3.1
  31368. >>>2 leshort 0x27 x.y
  31369. >>>2 leshort 0x33 95
  31370. >>>2 default x y.z
  31371. >>>>2 leshort x 0x%x
  31372. # to complete message string like "MS Windows 3.x help file"
  31373. >>>2 leshort x help
  31374. # GenDate often older than file creation date
  31375. >>>6 ldate x \b, %s
  31376. #
  31377. # Magic for HeLP files
  31378. 0 lelong 0x00035f3f
  31379. # ./windows (version 5.25) labeled the entry as "MS Windows 3.x help file"
  31380. # file header magic 0x293B at DirectoryStart+9
  31381. >(4.l+9) uleshort 0x293B MS
  31382. # look for @VERSION bmf.. like IBMAVW.ANN
  31383. >>0xD4 string =\x62\x6D\x66\x01\x00 Windows help annotation
  31384. !:mime application/x-winhelp
  31385. !:ext ann
  31386. >>0xD4 string !\x62\x6D\x66\x01\x00
  31387. # "GID Help index" by TrID
  31388. >>>(4.l+0x65) string =|Pete Windows help Global Index
  31389. !:mime application/x-winhelp
  31390. !:ext gid
  31391. # HeLP Bookmark or
  31392. # "Windows HELP File" by TrID
  31393. >>>(4.l+0x65) string !|Pete
  31394. # maybe there exist a cleaner way to detect HeLP fragments
  31395. # brute search for Magic 0x036C with matching Major maximal 7 iterations
  31396. # discapp.hlp
  31397. >>>>16 search/0x49AF/s \x6c\x03
  31398. >>>>>&0 use help-ver-date
  31399. >>>>>&4 leshort !1
  31400. # putty.hlp
  31401. >>>>>>&0 search/0x69AF/s \x6c\x03
  31402. >>>>>>>&0 use help-ver-date
  31403. >>>>>>>&4 leshort !1
  31404. >>>>>>>>&0 search/0x49AF/s \x6c\x03
  31405. >>>>>>>>>&0 use help-ver-date
  31406. >>>>>>>>>&4 leshort !1
  31407. >>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  31408. >>>>>>>>>>>&0 use help-ver-date
  31409. >>>>>>>>>>>&4 leshort !1
  31410. >>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  31411. >>>>>>>>>>>>>&0 use help-ver-date
  31412. >>>>>>>>>>>>>&4 leshort !1
  31413. >>>>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  31414. >>>>>>>>>>>>>>>&0 use help-ver-date
  31415. >>>>>>>>>>>>>>>&4 leshort !1
  31416. >>>>>>>>>>>>>>>>&0 search/0x49AF/s \x6c\x03
  31417. # GCC.HLP is detected after 7 iterations
  31418. >>>>>>>>>>>>>>>>>&0 use help-ver-date
  31419. # this only happens if bigger hlp file is detected after used search iterations
  31420. >>>>>>>>>>>>>>>>>&4 leshort !1 Windows y.z help
  31421. !:mime application/winhelp
  31422. !:ext hlp
  31423. # repeat search again or following default line does not work
  31424. >>>>16 search/0x49AF/s \x6c\x03
  31425. # remaining files should be HeLP Bookmark WinHlp32.BMK (XP 32-bit) or WinHlp32 (Windows 8.1 64-bit)
  31426. >>>>16 default x Windows help Bookmark
  31427. !:mime application/x-winhelp
  31428. !:ext bmk
  31429. ## FirstFreeBlock normally FFFFFFFFh 10h for *ANN
  31430. ##>>8 lelong x \b, FirstFreeBlock 0x%8.8x
  31431. # EntireFileSize
  31432. >>12 lelong x \b, %d bytes
  31433. ## ReservedSpace normally 042Fh AFh for *.ANN
  31434. #>>(4.l) lelong x \b, ReservedSpace 0x%8.8x
  31435. ## UsedSpace normally 0426h A6h for *.ANN
  31436. #>>(4.l+4) lelong x \b, UsedSpace 0x%8.8x
  31437. ## FileFlags normally 04...
  31438. #>>(4.l+5) lelong x \b, FileFlags 0x%8.8x
  31439. ## file header magic 0x293B
  31440. #>>(4.l+9) uleshort x \b, file header magic 0x%4.4x
  31441. ## file header Flags 0x0402
  31442. #>>(4.l+11) uleshort x \b, file header Flags 0x%4.4x
  31443. ## file header PageSize 0400h 80h for *.ANN
  31444. #>>(4.l+13) uleshort x \b, PageSize 0x%4.4x
  31445. ## Structure[16] z4
  31446. #>>(4.l+15) string >\0 \b, Structure_"%-.16s"
  31447. ## MustBeZero 0
  31448. #>>(4.l+31) uleshort x \b, MustBeZero 0x%4.4x
  31449. ## PageSplits
  31450. #>>(4.l+33) uleshort x \b, PageSplits 0x%4.4x
  31451. ## RootPage
  31452. #>>(4.l+35) uleshort x \b, RootPage 0x%4.4x
  31453. ## MustBeNegOne 0xffff
  31454. #>>(4.l+37) uleshort x \b, MustBeNegOne 0x%4.4x
  31455. ## TotalPages 1
  31456. #>>(4.l+39) uleshort x \b, TotalPages 0x%4.4x
  31457. ## NLevels 0x0001
  31458. #>>(4.l+41) uleshort x \b, NLevels 0x%4.4x
  31459. ## TotalBtreeEntries
  31460. #>>(4.l+43) ulelong x \b, TotalBtreeEntries 0x%8.8x
  31461. ## pages of the B+ tree
  31462. #>>(4.l+47) ubequad x \b, PageStart 0x%16.16llx
  31463. # start with colon or semicolon for comment line like Back2Life.cnt
  31464. 0 regex \^(:|;)
  31465. # look for first keyword Base
  31466. >0 search/45 :Base
  31467. >>&0 use cnt-name
  31468. # only solution to search again from beginning , because relative offsets changes when use is called
  31469. >0 search/45 :Base
  31470. >0 default x
  31471. # look for other keyword Title like in putty.cnt
  31472. >>0 search/45 :Title
  31473. >>>&0 use cnt-name
  31474. #
  31475. # display mime type and name of Windows help Content source
  31476. 0 name cnt-name
  31477. # skip space at beginning
  31478. >0 string \040
  31479. # name without extension and greater character or name with hlp extension
  31480. >>1 regex/c \^([^\xd>]*|.*\.hlp) MS Windows help file Content, based "%s"
  31481. !:mime text/plain
  31482. !:apple ????TEXT
  31483. !:ext cnt
  31484. #
  31485. # Windows creates a full text search from hlp file, if the user clicks the "Find" tab and enables keyword indexing
  31486. 0 string tfMR MS Windows help Full Text Search index
  31487. !:mime application/x-winhelp-fts
  31488. !:ext fts
  31489. >16 string >\0 for "%s"
  31490. # Summary: Hyper terminal
  31491. # Extension: .ht
  31492. # Created by: unknown
  31493. 0 string HyperTerminal\040
  31494. >15 string 1.0\ --\ HyperTerminal\ data\ file MS Windows HyperTerminal profile
  31495. # https://ithreats.files.wordpress.com/2009/05/\040
  31496. # lnk_the_windows_shortcut_file_format.pdf
  31497. # Summary: Windows shortcut
  31498. # Extension: .lnk
  31499. # Created by: unknown
  31500. # 'L' + GUUID
  31501. 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
  31502. >20 lelong&1 1 \b, Item id list present
  31503. >20 lelong&2 2 \b, Points to a file or directory
  31504. >20 lelong&4 4 \b, Has Description string
  31505. >20 lelong&8 8 \b, Has Relative path
  31506. >20 lelong&16 16 \b, Has Working directory
  31507. >20 lelong&32 32 \b, Has command line arguments
  31508. >20 lelong&64 64 \b, Icon
  31509. >>56 lelong x \b number=%d
  31510. >24 lelong&1 1 \b, Read-Only
  31511. >24 lelong&2 2 \b, Hidden
  31512. >24 lelong&4 4 \b, System
  31513. >24 lelong&8 8 \b, Volume Label
  31514. >24 lelong&16 16 \b, Directory
  31515. >24 lelong&32 32 \b, Archive
  31516. >24 lelong&64 64 \b, Encrypted
  31517. >24 lelong&128 128 \b, Normal
  31518. >24 lelong&256 256 \b, Temporary
  31519. >24 lelong&512 512 \b, Sparse
  31520. >24 lelong&1024 1024 \b, Reparse point
  31521. >24 lelong&2048 2048 \b, Compressed
  31522. >24 lelong&4096 4096 \b, Offline
  31523. >28 leqwdate x \b, ctime=%s
  31524. >36 leqwdate x \b, mtime=%s
  31525. >44 leqwdate x \b, atime=%s
  31526. >52 lelong x \b, length=%u, window=
  31527. >60 lelong&1 1 \bhide
  31528. >60 lelong&2 2 \bnormal
  31529. >60 lelong&4 4 \bshowminimized
  31530. >60 lelong&8 8 \bshowmaximized
  31531. >60 lelong&16 16 \bshownoactivate
  31532. >60 lelong&32 32 \bminimize
  31533. >60 lelong&64 64 \bshowminnoactive
  31534. >60 lelong&128 128 \bshowna
  31535. >60 lelong&256 256 \brestore
  31536. >60 lelong&512 512 \bshowdefault
  31537. #>20 lelong&1 0
  31538. #>>20 lelong&2 2
  31539. #>>>(72.l-64) pstring/h x \b [%s]
  31540. #>20 lelong&1 1
  31541. #>>20 lelong&2 2
  31542. #>>>(72.s) leshort x
  31543. #>>>&75 pstring/h x \b [%s]
  31544. # Summary: Outlook Personal Folders
  31545. # Created by: unknown
  31546. 0 lelong 0x4E444221 Microsoft Outlook email folder
  31547. >10 leshort 0x0e (<=2002)
  31548. >10 leshort 0x17 (>=2003)
  31549. # Summary: Windows help cache
  31550. # Created by: unknown
  31551. 0 string \164\146\115\122\012\000\000\000\001\000\000\000 MS Windows help cache
  31552. # Summary: IE cache file
  31553. # Created by: Christophe Monniez
  31554. 0 string Client\ UrlCache\ MMF Internet Explorer cache file
  31555. >20 string >\0 version %s
  31556. # Summary: Registry files
  31557. # Created by: unknown
  31558. # Modified by (1): Joerg Jenderek
  31559. 0 string regf MS Windows registry file, NT/2000 or above
  31560. 0 string CREG MS Windows 95/98/ME registry file
  31561. 0 string SHCC3 MS Windows 3.1 registry file
  31562. # Summary: Windows Registry text
  31563. # URL: https://en.wikipedia.org/wiki/Windows_Registry#.REG_files
  31564. # Reference: http://fileformats.archiveteam.org/wiki/Windows_Registry
  31565. # Submitted by: Abel Cheung <abelcheung@gmail.com>
  31566. # Update: Joerg Jenderek
  31567. # Windows 3-9X variant
  31568. 0 string REGEDIT
  31569. # skip ASCII text like "REGEDITor.txt" but match
  31570. # L1WMAP.REG with only 1 CRNL or org.gnome.gnumeric.reg with 2 NL
  31571. >7 search/3 \n Windows Registry text
  31572. !:mime text/x-ms-regedit
  31573. !:ext reg
  31574. # Windows 9X variant
  31575. >>0 string REGEDIT4 (Win95 or above)
  31576. # Windows 2K ANSI variant
  31577. 0 string Windows\ Registry\ Editor\
  31578. >&0 string Version\ 5.00\r\n\r\n Windows Registry text (Win2K or above)
  31579. !:mime text/x-ms-regedit
  31580. !:ext reg
  31581. # Windows 2K UTF-16 variant
  31582. 2 lestring16 Windows\ Registry\ Editor\
  31583. >0x32 lestring16 Version\ 5.00\r\n\r\n Windows Registry little-endian text (Win2K or above)
  31584. # relative offset not working
  31585. #>&0 lestring16 Version\ 5.00\r\n\r\n Windows Registry little-endian text (Win2K or above)
  31586. !:mime text/x-ms-regedit
  31587. !:ext reg
  31588. # WINE variant
  31589. # URL: https://en.wikipedia.org/wiki/Wine_(software)
  31590. # Reference: https://www.winehq.org/pipermail/wine-cvs/2005-October/018763.html
  31591. # Note: WINE use text based registry (system.reg,user.reg,userdef.reg)
  31592. # instead binary hiv structure like Windows
  31593. 0 string WINE\ REGISTRY\ Version\ WINE registry text
  31594. # version 2
  31595. >&0 string x \b, version %s
  31596. !:mime text/x-wine-extension-reg
  31597. !:ext reg
  31598. # Windows *.INF *.INI files updated by Joerg Jenderek at Apr 2013, Feb 2018
  31599. # empty ,comment , section
  31600. # PR/383: remove unicode BOM because it is not portable across regex impls
  31601. #0 regex/s \\`(\\r\\n|;|[[])
  31602. # empty line CRLF
  31603. 0 ubeshort 0x0D0A
  31604. >0 use ini-file
  31605. # comment line
  31606. 0 string ;
  31607. >0 use ini-file
  31608. # section line
  31609. 0 string [
  31610. >0 use ini-file
  31611. # check and then display Windows INItialization configuration
  31612. 0 name ini-file
  31613. # look for left bracket in section line
  31614. >0 search/8192 [
  31615. # https://en.wikipedia.org/wiki/Autorun.inf
  31616. # https://msdn.microsoft.com/en-us/library/windows/desktop/cc144200.aspx
  31617. # space after right bracket
  31618. # or AutoRun.Amd64 for 64 bit systems
  31619. # or only NL separator
  31620. >>&0 regex/c \^(autorun)
  31621. # but sometimes total commander directory tree file "treeinfo.wc" with lines like
  31622. # [AUTORUN]
  31623. # [boot]
  31624. >>>&0 string =]\r\n[ Total commander directory treeinfo.wc
  31625. !:mime text/plain
  31626. !:ext wc
  31627. # From: Pal Tamas <folti@balabit.hu>
  31628. # Autorun File
  31629. >>>&0 string !]\r\n[ Microsoft Windows Autorun file
  31630. !:mime application/x-setupscript
  31631. !:ext inf
  31632. # https://msdn.microsoft.com/en-us/library/windows/hardware/ff549520(v=vs.85).aspx
  31633. # version strings ASCII coded case-independent for Windows setup information script file
  31634. >>&0 regex/c \^(version|strings)] Windows setup INFormation
  31635. !:mime application/x-setupscript
  31636. #!:mime application/x-wine-extension-inf
  31637. !:ext inf
  31638. # NETCRC.INF OEMCPL.INF
  31639. >>&0 regex/c \^(WinsockCRCList|OEMCPL)] Windows setup INFormation
  31640. !:mime application/x-setupscript
  31641. !:ext inf
  31642. # http://www.winfaq.de/faq_html/Content/tip2500/onlinefaq.php?h=tip2653.htm
  31643. # https://msdn.microsoft.com/en-us/library/windows/desktop/cc144102.aspx
  31644. # .ShellClassInfo DeleteOnCopy LocalizedFileNames ASCII coded case-independent
  31645. >>&0 regex/c \^(\.ShellClassInfo|DeleteOnCopy|LocalizedFileNames)] Windows desktop.ini
  31646. !:mime application/x-wine-extension-ini
  31647. #!:mime text/plain
  31648. # https://support.microsoft.com/kb/84709/
  31649. >>&0 regex/c \^(don't\ load)] Windows CONTROL.INI
  31650. !:mime application/x-wine-extension-ini
  31651. !:ext ini
  31652. >>&0 regex/c \^(ndishlp\\$|protman\\$|NETBEUI\\$)] Windows PROTOCOL.INI
  31653. !:mime application/x-wine-extension-ini
  31654. !:ext ini
  31655. # https://technet.microsoft.com/en-us/library/cc722567.aspx
  31656. # http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0137.htm
  31657. >>&0 regex/c \^(windows|Compatibility|embedding)] Windows WIN.INI
  31658. !:mime application/x-wine-extension-ini
  31659. !:ext ini
  31660. # https://en.wikipedia.org/wiki/SYSTEM.INI
  31661. >>&0 regex/c \^(boot|386enh|drivers)] Windows SYSTEM.INI
  31662. !:mime application/x-wine-extension-ini
  31663. !:ext ini
  31664. # http://www.mdgx.com/newtip6.htm
  31665. >>&0 regex/c \^(SafeList)] Windows IOS.INI
  31666. !:mime application/x-wine-extension-ini
  31667. !:ext ini
  31668. # https://en.wikipedia.org/wiki/NTLDR Windows Boot Loader information
  31669. >>&0 regex/c \^(boot\x20loader)] Windows boot.ini
  31670. !:mime application/x-wine-extension-ini
  31671. !:ext ini
  31672. # https://en.wikipedia.org/wiki/CONFIG.SYS
  31673. >>&0 regex/c \^(menu)] MS-DOS CONFIG.SYS
  31674. # @CONFIG.UI configuration file of previous DOS version saved by Caldera OPENDOS INSTALL.EXE
  31675. # CONFIG.PSS saved version of file CONFIG.SYS created by %WINDIR%\SYSTEM\MSCONFIG.EXE
  31676. # CONFIG.TSH renamed file CONFIG.SYS.BAT by %WINDIR%\SYSTEM\MSCONFIG.EXE
  31677. # dos and w40 used in dual booting scene
  31678. !:ext sys/dos/w40
  31679. # https://support.microsoft.com/kb/118579/
  31680. >>&0 regex/c \^(Paths)]\r\n MS-DOS MSDOS.SYS
  31681. !:ext sys/dos
  31682. # http://chmspec.nongnu.org/latest/INI.html#HHP
  31683. >>&0 regex/c \^(options)]\r\n Microsoft HTML Help Project
  31684. !:mime text/plain
  31685. !:ext hhp
  31686. # From: Joerg Jenderek
  31687. # URL: https://documentation.basis.com/BASISHelp/WebHelp/b3odbc/obdcdriv_character_translation.htm
  31688. # Reference: https://www.garykessler.net/library/file_sigs.html
  31689. # Note: stored in directory %WINDIR%\SysWOW64 or %WINDIR%\system
  31690. >>&0 regex/c \^(Windows\ Latin) Windows codepage translator
  31691. !:mime text/plain
  31692. !:ext cpx
  31693. # unknown keyword after opening bracket
  31694. >>&0 default x
  31695. #>>>&0 string/c x UNKNOWN [%s
  31696. # look for left bracket of second section
  31697. >>>&0 search/8192 [
  31698. # version Strings FileIdentification
  31699. >>>>&0 string/c version Windows setup INFormation
  31700. !:mime application/x-setupscript
  31701. !:ext inf
  31702. # https://en.wikipedia.org/wiki/Initialization_file Windows Initialization File or other
  31703. >>>>&0 default x
  31704. >>>>>&0 ubyte x
  31705. # characters, digits, underscore and white space followed by right bracket
  31706. # terminated by CR implies section line to skip BOOTLOG.TXT DETLOG.TXT
  31707. >>>>>>&-1 regex/T \^([A-Za-z0-9_\(\)\ ]+)\]\r Generic INItialization configuration [%-.40s
  31708. # NETDEF.INF multiarc.ini
  31709. #!:mime application/x-setupscript
  31710. !:mime application/x-wine-extension-ini
  31711. #!:mime text/plain
  31712. !:ext ini/inf
  31713. # UTF-16 BOM followed by CR~0D00 , comment~semicolon~3B00 , section~bracket~5B00
  31714. 0 ubelong&0xFFff89FF =0xFFFE0900
  31715. # look for left bracket in section line
  31716. >2 search/8192 [
  31717. # keyword without 1st letter which is maybe up-/down-case
  31718. >>&3 lestring16 ersion] Windows setup INFormation
  31719. !:mime application/x-setupscript
  31720. !:ext inf
  31721. >>&3 lestring16 trings] Windows setup INFormation
  31722. !:mime application/x-setupscript
  31723. !:ext inf
  31724. >>&3 lestring16 ourceDisksNames] Windows setup INFormation
  31725. !:mime application/x-setupscript
  31726. !:ext inf
  31727. # netnwcli.inf start with ;---[ NetNWCli.INX ]
  31728. >>&3 default x
  31729. # look for NL followed by left bracket
  31730. >>>&0 search/8192 \x0A\x00\x5b
  31731. >>>>&3 lestring16 ersion] Windows setup INFormation
  31732. !:mime application/x-setupscript
  31733. !:ext inf
  31734. # Windows Precompiled INF files *.PNF added by Joerg Jenderek at Mar 2013 of _PNF_HEADER inf.h
  31735. # http://read.pudn.com/downloads3/sourcecode/windows/248345/win2k/private/windows/setup/setupapi/inf.h__.htm
  31736. # URL: http://fileformats.archiveteam.org/wiki/INF_(Windows)
  31737. # Reference: http://en.verysource.com/code/10350344_1/inf.h.html
  31738. # Note: stored in %Windir%\Inf %Windir%\System32\DriverStore\FileRepository
  31739. # check for valid major and minor versions: 101h - 303h
  31740. 0 leshort&0xFcFc =0x0000
  31741. # GRR: line above (strength 50) is too general as it catches also "PDP-11 UNIX/RT ldp" ./pdp
  31742. >0 leshort&0x0303 !0x0000
  31743. # test for valid InfStyles: 1 2
  31744. >>2 uleshort >0
  31745. >>>2 uleshort <3
  31746. # look for colon in WinDirPath after PNF header
  31747. #>>>>0x59 search/18 :
  31748. >>>>0 use PreCompiledInf
  31749. 0 name PreCompiledInf
  31750. >0 uleshort x Windows Precompiled iNF
  31751. !:mime application/x-pnf
  31752. !:ext pnf
  31753. # major version 1 for older Windows like XP and 3 since about Windows Vista
  31754. # 101h~98-XP; 301h~Windows Vista-7 ; 302h~Windows 10 14393; 303h~Windows 10 18362
  31755. >1 ubyte x \b, version %u
  31756. >0 ubyte x \b.%u
  31757. >0 uleshort =0x0101 (Windows
  31758. >>4 ulelong&0x00000001 !0x00000001 98)
  31759. >>4 ulelong&0x00000001 =0x00000001 XP)
  31760. >0 uleshort =0x0301 (Windows Vista-8.1)
  31761. >0 uleshort =0x0302 (Windows 10 older)
  31762. >0 uleshort =0x0303 (Windows 10)
  31763. # 1 ,2 (windows 98 SE)
  31764. >2 uleshort !2 \b, InfStyle %u
  31765. # PNF_FLAG_IS_UNICODE 0x00000001
  31766. # PNF_FLAG_HAS_STRINGS 0x00000002
  31767. # PNF_FLAG_SRCPATH_IS_URL 0x00000004
  31768. # PNF_FLAG_HAS_VOLATILE_DIRIDS 0x00000008
  31769. # PNF_FLAG_INF_VERIFIED 0x00000010
  31770. # PNF_FLAG_INF_DIGITALLY_SIGNED 0x00000020
  31771. # UNKNOWN8 0x00000080
  31772. # UNKNOWN 0x00000100
  31773. # UNKNOWN1 0x01000000
  31774. # UNKNOWN2 0x02000000
  31775. >4 ulelong&0x03000180 >0 \b, flags
  31776. >>4 ulelong x 0x%x
  31777. >4 ulelong&0x00000001 0x00000001 \b, unicoded
  31778. >4 ulelong&0x00000002 0x00000002 \b, has strings
  31779. >4 ulelong&0x00000004 0x00000004 \b, src URL
  31780. >4 ulelong&0x00000008 0x00000008 \b, volatile dir ids
  31781. >4 ulelong&0x00000010 0x00000010 \b, verified
  31782. >4 ulelong&0x00000020 0x00000020 \b, digitally signed
  31783. # >4 ulelong&0x00000080 0x00000080 \b, UNKNOWN8
  31784. # >4 ulelong&0x00000100 0x00000100 \b, UNKNOWN
  31785. # >4 ulelong&0x01000000 0x01000000 \b, UNKNOWN1
  31786. # >4 ulelong&0x02000000 0x02000000 \b, UNKNOWN2
  31787. #>8 ulelong x \b, InfSubstValueListOffset 0x%x
  31788. # many 0, 1 lmouusb.PNF, 2 linkfx10.PNF , f webfdr16.PNF
  31789. # , 6 bth.PNF, 9 usbport.PNF, d netnwifi.PNF, 10h nettcpip.PNF
  31790. #>12 uleshort x \b, InfSubstValueCount 0x%x
  31791. # only < 9 found: 8 hcw85b64.PNF
  31792. #>14 uleshort x \b, InfVersionDatumCount 0x%x
  31793. # only found values lower 0x0000ffff ??
  31794. #>16 ulelong x \b, InfVersionDataSize 0x%x
  31795. # only found positive values lower 0x00ffFFff for InfVersionDataOffset
  31796. >20 ulelong x \b, at 0x%x
  31797. >4 ulelong&0x00000001 =0x00000001
  31798. # case independent: CatalogFile Class DriverVer layoutfile LayoutFile SetupClass signature Signature
  31799. >>(20.l) lestring16 x "%s"
  31800. >4 ulelong&0x00000001 !0x00000001
  31801. >>(20.l) string x "%s"
  31802. # FILETIME is number of 100-nanosecond intervals since 1 January 1601
  31803. #>24 ulequad x \b, InfVersionLastWriteTime %16.16llx
  31804. #>24 foodate-0xbar x \b, InfVersionLastWriteTime %s
  31805. # for Windows 98, XP
  31806. >0 uleshort <0x0102
  31807. # only found values lower 0x00ffFFff
  31808. # often 70 but also 78h for corelist.PNF
  31809. # >>32 ulelong x \b, StringTableBlockOffset 0x%x
  31810. # >>36 ulelong x \b, StringTableBlockSize 0x%x
  31811. # >>40 ulelong x \b, InfSectionCount 0x%x
  31812. # >>44 ulelong x \b, InfSectionBlockOffset 0x%x
  31813. # >>48 ulelong x \b, InfSectionBlockSize 0x%x
  31814. # >>52 ulelong x \b, InfLineBlockOffset 0x%x
  31815. # >>56 ulelong x \b, InfLineBlockSize 0x%x
  31816. # >>60 ulelong x \b, InfValueBlockOffset 0x%x
  31817. # >>64 ulelong x \b, InfValueBlockSize 0x%x
  31818. # WinDirPathOffset
  31819. # like 58h, which means direct after PNF header
  31820. #>>68 ulelong x \b, at 0x%x
  31821. >>68 ulelong x
  31822. >>>4 ulelong&0x00000001 =0x00000001
  31823. #>>>>(68.l) ubequad =0x43003a005c005700
  31824. # normally unicoded C:\Windows
  31825. #>>>>>(68.l) lestring16 x \b, WinDirPath "%s"
  31826. >>>>(68.l) ubequad !0x43003a005c005700
  31827. >>>>>(68.l) lestring16 x \b, WinDirPath "%s"
  31828. >>>4 ulelong&0x00000001 !0x00000001
  31829. # normally ASCII C:\WINDOWS
  31830. #>>>>(68.l) string =C:\\WINDOWS \b, WinDirPath "%s"
  31831. >>>>(68.l) string !C:\\WINDOWS
  31832. >>>>>(68.l) string x \b, WinDirPath "%s"
  31833. # found OsLoaderPathOffset values often 0 , once 70h corelist.PNF, once 68h ASCII machine.PNF
  31834. >>>72 ulelong >0 \b,
  31835. >>>>4 ulelong&0x00000001 =0x00000001
  31836. >>>>>(72.l) lestring16 x OsLoaderPath "%s"
  31837. >>>>4 ulelong&0x00000001 !0x00000001
  31838. # seldom C:\ instead empty
  31839. >>>>>(72.l) string x OsLoaderPath "%s"
  31840. # 1fdh
  31841. #>>>76 uleshort x \b, StringTableHashBucketCount 0x%x
  31842. # only 407h found
  31843. >>>78 uleshort !0x409 \b, LanguageID %x
  31844. #>>>78 uleshort =0x409 \b, LanguageID %x
  31845. # InfSourcePathOffset often 0
  31846. >>>80 ulelong >0 \b, at 0x%x
  31847. >>>>4 ulelong&0x00000001 =0x00000001
  31848. >>>>>(80.l) lestring16 x SourcePath "%s"
  31849. >>>>4 ulelong&0x00000001 !0x00000001
  31850. >>>>>(80.l) string >\0 SourcePath "%s"
  31851. # OriginalInfNameOffset often 0
  31852. >>>84 ulelong >0 \b, at 0x%x
  31853. >>>>4 ulelong&0x00000001 =0x00000001
  31854. >>>>>(84.l) lestring16 x InfName "%s"
  31855. >>>>4 ulelong&0x00000001 !0x00000001
  31856. >>>>>(84.l) string >\0 InfName "%s"
  31857. # for newer Windows like Vista, 7 , 8.1 , 10
  31858. >0 uleshort >0x0101
  31859. >>80 ulelong x \b, at 0x%x WinDirPath
  31860. >>>4 ulelong&0x00000001 0x00000001
  31861. # normally unicoded C:\Windows
  31862. #>>>>(80.l) ubequad =0x43003a005c005700
  31863. #>>>>>(80.l) lestring16 x "%s"
  31864. >>>>(80.l) ubequad !0x43003a005c005700
  31865. >>>>>(80.l) lestring16 x "%s"
  31866. # language id: 0 407h~german 409h~English_US
  31867. >>90 uleshort !0x409 \b, LanguageID %x
  31868. #>>90 uleshort =0x409 \b, LanguageID %x
  31869. >>92 ulelong >0 \b, at 0x%x
  31870. >>>4 ulelong&0x00000001 0x00000001
  31871. # language string like: de-DE en-US
  31872. >>>>(92.l) lestring16 x language %s
  31873. # Summary: backup file created with utility like NTBACKUP.EXE shipped with Windows NT/2K/XP/2003
  31874. # Extension: .bkf
  31875. # Created by: Joerg Jenderek
  31876. # URL: https://en.wikipedia.org/wiki/NTBackup
  31877. # Reference: http://laytongraphics.com/mtf/MTF_100a.PDF
  31878. # Descriptor BloCK name of Microsoft Tape Format
  31879. 0 string TAPE
  31880. # Format Logical Address is zero
  31881. >20 ulequad 0
  31882. # Reserved for MBC is zero
  31883. >>28 uleshort 0
  31884. # Control Block ID is zero
  31885. >>>36 ulelong 0
  31886. # BIT4-BIT15, BIT18-BIT31 of block attributes are unused
  31887. >>>>4 ulelong&0xFFfcFFe0 0 Windows NTbackup archive
  31888. #!:mime application/x-ntbackup
  31889. !:ext bkf
  31890. # OS ID
  31891. >>>>>10 ubyte 1 \b NetWare
  31892. >>>>>10 ubyte 13 \b NetWare SMS
  31893. >>>>>10 ubyte 14 \b NT
  31894. >>>>>10 ubyte 24 \b 3
  31895. >>>>>10 ubyte 25 \b OS/2
  31896. >>>>>10 ubyte 26 \b 95
  31897. >>>>>10 ubyte 27 \b Macintosh
  31898. >>>>>10 ubyte 28 \b UNIX
  31899. # OS Version (2)
  31900. #>>>>>11 ubyte x OS V=%x
  31901. # MTF_CONTINUATION Media Sequence Number > 1
  31902. #>>>>>4 ulelong&0x00000001 !0 \b, continued
  31903. # MTF_COMPRESSION
  31904. >>>>>4 ulelong&0x00000004 !0 \b, compressed
  31905. # MTF_EOS_AT_EOM End Of Medium was hit during end of set processing
  31906. >>>>>4 ulelong&0x00000008 !0 \b, End Of Medium hit
  31907. >>>>>4 ulelong&0x00020000 0
  31908. # MTF_SET_MAP_EXISTS A Media Based Catalog Set Map may exist on tape
  31909. >>>>>>4 ulelong&0x00010000 !0 \b, with catalog
  31910. # MTF_FDD_ALLOWED However File/Directory Detail can only exist if a Set Map is also present
  31911. >>>>>4 ulelong&0x00020000 !0 \b, with file catalog
  31912. # Offset To First Event 238h,240h,28Ch
  31913. #>>>>>8 uleshort x \b, event offset %4.4x
  31914. # Displayable Size (20e0230h 20e024ch 20e0224h)
  31915. #>>>>>8 ulequad x dis. size %16.16llx
  31916. # Media Family ID (455288C4h 4570BD1Ah 45708F2Fh 4570BBF5h)
  31917. #>>>>>52 ulelong x family ID %8.8x
  31918. # TAPE Attributes (3)
  31919. #>>>>>56 ulelong x TAPE %8.8x
  31920. # Media Sequence Number
  31921. >>>>>60 uleshort >1 \b, sequence %u
  31922. # Password Encryption Algorithm (3)
  31923. >>>>>62 uleshort >0 \b, 0x%x encrypted
  31924. # Soft Filemark Block Size * 512 (2)
  31925. #>>>>>64 uleshort =2 \b, soft size %u*512
  31926. >>>>>64 uleshort !2 \b, soft size %u*512
  31927. # Media Based Catalog Type (1,2)
  31928. #>>>>>66 uleshort x \b, catalog type %4.4x
  31929. # size of Media Name (66,68,6Eh)
  31930. >>>>>68 uleshort >0
  31931. # offset of Media Name (5Eh)
  31932. >>>>>>70 uleshort >0
  31933. # 0~, 1~ANSI, 2~UNICODE
  31934. >>>>>>>48 ubyte 1
  31935. # size terminated ansi coded string normally followed by "MTF Media Label"
  31936. >>>>>>>>(70.s) string >\0 \b, name: %s
  31937. >>>>>>>48 ubyte 2
  31938. # Not null, but size terminated unicoded string
  31939. >>>>>>>>(70.s) lestring16 x \b, name: %s
  31940. # size of Media Label (104h)
  31941. >>>>>72 uleshort >0
  31942. # offset of Media Label (C4h,C6h,CCh)
  31943. >>>>>74 uleshort >0
  31944. >>>>>>48 ubyte 1
  31945. #Tag|Version|Vendor|Vendor ID|Creation Time Stamp|Cartridge Label|Side|Media ID|Media Domain ID|Vendor Specific fields
  31946. >>>>>>>(74.s) string >\0 \b, label: %s
  31947. >>>>>>48 ubyte 2
  31948. >>>>>>>(74.s) lestring16 x \b, label: %s
  31949. # size of password name (0,1Ch)
  31950. #>>>>>76 uleshort >0 \b, password size %4.4x
  31951. # Software Vendor ID (CBEh)
  31952. >>>>>86 uleshort x \b, software (0x%x)
  31953. # size of Software Name (6Eh)
  31954. >>>>>80 uleshort >0
  31955. # offset of Software Name (1C8h,1CAh,1D0h)
  31956. >>>>>>82 uleshort >0
  31957. # 1~ANSI, 2~UNICODE
  31958. >>>>>>>48 ubyte 1
  31959. >>>>>>>>(82.s) string >\0 \b: %s
  31960. >>>>>>>48 ubyte 2
  31961. # size terminated unicoded coded string normally followed by "SPAD"
  31962. >>>>>>>>(82.s) lestring16 x \b: %s
  31963. # Format Logical Block Size (512,1024)
  31964. #>>>>>84 uleshort =1024 \b, block size %u
  31965. >>>>>84 uleshort !1024 \b, block size %u
  31966. # Media Date of MTF_DATE_TIME type with 5 bytes
  31967. #>>>>>>88 ubequad x DATE %16.16llx
  31968. # MTF Major Version (1)
  31969. #>>>>>>93 ubyte x \b, MFT version %x
  31970. #
  31971. # URL: https://en.wikipedia.org/wiki/PaintShop_Pro
  31972. # Reference: https://www.cryer.co.uk/file-types/p/pal.htm
  31973. # Created by: Joerg Jenderek
  31974. # Note: there exist other color palette formats also with .pal extension
  31975. 0 string JASC-PAL\r\n PaintShop Pro color palette
  31976. #!:mime text/plain
  31977. # PspPalette extension is used by newer (probably 8) PaintShopPro versions
  31978. !:ext pal/PspPalette
  31979. # 2nd line contains palette file version. For example "0100"
  31980. >10 string !0100 \b, version %.4s
  31981. # third line contains the number of colours: 16 256 ...
  31982. >16 string x \b, %.3s colors
  31983. # URL: https://en.wikipedia.org/wiki/Innosetup
  31984. # Reference: https://github.com/jrsoftware/issrc/blob/master/Projects/Undo.pas
  31985. # Created by: Joerg Jenderek
  31986. # Note: created by like "InnoSetup self-extracting archive" inside ./msdos
  31987. # TrID labeles the entry as "Inno Setup Uninstall Log"
  31988. # TUninstallLogID
  31989. 0 string Inno\ Setup\ Uninstall\ Log\ (b) InnoSetup Log
  31990. !:mime application/x-innosetup
  31991. # unins000.dat, unins001.dat, ...
  31992. !:ext dat
  31993. # " 64-bit" variant
  31994. >0x1c string >\0 \b%.7s
  31995. # AppName[0x80] like "Minimal SYStem", ClamWin Free Antivirus , ...
  31996. >0xc0 string x %s
  31997. # AppId[0x80] is similar to AppName or
  31998. # GUID like {4BB0DCDC-BC24-49EC-8937-72956C33A470} start with left brace
  31999. >0x40 ubyte 0x7b
  32000. >>0x40 string x %-.38s
  32001. # do not know how this log version correlates to program version
  32002. >0x140 ulelong x \b, version 0x%x
  32003. # NumRecs
  32004. #>0x144 ulelong x \b, 0x%4.4x records
  32005. # EndOffset means files size
  32006. >0x148 ulelong x \b, %u bytes
  32007. # Flags 5 25h 35h
  32008. #>0x14c ulelong x \b, flags %8.8x
  32009. # Reserved: array[0..26] of Longint
  32010. # the non Unicode HighestSupportedVersion may never become greater than or equal to 1000
  32011. >0x140 ulelong <1000
  32012. # hostname
  32013. >>0x1d6 pstring x \b, %s
  32014. # user name
  32015. >>>&0 pstring x \b\%s
  32016. # directory like C:\Program Files (x86)\GnuWin32
  32017. >>>>&0 pstring x \b, "%s"
  32018. # version 1000 or higher implies unicode
  32019. >0x140 ulelong >999
  32020. # hostname
  32021. >>0x1db lestring16 x \b, %-.9s
  32022. # utf string variant with prepending fe??ffFFff
  32023. >>0x1db search/43 \xFF\xFF\xFF
  32024. # user name
  32025. >>>&0 lestring16 x \b\%-.9s
  32026. >>>&0 search/43 \xFF\xFF\xFF
  32027. # directory like C:\Program Files\GIMP 2
  32028. >>>>&0 lestring16 x \b, %-.42s
  32029. # URL: https://jrsoftware.org/ishelp/index.php?topic=setup_signeduninstaller
  32030. # Reference:https://github.com/jrsoftware/issrc/blob/main/Projects/Struct.pas
  32031. # From: Joerg Jenderek
  32032. 0 string Inno\ Setup\ Messages\ (
  32033. # null padded til 0x40 boundary
  32034. >0x38 quad 0 InnoSetup messages
  32035. !:mime application/x-innosetup-msg
  32036. # unins000.msg, unins001.msg, ...
  32037. !:ext msg
  32038. # version like 5.1.1 5.1.11 5.5.0 5.5.3 6.0.0
  32039. >>0x15 string x \b, version %.5s
  32040. # look for 6th char of version string or terminating right parentheses
  32041. >>>0x1a ubyte !0x29 \b%c
  32042. # NumMessages
  32043. >>0x40 ulelong x \b, %u messages
  32044. # TotalSize: Cardinal;
  32045. #>>0x44 ulelong x \b, TotalSize %u
  32046. # NotTotalSize: Cardinal;
  32047. #>>0x48 ulelong x \b, NotTotalSize %u
  32048. # CRCMessages: Longint;
  32049. #>>0x4C ulelong x \b, CRC 0x%x
  32050. >>0x40 ulelong x
  32051. # (u) after version means unicoded messages
  32052. >>>0x1c search/2 (u) (UTF-16),
  32053. >>>>0x50 lestring16 x %s
  32054. # ASCII coded message
  32055. >>>0x1c default x (ASCII),
  32056. >>>>0x50 string x %s
  32057. # Windows Imaging (WIM) Image
  32058. # Update: Joerg Jenderek at Mar 2019, 2021
  32059. # URL: https://en.wikipedia.org/wiki/Windows_Imaging_Format
  32060. # http://fileformats.archiveteam.org/wiki/Windows_Imaging_Format
  32061. # Reference: https://download.microsoft.com/download/f/e/f/
  32062. # fefdc36e-392d-4678-9e4e-771ffa2692ab/Windows%20Imaging%20File%20Format.rtf
  32063. # Note: verified by like `7z t boot.wim` `wiminfo install.esd --header`
  32064. 0 string MSWIM\000\000\000
  32065. >0 use wim-archive
  32066. # https://wimlib.net/man1/wimoptimize.html
  32067. 0 string WLPWM\000\000\000
  32068. >0 use wim-archive
  32069. 0 name wim-archive
  32070. # _WIMHEADER_V1_PACKED ImageTag[8]
  32071. >0 string x Windows imaging
  32072. !:mime application/x-ms-wim
  32073. # TO avoid in file version 5.36 error like
  32074. # Magdir/windows, 760: Warning: Current entry does not yet have a description
  32075. # file: could not find any valid magic files! (No error)
  32076. # split WIM
  32077. >16 ulelong &0x00000008 (SWM
  32078. !:ext swm
  32079. # usPartNumber; 1, unless the file was split into multiple parts
  32080. >>40 uleshort x \b %u
  32081. # usTotalParts; The total number of WIM file parts in a spanned set
  32082. >>42 uleshort x \b of %u) image
  32083. # non split WIM
  32084. >16 ulelong ^0x00000008
  32085. # https://wimlib.net/man1/wimmount.html
  32086. # solid WIMs; version 3584; usually contain LZMS-compressed and the .esd extension
  32087. >>12 ulelong 3584 (ESD) image
  32088. !:ext esd
  32089. >>12 ulelong !3584 (
  32090. # look for archive member RunTime.xml like in Microsoft.Windows.Cosa.Desktop.Client.ppkg
  32091. >>>156 search/68233/s RunTime.xml \bWindows provisioning package)
  32092. !:ext ppkg
  32093. # if is is not a Windows provisioning package, then it is a WIM
  32094. >>>156 default x \bWIM) image
  32095. # second disk image part created by Microsoft's RecoveryDrive.exe has name Reconstruct.WIM2
  32096. !:ext wim/wim2
  32097. >0 string/b WLPWM\000\000\000 \b, wimlib pipable format
  32098. # cbSize size of the WIM header in bytes like 208
  32099. #>8 ulelong x \b, headersize %u
  32100. # dwVersion version of the WIM file 00010d00h~1.13 00000e00h~0.14
  32101. >14 uleshort x v%u
  32102. >13 ubyte x \b.%u
  32103. # dwImageCount; The number of images contained in the WIM file
  32104. >44 ulelong >1 \b, %u images
  32105. # dwBootIndex
  32106. # 1-based index of the bootable image of the WIM, or 0 if no image is bootable
  32107. >0x78 ulelong >0 \b, bootable no. %u
  32108. # dwFlags
  32109. #>16 ulelong x \b, flags 0x%8.8x
  32110. #define FLAG_HEADER_COMPRESSION 0x00000002
  32111. #define FLAG_HEADER_READONLY 0x00000004
  32112. #define FLAG_HEADER_SPANNED 0x00000008
  32113. #define FLAG_HEADER_RESOURCE_ONLY 0x00000010
  32114. #define FLAG_HEADER_METADATA_ONLY 0x00000020
  32115. #define FLAG_HEADER_WRITE_IN_PROGRESS 0x00000040
  32116. #define FLAG_HEADER_RP_FIX 0x00000080 reparse point fixup
  32117. #define FLAG_HEADER_COMPRESS_RESERVED 0x00010000
  32118. #define FLAG_HEADER_COMPRESS_XPRESS 0x00020000
  32119. #define FLAG_HEADER_COMPRESS_LZX 0x00040000
  32120. #define FLAG_HEADER_COMPRESS_LZMS 0x00080000
  32121. #define FLAG_HEADER_COMPRESS_XPRESS2 0x00100000 wimlib-1.13.0\include\wimlib\header.h
  32122. # XPRESS, with small chunk size
  32123. >16 ulelong &0x00100000 \b, XPRESS2
  32124. >16 ulelong &0x00080000 \b, LZMS
  32125. >16 ulelong &0x00040000 \b, LZX
  32126. >16 ulelong &0x00020000 \b, XPRESS
  32127. >16 ulelong &0x00000002 compressed
  32128. >16 ulelong &0x00000004 \b, read only
  32129. >16 ulelong &0x00000010 \b, resource only
  32130. >16 ulelong &0x00000020 \b, metadata only
  32131. >16 ulelong &0x00000080 \b, reparse point fixup
  32132. #>16 ulelong &0x00010000 \b, RESERVED
  32133. # dwCompressionSize; Uncompressed chunk size for resources or 0 if uncompressed
  32134. #>20 ulelong >0 \b, chunk size %u bytes
  32135. # gWIMGuid
  32136. #>24 ubequad x \b, GUID 0x%16.16llx
  32137. #>>32 ubequad x \b%16.16llx
  32138. # rhOffsetTable; the location of the resource lookup table
  32139. # wim_reshdr_disk[24]= u8 size_in_wim[7] + u8 flags + le64 offset_in_wim + le64 uncompressed_size
  32140. #>48 ubequad x \b, rhOffsetTable 0x%16.16llx
  32141. # rhXmlData; the location of the XML data
  32142. #>0x50 ulelong x \b, at 0x%8.8x
  32143. # NOT WORKING \xff\xfe<\0W\0I\0M\0
  32144. #>(0x50.l) ubequad x \b, xml=%16.16llx
  32145. # rhBootMetadata; the location of the metadata resource
  32146. #>0x60 ubequad x \b, rhBootMetadata 0x%16.16llx
  32147. # rhIntegrity; the location of integrity table used to verify files
  32148. #>0x7c ubequad x \b, rhIntegrity 0x%16.16llx
  32149. # Unused[60]
  32150. #>148 ubequad !0 \b,unused 0x%16.16llx
  32151. #
  32152. # From: Joerg Jenderek
  32153. # URL: https://en.wikipedia.org/wiki/Windows_Easy_Transfer
  32154. # Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/mig.trid.xml
  32155. # Note: called "Windows Easy Transfer migration data" by TrID,
  32156. # "Migration Store" or "EasyTransfer file" by Microsoft
  32157. 0 string 1giM Windows Easy Transfer migration data
  32158. #!:mime application/octet-stream
  32159. !:mime application/x-ms-mig
  32160. !:ext mig
  32161. >0x18 string =MRTS without password
  32162. # data offset with 1 space at end
  32163. >>0x1c ulelong+0x38 x \b, at 0x%x
  32164. # look for zlib compressed data by ./compress
  32165. >>(0x1c.l+0x38) ubyte x
  32166. >>>&-1 indirect x
  32167. # in password protected examples MRTS comes some bytes further
  32168. >0x18 string !MRTS with password
  32169. # look for first MRTS tag
  32170. >0x18 search/29/b MRTS
  32171. # probably first file name length like 178, ...
  32172. #>>&0 ulelong x \b, 1st length %u
  32173. # URL like File\C:\Users\nutzer\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\desktop.ini
  32174. >>&20 lestring16 x \b, 1st %-s
  32175. # Microsoft SYLK
  32176. # https://en.wikipedia.org/wiki/SYmbolic_LinK_(SYLK)
  32177. # https://outflank.nl/upload/sylksum.txt
  32178. 0 string ID;P Microsoft SYLK program
  32179. >4 string >0 \b, created by %s
  32180. !:ext slk/sylk
  32181. #------------------------------------------------------------------------------
  32182. # $File: wireless,v 1.2 2009/09/19 16:28:13 christos Exp $
  32183. # wireless-regdb: file(1) magic for CRDA wireless-regdb file format
  32184. #
  32185. 0 string RGDB CRDA wireless regulatory database file
  32186. >4 belong 19 (Version 1)
  32187. #------------------------------------------------------------------------------
  32188. # $File: wordprocessors,v 1.24 2020/05/22 19:28:47 christos Exp $
  32189. # wordprocessors: file(1) magic fo word processors.
  32190. #
  32191. ####### PWP file format used on Smith Corona Personal Word Processors:
  32192. 2 string \040\040\040\040\040\040\040\040\040\040\040ML4D\040'92 Smith Corona PWP
  32193. >24 byte 2 \b, single spaced
  32194. >24 byte 3 \b, 1.5 spaced
  32195. >24 byte 4 \b, double spaced
  32196. >25 byte 0x42 \b, letter
  32197. >25 byte 0x54 \b, legal
  32198. >26 byte 0x46 \b, A4
  32199. # URL: http://fileformats.archiveteam.org/wiki/Microsoft_Works_Word_Processor
  32200. # reference: http://mark0.net/download/triddefs_xml.7z
  32201. # /defs/w/wps-works-dos.trid.xml
  32202. # From: Joerg Jenderek
  32203. # Note: older non OLE 2 Compound based versions
  32204. 0 ubeshort =0x01FE
  32205. >112 ubeshort =0x0100 Microsoft Works 1-3 (DOS) or 2 (Windows) document
  32206. # title like THE GREAT KHAN GAME
  32207. >>0x100 string x %s
  32208. !:mime application/vnd-ms-works
  32209. #!:mime application/x-msworks
  32210. # https://www.macdisk.com/macsigen.php
  32211. !:apple ????AWWP
  32212. !:ext wps
  32213. # Corel/WordPerfect
  32214. 0 string \xffWPC
  32215. # WordPerfect
  32216. >8 byte 1
  32217. >>9 byte 1 WordPerfect macro
  32218. >>9 byte 2 WordPerfect help file
  32219. >>9 byte 3 WordPerfect keyboard file
  32220. >>9 byte 10 WordPerfect document
  32221. >>9 byte 11 WordPerfect dictionary
  32222. >>9 byte 12 WordPerfect thesaurus
  32223. >>9 byte 13 WordPerfect block
  32224. >>9 byte 14 WordPerfect rectangular block
  32225. >>9 byte 15 WordPerfect column block
  32226. >>9 byte 16 WordPerfect printer data
  32227. >>9 byte 19 WordPerfect printer data
  32228. >>9 byte 20 WordPerfect driver resource data
  32229. >>9 byte 22 WordPerfect graphic image
  32230. >>9 byte 23 WordPerfect hyphenation code
  32231. >>9 byte 24 WordPerfect hyphenation data
  32232. >>9 byte 25 WordPerfect macro resource data
  32233. >>9 byte 27 WordPerfect hyphenation lex
  32234. >>9 byte 29 WordPerfect wordlist
  32235. >>9 byte 30 WordPerfect equation resource data
  32236. >>9 byte 33 WordPerfect spell rules
  32237. >>9 byte 34 WordPerfect dictionary rules
  32238. >>9 byte 39 WordPerfect spell rules (Microlytics)
  32239. >>9 byte 43 WordPerfect settings file
  32240. >>9 byte 44 WordPerfect 3.5 document
  32241. >>9 byte 45 WordPerfect 4.2 document
  32242. >>9 byte 69 WordPerfect dialog file
  32243. >>9 byte 76 WordPerfect button bar
  32244. >>9 default x
  32245. >>>9 byte x Corel WordPerfect: Unknown filetype %d
  32246. # Corel Shell
  32247. >8 byte 2
  32248. >>9 byte 1 Corel shell macro
  32249. >>9 byte 10 Corel shell definition
  32250. >>9 default x
  32251. >>>9 byte x Corel Shell: Unknown filetype %d
  32252. # Corel Notebook
  32253. >8 byte 3
  32254. >>9 byte 1 Corel Notebook macro
  32255. >>9 byte 2 Corel Notebook help file
  32256. >>9 byte 3 Corel Notebook keyboard file
  32257. >>9 byte 10 Corel Notebook definition
  32258. >>9 default x
  32259. >>>9 byte x Corel Notebook: Unknown filetype %d
  32260. # Corel Calculator
  32261. >8 byte 4
  32262. >>9 byte 2 Corel Calculator help file
  32263. >>9 default x
  32264. >>>9 byte x Corel Calculator: Unknown filetype %d
  32265. # Corel File Manager
  32266. >8 byte 5
  32267. >>9 default x
  32268. >>>9 byte x Corel File Manager: Unknown filetype %d
  32269. # Corel Calendar
  32270. >8 byte 6
  32271. >>9 byte 2 Corel Calendar help file
  32272. >>9 byte 10 Corel Calendar data file
  32273. >>9 default x
  32274. >>>9 byte x Corel Calendar: Unknown filetype %d
  32275. # Corel Program Editor/Ed Editor
  32276. >8 byte 7
  32277. >>9 byte 1 Corel Editor macro
  32278. >>9 byte 2 Corel Editor help file
  32279. >>9 byte 3 Corel Editor keyboard file
  32280. >>9 byte 25 Corel Editor macro resource file
  32281. >>9 default x
  32282. >>>9 byte x Corel Program Editor/Ed Editor: Unknown filetype %d
  32283. # Corel Macro Editor
  32284. >8 byte 8
  32285. >>9 byte 1 Corel Macro editor macro
  32286. >>9 byte 2 Corel Macro editor help file
  32287. >>9 byte 3 Corel Macro editor keyboard file
  32288. >>9 default x
  32289. >>>9 byte x Corel Macro Editor: Unknown filetype %d
  32290. # Corel Plan Perfect
  32291. >8 byte 9
  32292. >>9 default x
  32293. >>>9 byte x Corel Plan Perfect: Unknown filetype %d
  32294. # Corel DataPerfect
  32295. >8 byte 10
  32296. # CHECK: Don't these belong into product 9?
  32297. >>9 byte 1 Corel PlanPerfect macro
  32298. >>9 byte 2 Corel PlanPerfect help file
  32299. >>9 byte 3 Corel PlanPerfect keyboard file
  32300. >>9 byte 10 Corel PlanPerfect worksheet
  32301. >>9 byte 15 Corel PlanPerfect printer definition
  32302. >>9 byte 18 Corel PlanPerfect graphic definition
  32303. >>9 byte 19 Corel PlanPerfect data
  32304. >>9 byte 20 Corel PlanPerfect temporary printer
  32305. >>9 byte 25 Corel PlanPerfect macro resource data
  32306. >>9 default x
  32307. >>>9 byte x Corel DataPerfect: Unknown filetype %d
  32308. # Corel Mail
  32309. >8 byte 11
  32310. >>9 byte 2 Corel Mail help file
  32311. >>9 byte 5 Corel Mail distribution list
  32312. >>9 byte 10 Corel Mail out box
  32313. >>9 byte 11 Corel Mail in box
  32314. >>9 byte 20 Corel Mail users archived mailbox
  32315. >>9 byte 21 Corel Mail archived message database
  32316. >>9 byte 22 Corel Mail archived attachments
  32317. >>9 default x
  32318. >>>9 byte x Corel Mail: Unknown filetype %d
  32319. # Corel Printer
  32320. >8 byte 12
  32321. >>9 byte 11 Corel Printer temporary file
  32322. >>9 default x
  32323. >>>9 byte x Corel Printer: Unknown filetype %d
  32324. # Corel Scheduler
  32325. >8 byte 13
  32326. >>9 byte 2 Corel Scheduler help file
  32327. >>9 byte 10 Corel Scheduler in file
  32328. >>9 byte 11 Corel Scheduler out file
  32329. >>9 default x
  32330. >>>9 byte x Corel Scheduler: Unknown filetype %d
  32331. # Corel WordPerfect Office
  32332. >8 byte 14
  32333. >>9 byte 10 Corel GroupWise settings file
  32334. >>9 byte 17 Corel GroupWise directory services
  32335. >>9 byte 43 Corel GroupWise settings file
  32336. >>9 default x
  32337. >>>9 byte x Corel WordPerfect Office: Unknown filetype %d
  32338. # Corel DrawPerfect
  32339. >8 byte 15
  32340. >>9 default x
  32341. >>>9 byte x Corel DrawPerfect: Unknown filetype %d
  32342. # Corel LetterPerfect
  32343. >8 byte 16
  32344. >>9 default x
  32345. >>>9 byte x Corel LetterPerfect: Unknown filetype %d
  32346. # Corel Terminal
  32347. >8 byte 17
  32348. >>9 byte 10 Corel Terminal resource data
  32349. >>9 byte 11 Corel Terminal resource data
  32350. >>9 byte 43 Corel Terminal resource data
  32351. >>9 default x
  32352. >>>9 byte x Corel Terminal: Unknown filetype %d
  32353. # Corel loadable file
  32354. >8 byte 18
  32355. >>9 byte 10 Corel loadable file
  32356. >>9 byte 11 Corel GUI loadable text
  32357. >>9 byte 12 Corel graphics resource data
  32358. >>9 byte 13 Corel printer settings file
  32359. >>9 byte 14 Corel port definition file
  32360. >>9 byte 15 Corel print queue parameters
  32361. >>9 byte 16 Corel compressed file
  32362. >>9 default x
  32363. >>>9 byte x Corel loadable file: Unknown filetype %d
  32364. >>15 byte 0 \b, optimized for Intel
  32365. >>15 byte 1 \b, optimized for Non-Intel
  32366. # Network service
  32367. >8 byte 20
  32368. >>9 byte 10 Corel Network service msg file
  32369. >>9 byte 11 Corel Network service msg file
  32370. >>9 byte 12 Corel Async gateway login msg
  32371. >>9 byte 14 Corel GroupWise message file
  32372. >>9 default x
  32373. >>>9 byte x Corel Network service: Unknown filetype %d
  32374. # GroupWise
  32375. >8 byte 31
  32376. >>9 byte 20 GroupWise admin domain database
  32377. >>9 byte 21 GroupWise admin host database
  32378. >>9 byte 23 GroupWise admin remote host database
  32379. >>9 byte 24 GroupWise admin ADS deferment data file
  32380. >>9 default x
  32381. >>>9 byte x GroupWise: Unknown filetype %d
  32382. # IntelliTAG
  32383. >8 byte 33
  32384. >>9 byte 10 IntelliTAG (SGML) compiled DTD
  32385. >>9 default x
  32386. >>>9 byte x IntelliTAG: Unknown filetype %d
  32387. # everything else
  32388. >8 default x
  32389. >>8 byte x Unknown Corel/Wordperfect product %d,
  32390. >>>9 byte x file type %d
  32391. >10 byte 0 \b, v5.
  32392. >10 byte !0 \b, v%d.
  32393. >11 byte x \b%d
  32394. # Hangul (Korean) Word Processor File
  32395. 0 string HWP\ Document\ File Hangul (Korean) Word Processor File 3.0
  32396. # CosmicBook, from Benoit Rouits
  32397. 0 string CSBK Ted Neslson's CosmicBook hypertext file
  32398. 2 string EYWR AmigaWriter file
  32399. # chi: file(1) magic for ChiWriter files
  32400. 0 string \\1cw\ ChiWriter file
  32401. >5 string >\0 version %s
  32402. 0 string \\1cw ChiWriter file
  32403. # Quark Express from https://www.garykessler.net/library/file_sigs.html
  32404. 2 string IIXPR3 Intel Quark Express Document (English)
  32405. 2 string IIXPRa Intel Quark Express Document (Korean)
  32406. 2 string MMXPR3 Motorola Quark Express Document (English)
  32407. !:mime application/x-quark-xpress-3
  32408. 2 string MMXPRa Motorola Quark Express Document (Korean)
  32409. # adobe indesign (document, whatever...) from querkan
  32410. 0 belong 0x0606edf5 Adobe InDesign
  32411. >16 string DOCUMENT Document
  32412. #------------------------------------------------------------------------------
  32413. # ichitaro456: file(1) magic for Just System Word Processor Ichitaro
  32414. #
  32415. # Contributor kenzo-:
  32416. # Reversed-engineered JS Ichitaro magic numbers
  32417. #
  32418. 0 string DOC
  32419. >43 byte 0x14 Just System Word Processor Ichitaro v4
  32420. !:mime application/x-ichitaro4
  32421. >144 string JDASH application/x-ichitaro4
  32422. 0 string DOC
  32423. >43 byte 0x15 Just System Word Processor Ichitaro v5
  32424. !:mime application/x-ichitaro5
  32425. 0 string DOC
  32426. >43 byte 0x16 Just System Word Processor Ichitaro v6
  32427. !:mime application/x-ichitaro6
  32428. # Type: Freemind mindmap documents
  32429. # From: Jamie Thompson <debian-bugs@jamie-thompson.co.uk>
  32430. 0 string/w \<map\ version Freemind document
  32431. !:mime application/x-freemind
  32432. # Type: Freeplane mindmap documents
  32433. # From: Felix Natter <fnatter@gmx.net>
  32434. 0 string/w \<map\ version="freeplane Freeplane document
  32435. !:mime application/x-freeplane
  32436. # Type: Scribus
  32437. # From: Werner Fink <werner@suse.de>
  32438. 0 string \<SCRIBUSUTF8\ Version Scribus Document
  32439. 0 string \<SCRIBUSUTF8NEW\ Version Scribus Document
  32440. !:mime application/x-scribus
  32441. # help files .hlp compiled from html and used by gfxboot added by Joerg Jenderek
  32442. # markups page=0x04,label=0x12, followed by strings like "opt" or "main" and title=0x14
  32443. 0 ulelong&0x8080FFFF 0x00001204 gfxboot compiled html help file
  32444. # From: Joerg Jenderek
  32445. # URL: https://en.wikipedia.org/wiki/StarOffice
  32446. # Note: used in Star-, Open- and Libre-Office
  32447. # named as soffice.StarConfigFile.6 or OpenOffice.org configuration by others
  32448. 0 ubeshort 0x0400
  32449. #>(2.s+8) ubequad x \b, gap 0x%16.16llx
  32450. # test for null value in gap after theme name maybe unreliable
  32451. #>(2.s+9) ubyte 0 \b, 0-byte
  32452. # look for keyword GALRESRV near the end
  32453. # "C:\Program Files (x86)\StarOffice6.0\share\gallery\sg27.thm" Navigation, 238 objects
  32454. #>0 search/8415 GALRESRV \b, GALRESRV found
  32455. # "neues thema6.thm" MorePictures, 315 objects
  32456. #>0 search/19299 GALRESRV \b, GALRESRV FOUND
  32457. #>2 uleshort x \b, name length %u
  32458. # skip file2147.chk by check for positive name length like for sg16.thm "3D"
  32459. >2 uleshort >0 StarOffice Gallery theme
  32460. !:mime application/x-stargallery-thm
  32461. !:ext thm
  32462. # gallery name
  32463. >>2 pstring/h x %s
  32464. # number of objects
  32465. >>(2.s+4) ulelong x \b, %u object
  32466. # plural s
  32467. >>(2.s+4) ulelong !1 \bs
  32468. # if available then display first object name
  32469. >>(2.s+4) ulelong >0
  32470. # partial file name, URL or internal name like "dd2*" of 1st object or RESRV
  32471. >>>(2.s+11) pstring/h x \b, 1st %s
  32472. # From: Joerg Jenderek
  32473. # URL: http://fileformats.archiveteam.org/wiki/StarOffice_Gallery
  32474. # Note: used in Star-, Open- and Libre-Office and found in directories like
  32475. # %APPDATA%\Roaming\LibreOffice\4\user\gallery
  32476. # $HOME/.config/libreoffice/4/user/gallery
  32477. 0 string SGA3 StarOffice Gallery thumbnails
  32478. # Unknown like 0x04000?0001000142
  32479. #>4 ubequad x \b, UNKNOWN 0x%16.16llx
  32480. #!:mime application/x-sdg
  32481. !:mime application/x-stargallery-sdg
  32482. !:ext sdg
  32483. # display image magic for debugging purpose like 'BM'
  32484. # looking like PC bitmap, Windows 3.x format with unknown compression
  32485. #>11 string x \b, image magic '%-.2s'
  32486. # inspect 1st GALLERY thumbnail magic by ./images with 1 space at end
  32487. #>11 indirect x \b; contains
  32488. #------------------------------------------------------------------------------
  32489. # $File: wsdl,v 1.5 2019/04/19 00:42:27 christos Exp $
  32490. # wsdl: PHP WSDL Cache, https://www.php.net/manual/en/book.soap.php
  32491. # Cache format extracted from source:
  32492. # https://svn.php.net/viewvc/php/php-src/trunk/ext/soap/php_sdl.c?revision=HEAD&view=markup
  32493. # Requires file >= 5.05
  32494. # By Elan Ruusamae <glen@delfi.ee>, Patryk Zawadzki <patrys@pld-linux.org>, 2010-2011
  32495. 0 string wsdl PHP WSDL cache,
  32496. >4 byte x version 0x%02x
  32497. >6 ledate x \b, created %s
  32498. # uri
  32499. >10 lelong <0x7fffffff
  32500. >>10 pstring/l x \b, uri: "%s"
  32501. # source
  32502. >>>&0 lelong <0x7fffffff
  32503. >>>>&-4 pstring/l x \b, source: "%s"
  32504. # target_ns
  32505. >>>>>&0 lelong <0x7fffffff
  32506. >>>>>>&-4 pstring/l x \b, target_ns: "%s"
  32507. #------------------------------------------------------------------------------
  32508. # x68000: file(1) magic for the Sharp Home Computer
  32509. # v1.0
  32510. # Fabio R. Schmidlin <sd-snatcher@users.sourceforge.net>
  32511. # Yanagisawa PIC picture
  32512. 0 string PIC
  32513. >3 search/0x200 \x1A
  32514. >>&0 search/0x200 \x0
  32515. >>>&0 ubyte 0 Yanagisawa PIC image file,
  32516. >>>>&0 ubyte&15 0 model: X68000,
  32517. >>>>&0 ubyte&15 1 model: PC-88VA,
  32518. >>>>&0 ubyte&15 2 model: FM-TOWNS,
  32519. >>>>&0 ubyte&15 3 model: MAC,
  32520. >>>>&0 ubyte&15 15 model: Generic,
  32521. >>>>&3 ubeshort x %dx
  32522. >>>>&5 ubeshort x \b%d,
  32523. >>>>&1 ubeshort 4 colors: 16
  32524. >>>>&1 ubeshort 8 colors: 256
  32525. >>>>&1 ubeshort 12 colors: 4096
  32526. >>>>&1 ubeshort 15 colors: 32768
  32527. >>>>&1 ubeshort 16 colors: 65536
  32528. >>>>&1 ubeshort >16 colors: %d-bit
  32529. #------------------------------------------------------------------------------
  32530. # $File: xdelta,v 1.5 2011/08/08 09:01:05 christos Exp $
  32531. # file(1) magic(5) data for xdelta Josh MacDonald <jmacd@CS.Berkeley.EDU>
  32532. #
  32533. 0 string %XDELTA% XDelta binary patch file 0.14
  32534. 0 string %XDZ000% XDelta binary patch file 0.18
  32535. 0 string %XDZ001% XDelta binary patch file 0.20
  32536. 0 string %XDZ002% XDelta binary patch file 1.0
  32537. 0 string %XDZ003% XDelta binary patch file 1.0.4
  32538. 0 string %XDZ004% XDelta binary patch file 1.1
  32539. 0 string \xD6\xC3\xC4\x00 VCDIFF binary diff
  32540. #------------------------------------------------------------------------------
  32541. # $File: xenix,v 1.12 2021/02/23 00:51:10 christos Exp $
  32542. # xenix: file(1) magic for Microsoft Xenix
  32543. #
  32544. # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
  32545. # model" lifted from "magic.xenix", with comment "derived empirically;
  32546. # treat as folklore until proven"
  32547. #
  32548. # "small model", "large model", "huge model" stuff lifted from XXX
  32549. #
  32550. # XXX - "x.out" collides with PDP-11 archives
  32551. #
  32552. 0 string core core file (Xenix)
  32553. # URL: http://www.polarhome.com/service/man/?qf=86rel&tf=2&of=Xenix
  32554. # Reference: http://www.azillionmonkeys.com/qed/Omfg.pdf
  32555. # Update: Joerg Jenderek
  32556. # recordtype~TranslatorHEADerRecord
  32557. 0 byte 0x80
  32558. # GRR: line above is too general as it catches also Extensible storage engine DataBase
  32559. # skip examples like GENA.SND Switch.Snd by looking for record length maximal 1024-3
  32560. >1 uleshort <1022
  32561. # skip examples like GAME.PICTURE Strange.Pic by looking for positive record length
  32562. >>1 uleshort >0
  32563. # skip examples like Xtable.Data FRACTAL.GEN SHR.VIEW by looking for positive string length
  32564. >>>3 ubyte >0
  32565. # skip examples like OMBRE.6 with "UUUUUU" by looking for filename like "hello.c"
  32566. >>>>4 regex [a-zA-Z_/]{1,8}[.] 8086 relocatable (Microsoft)
  32567. #!:mime application/octet-stream
  32568. !:mime application/x-object
  32569. !:ext o/a
  32570. >>>>>3 pstring x \b, "%s"
  32571. # checksum
  32572. #>>>>>(3.b+4) ubyte x \b, checksum 0x%2.2x
  32573. 0 leshort 0xff65 x.out
  32574. >2 string __.SYMDEF randomized
  32575. >0 byte x archive
  32576. 0 leshort 0x206 Microsoft a.out
  32577. >8 leshort 1 Middle model
  32578. >0x1e leshort &0x10 overlay
  32579. >0x1e leshort &0x2 separate
  32580. >0x1e leshort &0x4 pure
  32581. >0x1e leshort &0x800 segmented
  32582. >0x1e leshort &0x400 standalone
  32583. >0x1e leshort &0x8 fixed-stack
  32584. >0x1c byte &0x80 byte-swapped
  32585. >0x1c byte &0x40 word-swapped
  32586. >0x10 lelong >0 not-stripped
  32587. >0x1e leshort ^0xc000 pre-SysV
  32588. >0x1e leshort &0x4000 V2.3
  32589. >0x1e leshort &0x8000 V3.0
  32590. >0x1c byte &0x4 86
  32591. >0x1c byte &0xb 186
  32592. >0x1c byte &0x9 286
  32593. >0x1c byte &0xa 386
  32594. >0x1f byte <0x040 small model
  32595. >0x1f byte =0x048 large model
  32596. >0x1f byte =0x049 huge model
  32597. >0x1e leshort &0x1 executable
  32598. >0x1e leshort ^0x1 object file
  32599. >0x1e leshort &0x40 Large Text
  32600. >0x1e leshort &0x20 Large Data
  32601. >0x1e leshort &0x120 Huge Objects Enabled
  32602. >0x10 lelong >0 not stripped
  32603. 0 leshort 0x140 old Microsoft 8086 x.out
  32604. >0x3 byte &0x4 separate
  32605. >0x3 byte &0x2 pure
  32606. >0 byte &0x1 executable
  32607. >0 byte ^0x1 relocatable
  32608. >0x14 lelong >0 not stripped
  32609. 0 lelong 0x206 b.out
  32610. >0x1e leshort &0x10 overlay
  32611. >0x1e leshort &0x2 separate
  32612. >0x1e leshort &0x4 pure
  32613. >0x1e leshort &0x800 segmented
  32614. >0x1e leshort &0x400 standalone
  32615. >0x1e leshort &0x1 executable
  32616. >0x1e leshort ^0x1 object file
  32617. >0x1e leshort &0x4000 V2.3
  32618. >0x1e leshort &0x8000 V3.0
  32619. >0x1c byte &0x4 86
  32620. >0x1c byte &0xb 186
  32621. >0x1c byte &0x9 286
  32622. >0x1c byte &0x29 286
  32623. >0x1c byte &0xa 386
  32624. >0x1e leshort &0x4 Large Text
  32625. >0x1e leshort &0x2 Large Data
  32626. >0x1e leshort &0x102 Huge Objects Enabled
  32627. 0 leshort 0x580 XENIX 8086 relocatable or 80286 small model
  32628. #------------------------------------------------------------------------------
  32629. # $File: xilinx,v 1.8 2017/03/17 21:35:28 christos Exp $
  32630. # This is Aaron's attempt at a MAGIC file for Xilinx .bit files.
  32631. # Xilinx-Magic@RevRagnarok.com
  32632. # Got the info from FPGA-FAQ 0026
  32633. #
  32634. # Rewritten to use pstring/H instead of hardcoded lengths by O. Freyermuth,
  32635. # fixes at least reading of bitfiles from Spartan 2, 3, 6.
  32636. # http://www.fpga-faq.com/FAQ_Pages/0026_Tell_me_about_bit_files.htm
  32637. #
  32638. # First there is the sync header and its length
  32639. 0 beshort 0x0009
  32640. >2 belong =0x0ff00ff0
  32641. >>&0 belong =0x0ff00ff0
  32642. >>>&0 byte =0x00
  32643. >>>&1 beshort =0x0001
  32644. >>>&3 string a Xilinx BIT data
  32645. # Next is a Pascal-style string with the NCD name. We want to capture that.
  32646. >>>>&0 pstring/H x - from %s
  32647. # And then 'b'
  32648. >>>>>&1 string b
  32649. # Then the model / part number:
  32650. >>>>>>&0 pstring/H x - for %s
  32651. # Then 'c'
  32652. >>>>>>>&1 string c
  32653. # Then the build-date
  32654. >>>>>>>>&0 pstring/H x - built %s
  32655. # Then 'd'
  32656. >>>>>>>>>&1 string d
  32657. # Then the build-time
  32658. >>>>>>>>>>&0 pstring/H x \b(%s)
  32659. # Then 'e'
  32660. >>>>>>>>>>>&1 string e
  32661. # And length of data
  32662. >>>>>>>>>>>>&0 belong x - data length 0x%x
  32663. # Raw bitstream files
  32664. 0 long 0xffffffff
  32665. >&0 belong 0xaa995566 Xilinx RAW bitstream (.BIN)
  32666. #------------------------------------------------------------------------------
  32667. # $File: xo65,v 1.4 2009/09/19 16:28:13 christos Exp $
  32668. # xo65 object files
  32669. # From: "Ullrich von Bassewitz" <uz@cc65.org>
  32670. #
  32671. 0 string \x55\x7A\x6E\x61 xo65 object,
  32672. >4 leshort x version %d,
  32673. >6 leshort&0x0001 =0x0001 with debug info
  32674. >6 leshort&0x0001 =0x0000 no debug info
  32675. # xo65 library files
  32676. 0 string \x6E\x61\x55\x7A xo65 library,
  32677. >4 leshort x version %d
  32678. # o65 object files
  32679. 0 string \x01\x00\x6F\x36\x35 o65
  32680. >6 leshort&0x1000 =0x0000 executable,
  32681. >6 leshort&0x1000 =0x1000 object,
  32682. >5 byte x version %d,
  32683. >6 leshort&0x8000 =0x8000 65816,
  32684. >6 leshort&0x8000 =0x0000 6502,
  32685. >6 leshort&0x2000 =0x2000 32 bit,
  32686. >6 leshort&0x2000 =0x0000 16 bit,
  32687. >6 leshort&0x4000 =0x4000 page reloc,
  32688. >6 leshort&0x4000 =0x0000 byte reloc,
  32689. >6 leshort&0x0003 =0x0000 alignment 1
  32690. >6 leshort&0x0003 =0x0001 alignment 2
  32691. >6 leshort&0x0003 =0x0002 alignment 4
  32692. >6 leshort&0x0003 =0x0003 alignment 256
  32693. #------------------------------------------------------------------------------
  32694. # $File: xwindows,v 1.11 2019/04/19 00:42:27 christos Exp $
  32695. # xwindows: file(1) magic for various X/Window system file formats.
  32696. # Compiled X Keymap
  32697. # XKM (compiled X keymap) files (including version and byte ordering)
  32698. 1 string mkx Compiled XKB Keymap: lsb,
  32699. >0 byte >0 version %d
  32700. >0 byte =0 obsolete
  32701. 0 string xkm Compiled XKB Keymap: msb,
  32702. >3 byte >0 version %d
  32703. >3 byte =0 obsolete
  32704. # xfsdump archive
  32705. 0 string xFSdump0 xfsdump archive
  32706. >8 belong x (version %d)
  32707. # Jaleo XFS files
  32708. 0 long 395726 Jaleo XFS file
  32709. >4 long x - version %d
  32710. >8 long x - [%d -
  32711. >20 long x \b%dx
  32712. >24 long x \b%dx
  32713. >28 long 1008 \bYUV422]
  32714. >28 long 1000 \bRGB24]
  32715. # Xcursor data
  32716. # X11 mouse cursor format defined in libXcursor, see
  32717. # https://www.x.org/archive/X11R6.8.1/doc/Xcursor.3.html
  32718. # https://cgit.freedesktop.org/xorg/lib/libXcursor/tree/include/X11/Xcursor/Xcursor.h
  32719. 0 string Xcur Xcursor data
  32720. !:mime image/x-xcursor
  32721. >10 leshort x version %d
  32722. >>8 leshort x \b.%d
  32723. #------------------------------------------------------------------------------
  32724. # $File: yara,v 1.3 2019/04/19 00:42:27 christos Exp $
  32725. # yara: file(1) magic for https://virustotal.github.io/yara/
  32726. #
  32727. 0 string YARA
  32728. >4 lelong >2047
  32729. >8 byte <20 YARA 3.x compiled rule set
  32730. # version
  32731. >>8 clear x
  32732. >>8 byte 6 created with version 3.3.0
  32733. >>8 byte 8 created with version 3.4.0
  32734. >>8 byte 11 created with version 3.5.0
  32735. >>8 default x
  32736. >>>8 byte x development version 0x%02x
  32737. #------------------------------------------------------------------------------
  32738. # zfs: file(1) magic for ZFS dumps
  32739. #
  32740. # From <rea-fbsd@codelabs.ru>
  32741. # ZFS dump header has the following structure (as per zfs_ioctl.h
  32742. # in FreeBSD with drr_type is set to DRR_BEGIN)
  32743. #
  32744. # enum {
  32745. # DRR_BEGIN, DRR_OBJECT, DRR_FREEOBJECTS,
  32746. # DRR_WRITE, DRR_FREE, DRR_END,
  32747. # } drr_type;
  32748. # uint32_t drr_pad;
  32749. # uint64_t drr_magic;
  32750. # uint64_t drr_version;
  32751. # uint64_t drr_creation_time;
  32752. # dmu_objset_type_t drr_type;
  32753. # uint32_t drr_pad;
  32754. # uint64_t drr_toguid;
  32755. # uint64_t drr_fromguid;
  32756. # char drr_toname[MAXNAMELEN];
  32757. #
  32758. # Backup magic is 0x00000002f5bacbac (quad word)
  32759. # The drr_type is defined as
  32760. # typedef enum dmu_objset_type {
  32761. # DMU_OST_NONE,
  32762. # DMU_OST_META,
  32763. # DMU_OST_ZFS,
  32764. # DMU_OST_ZVOL,
  32765. # DMU_OST_OTHER, /* For testing only! */
  32766. # DMU_OST_ANY, /* Be careful! */
  32767. # DMU_OST_NUMTYPES
  32768. # } dmu_objset_type_t;
  32769. #
  32770. # Almost all uint64_t fields are printed as the 32-bit ones (with high
  32771. # 32 bits zeroed), because there is no simple way to print them as the
  32772. # full 64-bit values.
  32773. # Big-endian values
  32774. 8 string \000\000\000\002\365\272\313\254 ZFS shapshot (big-endian machine),
  32775. >20 belong x version %u,
  32776. >32 belong 0 type: NONE,
  32777. >32 belong 1 type: META,
  32778. >32 belong 2 type: ZFS,
  32779. >32 belong 3 type: ZVOL,
  32780. >32 belong 4 type: OTHER,
  32781. >32 belong 5 type: ANY,
  32782. >32 belong >5 type: UNKNOWN (%u),
  32783. >40 byte x destination GUID: %02X
  32784. >41 byte x %02X
  32785. >42 byte x %02X
  32786. >43 byte x %02X
  32787. >44 byte x %02X
  32788. >45 byte x %02X
  32789. >46 byte x %02X
  32790. >47 byte x %02X,
  32791. >48 ulong >0
  32792. >>52 ulong >0
  32793. >>>48 byte x source GUID: %02X
  32794. >>>49 byte x %02X
  32795. >>>50 byte x %02X
  32796. >>>51 byte x %02X
  32797. >>>52 byte x %02X
  32798. >>>53 byte x %02X
  32799. >>>54 byte x %02X
  32800. >>>55 byte x %02X,
  32801. >56 string >\0 name: '%s'
  32802. # Little-endian values
  32803. 8 string \254\313\272\365\002\000\000\000 ZFS shapshot (little-endian machine),
  32804. >16 lelong x version %u,
  32805. >32 lelong 0 type: NONE,
  32806. >32 lelong 1 type: META,
  32807. >32 lelong 2 type: ZFS,
  32808. >32 lelong 3 type: ZVOL,
  32809. >32 lelong 4 type: OTHER,
  32810. >32 lelong 5 type: ANY,
  32811. >32 lelong >5 type: UNKNOWN (%u),
  32812. >47 byte x destination GUID: %02X
  32813. >46 byte x %02X
  32814. >45 byte x %02X
  32815. >44 byte x %02X
  32816. >43 byte x %02X
  32817. >42 byte x %02X
  32818. >41 byte x %02X
  32819. >40 byte x %02X,
  32820. >48 ulong >0
  32821. >>52 ulong >0
  32822. >>>55 byte x source GUID: %02X
  32823. >>>54 byte x %02X
  32824. >>>53 byte x %02X
  32825. >>>52 byte x %02X
  32826. >>>51 byte x %02X
  32827. >>>50 byte x %02X
  32828. >>>49 byte x %02X
  32829. >>>48 byte x %02X,
  32830. >56 string >\0 name: '%s'
  32831. #------------------------------------------------------------------------------
  32832. # $File: zilog,v 1.7 2009/09/19 16:28:13 christos Exp $
  32833. # zilog: file(1) magic for Zilog Z8000.
  32834. #
  32835. # Was it big-endian or little-endian? My Product Specification doesn't
  32836. # say.
  32837. #
  32838. 0 long 0xe807 object file (z8000 a.out)
  32839. 0 long 0xe808 pure object file (z8000 a.out)
  32840. 0 long 0xe809 separate object file (z8000 a.out)
  32841. 0 long 0xe805 overlay object file (z8000 a.out)
  32842. #------------------------------------------------------------------------------
  32843. # $File: zip,v 1.6 2021/02/05 22:55:36 christos Exp $
  32844. # zip: file(1) magic for zip files; this is not use
  32845. # Note the version of magic in archive is currently stronger, this is
  32846. # just an example until negative offsets are supported better
  32847. # Zip Central Directory record
  32848. 0 name zipcd
  32849. >0 string PK\001\002 Zip archive data
  32850. !:mime application/zip
  32851. >>4 leshort x \b, made by
  32852. >>4 use zipversion
  32853. >>4 use ziphost
  32854. >>6 leshort x \b, extract using at least
  32855. >>6 use zipversion
  32856. >>12 ledate x \b, last modified %s
  32857. >>24 lelong >0 \b, uncompressed size %d
  32858. >>10 leshort x \b, method=
  32859. >>10 use zipcompression
  32860. # URL: https://en.wikipedia.org/wiki/Zip_(file_format)
  32861. # reference: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT (Version: 6.3.9)
  32862. # Zip known compressions
  32863. 0 name zipcompression
  32864. >0 leshort 0 \bstore
  32865. >0 leshort 1 \bShrinking
  32866. >0 leshort 6 \bImploding
  32867. >0 leshort 7 \bTokenizing
  32868. >0 leshort 8 \bdeflate
  32869. >0 leshort 9 \bdeflate64
  32870. >0 leshort 10 \bLibrary imploding
  32871. #>0 leshort 11 \bReserved by PKWARE
  32872. >0 leshort 12 \bbzip2
  32873. #>0 leshort 13 \bReserved by PKWARE
  32874. >0 leshort 14 \blzma
  32875. #>0 leshort 15 \bReserved by PKWARE
  32876. >0 leshort 16 \bCMPSC (IBM z/OS)
  32877. #>0 leshort 17 \bReserved by PKWARE
  32878. >0 leshort 18 \bIBM TERSE
  32879. >0 leshort 19 \bIBM LZ77 (z/Architecture)
  32880. >0 leshort 20 \bZstd (deprecated)
  32881. >0 leshort 93 \bZstd
  32882. >0 leshort 94 \bMP3
  32883. >0 leshort 95 \bxz
  32884. >0 leshort 96 \bJpeg
  32885. >0 leshort 97 \bWavPack
  32886. >0 leshort 98 \bPPMd
  32887. >0 leshort 99 \bAES Encrypted
  32888. >0 default x
  32889. >>0 leshort x \b[%#x]
  32890. # Zip known versions
  32891. 0 name zipversion
  32892. # The lower byte indicates the ZIP version of this file. The value/10 indicates
  32893. # the major version number, and the value mod 10 is the minor version number.
  32894. >0 ubyte/10 x v%u
  32895. >0 ubyte%10 x \b.%u
  32896. # >0 leshort 0x09 v0.9
  32897. # >0 leshort 0x0a v1.0
  32898. # >0 leshort 0x0b v1.1
  32899. # >0 leshort 0x14 v2.0
  32900. # >0 leshort 0x15 v2.1
  32901. # >0 leshort 0x19 v2.5
  32902. # >0 leshort 0x1b v2.7
  32903. # >0 leshort 0x2d v4.5
  32904. # >0 leshort 0x2e v4.6
  32905. # >0 leshort 0x32 v5.0
  32906. # >0 leshort 0x33 v5.1
  32907. # >0 leshort 0x34 v5.2
  32908. # >0 leshort 0x3d v6.1
  32909. # >0 leshort 0x3e v6.2
  32910. # >0 leshort 0x3f v6.3
  32911. # >0 default x
  32912. # >>0 leshort x v?[%#x]
  32913. # display compatible host system name of ZIP archive
  32914. 0 name ziphost
  32915. # The upper byte indicates the compatibility of the file attribute information.
  32916. # If the file is compatible with MS-DOS (v 2.04g) then this value will be zero.
  32917. #>1 ubyte 0 DOS
  32918. >1 ubyte 1 Amiga
  32919. >1 ubyte 2 OpenVMS
  32920. >1 ubyte 3 UNIX
  32921. >1 ubyte 4 VM/CMS
  32922. >1 ubyte 6 OS/2
  32923. >1 ubyte 7 Macintosh
  32924. >1 ubyte 11 MVS
  32925. >1 ubyte 13 Acorn Risc
  32926. >1 ubyte 16 BeOS
  32927. >1 ubyte 17 Tandem
  32928. # 9 untested
  32929. >1 ubyte 5 Atari ST
  32930. >1 ubyte 8 Z-System
  32931. >1 ubyte 9 CP/M
  32932. >1 ubyte 10 Windows NTFS
  32933. >1 ubyte 12 VSE
  32934. >1 ubyte 14 VFAT
  32935. >1 ubyte 15 alternate MVS
  32936. >1 ubyte 18 OS/400
  32937. >1 ubyte 19 OS X
  32938. # unused
  32939. #>1 ubyte >19 unused 0x%x
  32940. # Zip End Of Central Directory record
  32941. -22 string PK\005\006
  32942. #>4 leshort >1 \b, %d disks
  32943. #>6 leshort >1 \b, central directory disk %d
  32944. #>8 leshort >1 \b, %d central directories on this disk
  32945. #>10 leshort >1 \b, %d central directories
  32946. #>12 lelong x \b, %d central directory bytes
  32947. >(16.l) use zipcd
  32948. >>20 pstring/l >0 \b, %s
  32949. #------------------------------------------------------------------------------
  32950. # $File: zyxel,v 1.6 2009/09/19 16:28:13 christos Exp $
  32951. # zyxel: file(1) magic for ZyXEL modems
  32952. #
  32953. # From <rob@pe1chl.ampr.org>
  32954. # These are the /etc/magic entries to decode datafiles as used for the
  32955. # ZyXEL U-1496E DATA/FAX/VOICE modems. (This header conforms to a
  32956. # ZyXEL-defined standard)
  32957. 0 string ZyXEL\002 ZyXEL voice data
  32958. >10 byte 0 - CELP encoding
  32959. >10 byte&0x0B 1 - ADPCM2 encoding
  32960. >10 byte&0x0B 2 - ADPCM3 encoding
  32961. >10 byte&0x0B 3 - ADPCM4 encoding
  32962. >10 byte&0x0B 8 - New ADPCM3 encoding
  32963. >10 byte&0x04 4 with resync