magic 709 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127
  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@mx.gw.com
  6. #------------------------------------------------------------------------------
  7. # Localstuff: file(1) magic for locally observed files
  8. #
  9. # $File: Localstuff,v 1.4 2003/03/23 04:17: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.5 2009/09/19 16:28:07 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. #------------------------------------------------------------------------------
  72. # $File: adi,v 1.4 2009/09/19 16:28:07 christos Exp $
  73. # adi: file(1) magic for ADi's objects
  74. # From Gregory McGarry <g.mcgarry@ieee.org>
  75. #
  76. 0 leshort 0x521c COFF DSP21k
  77. >18 lelong &02 executable,
  78. >18 lelong ^02
  79. >>18 lelong &01 static object,
  80. >>18 lelong ^01 relocatable object,
  81. >18 lelong &010 stripped
  82. >18 lelong ^010 not stripped
  83. #------------------------------------------------------------------------------
  84. # $File: adventure,v 1.14 2012/06/21 01:32:26 christos Exp $
  85. # adventure: file(1) magic for Adventure game files
  86. #
  87. # from Allen Garvin <earendil@faeryland.tamu-commerce.edu>
  88. # Edited by Dave Chapeskie <dchapes@ddm.on.ca> Jun 28, 1998
  89. # Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
  90. #
  91. # ALAN
  92. # I assume there are other, lower versions, but these are the only ones I
  93. # saw in the archive.
  94. 0 beshort 0x0206 ALAN game data
  95. >2 byte <10 version 2.6%d
  96. # Infocom (see z-machine)
  97. #------------------------------------------------------------------------------
  98. # Z-machine: file(1) magic for Z-machine binaries.
  99. # Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
  100. #
  101. #http://www.gnelson.demon.co.uk/zspec/sect11.html
  102. #http://www.jczorkmid.net/~jpenney/ZSpec11-latest.txt
  103. #http://en.wikipedia.org/wiki/Z-machine
  104. # The first byte is the Z-machine revision; it is always between 1 and 8. We
  105. # had false matches (for instance, inbig5.ocp from the Omega TeX extension as
  106. # well as an occasional MP3 file), so we sanity-check the version number.
  107. #
  108. # It might be possible to sanity-check the release number as well, as it seems
  109. # (at least in classic Infocom games) to always be a relatively small number,
  110. # always under 150 or so, but as this isn't rigorous, we'll wait on that until
  111. # it becomes clear that it's needed.
  112. #
  113. 0 ubyte >0
  114. >0 ubyte <9
  115. >>16 belong&0xfe00f0f0 0x3030
  116. >>>0 ubyte < 10
  117. >>>>2 ubeshort < 10
  118. >>>>>18 regex [0-9][0-9][0-9][0-9][0-9][0-9]
  119. >>>>>>0 ubyte < 10 Infocom (Z-machine %d,
  120. >>>>>>>2 ubeshort < 10 Release %d /
  121. >>>>>>>>18 string >\0 Serial %.6s)
  122. !:strength + 40
  123. #------------------------------------------------------------------------------
  124. # Glulx: file(1) magic for Glulx binaries.
  125. #
  126. # I haven't checked for false matches yet.
  127. #
  128. 0 string Glul Glulx game data
  129. >4 beshort x (Version %d
  130. >>6 byte x \b.%d
  131. >>8 byte x \b.%d)
  132. >36 string Info Compiled by Inform
  133. # For Quetzal and blorb magic see iff
  134. # TADS (Text Adventure Development System) version 2
  135. # All files are machine-independent (games compile to byte-code) and are tagged
  136. # with a version string of the form "V2.<digit>.<digit>\0".
  137. # Game files start with "TADS2 bin\n\r\032\0" then the compiler version.
  138. 0 string TADS2\ bin TADS
  139. >9 belong !0x0A0D1A00 game data, CORRUPTED
  140. >9 belong 0x0A0D1A00
  141. >>13 string >\0 %s game data
  142. # Resource files start with "TADS2 rsc\n\r\032\0" then the compiler version.
  143. 0 string TADS2\ rsc TADS
  144. >9 belong !0x0A0D1A00 resource data, CORRUPTED
  145. >9 belong 0x0A0D1A00
  146. >>13 string >\0 %s resource data
  147. # Some saved game files start with "TADS2 save/g\n\r\032\0", a little-endian
  148. # 2-byte length N, the N-char name of the game file *without* a NUL (darn!),
  149. # "TADS2 save\n\r\032\0" and the interpreter version.
  150. 0 string TADS2\ save/g TADS
  151. >12 belong !0x0A0D1A00 saved game data, CORRUPTED
  152. >12 belong 0x0A0D1A00
  153. >>(16.s+32) string >\0 %s saved game data
  154. # Other saved game files start with "TADS2 save\n\r\032\0" and the interpreter
  155. # version.
  156. 0 string TADS2\ save TADS
  157. >10 belong !0x0A0D1A00 saved game data, CORRUPTED
  158. >10 belong 0x0A0D1A00
  159. >>14 string >\0 %s saved game data
  160. # TADS (Text Adventure Development System) version 3
  161. # Game files start with "T3-image\015\012\032"
  162. 0 string T3-image\015\012\032
  163. >11 leshort x TADS 3 game data (format version %d)
  164. # Saved game files start with "T3-state-v####\015\012\032"
  165. # where #### is a format version number
  166. 0 string T3-state-v
  167. >14 string \015\012\032 TADS 3 saved game data (format version
  168. >>10 byte x %c
  169. >>11 byte x \b%c
  170. >>12 byte x \b%c
  171. >>13 byte x \b%c)
  172. # Danny Milosavljevic <danny.milo@gmx.net>
  173. # this are adrift (adventure game standard) game files, extension .taf
  174. # depending on version magic continues with 0x93453E6139FA (V 4.0)
  175. # 0x9445376139FA (V 3.90)
  176. # 0x9445366139FA (V 3.80)
  177. # this is from source (http://www.adrift.org.uk/) and I have some taf
  178. # files, and checked them.
  179. #0 belong 0x3C423FC9
  180. #>4 belong 0x6A87C2CF Adrift game file
  181. #!:mime application/x-adrift
  182. #------------------------------------------------------------------------------
  183. # $File: allegro,v 1.4 2009/09/19 16:28:07 christos Exp $
  184. # allegro: file(1) magic for Allegro datafiles
  185. # Toby Deshane <hac@shoelace.digivill.net>
  186. #
  187. 0 belong 0x736C6821 Allegro datafile (packed)
  188. 0 belong 0x736C682E Allegro datafile (not packed/autodetect)
  189. 0 belong 0x736C682B Allegro datafile (appended exe data)
  190. #------------------------------------------------------------------------------
  191. # $File: alliant,v 1.7 2009/09/19 16:28:07 christos Exp $
  192. # alliant: file(1) magic for Alliant FX series a.out files
  193. #
  194. # If the FX series is the one that had a processor with a 68K-derived
  195. # instruction set, the "short" should probably become "beshort" and the
  196. # "long" should probably become "belong".
  197. # If it's the i860-based one, they should probably become either the
  198. # big-endian or little-endian versions, depending on the mode they ran
  199. # the 860 in....
  200. #
  201. 0 short 0420 0420 Alliant virtual executable
  202. >2 short &0x0020 common library
  203. >16 long >0 not stripped
  204. 0 short 0421 0421 Alliant compact executable
  205. >2 short &0x0020 common library
  206. >16 long >0 not stripped
  207. #------------------------------------------------------------------------------
  208. # $File: amanda,v 1.5 2009/09/19 16:28:07 christos Exp $
  209. # amanda: file(1) magic for amanda file format
  210. #
  211. 0 string AMANDA:\ AMANDA
  212. >8 string TAPESTART\ DATE tape header file,
  213. >>23 string X
  214. >>>25 string >\ Unused %s
  215. >>23 string >\ DATE %s
  216. >8 string FILE\ dump file,
  217. >>13 string >\ DATE %s
  218. #------------------------------------------------------------------------------
  219. # $File: amigaos,v 1.15 2012/06/21 01:13:59 christos Exp $
  220. # amigaos: file(1) magic for AmigaOS binary formats:
  221. #
  222. # From ignatios@cs.uni-bonn.de (Ignatios Souvatzis)
  223. #
  224. 0 belong 0x000003fa AmigaOS shared library
  225. 0 belong 0x000003f3 AmigaOS loadseg()ble executable/binary
  226. 0 belong 0x000003e7 AmigaOS object/library data
  227. #
  228. 0 beshort 0xe310 Amiga Workbench
  229. >2 beshort 1
  230. >>48 byte 1 disk icon
  231. >>48 byte 2 drawer icon
  232. >>48 byte 3 tool icon
  233. >>48 byte 4 project icon
  234. >>48 byte 5 garbage icon
  235. >>48 byte 6 device icon
  236. >>48 byte 7 kickstart icon
  237. >>48 byte 8 workbench application icon
  238. >2 beshort >1 icon, vers. %d
  239. #
  240. # various sound formats from the Amiga
  241. # G=F6tz Waschk <waschk@informatik.uni-rostock.de>
  242. #
  243. 0 string FC14 Future Composer 1.4 Module sound file
  244. 0 string SMOD Future Composer 1.3 Module sound file
  245. 0 string AON4artofnoise Art Of Noise Module sound file
  246. 1 string MUGICIAN/SOFTEYES Mugician Module sound file
  247. 58 string SIDMON\ II\ -\ THE Sidmon 2.0 Module sound file
  248. 0 string Synth4.0 Synthesis Module sound file
  249. 0 string ARP. The Holy Noise Module sound file
  250. 0 string BeEp\0 JamCracker Module sound file
  251. 0 string COSO\0 Hippel-COSO Module sound file
  252. # Too simple (short, pure ASCII, deep), MPi
  253. #26 string V.3 Brian Postma's Soundmon Module sound file v3
  254. #26 string BPSM Brian Postma's Soundmon Module sound file v3
  255. #26 string V.2 Brian Postma's Soundmon Module sound file v2
  256. # The following are from: "Stefan A. Haubenthal" <polluks@web.de>
  257. 0 beshort 0x0f00 AmigaOS bitmap font
  258. 0 beshort 0x0f03 AmigaOS outline font
  259. 0 belong 0x80001001 AmigaOS outline tag
  260. 0 string ##\ version catalog translation
  261. 0 string EMOD\0 Amiga E module
  262. 8 string ECXM\0 ECX module
  263. 0 string/c @database AmigaGuide file
  264. # Amiga disk types
  265. #
  266. 0 string RDSK Rigid Disk Block
  267. >160 string x on %.24s
  268. 0 string DOS\0 Amiga DOS disk
  269. 0 string DOS\1 Amiga FFS disk
  270. 0 string DOS\2 Amiga Inter DOS disk
  271. 0 string DOS\3 Amiga Inter FFS disk
  272. 0 string DOS\4 Amiga Fastdir DOS disk
  273. 0 string DOS\5 Amiga Fastdir FFS disk
  274. 0 string KICK Kickstart disk
  275. # From: Alex Beregszaszi <alex@fsn.hu>
  276. 0 string LZX LZX compressed archive (Amiga)
  277. # From: Przemek Kramarczyk <pkramarczyk@gmail.com>
  278. 0 string .KEY AmigaDOS script
  279. 0 string .key AmigaDOS script
  280. #------------------------------------------------------------
  281. # $File: android,v 1.3 2013/11/08 01:24:22 christos Exp $
  282. # Various android related magic entries
  283. #------------------------------------------------------------
  284. # Dalvik .dex format. http://retrodev.com/android/dexformat.html
  285. # From <mkf@google.com> "Mike Fleming"
  286. # Fixed to avoid regexec 17 errors on some dex files
  287. # From <diff@lookout.com> "Tim Strazzere"
  288. 0 string dex\n
  289. >0 regex dex\n[0-9]{2}\0 Dalvik dex file
  290. >4 string >000 version %s
  291. 0 string dey\n
  292. >0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host)
  293. >4 string >000 version %s
  294. # http://android.stackexchange.com/questions/23357/\
  295. # is-there-a-way-to-look-inside-and-modify-an-adb-backup-created-file/\
  296. # 23608#23608
  297. 0 string ANDROID\040BACKUP\n Android Backup
  298. >15 string 1\n \b, version 1
  299. >17 string 0\n \b, uncompressed
  300. >17 string 1\n \b, compressed
  301. >19 string none\n \b, unencrypted
  302. >19 string AES-256\n \b, encrypted AES-256
  303. # Android bootimg format
  304. # From https://android.googlesource.com/\
  305. # platform/system/core/+/master/mkbootimg/bootimg.h
  306. 0 string ANDROID! Android bootimg
  307. >8 lelong >0 \b, kernel
  308. >>12 lelong >0 \b (0x%x)
  309. >16 lelong >0 \b, ramdisk
  310. >>20 lelong >0 \b (0x%x)
  311. >24 lelong >0 \b, second stage
  312. >>28 lelong >0 \b (0x%x)
  313. >36 lelong >0 \b, page size: %d
  314. >38 string >0 \b, name: %s
  315. >64 string >0 \b, cmdline (%s)
  316. # Dalvik .dex format. http://retrodev.com/android/dexformat.html
  317. # From <mkf@google.com> "Mike Fleming"
  318. # Fixed to avoid regexec 17 errors on some dex files
  319. # From <diff@lookout.com> "Tim Strazzere"
  320. 0 string dex\n
  321. >0 regex dex\n[0-9]{2}\0 Dalvik dex file
  322. >4 string >000 version %s
  323. 0 string dey\n
  324. >0 regex dey\n[0-9]{2}\0 Dalvik dex file (optimized for host)
  325. >4 string >000 version %s
  326. # http://android.stackexchange.com/questions/23357/\
  327. # is-there-a-way-to-look-inside-and-modify-an-adb-backup-created-file/\
  328. # 23608#23608
  329. 0 string ANDROID\040BACKUP\n Android Backup
  330. >15 string 1\n \b, version 1
  331. >17 string 0\n \b, uncompressed
  332. >17 string 1\n \b, compressed
  333. >19 string none\n \b, unencrypted
  334. >19 string AES-256\n \b, encrypted AES-256
  335. # Android bootimg format
  336. # From https://android.googlesource.com/\
  337. # platform/system/core/+/master/mkbootimg/bootimg.h
  338. 0 string ANDROID! Android bootimg
  339. >8 lelong >0 \b, kernel
  340. >>12 lelong >0 \b (0x%x)
  341. >16 lelong >0 \b, ramdisk
  342. >>20 lelong >0 \b (0x%x)
  343. >24 lelong >0 \b, second stage
  344. >>28 lelong >0 \b (0x%x)
  345. >36 lelong >0 \b, page size: %d
  346. >38 string >0 \b, name: %s
  347. >64 string >0 \b, cmdline (%s)
  348. # Android Backup archive
  349. # From: Ariel Shkedi
  350. # File extension: .ab
  351. # No mime-type defined
  352. # URL: https://github.com/android/platform_frameworks_base/blob/\
  353. # 0bacfd2ba68d21a68a3df345b830bc2a1e515b5a/services/java/com/\
  354. # android/server/BackupManagerService.java#L2367
  355. # After the header comes a tar file
  356. # If compressed, the entire tar file is compressed with JAVA deflate
  357. #
  358. # Include the version number hardcoded with the magic string to avoid
  359. # false positives
  360. 0 string/b ANDROID\ BACKUP\n1\n Android Backup
  361. >17 string 0\n \b, Not-Compressed
  362. >17 string 1\n \b, Compressed
  363. # any string as long as it's not the word none (which is matched below)
  364. >>19 regex/1 \^([^n\n]|n[^o]|no[^n]|non[^e]|none.+).* \b, Encrypted (%s)
  365. >>19 string none\n \b, Not-Encrypted
  366. # Commented out because they don't seem useful to print
  367. # (but they are part of the header - the tar file comes after them):
  368. #>>>&1 regex/1 .* \b, Password salt: %s
  369. #>>>>&1 regex/1 .* \b, Master salt: %s
  370. #>>>>>&1 regex/1 .* \b, PBKDF2 rounds: %s
  371. #>>>>>>&1 regex/1 .* \b, IV: %s
  372. #>>>>>>>&1 regex/1 .* \b, Key: %s
  373. #------------------------------------------------------------------------------
  374. # $File: animation,v 1.49 2013/08/15 13:15:11 christos Exp $
  375. # animation: file(1) magic for animation/movie formats
  376. #
  377. # animation formats
  378. # MPEG, FLI, DL originally from vax@ccwf.cc.utexas.edu (VaX#n8)
  379. # FLC, SGI, Apple originally from Daniel Quinlan (quinlan@yggdrasil.com)
  380. # SGI and Apple formats
  381. 0 string MOVI Silicon Graphics movie file
  382. !:mime video/x-sgi-movie
  383. 4 string moov Apple QuickTime
  384. !:mime video/quicktime
  385. >12 string mvhd \b movie (fast start)
  386. >12 string mdra \b URL
  387. >12 string cmov \b movie (fast start, compressed header)
  388. >12 string rmra \b multiple URLs
  389. 4 string mdat Apple QuickTime movie (unoptimized)
  390. !:mime video/quicktime
  391. #4 string wide Apple QuickTime movie (unoptimized)
  392. #!:mime video/quicktime
  393. #4 string skip Apple QuickTime movie (modified)
  394. #!:mime video/quicktime
  395. #4 string free Apple QuickTime movie (modified)
  396. #!:mime video/quicktime
  397. 4 string idsc Apple QuickTime image (fast start)
  398. !:mime image/x-quicktime
  399. #4 string idat Apple QuickTime image (unoptimized)
  400. #!:mime image/x-quicktime
  401. 4 string pckg Apple QuickTime compressed archive
  402. !:mime application/x-quicktime-player
  403. 4 string/W jP JPEG 2000 image
  404. !:mime image/jp2
  405. 4 string ftyp ISO Media
  406. >8 string isom \b, MPEG v4 system, version 1
  407. !:mime video/mp4
  408. >8 string iso2 \b, MPEG v4 system, part 12 revision
  409. >8 string mp41 \b, MPEG v4 system, version 1
  410. !:mime video/mp4
  411. >8 string mp42 \b, MPEG v4 system, version 2
  412. !:mime video/mp4
  413. >8 string mp7t \b, MPEG v4 system, MPEG v7 XML
  414. >8 string mp7b \b, MPEG v4 system, MPEG v7 binary XML
  415. >8 string/W jp2 \b, JPEG 2000
  416. !:mime image/jp2
  417. >8 string 3ge \b, MPEG v4 system, 3GPP
  418. !:mime video/3gpp
  419. >8 string 3gg \b, MPEG v4 system, 3GPP
  420. !:mime video/3gpp
  421. >8 string 3gp \b, MPEG v4 system, 3GPP
  422. !:mime video/3gpp
  423. >8 string 3gs \b, MPEG v4 system, 3GPP
  424. !:mime video/3gpp
  425. >8 string 3g2 \b, MPEG v4 system, 3GPP2
  426. !:mime video/3gpp2
  427. >>11 byte 4 \b v4 (H.263/AMR GSM 6.10)
  428. >>11 byte 5 \b v5 (H.263/AMR GSM 6.10)
  429. >>11 byte 6 \b v6 (ITU H.264/AMR GSM 6.10)
  430. >8 string mmp4 \b, MPEG v4 system, 3GPP Mobile
  431. !:mime video/mp4
  432. >8 string avc1 \b, MPEG v4 system, 3GPP JVT AVC
  433. !:mime video/3gpp
  434. >8 string/W M4A \b, MPEG v4 system, iTunes AAC-LC
  435. !:mime audio/mp4
  436. >8 string/W M4V \b, MPEG v4 system, iTunes AVC-LC
  437. !:mime video/mp4
  438. >8 string/W M4P \b, MPEG v4 system, iTunes AES encrypted
  439. >8 string/W M4B \b, MPEG v4 system, iTunes bookmarked
  440. >8 string/W qt \b, Apple QuickTime movie
  441. !:mime video/quicktime
  442. # MPEG sequences
  443. # Scans for all common MPEG header start codes
  444. 0 belong 0x00000001
  445. >4 byte&0x1F 0x07 JVT NAL sequence, H.264 video
  446. >>5 byte 66 \b, baseline
  447. >>5 byte 77 \b, main
  448. >>5 byte 88 \b, extended
  449. >>7 byte x \b @ L %u
  450. 0 belong&0xFFFFFF00 0x00000100
  451. >3 byte 0xBA MPEG sequence
  452. !:mime video/mpeg
  453. >>4 byte &0x40 \b, v2, program multiplex
  454. >>4 byte ^0x40 \b, v1, system multiplex
  455. >3 byte 0xBB MPEG sequence, v1/2, multiplex (missing pack header)
  456. >3 byte&0x1F 0x07 MPEG sequence, H.264 video
  457. >>4 byte 66 \b, baseline
  458. >>4 byte 77 \b, main
  459. >>4 byte 88 \b, extended
  460. >>6 byte x \b @ L %u
  461. # GRR too general as it catches also FoxPro Memo example NG.FPT
  462. >3 byte 0xB0 MPEG sequence, v4
  463. # TODO: maybe this extra line exclude FoxPro Memo example NG.FPT starting with 000001b0 00000100 00000000
  464. #>>4 byte !0 MPEG sequence, v4
  465. !:mime video/mpeg4-generic
  466. >>5 belong 0x000001B5
  467. >>>9 byte &0x80
  468. >>>>10 byte&0xF0 16 \b, video
  469. >>>>10 byte&0xF0 32 \b, still texture
  470. >>>>10 byte&0xF0 48 \b, mesh
  471. >>>>10 byte&0xF0 64 \b, face
  472. >>>9 byte&0xF8 8 \b, video
  473. >>>9 byte&0xF8 16 \b, still texture
  474. >>>9 byte&0xF8 24 \b, mesh
  475. >>>9 byte&0xF8 32 \b, face
  476. >>4 byte 1 \b, simple @ L1
  477. >>4 byte 2 \b, simple @ L2
  478. >>4 byte 3 \b, simple @ L3
  479. >>4 byte 4 \b, simple @ L0
  480. >>4 byte 17 \b, simple scalable @ L1
  481. >>4 byte 18 \b, simple scalable @ L2
  482. >>4 byte 33 \b, core @ L1
  483. >>4 byte 34 \b, core @ L2
  484. >>4 byte 50 \b, main @ L2
  485. >>4 byte 51 \b, main @ L3
  486. >>4 byte 53 \b, main @ L4
  487. >>4 byte 66 \b, n-bit @ L2
  488. >>4 byte 81 \b, scalable texture @ L1
  489. >>4 byte 97 \b, simple face animation @ L1
  490. >>4 byte 98 \b, simple face animation @ L2
  491. >>4 byte 99 \b, simple face basic animation @ L1
  492. >>4 byte 100 \b, simple face basic animation @ L2
  493. >>4 byte 113 \b, basic animation text @ L1
  494. >>4 byte 114 \b, basic animation text @ L2
  495. >>4 byte 129 \b, hybrid @ L1
  496. >>4 byte 130 \b, hybrid @ L2
  497. >>4 byte 145 \b, advanced RT simple @ L!
  498. >>4 byte 146 \b, advanced RT simple @ L2
  499. >>4 byte 147 \b, advanced RT simple @ L3
  500. >>4 byte 148 \b, advanced RT simple @ L4
  501. >>4 byte 161 \b, core scalable @ L1
  502. >>4 byte 162 \b, core scalable @ L2
  503. >>4 byte 163 \b, core scalable @ L3
  504. >>4 byte 177 \b, advanced coding efficiency @ L1
  505. >>4 byte 178 \b, advanced coding efficiency @ L2
  506. >>4 byte 179 \b, advanced coding efficiency @ L3
  507. >>4 byte 180 \b, advanced coding efficiency @ L4
  508. >>4 byte 193 \b, advanced core @ L1
  509. >>4 byte 194 \b, advanced core @ L2
  510. >>4 byte 209 \b, advanced scalable texture @ L1
  511. >>4 byte 210 \b, advanced scalable texture @ L2
  512. >>4 byte 211 \b, advanced scalable texture @ L3
  513. >>4 byte 225 \b, simple studio @ L1
  514. >>4 byte 226 \b, simple studio @ L2
  515. >>4 byte 227 \b, simple studio @ L3
  516. >>4 byte 228 \b, simple studio @ L4
  517. >>4 byte 229 \b, core studio @ L1
  518. >>4 byte 230 \b, core studio @ L2
  519. >>4 byte 231 \b, core studio @ L3
  520. >>4 byte 232 \b, core studio @ L4
  521. >>4 byte 240 \b, advanced simple @ L0
  522. >>4 byte 241 \b, advanced simple @ L1
  523. >>4 byte 242 \b, advanced simple @ L2
  524. >>4 byte 243 \b, advanced simple @ L3
  525. >>4 byte 244 \b, advanced simple @ L4
  526. >>4 byte 245 \b, advanced simple @ L5
  527. >>4 byte 247 \b, advanced simple @ L3b
  528. >>4 byte 248 \b, FGS @ L0
  529. >>4 byte 249 \b, FGS @ L1
  530. >>4 byte 250 \b, FGS @ L2
  531. >>4 byte 251 \b, FGS @ L3
  532. >>4 byte 252 \b, FGS @ L4
  533. >>4 byte 253 \b, FGS @ L5
  534. >3 byte 0xB5 MPEG sequence, v4
  535. !:mime video/mpeg4-generic
  536. >>4 byte &0x80
  537. >>>5 byte&0xF0 16 \b, video (missing profile header)
  538. >>>5 byte&0xF0 32 \b, still texture (missing profile header)
  539. >>>5 byte&0xF0 48 \b, mesh (missing profile header)
  540. >>>5 byte&0xF0 64 \b, face (missing profile header)
  541. >>4 byte&0xF8 8 \b, video (missing profile header)
  542. >>4 byte&0xF8 16 \b, still texture (missing profile header)
  543. >>4 byte&0xF8 24 \b, mesh (missing profile header)
  544. >>4 byte&0xF8 32 \b, face (missing profile header)
  545. >3 byte 0xB3 MPEG sequence
  546. !:mime video/mpeg
  547. >>12 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
  548. >>12 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
  549. >>12 belong 0x000001B5 \b, v2,
  550. >>>16 byte&0x0F 1 \b HP
  551. >>>16 byte&0x0F 2 \b Spt
  552. >>>16 byte&0x0F 3 \b SNR
  553. >>>16 byte&0x0F 4 \b MP
  554. >>>16 byte&0x0F 5 \b SP
  555. >>>17 byte&0xF0 64 \b@HL
  556. >>>17 byte&0xF0 96 \b@H-14
  557. >>>17 byte&0xF0 128 \b@ML
  558. >>>17 byte&0xF0 160 \b@LL
  559. >>>17 byte &0x08 \b progressive
  560. >>>17 byte ^0x08 \b interlaced
  561. >>>17 byte&0x06 2 \b Y'CbCr 4:2:0 video
  562. >>>17 byte&0x06 4 \b Y'CbCr 4:2:2 video
  563. >>>17 byte&0x06 6 \b Y'CbCr 4:4:4 video
  564. >>11 byte &0x02
  565. >>>75 byte &0x01
  566. >>>>140 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
  567. >>>>140 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
  568. >>>>140 belong 0x000001B5 \b, v2,
  569. >>>>>144 byte&0x0F 1 \b HP
  570. >>>>>144 byte&0x0F 2 \b Spt
  571. >>>>>144 byte&0x0F 3 \b SNR
  572. >>>>>144 byte&0x0F 4 \b MP
  573. >>>>>144 byte&0x0F 5 \b SP
  574. >>>>>145 byte&0xF0 64 \b@HL
  575. >>>>>145 byte&0xF0 96 \b@H-14
  576. >>>>>145 byte&0xF0 128 \b@ML
  577. >>>>>145 byte&0xF0 160 \b@LL
  578. >>>>>145 byte &0x08 \b progressive
  579. >>>>>145 byte ^0x08 \b interlaced
  580. >>>>>145 byte&0x06 2 \b Y'CbCr 4:2:0 video
  581. >>>>>145 byte&0x06 4 \b Y'CbCr 4:2:2 video
  582. >>>>>145 byte&0x06 6 \b Y'CbCr 4:4:4 video
  583. >>76 belong 0x000001B8 \b, v1, progressive Y'CbCr 4:2:0 video
  584. >>76 belong 0x000001B2 \b, v1, progressive Y'CbCr 4:2:0 video
  585. >>76 belong 0x000001B5 \b, v2,
  586. >>>80 byte&0x0F 1 \b HP
  587. >>>80 byte&0x0F 2 \b Spt
  588. >>>80 byte&0x0F 3 \b SNR
  589. >>>80 byte&0x0F 4 \b MP
  590. >>>80 byte&0x0F 5 \b SP
  591. >>>81 byte&0xF0 64 \b@HL
  592. >>>81 byte&0xF0 96 \b@H-14
  593. >>>81 byte&0xF0 128 \b@ML
  594. >>>81 byte&0xF0 160 \b@LL
  595. >>>81 byte &0x08 \b progressive
  596. >>>81 byte ^0x08 \b interlaced
  597. >>>81 byte&0x06 2 \b Y'CbCr 4:2:0 video
  598. >>>81 byte&0x06 4 \b Y'CbCr 4:2:2 video
  599. >>>81 byte&0x06 6 \b Y'CbCr 4:4:4 video
  600. >>4 belong&0xFFFFFF00 0x78043800 \b, HD-TV 1920P
  601. >>>7 byte&0xF0 0x10 \b, 16:9
  602. >>4 belong&0xFFFFFF00 0x50002D00 \b, SD-TV 1280I
  603. >>>7 byte&0xF0 0x10 \b, 16:9
  604. >>4 belong&0xFFFFFF00 0x30024000 \b, PAL Capture
  605. >>>7 byte&0xF0 0x10 \b, 4:3
  606. >>4 beshort&0xFFF0 0x2C00 \b, 4CIF
  607. >>>5 beshort&0x0FFF 0x01E0 \b NTSC
  608. >>>5 beshort&0x0FFF 0x0240 \b PAL
  609. >>>7 byte&0xF0 0x20 \b, 4:3
  610. >>>7 byte&0xF0 0x30 \b, 16:9
  611. >>>7 byte&0xF0 0x40 \b, 11:5
  612. >>>7 byte&0xF0 0x80 \b, PAL 4:3
  613. >>>7 byte&0xF0 0xC0 \b, NTSC 4:3
  614. >>4 belong&0xFFFFFF00 0x2801E000 \b, LD-TV 640P
  615. >>>7 byte&0xF0 0x10 \b, 4:3
  616. >>4 belong&0xFFFFFF00 0x1400F000 \b, 320x240
  617. >>>7 byte&0xF0 0x10 \b, 4:3
  618. >>4 belong&0xFFFFFF00 0x0F00A000 \b, 240x160
  619. >>>7 byte&0xF0 0x10 \b, 4:3
  620. >>4 belong&0xFFFFFF00 0x0A007800 \b, 160x120
  621. >>>7 byte&0xF0 0x10 \b, 4:3
  622. >>4 beshort&0xFFF0 0x1600 \b, CIF
  623. >>>5 beshort&0x0FFF 0x00F0 \b NTSC
  624. >>>5 beshort&0x0FFF 0x0120 \b PAL
  625. >>>7 byte&0xF0 0x20 \b, 4:3
  626. >>>7 byte&0xF0 0x30 \b, 16:9
  627. >>>7 byte&0xF0 0x40 \b, 11:5
  628. >>>7 byte&0xF0 0x80 \b, PAL 4:3
  629. >>>7 byte&0xF0 0xC0 \b, NTSC 4:3
  630. >>>5 beshort&0x0FFF 0x0240 \b PAL 625
  631. >>>>7 byte&0xF0 0x20 \b, 4:3
  632. >>>>7 byte&0xF0 0x30 \b, 16:9
  633. >>>>7 byte&0xF0 0x40 \b, 11:5
  634. >>4 beshort&0xFFF0 0x2D00 \b, CCIR/ITU
  635. >>>5 beshort&0x0FFF 0x01E0 \b NTSC 525
  636. >>>5 beshort&0x0FFF 0x0240 \b PAL 625
  637. >>>7 byte&0xF0 0x20 \b, 4:3
  638. >>>7 byte&0xF0 0x30 \b, 16:9
  639. >>>7 byte&0xF0 0x40 \b, 11:5
  640. >>4 beshort&0xFFF0 0x1E00 \b, SVCD
  641. >>>5 beshort&0x0FFF 0x01E0 \b NTSC 525
  642. >>>5 beshort&0x0FFF 0x0240 \b PAL 625
  643. >>>7 byte&0xF0 0x20 \b, 4:3
  644. >>>7 byte&0xF0 0x30 \b, 16:9
  645. >>>7 byte&0xF0 0x40 \b, 11:5
  646. >>7 byte&0x0F 1 \b, 23.976 fps
  647. >>7 byte&0x0F 2 \b, 24 fps
  648. >>7 byte&0x0F 3 \b, 25 fps
  649. >>7 byte&0x0F 4 \b, 29.97 fps
  650. >>7 byte&0x0F 5 \b, 30 fps
  651. >>7 byte&0x0F 6 \b, 50 fps
  652. >>7 byte&0x0F 7 \b, 59.94 fps
  653. >>7 byte&0x0F 8 \b, 60 fps
  654. >>11 byte &0x04 \b, Constrained
  655. # MPEG ADTS Audio (*.mpx/mxa/aac)
  656. # from dreesen@math.fu-berlin.de
  657. # modified to fully support MPEG ADTS
  658. # MP3, M1A
  659. # modified by Joerg Jenderek
  660. # GRR the original test are too common for many DOS files
  661. # so don't accept as MP3 until we've tested the rate
  662. 0 beshort&0xFFFE 0xFFFA
  663. # rates
  664. >2 byte&0xF0 0x10 MPEG ADTS, layer III, v1, 32 kbps
  665. !:mime audio/mpeg
  666. >2 byte&0xF0 0x20 MPEG ADTS, layer III, v1, 40 kbps
  667. !:mime audio/mpeg
  668. >2 byte&0xF0 0x30 MPEG ADTS, layer III, v1, 48 kbps
  669. !:mime audio/mpeg
  670. >2 byte&0xF0 0x40 MPEG ADTS, layer III, v1, 56 kbps
  671. !:mime audio/mpeg
  672. >2 byte&0xF0 0x50 MPEG ADTS, layer III, v1, 64 kbps
  673. !:mime audio/mpeg
  674. >2 byte&0xF0 0x60 MPEG ADTS, layer III, v1, 80 kbps
  675. !:mime audio/mpeg
  676. >2 byte&0xF0 0x70 MPEG ADTS, layer III, v1, 96 kbps
  677. !:mime audio/mpeg
  678. >2 byte&0xF0 0x80 MPEG ADTS, layer III, v1, 112 kbps
  679. !:mime audio/mpeg
  680. >2 byte&0xF0 0x90 MPEG ADTS, layer III, v1, 128 kbps
  681. !:mime audio/mpeg
  682. >2 byte&0xF0 0xA0 MPEG ADTS, layer III, v1, 160 kbps
  683. !:mime audio/mpeg
  684. >2 byte&0xF0 0xB0 MPEG ADTS, layer III, v1, 192 kbps
  685. !:mime audio/mpeg
  686. >2 byte&0xF0 0xC0 MPEG ADTS, layer III, v1, 224 kbps
  687. !:mime audio/mpeg
  688. >2 byte&0xF0 0xD0 MPEG ADTS, layer III, v1, 256 kbps
  689. !:mime audio/mpeg
  690. >2 byte&0xF0 0xE0 MPEG ADTS, layer III, v1, 320 kbps
  691. !:mime audio/mpeg
  692. # timing
  693. >2 byte&0x0C 0x00 \b, 44.1 kHz
  694. >2 byte&0x0C 0x04 \b, 48 kHz
  695. >2 byte&0x0C 0x08 \b, 32 kHz
  696. # channels/options
  697. >3 byte&0xC0 0x00 \b, Stereo
  698. >3 byte&0xC0 0x40 \b, JntStereo
  699. >3 byte&0xC0 0x80 \b, 2x Monaural
  700. >3 byte&0xC0 0xC0 \b, Monaural
  701. #>1 byte ^0x01 \b, Data Verify
  702. #>2 byte &0x02 \b, Packet Pad
  703. #>2 byte &0x01 \b, Custom Flag
  704. #>3 byte &0x08 \b, Copyrighted
  705. #>3 byte &0x04 \b, Original Source
  706. #>3 byte&0x03 1 \b, NR: 50/15 ms
  707. #>3 byte&0x03 3 \b, NR: CCIT J.17
  708. # MP2, M1A
  709. 0 beshort&0xFFFE 0xFFFC MPEG ADTS, layer II, v1
  710. !:mime audio/mpeg
  711. # rates
  712. >2 byte&0xF0 0x10 \b, 32 kbps
  713. >2 byte&0xF0 0x20 \b, 48 kbps
  714. >2 byte&0xF0 0x30 \b, 56 kbps
  715. >2 byte&0xF0 0x40 \b, 64 kbps
  716. >2 byte&0xF0 0x50 \b, 80 kbps
  717. >2 byte&0xF0 0x60 \b, 96 kbps
  718. >2 byte&0xF0 0x70 \b, 112 kbps
  719. >2 byte&0xF0 0x80 \b, 128 kbps
  720. >2 byte&0xF0 0x90 \b, 160 kbps
  721. >2 byte&0xF0 0xA0 \b, 192 kbps
  722. >2 byte&0xF0 0xB0 \b, 224 kbps
  723. >2 byte&0xF0 0xC0 \b, 256 kbps
  724. >2 byte&0xF0 0xD0 \b, 320 kbps
  725. >2 byte&0xF0 0xE0 \b, 384 kbps
  726. # timing
  727. >2 byte&0x0C 0x00 \b, 44.1 kHz
  728. >2 byte&0x0C 0x04 \b, 48 kHz
  729. >2 byte&0x0C 0x08 \b, 32 kHz
  730. # channels/options
  731. >3 byte&0xC0 0x00 \b, Stereo
  732. >3 byte&0xC0 0x40 \b, JntStereo
  733. >3 byte&0xC0 0x80 \b, 2x Monaural
  734. >3 byte&0xC0 0xC0 \b, Monaural
  735. #>1 byte ^0x01 \b, Data Verify
  736. #>2 byte &0x02 \b, Packet Pad
  737. #>2 byte &0x01 \b, Custom Flag
  738. #>3 byte &0x08 \b, Copyrighted
  739. #>3 byte &0x04 \b, Original Source
  740. #>3 byte&0x03 1 \b, NR: 50/15 ms
  741. #>3 byte&0x03 3 \b, NR: CCIT J.17
  742. # MPA, M1A
  743. # updated by Joerg Jenderek
  744. # GRR the original test are too common for many DOS files, so test 32 <= kbits <= 448
  745. # GRR this test is still too general as it catches a BOM of UTF-16 files (0xFFFE)
  746. # FIXME: Almost all little endian UTF-16 text with BOM are clobbered by these entries
  747. #0 beshort&0xFFFE 0xFFFE
  748. #>2 ubyte&0xF0 >0x0F
  749. #>>2 ubyte&0xF0 <0xE1 MPEG ADTS, layer I, v1
  750. ## rate
  751. #>>>2 byte&0xF0 0x10 \b, 32 kbps
  752. #>>>2 byte&0xF0 0x20 \b, 64 kbps
  753. #>>>2 byte&0xF0 0x30 \b, 96 kbps
  754. #>>>2 byte&0xF0 0x40 \b, 128 kbps
  755. #>>>2 byte&0xF0 0x50 \b, 160 kbps
  756. #>>>2 byte&0xF0 0x60 \b, 192 kbps
  757. #>>>2 byte&0xF0 0x70 \b, 224 kbps
  758. #>>>2 byte&0xF0 0x80 \b, 256 kbps
  759. #>>>2 byte&0xF0 0x90 \b, 288 kbps
  760. #>>>2 byte&0xF0 0xA0 \b, 320 kbps
  761. #>>>2 byte&0xF0 0xB0 \b, 352 kbps
  762. #>>>2 byte&0xF0 0xC0 \b, 384 kbps
  763. #>>>2 byte&0xF0 0xD0 \b, 416 kbps
  764. #>>>2 byte&0xF0 0xE0 \b, 448 kbps
  765. ## timing
  766. #>>>2 byte&0x0C 0x00 \b, 44.1 kHz
  767. #>>>2 byte&0x0C 0x04 \b, 48 kHz
  768. #>>>2 byte&0x0C 0x08 \b, 32 kHz
  769. ## channels/options
  770. #>>>3 byte&0xC0 0x00 \b, Stereo
  771. #>>>3 byte&0xC0 0x40 \b, JntStereo
  772. #>>>3 byte&0xC0 0x80 \b, 2x Monaural
  773. #>>>3 byte&0xC0 0xC0 \b, Monaural
  774. ##>1 byte ^0x01 \b, Data Verify
  775. ##>2 byte &0x02 \b, Packet Pad
  776. ##>2 byte &0x01 \b, Custom Flag
  777. ##>3 byte &0x08 \b, Copyrighted
  778. ##>3 byte &0x04 \b, Original Source
  779. ##>3 byte&0x03 1 \b, NR: 50/15 ms
  780. ##>3 byte&0x03 3 \b, NR: CCIT J.17
  781. # MP3, M2A
  782. 0 beshort&0xFFFE 0xFFF2 MPEG ADTS, layer III, v2
  783. !:mime audio/mpeg
  784. # rate
  785. >2 byte&0xF0 0x10 \b, 8 kbps
  786. >2 byte&0xF0 0x20 \b, 16 kbps
  787. >2 byte&0xF0 0x30 \b, 24 kbps
  788. >2 byte&0xF0 0x40 \b, 32 kbps
  789. >2 byte&0xF0 0x50 \b, 40 kbps
  790. >2 byte&0xF0 0x60 \b, 48 kbps
  791. >2 byte&0xF0 0x70 \b, 56 kbps
  792. >2 byte&0xF0 0x80 \b, 64 kbps
  793. >2 byte&0xF0 0x90 \b, 80 kbps
  794. >2 byte&0xF0 0xA0 \b, 96 kbps
  795. >2 byte&0xF0 0xB0 \b, 112 kbps
  796. >2 byte&0xF0 0xC0 \b, 128 kbps
  797. >2 byte&0xF0 0xD0 \b, 144 kbps
  798. >2 byte&0xF0 0xE0 \b, 160 kbps
  799. # timing
  800. >2 byte&0x0C 0x00 \b, 22.05 kHz
  801. >2 byte&0x0C 0x04 \b, 24 kHz
  802. >2 byte&0x0C 0x08 \b, 16 kHz
  803. # channels/options
  804. >3 byte&0xC0 0x00 \b, Stereo
  805. >3 byte&0xC0 0x40 \b, JntStereo
  806. >3 byte&0xC0 0x80 \b, 2x Monaural
  807. >3 byte&0xC0 0xC0 \b, Monaural
  808. #>1 byte ^0x01 \b, Data Verify
  809. #>2 byte &0x02 \b, Packet Pad
  810. #>2 byte &0x01 \b, Custom Flag
  811. #>3 byte &0x08 \b, Copyrighted
  812. #>3 byte &0x04 \b, Original Source
  813. #>3 byte&0x03 1 \b, NR: 50/15 ms
  814. #>3 byte&0x03 3 \b, NR: CCIT J.17
  815. # MP2, M2A
  816. 0 beshort&0xFFFE 0xFFF4 MPEG ADTS, layer II, v2
  817. # rate
  818. >2 byte&0xF0 0x10 \b, 8 kbps
  819. >2 byte&0xF0 0x20 \b, 16 kbps
  820. >2 byte&0xF0 0x30 \b, 24 kbps
  821. >2 byte&0xF0 0x40 \b, 32 kbps
  822. >2 byte&0xF0 0x50 \b, 40 kbps
  823. >2 byte&0xF0 0x60 \b, 48 kbps
  824. >2 byte&0xF0 0x70 \b, 56 kbps
  825. >2 byte&0xF0 0x80 \b, 64 kbps
  826. >2 byte&0xF0 0x90 \b, 80 kbps
  827. >2 byte&0xF0 0xA0 \b, 96 kbps
  828. >2 byte&0xF0 0xB0 \b, 112 kbps
  829. >2 byte&0xF0 0xC0 \b, 128 kbps
  830. >2 byte&0xF0 0xD0 \b, 144 kbps
  831. >2 byte&0xF0 0xE0 \b, 160 kbps
  832. # timing
  833. >2 byte&0x0C 0x00 \b, 22.05 kHz
  834. >2 byte&0x0C 0x04 \b, 24 kHz
  835. >2 byte&0x0C 0x08 \b, 16 kHz
  836. # channels/options
  837. >3 byte&0xC0 0x00 \b, Stereo
  838. >3 byte&0xC0 0x40 \b, JntStereo
  839. >3 byte&0xC0 0x80 \b, 2x Monaural
  840. >3 byte&0xC0 0xC0 \b, Monaural
  841. #>1 byte ^0x01 \b, Data Verify
  842. #>2 byte &0x02 \b, Packet Pad
  843. #>2 byte &0x01 \b, Custom Flag
  844. #>3 byte &0x08 \b, Copyrighted
  845. #>3 byte &0x04 \b, Original Source
  846. #>3 byte&0x03 1 \b, NR: 50/15 ms
  847. #>3 byte&0x03 3 \b, NR: CCIT J.17
  848. # MPA, M2A
  849. 0 beshort&0xFFFE 0xFFF6 MPEG ADTS, layer I, v2
  850. !:mime audio/mpeg
  851. # rate
  852. >2 byte&0xF0 0x10 \b, 32 kbps
  853. >2 byte&0xF0 0x20 \b, 48 kbps
  854. >2 byte&0xF0 0x30 \b, 56 kbps
  855. >2 byte&0xF0 0x40 \b, 64 kbps
  856. >2 byte&0xF0 0x50 \b, 80 kbps
  857. >2 byte&0xF0 0x60 \b, 96 kbps
  858. >2 byte&0xF0 0x70 \b, 112 kbps
  859. >2 byte&0xF0 0x80 \b, 128 kbps
  860. >2 byte&0xF0 0x90 \b, 144 kbps
  861. >2 byte&0xF0 0xA0 \b, 160 kbps
  862. >2 byte&0xF0 0xB0 \b, 176 kbps
  863. >2 byte&0xF0 0xC0 \b, 192 kbps
  864. >2 byte&0xF0 0xD0 \b, 224 kbps
  865. >2 byte&0xF0 0xE0 \b, 256 kbps
  866. # timing
  867. >2 byte&0x0C 0x00 \b, 22.05 kHz
  868. >2 byte&0x0C 0x04 \b, 24 kHz
  869. >2 byte&0x0C 0x08 \b, 16 kHz
  870. # channels/options
  871. >3 byte&0xC0 0x00 \b, Stereo
  872. >3 byte&0xC0 0x40 \b, JntStereo
  873. >3 byte&0xC0 0x80 \b, 2x Monaural
  874. >3 byte&0xC0 0xC0 \b, Monaural
  875. #>1 byte ^0x01 \b, Data Verify
  876. #>2 byte &0x02 \b, Packet Pad
  877. #>2 byte &0x01 \b, Custom Flag
  878. #>3 byte &0x08 \b, Copyrighted
  879. #>3 byte &0x04 \b, Original Source
  880. #>3 byte&0x03 1 \b, NR: 50/15 ms
  881. #>3 byte&0x03 3 \b, NR: CCIT J.17
  882. # MP3, M25A
  883. 0 beshort&0xFFFE 0xFFE2 MPEG ADTS, layer III, v2.5
  884. !:mime audio/mpeg
  885. # rate
  886. >2 byte&0xF0 0x10 \b, 8 kbps
  887. >2 byte&0xF0 0x20 \b, 16 kbps
  888. >2 byte&0xF0 0x30 \b, 24 kbps
  889. >2 byte&0xF0 0x40 \b, 32 kbps
  890. >2 byte&0xF0 0x50 \b, 40 kbps
  891. >2 byte&0xF0 0x60 \b, 48 kbps
  892. >2 byte&0xF0 0x70 \b, 56 kbps
  893. >2 byte&0xF0 0x80 \b, 64 kbps
  894. >2 byte&0xF0 0x90 \b, 80 kbps
  895. >2 byte&0xF0 0xA0 \b, 96 kbps
  896. >2 byte&0xF0 0xB0 \b, 112 kbps
  897. >2 byte&0xF0 0xC0 \b, 128 kbps
  898. >2 byte&0xF0 0xD0 \b, 144 kbps
  899. >2 byte&0xF0 0xE0 \b, 160 kbps
  900. # timing
  901. >2 byte&0x0C 0x00 \b, 11.025 kHz
  902. >2 byte&0x0C 0x04 \b, 12 kHz
  903. >2 byte&0x0C 0x08 \b, 8 kHz
  904. # channels/options
  905. >3 byte&0xC0 0x00 \b, Stereo
  906. >3 byte&0xC0 0x40 \b, JntStereo
  907. >3 byte&0xC0 0x80 \b, 2x Monaural
  908. >3 byte&0xC0 0xC0 \b, Monaural
  909. #>1 byte ^0x01 \b, Data Verify
  910. #>2 byte &0x02 \b, Packet Pad
  911. #>2 byte &0x01 \b, Custom Flag
  912. #>3 byte &0x08 \b, Copyrighted
  913. #>3 byte &0x04 \b, Original Source
  914. #>3 byte&0x03 1 \b, NR: 50/15 ms
  915. #>3 byte&0x03 3 \b, NR: CCIT J.17
  916. # AAC (aka MPEG-2 NBC audio) and MPEG-4 audio
  917. # Stored AAC streams (instead of the MP4 format)
  918. 0 string ADIF MPEG ADIF, AAC
  919. !:mime audio/x-hx-aac-adif
  920. >4 byte &0x80
  921. >>13 byte &0x10 \b, VBR
  922. >>13 byte ^0x10 \b, CBR
  923. >>16 byte&0x1E 0x02 \b, single stream
  924. >>16 byte&0x1E 0x04 \b, 2 streams
  925. >>16 byte&0x1E 0x06 \b, 3 streams
  926. >>16 byte &0x08 \b, 4 or more streams
  927. >>16 byte &0x10 \b, 8 or more streams
  928. >>4 byte &0x80 \b, Copyrighted
  929. >>13 byte &0x40 \b, Original Source
  930. >>13 byte &0x20 \b, Home Flag
  931. >4 byte ^0x80
  932. >>4 byte &0x10 \b, VBR
  933. >>4 byte ^0x10 \b, CBR
  934. >>7 byte&0x1E 0x02 \b, single stream
  935. >>7 byte&0x1E 0x04 \b, 2 streams
  936. >>7 byte&0x1E 0x06 \b, 3 streams
  937. >>7 byte &0x08 \b, 4 or more streams
  938. >>7 byte &0x10 \b, 8 or more streams
  939. >>4 byte &0x40 \b, Original Stream(s)
  940. >>4 byte &0x20 \b, Home Source
  941. # Live or stored single AAC stream (used with MPEG-2 systems)
  942. 0 beshort&0xFFF6 0xFFF0 MPEG ADTS, AAC
  943. !:mime audio/x-hx-aac-adts
  944. >1 byte &0x08 \b, v2
  945. >1 byte ^0x08 \b, v4
  946. # profile
  947. >>2 byte &0xC0 \b LTP
  948. >2 byte&0xc0 0x00 \b Main
  949. >2 byte&0xc0 0x40 \b LC
  950. >2 byte&0xc0 0x80 \b SSR
  951. # timing
  952. >2 byte&0x3c 0x00 \b, 96 kHz
  953. >2 byte&0x3c 0x04 \b, 88.2 kHz
  954. >2 byte&0x3c 0x08 \b, 64 kHz
  955. >2 byte&0x3c 0x0c \b, 48 kHz
  956. >2 byte&0x3c 0x10 \b, 44.1 kHz
  957. >2 byte&0x3c 0x14 \b, 32 kHz
  958. >2 byte&0x3c 0x18 \b, 24 kHz
  959. >2 byte&0x3c 0x1c \b, 22.05 kHz
  960. >2 byte&0x3c 0x20 \b, 16 kHz
  961. >2 byte&0x3c 0x24 \b, 12 kHz
  962. >2 byte&0x3c 0x28 \b, 11.025 kHz
  963. >2 byte&0x3c 0x2c \b, 8 kHz
  964. # channels
  965. >2 beshort&0x01c0 0x0040 \b, monaural
  966. >2 beshort&0x01c0 0x0080 \b, stereo
  967. >2 beshort&0x01c0 0x00c0 \b, stereo + center
  968. >2 beshort&0x01c0 0x0100 \b, stereo+center+LFE
  969. >2 beshort&0x01c0 0x0140 \b, surround
  970. >2 beshort&0x01c0 0x0180 \b, surround + LFE
  971. >2 beshort &0x01C0 \b, surround + side
  972. #>1 byte ^0x01 \b, Data Verify
  973. #>2 byte &0x02 \b, Custom Flag
  974. #>3 byte &0x20 \b, Original Stream
  975. #>3 byte &0x10 \b, Home Source
  976. #>3 byte &0x08 \b, Copyrighted
  977. # Live MPEG-4 audio streams (instead of RTP FlexMux)
  978. 0 beshort&0xFFE0 0x56E0 MPEG-4 LOAS
  979. !:mime audio/x-mp4a-latm
  980. #>1 beshort&0x1FFF x \b, %u byte packet
  981. >3 byte&0xE0 0x40
  982. >>4 byte&0x3C 0x04 \b, single stream
  983. >>4 byte&0x3C 0x08 \b, 2 streams
  984. >>4 byte&0x3C 0x0C \b, 3 streams
  985. >>4 byte &0x08 \b, 4 or more streams
  986. >>4 byte &0x20 \b, 8 or more streams
  987. >3 byte&0xC0 0
  988. >>4 byte&0x78 0x08 \b, single stream
  989. >>4 byte&0x78 0x10 \b, 2 streams
  990. >>4 byte&0x78 0x18 \b, 3 streams
  991. >>4 byte &0x20 \b, 4 or more streams
  992. >>4 byte &0x40 \b, 8 or more streams
  993. # This magic isn't strong enough (matches plausible ISO-8859-1 text)
  994. #0 beshort 0x4DE1 MPEG-4 LO-EP audio stream
  995. #!:mime audio/x-mp4a-latm
  996. # Summary: FLI animation format
  997. # Created by: Daniel Quinlan <quinlan@yggdrasil.com>
  998. # Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
  999. 4 leshort 0xAF11
  1000. # standard FLI always has 320x200 resolution and 8 bit color
  1001. >8 leshort 320
  1002. >>10 leshort 200
  1003. >>>12 leshort 8 FLI animation, 320x200x8
  1004. !:mime video/x-fli
  1005. >>>>6 leshort x \b, %d frames
  1006. # frame speed is multiple of 1/70s
  1007. >>>>16 leshort x \b, %d/70s per frame
  1008. # Summary: FLC animation format
  1009. # Created by: Daniel Quinlan <quinlan@yggdrasil.com>
  1010. # Modified by (1): Abel Cheung <abelcheung@gmail.com> (avoid over-generic detection)
  1011. 4 leshort 0xAF12
  1012. # standard FLC always use 8 bit color
  1013. >12 leshort 8 FLC animation
  1014. !:mime video/x-flc
  1015. >>8 leshort x \b, %d
  1016. >>10 leshort x \bx%dx8
  1017. >>6 uleshort x \b, %d frames
  1018. >>16 uleshort x \b, %dms per frame
  1019. # DL animation format
  1020. # XXX - collision with most `mips' magic
  1021. #
  1022. # I couldn't find a real magic number for these, however, this
  1023. # -appears- to work. Note that it might catch other files, too, so be
  1024. # careful!
  1025. #
  1026. # Note that title and author appear in the two 20-byte chunks
  1027. # at decimal offsets 2 and 22, respectively, but they are XOR'ed with
  1028. # 255 (hex FF)! The DL format is really bad.
  1029. #
  1030. #0 byte 1 DL version 1, medium format (160x100, 4 images/screen)
  1031. #!:mime video/x-unknown
  1032. #>42 byte x - %d screens,
  1033. #>43 byte x %d commands
  1034. #0 byte 2 DL version 2
  1035. #!:mime video/x-unknown
  1036. #>1 byte 1 - large format (320x200,1 image/screen),
  1037. #>1 byte 2 - medium format (160x100,4 images/screen),
  1038. #>1 byte >2 - unknown format,
  1039. #>42 byte x %d screens,
  1040. #>43 byte x %d commands
  1041. # Based on empirical evidence, DL version 3 have several nulls following the
  1042. # \003. Most of them start with non-null values at hex offset 0x34 or so.
  1043. #0 string \3\0\0\0\0\0\0\0\0\0\0\0 DL version 3
  1044. # iso 13818 transport stream
  1045. #
  1046. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001 (ISO 13818.1)
  1047. # syncbyte 8 bit 0x47
  1048. # error_ind 1 bit -
  1049. # payload_start 1 bit 1
  1050. # priority 1 bit -
  1051. # PID 13 bit 0x0000
  1052. # scrambling 2 bit -
  1053. # adaptfld_ctrl 2 bit 1 or 3
  1054. # conti_count 4 bit -
  1055. 0 belong&0xFF5FFF10 0x47400010
  1056. >188 byte 0x47 MPEG transport stream data
  1057. # DIF digital video file format <mpruett@sgi.com>
  1058. 0 belong&0xffffff00 0x1f070000 DIF
  1059. >4 byte &0x01 (DVCPRO) movie file
  1060. >4 byte ^0x01 (DV) movie file
  1061. >3 byte &0x80 (PAL)
  1062. >3 byte ^0x80 (NTSC)
  1063. # Microsoft Advanced Streaming Format (ASF) <mpruett@sgi.com>
  1064. 0 belong 0x3026b275 Microsoft ASF
  1065. !:mime video/x-ms-asf
  1066. # MNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  1067. 0 string \x8aMNG MNG video data,
  1068. !:mime video/x-mng
  1069. >4 belong !0x0d0a1a0a CORRUPTED,
  1070. >4 belong 0x0d0a1a0a
  1071. >>16 belong x %ld x
  1072. >>20 belong x %ld
  1073. # JNG Video Format, <URL:http://www.libpng.org/pub/mng/spec/>
  1074. 0 string \x8bJNG JNG video data,
  1075. !:mime video/x-jng
  1076. >4 belong !0x0d0a1a0a CORRUPTED,
  1077. >4 belong 0x0d0a1a0a
  1078. >>16 belong x %ld x
  1079. >>20 belong x %ld
  1080. # Vivo video (Wolfram Kleff)
  1081. 3 string \x0D\x0AVersion:Vivo Vivo video data
  1082. # VRML (Virtual Reality Modelling Language)
  1083. 0 string/w #VRML\ V1.0\ ascii VRML 1 file
  1084. !:mime model/vrml
  1085. 0 string/w #VRML\ V2.0\ utf8 ISO/IEC 14772 VRML 97 file
  1086. !:mime model/vrml
  1087. # X3D (Extensible 3D) [http://www.web3d.org/specifications/x3d-3.0.dtd]
  1088. # From Michel Briand <michelbriand@free.fr>
  1089. 0 string/t \<?xml\ version="
  1090. !:strength +1
  1091. >20 search/1000/cw \<!DOCTYPE\ X3D X3D (Extensible 3D) model xml text
  1092. !:mime model/x3d
  1093. #---------------------------------------------------------------------------
  1094. # HVQM4: compressed movie format designed by Hudson for Nintendo GameCube
  1095. # From Mark Sheppard <msheppard@climax.co.uk>, 2002-10-03
  1096. #
  1097. 0 string HVQM4 %s
  1098. >6 string >\0 v%s
  1099. >0 byte x GameCube movie,
  1100. >0x34 ubeshort x %d x
  1101. >0x36 ubeshort x %d,
  1102. >0x26 ubeshort x %dus,
  1103. >0x42 ubeshort 0 no audio
  1104. >0x42 ubeshort >0 %dHz audio
  1105. # From: "Stefan A. Haubenthal" <polluks@web.de>
  1106. 0 string DVDVIDEO-VTS Video title set,
  1107. >0x21 byte x v%x
  1108. 0 string DVDVIDEO-VMG Video manager,
  1109. >0x21 byte x v%x
  1110. # From: Behan Webster <behanw@websterwood.com>
  1111. # NuppelVideo used by Mythtv (*.nuv)
  1112. # Note: there are two identical stanzas here differing only in the
  1113. # initial string matched. It used to be done with a regex, but we're
  1114. # trying to get rid of those.
  1115. 0 string NuppelVideo MythTV NuppelVideo
  1116. >12 string x v%s
  1117. >20 lelong x (%d
  1118. >24 lelong x \bx%d),
  1119. >36 string P \bprogressive,
  1120. >36 string I \binterlaced,
  1121. >40 ledouble x \baspect:%.2f,
  1122. >48 ledouble x \bfps:%.2f
  1123. 0 string MythTV MythTV NuppelVideo
  1124. >12 string x v%s
  1125. >20 lelong x (%d
  1126. >24 lelong x \bx%d),
  1127. >36 string P \bprogressive,
  1128. >36 string I \binterlaced,
  1129. >40 ledouble x \baspect:%.2f,
  1130. >48 ledouble x \bfps:%.2f
  1131. # MPEG file
  1132. # MPEG sequences
  1133. # FIXME: This section is from the old magic.mime file and needs integrating with the rest
  1134. 0 belong 0x000001BA
  1135. >4 byte &0x40
  1136. !:mime video/mp2p
  1137. >4 byte ^0x40
  1138. !:mime video/mpeg
  1139. 0 belong 0x000001BB
  1140. !:mime video/mpeg
  1141. 0 belong 0x000001B0
  1142. !:mime video/mp4v-es
  1143. 0 belong 0x000001B5
  1144. !:mime video/mp4v-es
  1145. 0 belong 0x000001B3
  1146. !:mime video/mpv
  1147. 0 belong&0xFF5FFF10 0x47400010
  1148. !:mime video/mp2t
  1149. 0 belong 0x00000001
  1150. >4 byte&0x1F 0x07
  1151. !:mime video/h264
  1152. # Type: Bink Video
  1153. # Extension: .bik
  1154. # URL: http://wiki.multimedia.cx/index.php?title=Bink_Container
  1155. # From: <hoehle@users.sourceforge.net> 2008-07-18
  1156. 0 string BIK Bink Video
  1157. >3 regex =[a-z] rev.%s
  1158. #>4 ulelong x size %d
  1159. >20 ulelong x \b, %d
  1160. >24 ulelong x \bx%d
  1161. >8 ulelong x \b, %d frames
  1162. >32 ulelong x at rate %d/
  1163. >28 ulelong >1 \b%d
  1164. >40 ulelong =0 \b, no audio
  1165. >40 ulelong !0 \b, %d audio track
  1166. >>40 ulelong !1 \bs
  1167. # follow properties of the first audio track only
  1168. >>48 uleshort x %dHz
  1169. >>51 byte&0x20 0 mono
  1170. >>51 byte&0x20 !0 stereo
  1171. #>>51 byte&0x10 0 FFT
  1172. #>>51 byte&0x10 !0 DCT
  1173. # Type: NUT Container
  1174. # URL: http://wiki.multimedia.cx/index.php?title=NUT
  1175. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  1176. 0 string nut/multimedia\ container\0 NUT multimedia container
  1177. # Type: Nullsoft Video (NSV)
  1178. # URL: http://wiki.multimedia.cx/index.php?title=Nullsoft_Video
  1179. # From: Mike Melanson <mike@multimedia.cx>
  1180. 0 string NSVf Nullsoft Video
  1181. # Type: REDCode Video
  1182. # URL: http://www.red.com/ ; http://wiki.multimedia.cx/index.php?title=REDCode
  1183. # From: Mike Melanson <mike@multimedia.cx>
  1184. 4 string RED1 REDCode Video
  1185. # Type: MTV Multimedia File
  1186. # URL: http://wiki.multimedia.cx/index.php?title=MTV
  1187. # From: Mike Melanson <mike@multimedia.cx>
  1188. 0 string AMVS MTV Multimedia File
  1189. # Type: ARMovie
  1190. # URL: http://wiki.multimedia.cx/index.php?title=ARMovie
  1191. # From: Mike Melanson <mike@multimedia.cx>
  1192. 0 string ARMovie\012 ARMovie
  1193. # Type: Interplay MVE Movie
  1194. # URL: http://wiki.multimedia.cx/index.php?title=Interplay_MVE
  1195. # From: Mike Melanson <mike@multimedia.cx>
  1196. 0 string Interplay\040MVE\040File\032 Interplay MVE Movie
  1197. # Type: Windows Television DVR File
  1198. # URL: http://wiki.multimedia.cx/index.php?title=WTV
  1199. # From: Mike Melanson <mike@mutlimedia.cx>
  1200. # This takes the form of a Windows-style GUID
  1201. 0 bequad 0xB7D800203749DA11
  1202. >8 bequad 0xA64E0007E95EAD8D Windows Television DVR Media
  1203. # Type: Sega FILM/CPK Multimedia
  1204. # URL: http://wiki.multimedia.cx/index.php?title=Sega_FILM
  1205. # From: Mike Melanson <mike@multimedia.cx>
  1206. 0 string FILM Sega FILM/CPK Multimedia,
  1207. >32 belong x %d x
  1208. >28 belong x %d
  1209. # Type: Nintendo THP Multimedia
  1210. # URL: http://wiki.multimedia.cx/index.php?title=THP
  1211. # From: Mike Melanson <mike@multimedia.cx>
  1212. 0 string THP\0 Nintendo THP Multimedia
  1213. # Type: BBC Dirac Video
  1214. # URL: http://wiki.multimedia.cx/index.php?title=Dirac
  1215. # From: Mike Melanson <mike@multimedia.cx>
  1216. 0 string BBCD BBC Dirac Video
  1217. # Type: RAD Game Tools Smacker Multimedia
  1218. # URL: http://wiki.multimedia.cx/index.php?title=Smacker
  1219. # From: Mike Melanson <mike@multimedia.cx>
  1220. 0 string SMK RAD Game Tools Smacker Multimedia
  1221. >3 byte x version %c,
  1222. >4 lelong x %d x
  1223. >8 lelong x %d,
  1224. >12 lelong x %d frames
  1225. #------------------------------------------------------------------------------
  1226. # $File: aout,v 1.1 2013/01/09 22:37:23 christos Exp $
  1227. # aout: file(1) magic for a.out executable/object/etc entries that
  1228. # handle executables on multiple platforms.
  1229. #
  1230. #
  1231. # Little-endian 32-bit-int a.out, merged from bsdi (for BSD/OS, from
  1232. # BSDI), netbsd, and vax (for UNIX/32V and BSD)
  1233. #
  1234. # XXX - is there anything we can look at to distinguish BSD/OS 386 from
  1235. # NetBSD 386 from various VAX binaries? The BSD/OS shared library flag
  1236. # works only for binaries using shared libraries. Grabbing the entry
  1237. # point from the a.out header, using it to find the first code executed
  1238. # in the program, and looking at that might help.
  1239. #
  1240. 0 lelong 0407 a.out little-endian 32-bit executable
  1241. >16 lelong >0 not stripped
  1242. >32 byte 0x6a (uses BSD/OS shared libs)
  1243. 0 lelong 0410 a.out little-endian 32-bit pure executable
  1244. >16 lelong >0 not stripped
  1245. >32 byte 0x6a (uses BSD/OS shared libs)
  1246. 0 lelong 0413 a.out little-endian 32-bit demand paged pure executable
  1247. >16 lelong >0 not stripped
  1248. >32 byte 0x6a (uses BSD/OS shared libs)
  1249. #
  1250. # Big-endian 32-bit-int a.out, merged from sun (for old 68010 SunOS a.out),
  1251. # mips (for old 68020(!) SGI a.out), and netbsd (for old big-endian a.out).
  1252. #
  1253. # XXX - is there anything we can look at to distinguish old SunOS 68010
  1254. # from old 68020 IRIX from old NetBSD? Again, I guess we could look at
  1255. # the first instruction or instructions in the program.
  1256. #
  1257. 0 belong 0407 a.out big-endian 32-bit executable
  1258. >16 belong >0 not stripped
  1259. 0 belong 0410 a.out big-endian 32-bit pure executable
  1260. >16 belong >0 not stripped
  1261. 0 belong 0413 a.out big-endian 32-bit demand paged executable
  1262. >16 belong >0 not stripped
  1263. #------------------------------------------------------------------------------
  1264. # $File: apl,v 1.6 2009/09/19 16:28:07 christos Exp $
  1265. # apl: file(1) magic for APL (see also "pdp" and "vax" for other APL
  1266. # workspaces)
  1267. #
  1268. 0 long 0100554 APL workspace (Ken's original?)
  1269. #------------------------------------------------------------------------------
  1270. # $File: apple,v 1.27 2013/03/09 22:36:00 christos Exp $
  1271. # apple: file(1) magic for Apple file formats
  1272. #
  1273. 0 search/1/t FiLeStArTfIlEsTaRt binscii (apple ][) text
  1274. 0 string \x0aGL Binary II (apple ][) data
  1275. 0 string \x76\xff Squeezed (apple ][) data
  1276. 0 string NuFile NuFile archive (apple ][) data
  1277. 0 string N\xf5F\xe9l\xe5 NuFile archive (apple ][) data
  1278. 0 belong 0x00051600 AppleSingle encoded Macintosh file
  1279. 0 belong 0x00051607 AppleDouble encoded Macintosh file
  1280. # Type: Apple Emulator 2IMG format
  1281. # From: Radek Vokal <rvokal@redhat.com>
  1282. 0 string 2IMG Apple ][ 2IMG Disk Image
  1283. >4 string XGS! \b, XGS
  1284. >4 string CTKG \b, Catakig
  1285. >4 string ShIm \b, Sheppy's ImageMaker
  1286. >4 string WOOF \b, Sweet 16
  1287. >4 string B2TR \b, Bernie ][ the Rescue
  1288. >4 string !nfc \b, ASIMOV2
  1289. >4 string x \b, Unknown Format
  1290. >0xc byte 00 \b, DOS 3.3 sector order
  1291. >>0x10 byte 00 \b, Volume 254
  1292. >>0x10 byte&0x7f x \b, Volume %u
  1293. >0xc byte 01 \b, ProDOS sector order
  1294. >>0x14 short x \b, %u Blocks
  1295. >0xc byte 02 \b, NIB data
  1296. # magic for Newton PDA package formats
  1297. # from Ruda Moura <ruda@helllabs.org>
  1298. 0 string package0 Newton package, NOS 1.x,
  1299. >12 belong &0x80000000 AutoRemove,
  1300. >12 belong &0x40000000 CopyProtect,
  1301. >12 belong &0x10000000 NoCompression,
  1302. >12 belong &0x04000000 Relocation,
  1303. >12 belong &0x02000000 UseFasterCompression,
  1304. >16 belong x version %d
  1305. 0 string package1 Newton package, NOS 2.x,
  1306. >12 belong &0x80000000 AutoRemove,
  1307. >12 belong &0x40000000 CopyProtect,
  1308. >12 belong &0x10000000 NoCompression,
  1309. >12 belong &0x04000000 Relocation,
  1310. >12 belong &0x02000000 UseFasterCompression,
  1311. >16 belong x version %d
  1312. 0 string package4 Newton package,
  1313. >8 byte 8 NOS 1.x,
  1314. >8 byte 9 NOS 2.x,
  1315. >12 belong &0x80000000 AutoRemove,
  1316. >12 belong &0x40000000 CopyProtect,
  1317. >12 belong &0x10000000 NoCompression,
  1318. # The following entries for the Apple II are for files that have
  1319. # been transferred as raw binary data from an Apple, without having
  1320. # been encapsulated by any of the above archivers.
  1321. #
  1322. # In general, Apple II formats are hard to identify because Apple DOS
  1323. # and especially Apple ProDOS have strong typing in the file system and
  1324. # therefore programmers never felt much need to include type information
  1325. # in the files themselves.
  1326. #
  1327. # Eric Fischer <enf@pobox.com>
  1328. # AppleWorks word processor:
  1329. #
  1330. # This matches the standard tab stops for an AppleWorks file, but if
  1331. # a file has a tab stop set in the first four columns this will fail.
  1332. #
  1333. # The "O" is really the magic number, but that's so common that it's
  1334. # necessary to check the tab stops that follow it to avoid false positives.
  1335. 4 string O==== AppleWorks word processor data
  1336. >85 byte&0x01 >0 \b, zoomed
  1337. >90 byte&0x01 >0 \b, paginated
  1338. >92 byte&0x01 >0 \b, with mail merge
  1339. #>91 byte x \b, left margin %d
  1340. # AppleWorks database:
  1341. #
  1342. # This isn't really a magic number, but it's the closest thing to one
  1343. # that I could find. The 1 and 2 really mean "order in which you defined
  1344. # categories" and "left to right, top to bottom," respectively; the D and R
  1345. # mean that the cursor should move either down or right when you press Return.
  1346. #30 string \x01D AppleWorks database data
  1347. #30 string \x02D AppleWorks database data
  1348. #30 string \x01R AppleWorks database data
  1349. #30 string \x02R AppleWorks database data
  1350. # AppleWorks spreadsheet:
  1351. #
  1352. # Likewise, this isn't really meant as a magic number. The R or C means
  1353. # row- or column-order recalculation; the A or M means automatic or manual
  1354. # recalculation.
  1355. #131 string RA AppleWorks spreadsheet data
  1356. #131 string RM AppleWorks spreadsheet data
  1357. #131 string CA AppleWorks spreadsheet data
  1358. #131 string CM AppleWorks spreadsheet data
  1359. # Applesoft BASIC:
  1360. #
  1361. # This is incredibly sloppy, but will be true if the program was
  1362. # written at its usual memory location of 2048 and its first line
  1363. # number is less than 256. Yuck.
  1364. # update by Joerg Jenderek at Feb 2013
  1365. # GRR: this test is still too general as it catches also Gujin BOOT144.SYS (0xfa080000)
  1366. #0 belong&0xff00ff 0x80000 Applesoft BASIC program data
  1367. 0 belong&0x00ff00ff 0x00080000
  1368. # assuming that line number must be positive
  1369. >2 leshort >0 Applesoft BASIC program data, first line number %d
  1370. #>2 leshort x \b, first line number %d
  1371. # ORCA/EZ assembler:
  1372. #
  1373. # This will not identify ORCA/M source files, since those have
  1374. # some sort of date code instead of the two zero bytes at 6 and 7
  1375. # XXX Conflicts with ELF
  1376. #4 belong&0xff00ffff 0x01000000 ORCA/EZ assembler source data
  1377. #>5 byte x \b, build number %d
  1378. # Broderbund Fantavision
  1379. #
  1380. # I don't know what these values really mean, but they seem to recur.
  1381. # Will they cause too many conflicts?
  1382. # Probably :-)
  1383. #2 belong&0xFF00FF 0x040008 Fantavision movie data
  1384. # Some attempts at images.
  1385. #
  1386. # These are actually just bit-for-bit dumps of the frame buffer, so
  1387. # there's really no reasonably way to distinguish them except for their
  1388. # address (if preserved) -- 8192 or 16384 -- and their length -- 8192
  1389. # or, occasionally, 8184.
  1390. #
  1391. # Nevertheless this will manage to catch a lot of images that happen
  1392. # to have a solid-colored line at the bottom of the screen.
  1393. # GRR: Magic too weak
  1394. #8144 string \x7F\x7F\x7F\x7F\x7F\x7F\x7F\x7F Apple II image with white background
  1395. #8144 string \x55\x2A\x55\x2A\x55\x2A\x55\x2A Apple II image with purple background
  1396. #8144 string \x2A\x55\x2A\x55\x2A\x55\x2A\x55 Apple II image with green background
  1397. #8144 string \xD5\xAA\xD5\xAA\xD5\xAA\xD5\xAA Apple II image with blue background
  1398. #8144 string \xAA\xD5\xAA\xD5\xAA\xD5\xAA\xD5 Apple II image with orange background
  1399. # Beagle Bros. Apple Mechanic fonts
  1400. 0 belong&0xFF00FFFF 0x6400D000 Apple Mechanic font
  1401. # Apple Universal Disk Image Format (UDIF) - dmg files.
  1402. # From Johan Gade.
  1403. # These entries are disabled for now until we fix the following issues.
  1404. #
  1405. # Note there might be some problems with the "VAX COFF executable"
  1406. # entry. Note this entry should be placed before the mac filesystem section,
  1407. # particularly the "Apple Partition data" entry.
  1408. #
  1409. # The intended meaning of these tests is, that the file is only of the
  1410. # specified type if both of the lines are correct - i.e. if the first
  1411. # line matches and the second doesn't then it is not of that type.
  1412. #
  1413. #0 long 0x7801730d
  1414. #>4 long 0x62626060 UDIF read-only zlib-compressed image (UDZO)
  1415. #
  1416. # Note that this entry is recognized correctly by the "Apple Partition
  1417. # data" entry - however since this entry is more specific - this
  1418. # information seems to be more useful.
  1419. #0 long 0x45520200
  1420. #>0x410 string disk\ image UDIF read/write image (UDRW)
  1421. # From: Toby Peterson <toby@apple.com>
  1422. 0 string bplist00 Apple binary property list
  1423. # Apple binary property list (bplist)
  1424. # Assumes version bytes are hex.
  1425. # Provides content hints for version 0 files. Assumes that the root
  1426. # object is the first object (true for CoreFoundation implementation).
  1427. # From: David Remahl <dremahl@apple.com>
  1428. 0 string bplist
  1429. >6 byte x \bCoreFoundation binary property list data, version 0x%c
  1430. >>7 byte x \b%c
  1431. >6 string 00 \b
  1432. >>8 byte&0xF0 0x00 \b
  1433. >>>8 byte&0x0F 0x00 \b, root type: null
  1434. >>>8 byte&0x0F 0x08 \b, root type: false boolean
  1435. >>>8 byte&0x0F 0x09 \b, root type: true boolean
  1436. >>8 byte&0xF0 0x10 \b, root type: integer
  1437. >>8 byte&0xF0 0x20 \b, root type: real
  1438. >>8 byte&0xF0 0x30 \b, root type: date
  1439. >>8 byte&0xF0 0x40 \b, root type: data
  1440. >>8 byte&0xF0 0x50 \b, root type: ascii string
  1441. >>8 byte&0xF0 0x60 \b, root type: unicode string
  1442. >>8 byte&0xF0 0x80 \b, root type: uid (CORRUPT)
  1443. >>8 byte&0xF0 0xa0 \b, root type: array
  1444. >>8 byte&0xF0 0xd0 \b, root type: dictionary
  1445. # Apple/NeXT typedstream data
  1446. # Serialization format used by NeXT and Apple for various
  1447. # purposes in YellowStep/Cocoa, including some nib files.
  1448. # From: David Remahl <dremahl@apple.com>
  1449. 2 string typedstream NeXT/Apple typedstream data, big endian
  1450. >0 byte x \b, version %hhd
  1451. >0 byte <5 \b
  1452. >>13 byte 0x81 \b
  1453. >>>14 ubeshort x \b, system %hd
  1454. 2 string streamtyped NeXT/Apple typedstream data, little endian
  1455. >0 byte x \b, version %hhd
  1456. >0 byte <5 \b
  1457. >>13 byte 0x81 \b
  1458. >>>14 uleshort x \b, system %hd
  1459. #------------------------------------------------------------------------------
  1460. # CAF: Apple CoreAudio File Format
  1461. #
  1462. # Container format for high-end audio purposes.
  1463. # From: David Remahl <dremahl@apple.com>
  1464. #
  1465. 0 string caff CoreAudio Format audio file
  1466. >4 beshort <10 version %d
  1467. >6 beshort x
  1468. #------------------------------------------------------------------------------
  1469. # Keychain database files
  1470. 0 string kych Mac OS X Keychain File
  1471. #------------------------------------------------------------------------------
  1472. # Code Signing related file types
  1473. 0 belong 0xfade0c00 Mac OS X Code Requirement
  1474. >8 belong 1 (opExpr)
  1475. >4 belong x - %d bytes
  1476. 0 belong 0xfade0c01 Mac OS X Code Requirement Set
  1477. >8 belong >1 containing %d items
  1478. >4 belong x - %d bytes
  1479. 0 belong 0xfade0c02 Mac OS X Code Directory
  1480. >8 belong x version %x
  1481. >12 belong >0 flags 0x%x
  1482. >4 belong x - %d bytes
  1483. 0 belong 0xfade0cc0 Mac OS X Detached Code Signature (non-executable)
  1484. >4 belong x - %d bytes
  1485. 0 belong 0xfade0cc1 Mac OS X Detached Code Signature
  1486. >8 belong >1 (%d elements)
  1487. >4 belong x - %d bytes
  1488. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  1489. # .vdi
  1490. 4 string innotek\ VirtualBox\ Disk\ Image %s
  1491. # Apple disk partition stuff, strengthen the magic using byte 4
  1492. 0 beshort 0x4552
  1493. >4 byte 0 Apple Driver Map
  1494. >>2 beshort x \b, blocksize %d
  1495. >>4 belong x \b, blockcount %d
  1496. >>10 beshort x \b, devtype %d
  1497. >>12 beshort x \b, devid %d
  1498. >>20 beshort x \b, descriptors %d
  1499. # Assume 8 partitions each at a multiple of the sector size.
  1500. # We could glean this from the partition descriptors, but they are empty!?!?
  1501. >>(2.S*1) indirect \b, contains[@0x%x]:
  1502. >>(2.S*2) indirect \b, contains[@0x%x]:
  1503. >>(2.S*3) indirect \b, contains[@0x%x]:
  1504. >>(2.S*4) indirect \b, contains[@0x%x]:
  1505. >>(2.S*5) indirect \b, contains[@0x%x]:
  1506. >>(2.S*6) indirect \b, contains[@0x%x]:
  1507. >>(2.S*7) indirect \b, contains[@0x%x]:
  1508. >>(2.S*8) indirect \b, contains[@0x%x]:
  1509. # Yes, the 3rd and 4th bytes are reserved, but we use them to make the
  1510. # magic stronger.
  1511. 0 belong 0x504d0000 Apple Partition Map
  1512. >4 belong x \b, map block count %d
  1513. >8 belong x \b, start block %d
  1514. >12 belong x \b, block count %d
  1515. >16 string >0 \b, name %s
  1516. >48 string >0 \b, type %s
  1517. >124 string >0 \b, processor %s
  1518. >140 string >0 \b, boot arguments %s
  1519. >92 belong & 1 \b, valid
  1520. >92 belong & 2 \b, allocated
  1521. >92 belong & 4 \b, in use
  1522. >92 belong & 8 \b, has boot info
  1523. >92 belong & 16 \b, readable
  1524. >92 belong & 32 \b, writable
  1525. >92 belong & 64 \b, pic boot code
  1526. >92 belong & 128 \b, chain compatible driver
  1527. >92 belong & 256 \b, real driver
  1528. >92 belong & 512 \b, chain driver
  1529. >92 belong & 1024 \b, mount at startup
  1530. >92 belong & 2048 \b, is the startup partition
  1531. #http://wiki.mozilla.org/DS_Store_File_Format`
  1532. #http://en.wikipedia.org/wiki/.DS_Store
  1533. 0 string \0\0\0\1Bud1\0 Apple Desktop Services Store
  1534. #------------------------------------------------------------------------------
  1535. # $File: applix,v 1.5 2009/09/19 16:28:08 christos Exp $
  1536. # applix: file(1) magic for Applixware
  1537. # From: Peter Soos <sp@osb.hu>
  1538. #
  1539. 0 string *BEGIN Applixware
  1540. >7 string WORDS Words Document
  1541. >7 string GRAPHICS Graphic
  1542. >7 string RASTER Bitmap
  1543. >7 string SPREADSHEETS Spreadsheet
  1544. >7 string MACRO Macro
  1545. >7 string BUILDER Builder Object
  1546. #------------------------------------------------------------------------------
  1547. # $File: archive,v 1.81 2014/01/08 22:27:31 christos Exp $
  1548. # archive: file(1) magic for archive formats (see also "msdos" for self-
  1549. # extracting compressed archives)
  1550. #
  1551. # cpio, ar, arc, arj, hpack, lha/lharc, rar, squish, uc2, zip, zoo, etc.
  1552. # pre-POSIX "tar" archives are handled in the C code.
  1553. # POSIX tar archives
  1554. 257 string ustar\0 POSIX tar archive
  1555. !:mime application/x-tar # encoding: posix
  1556. 257 string ustar\040\040\0 GNU tar archive
  1557. !:mime application/x-tar # encoding: gnu
  1558. # Incremental snapshot gnu-tar format from:
  1559. # http://www.gnu.org/software/tar/manual/html_node/Snapshot-Files.html
  1560. 0 string GNU\ tar- GNU tar incremental snapshot data
  1561. >&0 regex [0-9]\.[0-9]+-[0-9]+ version %s
  1562. # cpio archives
  1563. #
  1564. # Yes, the top two "cpio archive" formats *are* supposed to just be "short".
  1565. # The idea is to indicate archives produced on machines with the same
  1566. # byte order as the machine running "file" with "cpio archive", and
  1567. # to indicate archives produced on machines with the opposite byte order
  1568. # from the machine running "file" with "byte-swapped cpio archive".
  1569. #
  1570. # The SVR4 "cpio(4)" hints that there are additional formats, but they
  1571. # are defined as "short"s; I think all the new formats are
  1572. # character-header formats and thus are strings, not numbers.
  1573. 0 short 070707 cpio archive
  1574. !:mime application/x-cpio
  1575. 0 short 0143561 byte-swapped cpio archive
  1576. !:mime application/x-cpio # encoding: swapped
  1577. 0 string 070707 ASCII cpio archive (pre-SVR4 or odc)
  1578. 0 string 070701 ASCII cpio archive (SVR4 with no CRC)
  1579. 0 string 070702 ASCII cpio archive (SVR4 with CRC)
  1580. #
  1581. # Various archive formats used by various versions of the "ar"
  1582. # command.
  1583. #
  1584. #
  1585. # Original UNIX archive formats.
  1586. # They were written with binary values in host byte order, and
  1587. # the magic number was a host "int", which might have been 16 bits
  1588. # or 32 bits. We don't say "PDP-11" or "VAX", as there might have
  1589. # been ports to little-endian 16-bit-int or 32-bit-int platforms
  1590. # (x86?) using some of those formats; if none existed, feel free
  1591. # to use "PDP-11" for little-endian 16-bit and "VAX" for little-endian
  1592. # 32-bit. There might have been big-endian ports of that sort as
  1593. # well.
  1594. #
  1595. 0 leshort 0177555 very old 16-bit-int little-endian archive
  1596. 0 beshort 0177555 very old 16-bit-int big-endian archive
  1597. 0 lelong 0177555 very old 32-bit-int little-endian archive
  1598. 0 belong 0177555 very old 32-bit-int big-endian archive
  1599. 0 leshort 0177545 old 16-bit-int little-endian archive
  1600. >2 string __.SYMDEF random library
  1601. 0 beshort 0177545 old 16-bit-int big-endian archive
  1602. >2 string __.SYMDEF random library
  1603. 0 lelong 0177545 old 32-bit-int little-endian archive
  1604. >4 string __.SYMDEF random library
  1605. 0 belong 0177545 old 32-bit-int big-endian archive
  1606. >4 string __.SYMDEF random library
  1607. #
  1608. # From "pdp" (but why a 4-byte quantity?)
  1609. #
  1610. 0 lelong 0x39bed PDP-11 old archive
  1611. 0 lelong 0x39bee PDP-11 4.0 archive
  1612. #
  1613. # XXX - what flavor of APL used this, and was it a variant of
  1614. # some ar archive format? It's similar to, but not the same
  1615. # as, the APL workspace magic numbers in pdp.
  1616. #
  1617. 0 long 0100554 apl workspace
  1618. #
  1619. # System V Release 1 portable(?) archive format.
  1620. #
  1621. 0 string =<ar> System V Release 1 ar archive
  1622. !:mime application/x-archive
  1623. #
  1624. # Debian package; it's in the portable archive format, and needs to go
  1625. # before the entry for regular portable archives, as it's recognized as
  1626. # a portable archive whose first member has a name beginning with
  1627. # "debian".
  1628. #
  1629. 0 string =!<arch>\ndebian
  1630. !:mime application/x-debian-package
  1631. >8 string debian-split part of multipart Debian package
  1632. >8 string debian-binary Debian binary package
  1633. >8 string !debian
  1634. >68 string >\0 (format %s)
  1635. # These next two lines do not work, because a bzip2 Debian archive
  1636. # still uses gzip for the control.tar (first in the archive). Only
  1637. # data.tar varies, and the location of its filename varies too.
  1638. # file/libmagic does not current have support for ascii-string based
  1639. # (offsets) as of 2005-09-15.
  1640. #>81 string bz2 \b, uses bzip2 compression
  1641. #>84 string gz \b, uses gzip compression
  1642. #>136 ledate x created: %s
  1643. #
  1644. # MIPS archive; they're in the portable archive format, and need to go
  1645. # before the entry for regular portable archives, as it's recognized as
  1646. # a portable archive whose first member has a name beginning with
  1647. # "__________E".
  1648. #
  1649. 0 string =!<arch>\n__________E MIPS archive
  1650. !:mime application/x-archive
  1651. >20 string U with MIPS Ucode members
  1652. >21 string L with MIPSEL members
  1653. >21 string B with MIPSEB members
  1654. >19 string L and an EL hash table
  1655. >19 string B and an EB hash table
  1656. >22 string X -- out of date
  1657. 0 search/1 -h- Software Tools format archive text
  1658. #
  1659. # BSD/SVR2-and-later portable archive formats.
  1660. #
  1661. 0 string =!<arch> current ar archive
  1662. !:mime application/x-archive
  1663. >8 string __.SYMDEF random library
  1664. >68 string __.SYMDEF\ SORTED random library
  1665. #
  1666. # "Thin" archive, as can be produced by GNU ar.
  1667. #
  1668. 0 string =!<thin>\n thin archive with
  1669. >68 belong 0 no symbol entries
  1670. >68 belong 1 %d symbol entry
  1671. >68 belong >1 %d symbol entries
  1672. # ARC archiver, from Daniel Quinlan (quinlan@yggdrasil.com)
  1673. #
  1674. # The first byte is the magic (0x1a), byte 2 is the compression type for
  1675. # the first file (0x01 through 0x09), and bytes 3 to 15 are the MS-DOS
  1676. # filename of the first file (null terminated). Since some types collide
  1677. # we only test some types on basis of frequency: 0x08 (83%), 0x09 (5%),
  1678. # 0x02 (5%), 0x03 (3%), 0x04 (2%), 0x06 (2%). 0x01 collides with terminfo.
  1679. 0 lelong&0x8080ffff 0x0000081a ARC archive data, dynamic LZW
  1680. !:mime application/x-arc
  1681. 0 lelong&0x8080ffff 0x0000091a ARC archive data, squashed
  1682. !:mime application/x-arc
  1683. 0 lelong&0x8080ffff 0x0000021a ARC archive data, uncompressed
  1684. !:mime application/x-arc
  1685. 0 lelong&0x8080ffff 0x0000031a ARC archive data, packed
  1686. !:mime application/x-arc
  1687. 0 lelong&0x8080ffff 0x0000041a ARC archive data, squeezed
  1688. !:mime application/x-arc
  1689. 0 lelong&0x8080ffff 0x0000061a ARC archive data, crunched
  1690. !:mime application/x-arc
  1691. # [JW] stuff taken from idarc, obviously ARC successors:
  1692. 0 lelong&0x8080ffff 0x00000a1a PAK archive data
  1693. !:mime application/x-arc
  1694. 0 lelong&0x8080ffff 0x0000141a ARC+ archive data
  1695. !:mime application/x-arc
  1696. 0 lelong&0x8080ffff 0x0000481a HYP archive data
  1697. !:mime application/x-arc
  1698. # Acorn archive formats (Disaster prone simpleton, m91dps@ecs.ox.ac.uk)
  1699. # I can't create either SPARK or ArcFS archives so I have not tested this stuff
  1700. # [GRR: the original entries collide with ARC, above; replaced with combined
  1701. # version (not tested)]
  1702. #0 byte 0x1a RISC OS archive (spark format)
  1703. 0 string \032archive RISC OS archive (ArcFS format)
  1704. 0 string Archive\000 RISC OS archive (ArcFS format)
  1705. # All these were taken from idarc, many could not be verified. Unfortunately,
  1706. # there were many low-quality sigs, i.e. easy to trigger false positives.
  1707. # Please notify me of any real-world fishy/ambiguous signatures and I'll try
  1708. # to get my hands on the actual archiver and see if I find something better. [JW]
  1709. # probably many can be enhanced by finding some 0-byte or control char near the start
  1710. # idarc calls this Crush/Uncompressed... *shrug*
  1711. 0 string CRUSH Crush archive data
  1712. # Squeeze It (.sqz)
  1713. 0 string HLSQZ Squeeze It archive data
  1714. # SQWEZ
  1715. 0 string SQWEZ SQWEZ archive data
  1716. # HPack (.hpk)
  1717. 0 string HPAK HPack archive data
  1718. # HAP
  1719. 0 string \x91\x33HF HAP archive data
  1720. # MD/MDCD
  1721. 0 string MDmd MDCD archive data
  1722. # LIM
  1723. 0 string LIM\x1a LIM archive data
  1724. # SAR
  1725. 3 string LH5 SAR archive data
  1726. # BSArc/BS2
  1727. 0 string \212\3SB\020\0 BSArc/BS2 archive data
  1728. # Bethesda Softworks Archive (Oblivion)
  1729. 0 string BSA\0 BSArc archive data
  1730. >4 lelong x version %d
  1731. # MAR
  1732. 2 string =-ah MAR archive data
  1733. # ACB
  1734. #0 belong&0x00f800ff 0x00800000 ACB archive data
  1735. # CPZ
  1736. # TODO, this is what idarc says: 0 string \0\0\0 CPZ archive data
  1737. # JRC
  1738. 0 string JRchive JRC archive data
  1739. # Quantum
  1740. 0 string DS\0 Quantum archive data
  1741. # ReSOF
  1742. 0 string PK\3\6 ReSOF archive data
  1743. # QuArk
  1744. 0 string 7\4 QuArk archive data
  1745. # YAC
  1746. 14 string YC YAC archive data
  1747. # X1
  1748. 0 string X1 X1 archive data
  1749. 0 string XhDr X1 archive data
  1750. # CDC Codec (.dqt)
  1751. 0 belong&0xffffe000 0x76ff2000 CDC Codec archive data
  1752. # AMGC
  1753. 0 string \xad6" AMGC archive data
  1754. # NuLIB
  1755. 0 string N\xc3\xb5F\xc3\xa9lx\xc3\xa5 NuLIB archive data
  1756. # PakLeo
  1757. 0 string LEOLZW PAKLeo archive data
  1758. # ChArc
  1759. 0 string SChF ChArc archive data
  1760. # PSA
  1761. 0 string PSA PSA archive data
  1762. # CrossePAC
  1763. 0 string DSIGDCC CrossePAC archive data
  1764. # Freeze
  1765. 0 string \x1f\x9f\x4a\x10\x0a Freeze archive data
  1766. # KBoom
  1767. 0 string \xc2\xa8MP\xc2\xa8 KBoom archive data
  1768. # NSQ, must go after CDC Codec
  1769. 0 string \x76\xff NSQ archive data
  1770. # DPA
  1771. 0 string Dirk\ Paehl DPA archive data
  1772. # BA
  1773. # TODO: idarc says "bytes 0-2 == bytes 3-5"
  1774. # TTComp
  1775. 0 string \0\6 TTComp archive data
  1776. # ESP, could this conflict with Easy Software Products' (e.g.ESP ghostscript) documentation?
  1777. 0 string ESP ESP archive data
  1778. # ZPack
  1779. 0 string \1ZPK\1 ZPack archive data
  1780. # Sky
  1781. 0 string \xbc\x40 Sky archive data
  1782. # UFA
  1783. 0 string UFA UFA archive data
  1784. # Dry
  1785. 0 string =-H2O DRY archive data
  1786. # FoxSQZ
  1787. 0 string FOXSQZ FoxSQZ archive data
  1788. # AR7
  1789. 0 string ,AR7 AR7 archive data
  1790. # PPMZ
  1791. 0 string PPMZ PPMZ archive data
  1792. # MS Compress
  1793. 4 string \x88\xf0\x27 MS Compress archive data
  1794. # updated by Joerg Jenderek
  1795. >9 string \0
  1796. >>0 string KWAJ
  1797. >>>7 string \321\003 MS Compress archive data
  1798. >>>>14 ulong >0 \b, original size: %ld bytes
  1799. >>>>18 ubyte >0x65
  1800. >>>>>18 string x \b, was %.8s
  1801. >>>>>(10.b-4) string x \b.%.3s
  1802. # MP3 (archiver, not lossy audio compression)
  1803. 0 string MP3\x1a MP3-Archiver archive data
  1804. # ZET
  1805. 0 string OZ\xc3\x9d ZET archive data
  1806. # TSComp
  1807. 0 string \x65\x5d\x13\x8c\x08\x01\x03\x00 TSComp archive data
  1808. # ARQ
  1809. 0 string gW\4\1 ARQ archive data
  1810. # Squash
  1811. 3 string OctSqu Squash archive data
  1812. # Terse
  1813. 0 string \5\1\1\0 Terse archive data
  1814. # PUCrunch
  1815. 0 string \x01\x08\x0b\x08\xef\x00\x9e\x32\x30\x36\x31 PUCrunch archive data
  1816. # UHarc
  1817. 0 string UHA UHarc archive data
  1818. # ABComp
  1819. 0 string \2AB ABComp archive data
  1820. 0 string \3AB2 ABComp archive data
  1821. # CMP
  1822. 0 string CO\0 CMP archive data
  1823. # Splint
  1824. 0 string \x93\xb9\x06 Splint archive data
  1825. # InstallShield
  1826. 0 string \x13\x5d\x65\x8c InstallShield Z archive Data
  1827. # Gather
  1828. 1 string GTH Gather archive data
  1829. # BOA
  1830. 0 string BOA BOA archive data
  1831. # RAX
  1832. 0 string ULEB\xa RAX archive data
  1833. # Xtreme
  1834. 0 string ULEB\0 Xtreme archive data
  1835. # Pack Magic
  1836. 0 string @\xc3\xa2\1\0 Pack Magic archive data
  1837. # BTS
  1838. 0 belong&0xfeffffff 0x1a034465 BTS archive data
  1839. # ELI 5750
  1840. 0 string Ora\ ELI 5750 archive data
  1841. # QFC
  1842. 0 string \x1aFC\x1a QFC archive data
  1843. 0 string \x1aQF\x1a QFC archive data
  1844. # PRO-PACK
  1845. 0 string RNC PRO-PACK archive data
  1846. # 777
  1847. 0 string 777 777 archive data
  1848. # LZS221
  1849. 0 string sTaC LZS221 archive data
  1850. # HPA
  1851. 0 string HPA HPA archive data
  1852. # Arhangel
  1853. 0 string LG Arhangel archive data
  1854. # EXP1, uses bzip2
  1855. 0 string 0123456789012345BZh EXP1 archive data
  1856. # IMP
  1857. 0 string IMP\xa IMP archive data
  1858. # NRV
  1859. 0 string \x00\x9E\x6E\x72\x76\xFF NRV archive data
  1860. # Squish
  1861. 0 string \x73\xb2\x90\xf4 Squish archive data
  1862. # Par
  1863. 0 string PHILIPP Par archive data
  1864. 0 string PAR Par archive data
  1865. # HIT
  1866. 0 string UB HIT archive data
  1867. # SBX
  1868. 0 belong&0xfffff000 0x53423000 SBX archive data
  1869. # NaShrink
  1870. 0 string NSK NaShrink archive data
  1871. # SAPCAR
  1872. 0 string #\ CAR\ archive\ header SAPCAR archive data
  1873. 0 string CAR\ 2.00RG SAPCAR archive data
  1874. # Disintegrator
  1875. 0 string DST Disintegrator archive data
  1876. # ASD
  1877. 0 string ASD ASD archive data
  1878. # InstallShield CAB
  1879. 0 string ISc( InstallShield CAB
  1880. # TOP4
  1881. 0 string T4\x1a TOP4 archive data
  1882. # BatComp left out: sig looks like COM executable
  1883. # so TODO: get real 4dos batcomp file and find sig
  1884. # BlakHole
  1885. 0 string BH\5\7 BlakHole archive data
  1886. # BIX
  1887. 0 string BIX0 BIX archive data
  1888. # ChiefLZA
  1889. 0 string ChfLZ ChiefLZA archive data
  1890. # Blink
  1891. 0 string Blink Blink archive data
  1892. # Logitech Compress
  1893. 0 string \xda\xfa Logitech Compress archive data
  1894. # ARS-Sfx (FIXME: really a SFX? then goto COM/EXE)
  1895. 1 string (C)\ STEPANYUK ARS-Sfx archive data
  1896. # AKT/AKT32
  1897. 0 string AKT32 AKT32 archive data
  1898. 0 string AKT AKT archive data
  1899. # NPack
  1900. 0 string MSTSM NPack archive data
  1901. # PFT
  1902. 0 string \0\x50\0\x14 PFT archive data
  1903. # SemOne
  1904. 0 string SEM SemOne archive data
  1905. # PPMD
  1906. 0 string \x8f\xaf\xac\x84 PPMD archive data
  1907. # FIZ
  1908. 0 string FIZ FIZ archive data
  1909. # MSXiE
  1910. 0 belong&0xfffff0f0 0x4d530000 MSXiE archive data
  1911. # DeepFreezer
  1912. 0 belong&0xfffffff0 0x797a3030 DeepFreezer archive data
  1913. # DC
  1914. 0 string =<DC- DC archive data
  1915. # TPac
  1916. 0 string \4TPAC\3 TPac archive data
  1917. # Ai
  1918. 0 string Ai\1\1\0 Ai archive data
  1919. 0 string Ai\1\0\0 Ai archive data
  1920. # Ai32
  1921. 0 string Ai\2\0 Ai32 archive data
  1922. 0 string Ai\2\1 Ai32 archive data
  1923. # SBC
  1924. 0 string SBC SBC archive data
  1925. # Ybs
  1926. 0 string YBS Ybs archive data
  1927. # DitPack
  1928. 0 string \x9e\0\0 DitPack archive data
  1929. # DMS
  1930. 0 string DMS! DMS archive data
  1931. # EPC
  1932. 0 string \x8f\xaf\xac\x8c EPC archive data
  1933. # VSARC
  1934. 0 string VS\x1a VSARC archive data
  1935. # PDZ
  1936. 0 string PDZ PDZ archive data
  1937. # ReDuq
  1938. 0 string rdqx ReDuq archive data
  1939. # GCA
  1940. 0 string GCAX GCA archive data
  1941. # PPMN
  1942. 0 string pN PPMN archive data
  1943. # WinImage
  1944. 3 string WINIMAGE WinImage archive data
  1945. # Compressia
  1946. 0 string CMP0CMP Compressia archive data
  1947. # UHBC
  1948. 0 string UHB UHBC archive data
  1949. # WinHKI
  1950. 0 string \x61\x5C\x04\x05 WinHKI archive data
  1951. # WWPack data file
  1952. 0 string WWP WWPack archive data
  1953. # BSN (BSA, PTS-DOS)
  1954. 0 string \xffBSG BSN archive data
  1955. 1 string \xffBSG BSN archive data
  1956. 3 string \xffBSG BSN archive data
  1957. 1 string \0\xae\2 BSN archive data
  1958. 1 string \0\xae\3 BSN archive data
  1959. 1 string \0\xae\7 BSN archive data
  1960. # AIN
  1961. 0 string \x33\x18 AIN archive data
  1962. 0 string \x33\x17 AIN archive data
  1963. # XPA32
  1964. 0 string xpa\0\1 XPA32 archive data
  1965. # SZip (TODO: doesn't catch all versions)
  1966. 0 string SZ\x0a\4 SZip archive data
  1967. # XPack DiskImage
  1968. 0 string jm XPack DiskImage archive data
  1969. # XPack Data
  1970. 0 string xpa XPack archive data
  1971. # XPack Single Data
  1972. 0 string \xc3\x8d\ jm XPack single archive data
  1973. # TODO: missing due to unknown magic/magic at end of file:
  1974. #DWC
  1975. #ARG
  1976. #ZAR
  1977. #PC/3270
  1978. #InstallIt
  1979. #RKive
  1980. #RK
  1981. #XPack Diskimage
  1982. # These were inspired by idarc, but actually verified
  1983. # Dzip archiver (.dz)
  1984. 0 string DZ Dzip archive data
  1985. >2 byte x \b, version %i
  1986. >3 byte x \b.%i
  1987. # ZZip archiver (.zz)
  1988. 0 string ZZ\ \0\0 ZZip archive data
  1989. 0 string ZZ0 ZZip archive data
  1990. # PAQ archiver (.paq)
  1991. 0 string \xaa\x40\x5f\x77\x1f\xe5\x82\x0d PAQ archive data
  1992. 0 string PAQ PAQ archive data
  1993. >3 byte&0xf0 0x30
  1994. >>3 byte x (v%c)
  1995. # JAR archiver (.j), this is the successor to ARJ, not Java's JAR (which is essentially ZIP)
  1996. 0xe string \x1aJar\x1b JAR (ARJ Software, Inc.) archive data
  1997. 0 string JARCS JAR (ARJ Software, Inc.) archive data
  1998. # ARJ archiver (jason@jarthur.Claremont.EDU)
  1999. 0 leshort 0xea60 ARJ archive data
  2000. !:mime application/x-arj
  2001. >5 byte x \b, v%d,
  2002. >8 byte &0x04 multi-volume,
  2003. >8 byte &0x10 slash-switched,
  2004. >8 byte &0x20 backup,
  2005. >34 string x original name: %s,
  2006. >7 byte 0 os: MS-DOS
  2007. >7 byte 1 os: PRIMOS
  2008. >7 byte 2 os: Unix
  2009. >7 byte 3 os: Amiga
  2010. >7 byte 4 os: Macintosh
  2011. >7 byte 5 os: OS/2
  2012. >7 byte 6 os: Apple ][ GS
  2013. >7 byte 7 os: Atari ST
  2014. >7 byte 8 os: NeXT
  2015. >7 byte 9 os: VAX/VMS
  2016. >3 byte >0 %d]
  2017. # [JW] idarc says this is also possible
  2018. 2 leshort 0xea60 ARJ archive data
  2019. # HA archiver (Greg Roelofs, newt@uchicago.edu)
  2020. # This is a really bad format. A file containing HAWAII will match this...
  2021. #0 string HA HA archive data,
  2022. #>2 leshort =1 1 file,
  2023. #>2 leshort >1 %u files,
  2024. #>4 byte&0x0f =0 first is type CPY
  2025. #>4 byte&0x0f =1 first is type ASC
  2026. #>4 byte&0x0f =2 first is type HSC
  2027. #>4 byte&0x0f =0x0e first is type DIR
  2028. #>4 byte&0x0f =0x0f first is type SPECIAL
  2029. # suggestion: at least identify small archives (<1024 files)
  2030. 0 belong&0xffff00fc 0x48410000 HA archive data
  2031. >2 leshort =1 1 file,
  2032. >2 leshort >1 %u files,
  2033. >4 byte&0x0f =0 first is type CPY
  2034. >4 byte&0x0f =1 first is type ASC
  2035. >4 byte&0x0f =2 first is type HSC
  2036. >4 byte&0x0f =0x0e first is type DIR
  2037. >4 byte&0x0f =0x0f first is type SPECIAL
  2038. # HPACK archiver (Peter Gutmann, pgut1@cs.aukuni.ac.nz)
  2039. 0 string HPAK HPACK archive data
  2040. # JAM Archive volume format, by Dmitry.Kohmanyuk@UA.net
  2041. 0 string \351,\001JAM\ JAM archive,
  2042. >7 string >\0 version %.4s
  2043. >0x26 byte =0x27 -
  2044. >>0x2b string >\0 label %.11s,
  2045. >>0x27 lelong x serial %08x,
  2046. >>0x36 string >\0 fstype %.8s
  2047. # LHARC/LHA archiver (Greg Roelofs, newt@uchicago.edu)
  2048. 2 string -lh0- LHarc 1.x/ARX archive data [lh0]
  2049. !:mime application/x-lharc
  2050. 2 string -lh1- LHarc 1.x/ARX archive data [lh1]
  2051. !:mime application/x-lharc
  2052. 2 string -lz4- LHarc 1.x archive data [lz4]
  2053. !:mime application/x-lharc
  2054. 2 string -lz5- LHarc 1.x archive data [lz5]
  2055. !:mime application/x-lharc
  2056. # [never seen any but the last; -lh4- reported in comp.compression:]
  2057. 2 string -lzs- LHa/LZS archive data [lzs]
  2058. !:mime application/x-lha
  2059. 2 string -lh\40- LHa 2.x? archive data [lh ]
  2060. !:mime application/x-lha
  2061. 2 string -lhd- LHa 2.x? archive data [lhd]
  2062. !:mime application/x-lha
  2063. 2 string -lh2- LHa 2.x? archive data [lh2]
  2064. !:mime application/x-lha
  2065. 2 string -lh3- LHa 2.x? archive data [lh3]
  2066. !:mime application/x-lha
  2067. 2 string -lh4- LHa (2.x) archive data [lh4]
  2068. !:mime application/x-lha
  2069. 2 string -lh5- LHa (2.x) archive data [lh5]
  2070. !:mime application/x-lha
  2071. 2 string -lh6- LHa (2.x) archive data [lh6]
  2072. !:mime application/x-lha
  2073. 2 string -lh7- LHa (2.x)/LHark archive data [lh7]
  2074. !:mime application/x-lha
  2075. >20 byte x - header level %d
  2076. # taken from idarc [JW]
  2077. 2 string -lZ PUT archive data
  2078. 2 string -lz LZS archive data
  2079. 2 string -sw1- Swag archive data
  2080. # RAR archiver (Greg Roelofs, newt@uchicago.edu)
  2081. 0 string Rar! RAR archive data,
  2082. !:mime application/x-rar
  2083. >44 byte x v%0x,
  2084. >10 byte >0 flags:
  2085. >>10 byte &0x01 Archive volume,
  2086. >>10 byte &0x02 Commented,
  2087. >>10 byte &0x04 Locked,
  2088. >>10 byte &0x08 Solid,
  2089. >>10 byte &0x20 Authenticated,
  2090. >35 byte 0 os: MS-DOS
  2091. >35 byte 1 os: OS/2
  2092. >35 byte 2 os: Win32
  2093. >35 byte 3 os: Unix
  2094. # some old version? idarc says:
  2095. 0 string RE\x7e\x5e RAR archive data
  2096. # SQUISH archiver (Greg Roelofs, newt@uchicago.edu)
  2097. 0 string SQSH squished archive data (Acorn RISCOS)
  2098. # UC2 archiver (Greg Roelofs, newt@uchicago.edu)
  2099. # [JW] see exe section for self-extracting version
  2100. 0 string UC2\x1a UC2 archive data
  2101. # PKZIP multi-volume archive
  2102. 0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract
  2103. !:mime application/zip
  2104. # Zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  2105. 0 string PK\005\006 Zip archive data (empty)
  2106. 0 string PK\003\004
  2107. # Specialised zip formats which start with a member named 'mimetype'
  2108. # (stored uncompressed, with no 'extra field') containing the file's MIME type.
  2109. # Check for have 8-byte name, 0-byte extra field, name "mimetype", and
  2110. # contents starting with "application/":
  2111. >26 string \x8\0\0\0mimetypeapplication/
  2112. # KOffice / OpenOffice & StarOffice / OpenDocument formats
  2113. # From: Abel Cheung <abel@oaka.org>
  2114. # KOffice (1.2 or above) formats
  2115. # (mimetype contains "application/vnd.kde.<SUBTYPE>")
  2116. >>50 string vnd.kde. KOffice (>=1.2)
  2117. >>>58 string karbon Karbon document
  2118. >>>58 string kchart KChart document
  2119. >>>58 string kformula KFormula document
  2120. >>>58 string kivio Kivio document
  2121. >>>58 string kontour Kontour document
  2122. >>>58 string kpresenter KPresenter document
  2123. >>>58 string kspread KSpread document
  2124. >>>58 string kword KWord document
  2125. # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7)
  2126. # (mimetype contains "application/vnd.sun.xml.<SUBTYPE>")
  2127. >>50 string vnd.sun.xml. OpenOffice.org 1.x
  2128. >>>62 string writer Writer
  2129. >>>>68 byte !0x2e document
  2130. >>>>68 string .template template
  2131. >>>>68 string .global global document
  2132. >>>62 string calc Calc
  2133. >>>>66 byte !0x2e spreadsheet
  2134. >>>>66 string .template template
  2135. >>>62 string draw Draw
  2136. >>>>66 byte !0x2e document
  2137. >>>>66 string .template template
  2138. >>>62 string impress Impress
  2139. >>>>69 byte !0x2e presentation
  2140. >>>>69 string .template template
  2141. >>>62 string math Math document
  2142. >>>62 string base Database file
  2143. # OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8)
  2144. # http://lists.oasis-open.org/archives/office/200505/msg00006.html
  2145. # (mimetype contains "application/vnd.oasis.opendocument.<SUBTYPE>")
  2146. >>50 string vnd.oasis.opendocument. OpenDocument
  2147. >>>73 string text
  2148. >>>>77 byte !0x2d Text
  2149. !:mime application/vnd.oasis.opendocument.text
  2150. >>>>77 string -template Text Template
  2151. !:mime application/vnd.oasis.opendocument.text-template
  2152. >>>>77 string -web HTML Document Template
  2153. !:mime application/vnd.oasis.opendocument.text-web
  2154. >>>>77 string -master Master Document
  2155. !:mime application/vnd.oasis.opendocument.text-master
  2156. >>>73 string graphics
  2157. >>>>81 byte !0x2d Drawing
  2158. !:mime application/vnd.oasis.opendocument.graphics
  2159. >>>>81 string -template Template
  2160. !:mime application/vnd.oasis.opendocument.graphics-template
  2161. >>>73 string presentation
  2162. >>>>85 byte !0x2d Presentation
  2163. !:mime application/vnd.oasis.opendocument.presentation
  2164. >>>>85 string -template Template
  2165. !:mime application/vnd.oasis.opendocument.presentation-template
  2166. >>>73 string spreadsheet
  2167. >>>>84 byte !0x2d Spreadsheet
  2168. !:mime application/vnd.oasis.opendocument.spreadsheet
  2169. >>>>84 string -template Template
  2170. !:mime application/vnd.oasis.opendocument.spreadsheet-template
  2171. >>>73 string chart
  2172. >>>>78 byte !0x2d Chart
  2173. !:mime application/vnd.oasis.opendocument.chart
  2174. >>>>78 string -template Template
  2175. !:mime application/vnd.oasis.opendocument.chart-template
  2176. >>>73 string formula
  2177. >>>>80 byte !0x2d Formula
  2178. !:mime application/vnd.oasis.opendocument.formula
  2179. >>>>80 string -template Template
  2180. !:mime application/vnd.oasis.opendocument.formula-template
  2181. >>>73 string database Database
  2182. !:mime application/vnd.oasis.opendocument.database
  2183. >>>73 string image
  2184. >>>>78 byte !0x2d Image
  2185. !:mime application/vnd.oasis.opendocument.image
  2186. >>>>78 string -template Template
  2187. !:mime application/vnd.oasis.opendocument.image-template
  2188. # EPUB (OEBPS) books using OCF (OEBPS Container Format)
  2189. # http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4.
  2190. # From: Ralf Brown <ralf.brown@gmail.com>
  2191. >>50 string epub+zip EPUB document
  2192. !:mime application/epub+zip
  2193. # Catch other ZIP-with-mimetype formats
  2194. # In a ZIP file, the bytes immediately after a member's contents are
  2195. # always "PK". The 2 regex rules here print the "mimetype" member's
  2196. # contents up to the first 'P'. Luckily, most MIME types don't contain
  2197. # any capital 'P's. This is a kludge.
  2198. # (mimetype contains "application/<OTHER>")
  2199. >>50 string !epub+zip
  2200. >>>50 string !vnd.oasis.opendocument.
  2201. >>>>50 string !vnd.sun.xml.
  2202. >>>>>50 string !vnd.kde.
  2203. >>>>>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?)
  2204. !:mime application/zip
  2205. # (mimetype contents other than "application/*")
  2206. >26 string \x8\0\0\0mimetype
  2207. >>38 string !application/
  2208. >>>38 regex [!-OQ-~]+ Zip data (MIME type "%s"?)
  2209. !:mime application/zip
  2210. # Java Jar files
  2211. >(26.s+30) leshort 0xcafe Java archive data (JAR)
  2212. !:mime application/java-archive
  2213. # Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu)
  2214. # Next line excludes specialized formats:
  2215. >(26.s+30) leshort !0xcafe
  2216. >>26 string !\x8\0\0\0mimetype Zip archive data
  2217. !:mime application/zip
  2218. >>>4 byte 0x09 \b, at least v0.9 to extract
  2219. >>>4 byte 0x0a \b, at least v1.0 to extract
  2220. >>>4 byte 0x0b \b, at least v1.1 to extract
  2221. >>>4 byte 0x14 \b, at least v2.0 to extract
  2222. >>>4 byte 0x2d \b, at least v3.0 to extract
  2223. >>>0x161 string WINZIP \b, WinZIP self-extracting
  2224. # StarView Metafile
  2225. # From Pierre Ducroquet <pinaraf@pinaraf.info>
  2226. 0 string VCLMTF StarView MetaFile
  2227. >6 beshort x \b, version %d
  2228. >8 belong x \b, size %d
  2229. # Zoo archiver
  2230. 20 lelong 0xfdc4a7dc Zoo archive data
  2231. !:mime application/x-zoo
  2232. >4 byte >48 \b, v%c.
  2233. >>6 byte >47 \b%c
  2234. >>>7 byte >47 \b%c
  2235. >32 byte >0 \b, modify: v%d
  2236. >>33 byte x \b.%d+
  2237. >42 lelong 0xfdc4a7dc \b,
  2238. >>70 byte >0 extract: v%d
  2239. >>>71 byte x \b.%d+
  2240. # Shell archives
  2241. 10 string #\ This\ is\ a\ shell\ archive shell archive text
  2242. !:mime application/octet-stream
  2243. #
  2244. # LBR. NB: May conflict with the questionable
  2245. # "binary Computer Graphics Metafile" format.
  2246. #
  2247. 0 string \0\ \ \ \ \ \ \ \ \ \ \ \0\0 LBR archive data
  2248. #
  2249. # PMA (CP/M derivative of LHA)
  2250. #
  2251. 2 string -pm0- PMarc archive data [pm0]
  2252. 2 string -pm1- PMarc archive data [pm1]
  2253. 2 string -pm2- PMarc archive data [pm2]
  2254. 2 string -pms- PMarc SFX archive (CP/M, DOS)
  2255. 5 string -pc1- PopCom compressed executable (CP/M)
  2256. # From Rafael Laboissiere <rafael@laboissiere.net>
  2257. # The Project Revision Control System (see
  2258. # http://prcs.sourceforge.net) generates a packaged project
  2259. # file which is recognized by the following entry:
  2260. 0 leshort 0xeb81 PRCS packaged project
  2261. # Microsoft cabinets
  2262. # by David Necas (Yeti) <yeti@physics.muni.cz>
  2263. #0 string MSCF\0\0\0\0 Microsoft cabinet file data,
  2264. #>25 byte x v%d
  2265. #>24 byte x \b.%d
  2266. # MPi: All CABs have version 1.3, so this is pointless.
  2267. # Better magic in debian-additions.
  2268. # GTKtalog catalogs
  2269. # by David Necas (Yeti) <yeti@physics.muni.cz>
  2270. 4 string gtktalog\ GTKtalog catalog data,
  2271. >13 string 3 version 3
  2272. >>14 beshort 0x677a (gzipped)
  2273. >>14 beshort !0x677a (not gzipped)
  2274. >13 string >3 version %s
  2275. ############################################################################
  2276. # Parity archive reconstruction file, the 'par' file format now used on Usenet.
  2277. 0 string PAR\0 PARity archive data
  2278. >48 leshort =0 - Index file
  2279. >48 leshort >0 - file number %d
  2280. # Felix von Leitner <felix-file@fefe.de>
  2281. 0 string d8:announce BitTorrent file
  2282. !:mime application/x-bittorrent
  2283. # Atari MSA archive - Teemu Hukkanen <tjhukkan@iki.fi>
  2284. 0 beshort 0x0e0f Atari MSA archive data
  2285. >2 beshort x \b, %d sectors per track
  2286. >4 beshort 0 \b, 1 sided
  2287. >4 beshort 1 \b, 2 sided
  2288. >6 beshort x \b, starting track: %d
  2289. >8 beshort x \b, ending track: %d
  2290. # Alternate ZIP string (amc@arwen.cs.berkeley.edu)
  2291. 0 string PK00PK\003\004 Zip archive data
  2292. # ACE archive (from http://www.wotsit.org/download.asp?f=ace)
  2293. # by Stefan `Sec` Zehl <sec@42.org>
  2294. 7 string **ACE** ACE archive data
  2295. >15 byte >0 version %d
  2296. >16 byte =0x00 \b, from MS-DOS
  2297. >16 byte =0x01 \b, from OS/2
  2298. >16 byte =0x02 \b, from Win/32
  2299. >16 byte =0x03 \b, from Unix
  2300. >16 byte =0x04 \b, from MacOS
  2301. >16 byte =0x05 \b, from WinNT
  2302. >16 byte =0x06 \b, from Primos
  2303. >16 byte =0x07 \b, from AppleGS
  2304. >16 byte =0x08 \b, from Atari
  2305. >16 byte =0x09 \b, from Vax/VMS
  2306. >16 byte =0x0A \b, from Amiga
  2307. >16 byte =0x0B \b, from Next
  2308. >14 byte x \b, version %d to extract
  2309. >5 leshort &0x0080 \b, multiple volumes,
  2310. >>17 byte x \b (part %d),
  2311. >5 leshort &0x0002 \b, contains comment
  2312. >5 leshort &0x0200 \b, sfx
  2313. >5 leshort &0x0400 \b, small dictionary
  2314. >5 leshort &0x0800 \b, multi-volume
  2315. >5 leshort &0x1000 \b, contains AV-String
  2316. >>30 string \x16*UNREGISTERED\x20VERSION* (unregistered)
  2317. >5 leshort &0x2000 \b, with recovery record
  2318. >5 leshort &0x4000 \b, locked
  2319. >5 leshort &0x8000 \b, solid
  2320. # Date in MS-DOS format (whatever that is)
  2321. #>18 lelong x Created on
  2322. # sfArk : compression program for Soundfonts (sf2) by Dirk Jagdmann
  2323. # <doj@cubic.org>
  2324. 0x1A string sfArk sfArk compressed Soundfont
  2325. >0x15 string 2
  2326. >>0x1 string >\0 Version %s
  2327. >>0x2A string >\0 : %s
  2328. # DR-DOS 7.03 Packed File *.??_
  2329. 0 string Packed\ File\ Personal NetWare Packed File
  2330. >12 string x \b, was "%.12s"
  2331. # EET archive
  2332. # From: Tilman Sauerbeck <tilman@code-monkey.de>
  2333. 0 belong 0x1ee7ff00 EET archive
  2334. !:mime application/x-eet
  2335. # rzip archives
  2336. 0 string RZIP rzip compressed data
  2337. >4 byte x - version %d
  2338. >5 byte x \b.%d
  2339. >6 belong x (%d bytes)
  2340. # From: "Robert Dale" <robdale@gmail.com>
  2341. 0 belong 123 dar archive,
  2342. >4 belong x label "%.8x
  2343. >>8 belong x %.8x
  2344. >>>12 beshort x %.4x"
  2345. >14 byte 0x54 end slice
  2346. >14 beshort 0x4e4e multi-part
  2347. >14 beshort 0x4e53 multi-part, with -S
  2348. # Symbian installation files
  2349. # http://www.thouky.co.uk/software/psifs/sis.html
  2350. # http://developer.symbian.com/main/downloads/papers/SymbianOSv91/softwareinstallsis.pdf
  2351. 8 lelong 0x10000419 Symbian installation file
  2352. !:mime application/vnd.symbian.install
  2353. >4 lelong 0x1000006D (EPOC release 3/4/5)
  2354. >4 lelong 0x10003A12 (EPOC release 6)
  2355. 0 lelong 0x10201A7A Symbian installation file (Symbian OS 9.x)
  2356. !:mime x-epoc/x-sisx-app
  2357. # From "Nelson A. de Oliveira" <naoliv@gmail.com>
  2358. 0 string MPQ\032 MoPaQ (MPQ) archive
  2359. # From: Dirk Jagdmann <doj@cubic.org>
  2360. # xar archive format: http://code.google.com/p/xar/
  2361. 0 string xar! xar archive
  2362. >6 beshort x - version %ld
  2363. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  2364. # .kgb
  2365. 0 string KGB_arch KGB Archiver file
  2366. >10 string x with compression level %.1s
  2367. # xar (eXtensible ARchiver) archive
  2368. # From: "David Remahl" <dremahl@apple.com>
  2369. 0 string xar! xar archive
  2370. #>4 beshort x header size %d
  2371. >6 beshort x version %d,
  2372. #>8 quad x compressed TOC: %d,
  2373. #>16 quad x uncompressed TOC: %d,
  2374. >24 belong 0 no checksum
  2375. >24 belong 1 SHA-1 checksum
  2376. >24 belong 2 MD5 checksum
  2377. # Type: Parity Archive
  2378. # From: Daniel van Eeden <daniel_e@dds.nl>
  2379. 0 string PAR2 Parity Archive Volume Set
  2380. # Bacula volume format. (Volumes always start with a block header.)
  2381. # URL: http://bacula.org/3.0.x-manuals/en/developers/developers/Block_Header.html
  2382. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  2383. 12 string BB02 Bacula volume
  2384. >20 bedate x \b, started %s
  2385. # ePub is XHTML + XML inside a ZIP archive. The first member of the
  2386. # archive must be an uncompressed file called 'mimetype' with contents
  2387. # 'application/epub+zip'
  2388. # From: "Michael Gorny" <mgorny@gentoo.org>
  2389. # ZPAQ: http://mattmahoney.net/dc/zpaq.html
  2390. 0 string zPQ ZPAQ stream
  2391. >3 byte x \b, level %d
  2392. # BBeB ebook, unencrypted (LRF format)
  2393. # URL: http://www.sven.de/librie/Librie/LrfFormat
  2394. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  2395. 0 string L\0R\0F\0\0\0 BBeB ebook data, unencrypted
  2396. >8 beshort x \b, version %d
  2397. >36 byte 1 \b, front-to-back
  2398. >36 byte 16 \b, back-to-front
  2399. >42 beshort x \b, (%dx,
  2400. >44 beshort x %d)
  2401. #------------------------------------------------------------------------------
  2402. # $File: assembler,v 1.6 2013/12/11 14:14:20 christos Exp $
  2403. # make: file(1) magic for assembler source
  2404. #
  2405. 0 regex \^[\040\t]{0,50}\\.asciiz assembler source text
  2406. !:mime text/x-asm
  2407. 0 regex \^[\040\t]{0,50}\\.byte assembler source text
  2408. !:mime text/x-asm
  2409. 0 regex \^[\040\t]{0,50}\\.even assembler source text
  2410. !:mime text/x-asm
  2411. 0 regex \^[\040\t]{0,50}\\.globl assembler source text
  2412. !:mime text/x-asm
  2413. 0 regex \^[\040\t]{0,50}\\.text assembler source text
  2414. !:mime text/x-asm
  2415. 0 regex \^[\040\t]{0,50}\\.file assembler source text
  2416. !:mime text/x-asm
  2417. 0 regex \^[\040\t]{0,50}\\.type assembler source text
  2418. !:mime text/x-asm
  2419. #------------------------------------------------------------------------------
  2420. # $File: asterix,v 1.5 2009/09/19 16:28:08 christos Exp $
  2421. # asterix: file(1) magic for Aster*x; SunOS 5.5.1 gave the 4-character
  2422. # strings as "long" - we assume they're just strings:
  2423. # From: guy@netapp.com (Guy Harris)
  2424. #
  2425. 0 string *STA Aster*x
  2426. >7 string WORD Words Document
  2427. >7 string GRAP Graphic
  2428. >7 string SPRE Spreadsheet
  2429. >7 string MACR Macro
  2430. 0 string 2278 Aster*x Version 2
  2431. >29 byte 0x36 Words Document
  2432. >29 byte 0x35 Graphic
  2433. >29 byte 0x32 Spreadsheet
  2434. >29 byte 0x38 Macro
  2435. #------------------------------------------------------------------------------
  2436. # $File: att3b,v 1.8 2009/09/19 16:28:08 christos Exp $
  2437. # att3b: file(1) magic for AT&T 3B machines
  2438. #
  2439. # The `versions' should be un-commented if they work for you.
  2440. # (Was the problem just one of endianness?)
  2441. #
  2442. # 3B20
  2443. #
  2444. # The 3B20 conflicts with SCCS.
  2445. #0 beshort 0550 3b20 COFF executable
  2446. #>12 belong >0 not stripped
  2447. #>22 beshort >0 - version %ld
  2448. #0 beshort 0551 3b20 COFF executable (TV)
  2449. #>12 belong >0 not stripped
  2450. #>22 beshort >0 - version %ld
  2451. #
  2452. # WE32K
  2453. #
  2454. 0 beshort 0560 WE32000 COFF
  2455. >18 beshort ^00000020 object
  2456. >18 beshort &00000020 executable
  2457. >12 belong >0 not stripped
  2458. >18 beshort ^00010000 N/A on 3b2/300 w/paging
  2459. >18 beshort &00020000 32100 required
  2460. >18 beshort &00040000 and MAU hardware required
  2461. >20 beshort 0407 (impure)
  2462. >20 beshort 0410 (pure)
  2463. >20 beshort 0413 (demand paged)
  2464. >20 beshort 0443 (target shared library)
  2465. >22 beshort >0 - version %ld
  2466. 0 beshort 0561 WE32000 COFF executable (TV)
  2467. >12 belong >0 not stripped
  2468. #>18 beshort &00020000 - 32100 required
  2469. #>18 beshort &00040000 and MAU hardware required
  2470. #>22 beshort >0 - version %ld
  2471. #
  2472. # core file for 3b2
  2473. 0 string \000\004\036\212\200 3b2 core file
  2474. >364 string >\0 of '%s'
  2475. #------------------------------------------------------------------------------
  2476. # $File: audio,v 1.68 2013/12/02 13:32:26 christos Exp $
  2477. # audio: file(1) magic for sound formats (see also "iff")
  2478. #
  2479. # Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
  2480. # and others
  2481. #
  2482. # Sun/NeXT audio data
  2483. 0 string .snd Sun/NeXT audio data:
  2484. >12 belong 1 8-bit ISDN mu-law,
  2485. !:mime audio/basic
  2486. >12 belong 2 8-bit linear PCM [REF-PCM],
  2487. !:mime audio/basic
  2488. >12 belong 3 16-bit linear PCM,
  2489. !:mime audio/basic
  2490. >12 belong 4 24-bit linear PCM,
  2491. !:mime audio/basic
  2492. >12 belong 5 32-bit linear PCM,
  2493. !:mime audio/basic
  2494. >12 belong 6 32-bit IEEE floating point,
  2495. !:mime audio/basic
  2496. >12 belong 7 64-bit IEEE floating point,
  2497. !:mime audio/basic
  2498. >12 belong 8 Fragmented sample data,
  2499. >12 belong 10 DSP program,
  2500. >12 belong 11 8-bit fixed point,
  2501. >12 belong 12 16-bit fixed point,
  2502. >12 belong 13 24-bit fixed point,
  2503. >12 belong 14 32-bit fixed point,
  2504. >12 belong 18 16-bit linear with emphasis,
  2505. >12 belong 19 16-bit linear compressed,
  2506. >12 belong 20 16-bit linear with emphasis and compression,
  2507. >12 belong 21 Music kit DSP commands,
  2508. >12 belong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
  2509. !:mime audio/x-adpcm
  2510. >12 belong 24 compressed (8-bit CCITT G.722 ADPCM)
  2511. >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM),
  2512. >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM),
  2513. >12 belong 27 8-bit A-law (CCITT G.711),
  2514. >20 belong 1 mono,
  2515. >20 belong 2 stereo,
  2516. >20 belong 4 quad,
  2517. >16 belong >0 %d Hz
  2518. # DEC systems (e.g. DECstation 5000) use a variant of the Sun/NeXT format
  2519. # that uses little-endian encoding and has a different magic number
  2520. 0 lelong 0x0064732E DEC audio data:
  2521. >12 lelong 1 8-bit ISDN mu-law,
  2522. !:mime audio/x-dec-basic
  2523. >12 lelong 2 8-bit linear PCM [REF-PCM],
  2524. !:mime audio/x-dec-basic
  2525. >12 lelong 3 16-bit linear PCM,
  2526. !:mime audio/x-dec-basic
  2527. >12 lelong 4 24-bit linear PCM,
  2528. !:mime audio/x-dec-basic
  2529. >12 lelong 5 32-bit linear PCM,
  2530. !:mime audio/x-dec-basic
  2531. >12 lelong 6 32-bit IEEE floating point,
  2532. !:mime audio/x-dec-basic
  2533. >12 lelong 7 64-bit IEEE floating point,
  2534. !:mime audio/x-dec-basic
  2535. >12 belong 8 Fragmented sample data,
  2536. >12 belong 10 DSP program,
  2537. >12 belong 11 8-bit fixed point,
  2538. >12 belong 12 16-bit fixed point,
  2539. >12 belong 13 24-bit fixed point,
  2540. >12 belong 14 32-bit fixed point,
  2541. >12 belong 18 16-bit linear with emphasis,
  2542. >12 belong 19 16-bit linear compressed,
  2543. >12 belong 20 16-bit linear with emphasis and compression,
  2544. >12 belong 21 Music kit DSP commands,
  2545. >12 lelong 23 8-bit ISDN mu-law compressed (CCITT G.721 ADPCM voice enc.),
  2546. !:mime audio/x-dec-basic
  2547. >12 belong 24 compressed (8-bit CCITT G.722 ADPCM)
  2548. >12 belong 25 compressed (3-bit CCITT G.723.3 ADPCM),
  2549. >12 belong 26 compressed (5-bit CCITT G.723.5 ADPCM),
  2550. >12 belong 27 8-bit A-law (CCITT G.711),
  2551. >20 lelong 1 mono,
  2552. >20 lelong 2 stereo,
  2553. >20 lelong 4 quad,
  2554. >16 lelong >0 %d Hz
  2555. # Creative Labs AUDIO stuff
  2556. 0 string MThd Standard MIDI data
  2557. !:mime audio/midi
  2558. >8 beshort x (format %d)
  2559. >10 beshort x using %d track
  2560. >10 beshort >1 \bs
  2561. >12 beshort&0x7fff x at 1/%d
  2562. >12 beshort&0x8000 >0 SMPTE
  2563. 0 string CTMF Creative Music (CMF) data
  2564. !:mime audio/x-unknown
  2565. 0 string SBI SoundBlaster instrument data
  2566. !:mime audio/x-unknown
  2567. 0 string Creative\ Voice\ File Creative Labs voice data
  2568. !:mime audio/x-unknown
  2569. # is this next line right? it came this way...
  2570. >19 byte 0x1A
  2571. >23 byte >0 - version %d
  2572. >22 byte >0 \b.%d
  2573. # first entry is also the string "NTRK"
  2574. 0 belong 0x4e54524b MultiTrack sound data
  2575. >4 belong x - version %ld
  2576. # Extended MOD format (*.emd) (Greg Roelofs, newt@uchicago.edu); NOT TESTED
  2577. # [based on posting 940824 by "Dirk/Elastik", husberg@lehtori.cc.tut.fi]
  2578. 0 string EMOD Extended MOD sound data,
  2579. >4 byte&0xf0 x version %d
  2580. >4 byte&0x0f x \b.%d,
  2581. >45 byte x %d instruments
  2582. >83 byte 0 (module)
  2583. >83 byte 1 (song)
  2584. # Real Audio (Magic .ra\0375)
  2585. 0 belong 0x2e7261fd RealAudio sound file
  2586. !:mime audio/x-pn-realaudio
  2587. 0 string .RMF\0\0\0 RealMedia file
  2588. !:mime application/vnd.rn-realmedia
  2589. #video/x-pn-realvideo
  2590. #video/vnd.rn-realvideo
  2591. #application/vnd.rn-realmedia
  2592. # sigh, there are many mimes for that but the above are the most common.
  2593. # MTM/669/FAR/S3M/ULT/XM format checking [Aaron Eppert, aeppert@dialin.ind.net]
  2594. # Oct 31, 1995
  2595. # fixed by <doj@cubic.org> 2003-06-24
  2596. # Too short...
  2597. #0 string MTM MultiTracker Module sound file
  2598. #0 string if Composer 669 Module sound data
  2599. #0 string JN Composer 669 Module sound data (extended format)
  2600. 0 string MAS_U ULT(imate) Module sound data
  2601. #0 string FAR Module sound data
  2602. #>4 string >\15 Title: "%s"
  2603. 0x2c string SCRM ScreamTracker III Module sound data
  2604. >0 string >\0 Title: "%s"
  2605. # Gravis UltraSound patches
  2606. # From <ache@nagual.ru>
  2607. 0 string GF1PATCH110\0ID#000002\0 GUS patch
  2608. 0 string GF1PATCH100\0ID#000002\0 Old GUS patch
  2609. # mime types according to http://www.geocities.com/nevilo/mod.htm:
  2610. # audio/it .it
  2611. # audio/x-zipped-it .itz
  2612. # audio/xm fasttracker modules
  2613. # audio/x-s3m screamtracker modules
  2614. # audio/s3m screamtracker modules
  2615. # audio/x-zipped-mod mdz
  2616. # audio/mod mod
  2617. # audio/x-mod All modules (mod, s3m, 669, mtm, med, xm, it, mdz, stm, itz, xmz, s3z)
  2618. #
  2619. # Taken from loader code from mikmod version 2.14
  2620. # by Steve McIntyre (stevem@chiark.greenend.org.uk)
  2621. # <doj@cubic.org> added title printing on 2003-06-24
  2622. 0 string MAS_UTrack_V00
  2623. >14 string >/0 ultratracker V1.%.1s module sound data
  2624. !:mime audio/x-mod
  2625. #audio/x-tracker-module
  2626. 0 string UN05 MikMod UNI format module sound data
  2627. 0 string Extended\ Module: Fasttracker II module sound data
  2628. !:mime audio/x-mod
  2629. #audio/x-tracker-module
  2630. >17 string >\0 Title: "%s"
  2631. 21 string/c =!SCREAM! Screamtracker 2 module sound data
  2632. !:mime audio/x-mod
  2633. #audio/x-screamtracker-module
  2634. 21 string BMOD2STM Screamtracker 2 module sound data
  2635. !:mime audio/x-mod
  2636. #audio/x-screamtracker-module
  2637. 1080 string M.K. 4-channel Protracker module sound data
  2638. !:mime audio/x-mod
  2639. #audio/x-protracker-module
  2640. >0 string >\0 Title: "%s"
  2641. 1080 string M!K! 4-channel Protracker module sound data
  2642. !:mime audio/x-mod
  2643. #audio/x-protracker-module
  2644. >0 string >\0 Title: "%s"
  2645. 1080 string FLT4 4-channel Startracker module sound data
  2646. !:mime audio/x-mod
  2647. #audio/x-startracker-module
  2648. >0 string >\0 Title: "%s"
  2649. 1080 string FLT8 8-channel Startracker module sound data
  2650. !:mime audio/x-mod
  2651. #audio/x-startracker-module
  2652. >0 string >\0 Title: "%s"
  2653. 1080 string 4CHN 4-channel Fasttracker module sound data
  2654. !:mime audio/x-mod
  2655. #audio/x-fasttracker-module
  2656. >0 string >\0 Title: "%s"
  2657. 1080 string 6CHN 6-channel Fasttracker module sound data
  2658. !:mime audio/x-mod
  2659. #audio/x-fasttracker-module
  2660. >0 string >\0 Title: "%s"
  2661. 1080 string 8CHN 8-channel Fasttracker module sound data
  2662. !:mime audio/x-mod
  2663. #audio/x-fasttracker-module
  2664. >0 string >\0 Title: "%s"
  2665. 1080 string CD81 8-channel Octalyser module sound data
  2666. !:mime audio/x-mod
  2667. #audio/x-octalysertracker-module
  2668. >0 string >\0 Title: "%s"
  2669. 1080 string OKTA 8-channel Octalyzer module sound data
  2670. !:mime audio/x-mod
  2671. #audio/x-octalysertracker-module
  2672. >0 string >\0 Title: "%s"
  2673. # Not good enough.
  2674. #1082 string CH
  2675. #>1080 string >/0 %.2s-channel Fasttracker "oktalyzer" module sound data
  2676. 1080 string 16CN 16-channel Taketracker module sound data
  2677. !:mime audio/x-mod
  2678. #audio/x-taketracker-module
  2679. >0 string >\0 Title: "%s"
  2680. 1080 string 32CN 32-channel Taketracker module sound data
  2681. !:mime audio/x-mod
  2682. #audio/x-taketracker-module
  2683. >0 string >\0 Title: "%s"
  2684. # TOC sound files -Trevor Johnson <trevor@jpj.net>
  2685. #
  2686. 0 string TOC TOC sound file
  2687. # sidfiles <pooka@iki.fi>
  2688. # added name,author,(c) and new RSID type by <doj@cubic.org> 2003-06-24
  2689. 0 string SIDPLAY\ INFOFILE Sidplay info file
  2690. 0 string PSID PlaySID v2.2+ (AMIGA) sidtune
  2691. >4 beshort >0 w/ header v%d,
  2692. >14 beshort =1 single song,
  2693. >14 beshort >1 %d songs,
  2694. >16 beshort >0 default song: %d
  2695. >0x16 string >\0 name: "%s"
  2696. >0x36 string >\0 author: "%s"
  2697. >0x56 string >\0 copyright: "%s"
  2698. 0 string RSID RSID sidtune PlaySID compatible
  2699. >4 beshort >0 w/ header v%d,
  2700. >14 beshort =1 single song,
  2701. >14 beshort >1 %d songs,
  2702. >16 beshort >0 default song: %d
  2703. >0x16 string >\0 name: "%s"
  2704. >0x36 string >\0 author: "%s"
  2705. >0x56 string >\0 copyright: "%s"
  2706. # IRCAM sound files - Michael Pruett <michael@68k.org>
  2707. # http://www-mmsp.ece.mcgill.ca/documents/AudioFormats/IRCAM/IRCAM.html
  2708. 0 belong 0x64a30100 IRCAM file (VAX little-endian)
  2709. 0 belong 0x0001a364 IRCAM file (VAX big-endian)
  2710. 0 belong 0x64a30200 IRCAM file (Sun big-endian)
  2711. 0 belong 0x0002a364 IRCAM file (Sun little-endian)
  2712. 0 belong 0x64a30300 IRCAM file (MIPS little-endian)
  2713. 0 belong 0x0003a364 IRCAM file (MIPS big-endian)
  2714. 0 belong 0x64a30400 IRCAM file (NeXT big-endian)
  2715. 0 belong 0x64a30400 IRCAM file (NeXT big-endian)
  2716. 0 belong 0x0004a364 IRCAM file (NeXT little-endian)
  2717. # NIST SPHERE <mpruett@sgi.com>
  2718. 0 string NIST_1A\n\ \ \ 1024\n NIST SPHERE file
  2719. # Sample Vision <mpruett@sgi.com>
  2720. 0 string SOUND\ SAMPLE\ DATA\ Sample Vision file
  2721. # Audio Visual Research <tonigonenstein@users.sourceforge.net>
  2722. 0 string 2BIT Audio Visual Research file,
  2723. >12 beshort =0 mono,
  2724. >12 beshort =-1 stereo,
  2725. >14 beshort x %d bits
  2726. >16 beshort =0 unsigned,
  2727. >16 beshort =-1 signed,
  2728. >22 belong&0x00ffffff x %d Hz,
  2729. >18 beshort =0 no loop,
  2730. >18 beshort =-1 loop,
  2731. >21 ubyte <128 note %d,
  2732. >22 byte =0 replay 5.485 KHz
  2733. >22 byte =1 replay 8.084 KHz
  2734. >22 byte =2 replay 10.971 KHz
  2735. >22 byte =3 replay 16.168 KHz
  2736. >22 byte =4 replay 21.942 KHz
  2737. >22 byte =5 replay 32.336 KHz
  2738. >22 byte =6 replay 43.885 KHz
  2739. >22 byte =7 replay 47.261 KHz
  2740. # SGI SoundTrack <mpruett@sgi.com>
  2741. 0 string _SGI_SoundTrack SGI SoundTrack project file
  2742. # ID3 version 2 tags <waschk@informatik.uni-rostock.de>
  2743. 0 string ID3 Audio file with ID3 version 2
  2744. >3 byte x \b.%d
  2745. >4 byte x \b.%d
  2746. >>5 byte &0x80 \b, unsynchronized frames
  2747. >>5 byte &0x40 \b, extended header
  2748. >>5 byte &0x20 \b, experimental
  2749. >>5 byte &0x10 \b, footer present
  2750. >(6.I) indirect x \b, contains:
  2751. # NSF (NES sound file) magic
  2752. 0 string NESM\x1a NES Sound File
  2753. >14 string >\0 ("%s" by
  2754. >46 string >\0 %s, copyright
  2755. >78 string >\0 %s),
  2756. >5 byte x version %d,
  2757. >6 byte x %d tracks,
  2758. >122 byte&0x2 =1 dual PAL/NTSC
  2759. >122 byte&0x1 =1 PAL
  2760. >122 byte&0x1 =0 NTSC
  2761. # Type: SNES SPC700 sound files
  2762. # From: Josh Triplett <josh@freedesktop.org>
  2763. 0 string SNES-SPC700\ Sound\ File\ Data\ v SNES SPC700 sound file
  2764. >&0 string 0.30 \b, version %s
  2765. >>0x23 byte 0x1B \b, without ID666 tag
  2766. >>0x23 byte 0x1A \b, with ID666 tag
  2767. >>>0x2E string >\0 \b, song "%.32s"
  2768. >>>0x4E string >\0 \b, game "%.32s"
  2769. # Impulse tracker module (audio/x-it)
  2770. 0 string IMPM Impulse Tracker module sound data -
  2771. !:mime audio/x-mod
  2772. >4 string >\0 "%s"
  2773. >40 leshort !0 compatible w/ITv%x
  2774. >42 leshort !0 created w/ITv%x
  2775. # Imago Orpheus module (audio/x-imf)
  2776. 60 string IM10 Imago Orpheus module sound data -
  2777. >0 string >\0 "%s"
  2778. # From <collver1@attbi.com>
  2779. # These are the /etc/magic entries to decode modules, instruments, and
  2780. # samples in Impulse Tracker's native format.
  2781. 0 string IMPS Impulse Tracker Sample
  2782. >18 byte &2 16 bit
  2783. >18 byte ^2 8 bit
  2784. >18 byte &4 stereo
  2785. >18 byte ^4 mono
  2786. 0 string IMPI Impulse Tracker Instrument
  2787. >28 leshort !0 ITv%x
  2788. >30 byte !0 %d samples
  2789. # Yamaha TX Wave: file(1) magic for Yamaha TX Wave audio files
  2790. # From <collver1@attbi.com>
  2791. 0 string LM8953 Yamaha TX Wave
  2792. >22 byte 0x49 looped
  2793. >22 byte 0xC9 non-looped
  2794. >23 byte 1 33kHz
  2795. >23 byte 2 50kHz
  2796. >23 byte 3 16kHz
  2797. # scream tracker: file(1) magic for Scream Tracker sample files
  2798. #
  2799. # From <collver1@attbi.com>
  2800. 76 string SCRS Scream Tracker Sample
  2801. >0 byte 1 sample
  2802. >0 byte 2 adlib melody
  2803. >0 byte >2 adlib drum
  2804. >31 byte &2 stereo
  2805. >31 byte ^2 mono
  2806. >31 byte &4 16bit little endian
  2807. >31 byte ^4 8bit
  2808. >30 byte 0 unpacked
  2809. >30 byte 1 packed
  2810. # audio
  2811. # From: Cory Dikkers <cdikkers@swbell.net>
  2812. 0 string MMD0 MED music file, version 0
  2813. 0 string MMD1 OctaMED Pro music file, version 1
  2814. 0 string MMD3 OctaMED Soundstudio music file, version 3
  2815. 0 string OctaMEDCmpr OctaMED Soundstudio compressed file
  2816. 0 string MED MED_Song
  2817. 0 string SymM Symphonie SymMOD music file
  2818. #
  2819. 0 string THX AHX version
  2820. >3 byte =0 1 module data
  2821. >3 byte =1 2 module data
  2822. #
  2823. 0 string OKTASONG Oktalyzer module data
  2824. #
  2825. 0 string DIGI\ Booster\ module\0 %s
  2826. >20 byte >0 %c
  2827. >>21 byte >0 \b%c
  2828. >>>22 byte >0 \b%c
  2829. >>>>23 byte >0 \b%c
  2830. >610 string >\0 \b, "%s"
  2831. #
  2832. 0 string DBM0 DIGI Booster Pro Module
  2833. >4 byte >0 V%X.
  2834. >>5 byte x \b%02X
  2835. >16 string >\0 \b, "%s"
  2836. #
  2837. 0 string FTMN FaceTheMusic module
  2838. >16 string >\0d \b, "%s"
  2839. # From: <doj@cubic.org> 2003-06-24
  2840. 0 string AMShdr\32 Velvet Studio AMS Module v2.2
  2841. 0 string Extreme Extreme Tracker AMS Module v1.3
  2842. 0 string DDMF Xtracker DMF Module
  2843. >4 byte x v%i
  2844. >0xD string >\0 Title: "%s"
  2845. >0x2B string >\0 Composer: "%s"
  2846. 0 string DSM\32 Dynamic Studio Module DSM
  2847. 0 string SONG DigiTrekker DTM Module
  2848. 0 string DMDL DigiTrakker MDL Module
  2849. 0 string PSM\32 Protracker Studio PSM Module
  2850. 44 string PTMF Poly Tracker PTM Module
  2851. >0 string >\32 Title: "%s"
  2852. 0 string MT20 MadTracker 2.0 Module MT2
  2853. 0 string RAD\40by\40REALiTY!! RAD Adlib Tracker Module RAD
  2854. 0 string RTMM RTM Module
  2855. 0x426 string MaDoKaN96 XMS Adlib Module
  2856. >0 string >\0 Composer: "%s"
  2857. 0 string AMF AMF Module
  2858. >4 string >\0 Title: "%s"
  2859. 0 string MODINFO1 Open Cubic Player Module Inforation MDZ
  2860. 0 string Extended\40Instrument: Fast Tracker II Instrument
  2861. # From: Takeshi Hamasaki <hma@syd.odn.ne.jp>
  2862. # NOA Nancy Codec file
  2863. 0 string \210NOA\015\012\032 NOA Nancy Codec Movie file
  2864. # Yamaha SMAF format
  2865. 0 string MMMD Yamaha SMAF file
  2866. # Sharp Jisaku Melody format for PDC
  2867. 0 string \001Sharp\040JisakuMelody SHARP Cell-Phone ringing Melody
  2868. >20 string Ver01.00 Ver. 1.00
  2869. >>32 byte x , %d tracks
  2870. # Free lossless audio codec <http://flac.sourceforge.net>
  2871. # From: Przemyslaw Augustyniak <silvathraec@rpg.pl>
  2872. 0 string fLaC FLAC audio bitstream data
  2873. !:mime audio/x-flac
  2874. >4 byte&0x7f >0 \b, unknown version
  2875. >4 byte&0x7f 0 \b
  2876. # some common bits/sample values
  2877. >>20 beshort&0x1f0 0x030 \b, 4 bit
  2878. >>20 beshort&0x1f0 0x050 \b, 6 bit
  2879. >>20 beshort&0x1f0 0x070 \b, 8 bit
  2880. >>20 beshort&0x1f0 0x0b0 \b, 12 bit
  2881. >>20 beshort&0x1f0 0x0f0 \b, 16 bit
  2882. >>20 beshort&0x1f0 0x170 \b, 24 bit
  2883. >>20 byte&0xe 0x0 \b, mono
  2884. >>20 byte&0xe 0x2 \b, stereo
  2885. >>20 byte&0xe 0x4 \b, 3 channels
  2886. >>20 byte&0xe 0x6 \b, 4 channels
  2887. >>20 byte&0xe 0x8 \b, 5 channels
  2888. >>20 byte&0xe 0xa \b, 6 channels
  2889. >>20 byte&0xe 0xc \b, 7 channels
  2890. >>20 byte&0xe 0xe \b, 8 channels
  2891. # some common sample rates
  2892. >>17 belong&0xfffff0 0x0ac440 \b, 44.1 kHz
  2893. >>17 belong&0xfffff0 0x0bb800 \b, 48 kHz
  2894. >>17 belong&0xfffff0 0x07d000 \b, 32 kHz
  2895. >>17 belong&0xfffff0 0x056220 \b, 22.05 kHz
  2896. >>17 belong&0xfffff0 0x05dc00 \b, 24 kHz
  2897. >>17 belong&0xfffff0 0x03e800 \b, 16 kHz
  2898. >>17 belong&0xfffff0 0x02b110 \b, 11.025 kHz
  2899. >>17 belong&0xfffff0 0x02ee00 \b, 12 kHz
  2900. >>17 belong&0xfffff0 0x01f400 \b, 8 kHz
  2901. >>17 belong&0xfffff0 0x177000 \b, 96 kHz
  2902. >>17 belong&0xfffff0 0x0fa000 \b, 64 kHz
  2903. >>21 byte&0xf >0 \b, >4G samples
  2904. >>21 byte&0xf 0 \b
  2905. >>>22 belong >0 \b, %u samples
  2906. >>>22 belong 0 \b, length unknown
  2907. # (ISDN) VBOX voice message file (Wolfram Kleff)
  2908. 0 string VBOX VBOX voice message data
  2909. # ReBorn Song Files (.rbs)
  2910. # David J. Singer <doc@deadvirgins.org.uk>
  2911. 8 string RB40 RBS Song file
  2912. >29 string ReBorn created by ReBorn
  2913. >37 string Propellerhead created by ReBirth
  2914. # Synthesizer Generator and Kimwitu share their file format
  2915. 0 string A#S#C#S#S#L#V#3 Synthesizer Generator or Kimwitu data
  2916. # Kimwitu++ uses a slightly different magic
  2917. 0 string A#S#C#S#S#L#HUB Kimwitu++ data
  2918. # From "Simon Hosie
  2919. 0 string TFMX-SONG TFMX module sound data
  2920. # Monkey's Audio compressed audio format (.ape)
  2921. # From danny.milo@gmx.net (Danny Milosavljevic)
  2922. # New version from Abel Cheung <abel (@) oaka.org>
  2923. 0 string MAC\040 Monkey's Audio compressed format
  2924. !:mime audio/x-ape
  2925. >4 uleshort >0x0F8B version %d
  2926. >>(0x08.l) uleshort =1000 with fast compression
  2927. >>(0x08.l) uleshort =2000 with normal compression
  2928. >>(0x08.l) uleshort =3000 with high compression
  2929. >>(0x08.l) uleshort =4000 with extra high compression
  2930. >>(0x08.l) uleshort =5000 with insane compression
  2931. >>(0x08.l+18) uleshort =1 \b, mono
  2932. >>(0x08.l+18) uleshort =2 \b, stereo
  2933. >>(0x08.l+20) ulelong x \b, sample rate %d
  2934. >4 uleshort <0x0F8C version %d
  2935. >>6 uleshort =1000 with fast compression
  2936. >>6 uleshort =2000 with normal compression
  2937. >>6 uleshort =3000 with high compression
  2938. >>6 uleshort =4000 with extra high compression
  2939. >>6 uleshort =5000 with insane compression
  2940. >>10 uleshort =1 \b, mono
  2941. >>10 uleshort =2 \b, stereo
  2942. >>12 ulelong x \b, sample rate %d
  2943. # adlib sound files
  2944. # From Gurkan Sengun <gurkan@linuks.mine.nu>, http://www.linuks.mine.nu
  2945. 0 string RAWADATA RdosPlay RAW
  2946. 1068 string RoR AMUSIC Adlib Tracker
  2947. 0 string JCH EdLib
  2948. 0 string mpu401tr MPU-401 Trakker
  2949. 0 string SAdT Surprise! Adlib Tracker
  2950. >4 byte x Version %d
  2951. 0 string XAD! eXotic ADlib
  2952. 0 string ofTAZ! eXtra Simple Music
  2953. # Spectrum 128 tunes (.ay files).
  2954. # From: Emanuel Haupt <ehaupt@critical.ch>
  2955. 0 string ZXAYEMUL Spectrum 128 tune
  2956. 0 string \0BONK BONK,
  2957. #>5 byte x version %d
  2958. >14 byte x %d channel(s),
  2959. >15 byte =1 lossless,
  2960. >15 byte =0 lossy,
  2961. >16 byte x mid-side
  2962. 384 string LockStream LockStream Embedded file (mostly MP3 on old Nokia phones)
  2963. # format VQF (proprietary codec for sound)
  2964. # some infos on the header file available at :
  2965. # http://www.twinvq.org/english/technology_format.html
  2966. 0 string TWIN97012000 VQF data
  2967. >27 short 0 \b, Mono
  2968. >27 short 1 \b, Stereo
  2969. >31 short >0 \b, %d kbit/s
  2970. >35 short >0 \b, %d kHz
  2971. # Nelson A. de Oliveira (naoliv@gmail.com)
  2972. # .eqf
  2973. 0 string Winamp\ EQ\ library\ file %s
  2974. # it will match only versions like v<digit>.<digit>
  2975. # Since I saw only eqf files with version v1.1 I think that it's OK
  2976. >23 string x \b%.4s
  2977. # .preset
  2978. 0 string [Equalizer\ preset] XMMS equalizer preset
  2979. # .m3u
  2980. 0 search/1 #EXTM3U M3U playlist text
  2981. # .pls
  2982. 0 search/1 [playlist] PLS playlist text
  2983. # licq.conf
  2984. 1 string [licq] LICQ configuration file
  2985. # Atari ST audio files by Dirk Jagdmann <doj@cubic.org>
  2986. 0 string ICE! SNDH Atari ST music
  2987. 0 string SC68\ Music-file\ /\ (c)\ (BeN)jami sc68 Atari ST music
  2988. # musepak support From: "Jiri Pejchal" <jiri.pejchal@gmail.com>
  2989. 0 string MP+ Musepack audio
  2990. !:mime audio/x-musepack
  2991. >3 byte 255 \b, SV pre8
  2992. >3 byte&0xF 0x6 \b, SV 6
  2993. >3 byte&0xF 0x8 \b, SV 8
  2994. >3 byte&0xF 0x7 \b, SV 7
  2995. >>3 byte&0xF0 0x0 \b.0
  2996. >>3 byte&0xF0 0x10 \b.1
  2997. >>3 byte&0xF0 240 \b.15
  2998. >>10 byte&0xF0 0x0 \b, no profile
  2999. >>10 byte&0xF0 0x10 \b, profile 'Unstable/Experimental'
  3000. >>10 byte&0xF0 0x50 \b, quality 0
  3001. >>10 byte&0xF0 0x60 \b, quality 1
  3002. >>10 byte&0xF0 0x70 \b, quality 2 (Telephone)
  3003. >>10 byte&0xF0 0x80 \b, quality 3 (Thumb)
  3004. >>10 byte&0xF0 0x90 \b, quality 4 (Radio)
  3005. >>10 byte&0xF0 0xA0 \b, quality 5 (Standard)
  3006. >>10 byte&0xF0 0xB0 \b, quality 6 (Xtreme)
  3007. >>10 byte&0xF0 0xC0 \b, quality 7 (Insane)
  3008. >>10 byte&0xF0 0xD0 \b, quality 8 (BrainDead)
  3009. >>10 byte&0xF0 0xE0 \b, quality 9
  3010. >>10 byte&0xF0 0xF0 \b, quality 10
  3011. >>27 byte 0x0 \b, Buschmann 1.7.0-9, Klemm 0.90-1.05
  3012. >>27 byte 102 \b, Beta 1.02
  3013. >>27 byte 104 \b, Beta 1.04
  3014. >>27 byte 105 \b, Alpha 1.05
  3015. >>27 byte 106 \b, Beta 1.06
  3016. >>27 byte 110 \b, Release 1.1
  3017. >>27 byte 111 \b, Alpha 1.11
  3018. >>27 byte 112 \b, Beta 1.12
  3019. >>27 byte 113 \b, Alpha 1.13
  3020. >>27 byte 114 \b, Beta 1.14
  3021. >>27 byte 115 \b, Alpha 1.15
  3022. # IMY
  3023. # from http://filext.com/detaillist.php?extdetail=IMY
  3024. # http://cellphones.about.com/od/cellularfaqs/f/rf_imelody.htm
  3025. # http://download.ncl.ie/doc/api/ie/ncl/media/music/IMelody.html
  3026. # http://www.wx800.com/msg/download/irda/iMelody.pdf
  3027. 0 string BEGIN:IMELODY iMelody Ringtone Format
  3028. # From: "Mateus Caruccio" <mateus@caruccio.com>
  3029. # guitar pro v3,4,5 from http://filext.com/file-extension/gp3
  3030. 0 string \030FICHIER\ GUITAR\ PRO\ v3. Guitar Pro Ver. 3 Tablature
  3031. # From: "Leslie P. Polzer" <leslie.polzer@gmx.net>
  3032. 60 string SONG SoundFX Module sound file
  3033. # Type: Adaptive Multi-Rate Codec
  3034. # URL: http://filext.com/detaillist.php?extdetail=AMR
  3035. # From: Russell Coker <russell@coker.com.au>
  3036. 0 string #!AMR Adaptive Multi-Rate Codec (GSM telephony)
  3037. # Type: SuperCollider 3 Synth Definition File Format
  3038. # From: Mario Lang <mlang@debian.org>
  3039. 0 string SCgf SuperCollider3 Synth Definition file,
  3040. >4 belong x version %d
  3041. # Type: True Audio Lossless Audio
  3042. # URL: http://wiki.multimedia.cx/index.php?title=True_Audio
  3043. # From: Mike Melanson <mike@multimedia.cx>
  3044. 0 string TTA1 True Audio Lossless Audio
  3045. # Type: WavPack Lossless Audio
  3046. # URL: http://wiki.multimedia.cx/index.php?title=WavPack
  3047. # From: Mike Melanson <mike@multimedia.cx>
  3048. 0 string wvpk WavPack Lossless Audio
  3049. # From Fábio R. Schmidlin <frs@pop.com.br>
  3050. # VGM music file
  3051. 0 string Vgm\
  3052. >9 ubyte >0 VGM Video Game Music dump v
  3053. >>9 ubyte/16 >0 \b%d
  3054. >>9 ubyte&0x0F x \b%d
  3055. >>8 ubyte/16 x \b.%d
  3056. >>8 ubyte&0x0F >0 \b%d
  3057. #Get soundchips
  3058. >>8 ubyte x \b, soundchip(s)=
  3059. >>0x0C ulelong >0 SN76489,
  3060. >>0x10 ulelong >0 YM2413,
  3061. >>0x2C ulelong >0 YM2612,
  3062. >>0x30 ulelong >0 YM2151,
  3063. >>0x38 ulelong >0 Sega PCM,
  3064. >>0x34 ulelong >0xC
  3065. >>>0x40 ulelong >0 RF5C68,
  3066. >>0x34 ulelong >0x10
  3067. >>>0x44 ulelong >0 YM2203,
  3068. >>0x34 ulelong >0x14
  3069. >>>0x48 ulelong >0 YM2608,
  3070. >>0x34 ulelong >0x18
  3071. >>>0x4C lelong >0 YM2610,
  3072. >>>0x4C lelong <0 YM2610B,
  3073. >>0x34 ulelong >0x1C
  3074. >>>0x50 ulelong >0 YM3812,
  3075. >>0x34 ulelong >0x20
  3076. >>>0x54 ulelong >0 YM3526,
  3077. >>0x34 ulelong >0x24
  3078. >>>0x58 ulelong >0 Y8950,
  3079. >>0x34 ulelong >0x28
  3080. >>>0x5C ulelong >0 YMF262,
  3081. >>0x34 ulelong >0x2C
  3082. >>>0x60 ulelong >0 YMF278B,
  3083. >>0x34 ulelong >0x30
  3084. >>>0x64 ulelong >0 YMF271,
  3085. >>0x34 ulelong >0x34
  3086. >>>0x68 ulelong >0 YMZ280B,
  3087. >>0x34 ulelong >0x38
  3088. >>>0x6C ulelong >0 RF5C164,
  3089. >>0x34 ulelong >0x3C
  3090. >>>0x70 ulelong >0 PWM,
  3091. >>0x34 ulelong >0x40
  3092. >>>0x74 ulelong >0
  3093. >>>>0x78 ubyte 0x00 AY-3-8910,
  3094. >>>>0x78 ubyte 0x01 AY-3-8912,
  3095. >>>>0x78 ubyte 0x02 AY-3-8913,
  3096. >>>>0x78 ubyte 0x03 AY-3-8930,
  3097. >>>>0x78 ubyte 0x10 YM2149,
  3098. >>>>0x78 ubyte 0x11 YM3439,
  3099. # GVOX Encore file format
  3100. # Since this is a proprietary file format and there is no publicly available
  3101. # format specification, this is just based on induction
  3102. #
  3103. 0 string SCOW
  3104. >4 byte 0xc4 GVOX Encore music, version 5.0 or above
  3105. >4 byte 0xc2 GVOX Encore music, version < 5.0
  3106. 0 string ZBOT
  3107. >4 byte 0xc5 GVOX Encore music, version < 5.0
  3108. #----------------------------------------------------------------
  3109. # $File: basis,v 1.4 2009/09/19 16:28:08 christos Exp $
  3110. # basis: file(1) magic for BBx/Pro5-files
  3111. # Oliver Dammer <dammer@olida.de> 2005/11/07
  3112. # http://www.basis.com business-basic-files.
  3113. #
  3114. 0 string \074\074bbx\076\076 BBx
  3115. >7 string \000 indexed file
  3116. >7 string \001 serial file
  3117. >7 string \002 keyed file
  3118. >>13 short 0 (sort)
  3119. >7 string \004 program
  3120. >>18 byte x (LEVEL %d)
  3121. >>>23 string >\000 psaved
  3122. >7 string \006 mkeyed file
  3123. >>13 short 0 (sort)
  3124. >>8 string \000 (mkey)
  3125. #------------------------------------------------------------------------------
  3126. # $File: bflt,v 1.4 2009/09/19 16:28:08 christos Exp $
  3127. # bFLT: file(1) magic for BFLT uclinux binary files
  3128. #
  3129. # From Philippe De Muyter <phdm@macqel.be>
  3130. #
  3131. 0 string bFLT BFLT executable
  3132. >4 belong x - version %ld
  3133. >4 belong 4
  3134. >>36 belong&0x1 0x1 ram
  3135. >>36 belong&0x2 0x2 gotpic
  3136. >>36 belong&0x4 0x4 gzip
  3137. >>36 belong&0x8 0x8 gzdata
  3138. #------------------------------------------------------------------------------
  3139. # $File: blackberry,v 1.1 2014/01/31 01:51:32 christos Exp $
  3140. # blackberry: file(1) magic for BlackBerry file formats
  3141. #
  3142. 5 belong 0
  3143. >8 belong 010010010 BlackBerry RIM ETP file
  3144. >>22 string x \b for %s
  3145. # Berkeley Lab Checkpoint Restart (BLCR) checkpoint context files
  3146. # http://ftg.lbl.gov/checkpoint
  3147. 0 string C\0\0\0R\0\0\0 BLCR
  3148. >16 lelong 1 x86
  3149. >16 lelong 3 alpha
  3150. >16 lelong 5 x86-64
  3151. >16 lelong 7 ARM
  3152. >8 lelong x context data (little endian, version %d)
  3153. # Uncomment the following only of your "file" program supports "search"
  3154. #>0 search/1024 VMA\06 for kernel
  3155. #>>&1 byte x %d.
  3156. #>>&2 byte x %d.
  3157. #>>&3 byte x %d
  3158. 0 string \0\0\0C\0\0\0R BLCR
  3159. >16 belong 2 SPARC
  3160. >16 belong 4 ppc
  3161. >16 belong 6 ppc64
  3162. >16 belong 7 ARMEB
  3163. >16 belong 8 SPARC64
  3164. >8 belong x context data (big endian, version %d)
  3165. # Uncomment the following only of your "file" program supports "search"
  3166. #>0 search/1024 VMA\06 for kernel
  3167. #>>&1 byte x %d.
  3168. #>>&2 byte x \b%d.
  3169. #>>&3 byte x \b%d
  3170. #------------------------------------------------------------------------------
  3171. # $File: blender,v 1.5 2009/09/19 16:28:08 christos Exp $
  3172. # blender: file(1) magic for Blender 3D related files
  3173. #
  3174. # Native format rule v1.2. For questions use the developers list
  3175. # http://lists.blender.org/mailman/listinfo/bf-committers
  3176. # GLOB chunk was moved near start and provides subversion info since 2.42
  3177. 0 string =BLENDER Blender3D,
  3178. >7 string =_ saved as 32-bits
  3179. >>8 string =v little endian
  3180. >>>9 byte x with version %c.
  3181. >>>10 byte x \b%c
  3182. >>>11 byte x \b%c
  3183. >>>0x40 string =GLOB \b.
  3184. >>>>0x58 leshort x \b%.4d
  3185. >>8 string =V big endian
  3186. >>>9 byte x with version %c.
  3187. >>>10 byte x \b%c
  3188. >>>11 byte x \b%c
  3189. >>>0x40 string =GLOB \b.
  3190. >>>>0x58 beshort x \b%.4d
  3191. >7 string =- saved as 64-bits
  3192. >>8 string =v little endian
  3193. >>9 byte x with version %c.
  3194. >>10 byte x \b%c
  3195. >>11 byte x \b%c
  3196. >>0x44 string =GLOB \b.
  3197. >>>0x60 leshort x \b%.4d
  3198. >>8 string =V big endian
  3199. >>>9 byte x with version %c.
  3200. >>>10 byte x \b%c
  3201. >>>11 byte x \b%c
  3202. >>>0x44 string =GLOB \b.
  3203. >>>>0x60 beshort x \b%.4d
  3204. # Scripts that run in the embeded Python interpreter
  3205. 0 string #!BPY Blender3D BPython script
  3206. #------------------------------------------------------------------------------
  3207. # $File: blit,v 1.8 2009/09/19 16:28:08 christos Exp $
  3208. # blit: file(1) magic for 68K Blit stuff as seen from 680x0 machine
  3209. #
  3210. # Note that this 0407 conflicts with several other a.out formats...
  3211. #
  3212. # XXX - should this be redone with "be" and "le", so that it works on
  3213. # little-endian machines as well? If so, what's the deal with
  3214. # "VAX-order" and "VAX-order2"?
  3215. #
  3216. #0 long 0407 68K Blit (standalone) executable
  3217. #0 short 0407 VAX-order2 68K Blit (standalone) executable
  3218. 0 short 03401 VAX-order 68K Blit (standalone) executable
  3219. 0 long 0406 68k Blit mpx/mux executable
  3220. 0 short 0406 VAX-order2 68k Blit mpx/mux executable
  3221. 0 short 03001 VAX-order 68k Blit mpx/mux executable
  3222. # Need more values for WE32 DMD executables.
  3223. # Note that 0520 is the same as COFF
  3224. #0 short 0520 tty630 layers executable
  3225. #------------------------------------------------------------------------------
  3226. # $File: bout,v 1.5 2009/09/19 16:28:08 christos Exp $
  3227. # i80960 b.out objects and archives
  3228. #
  3229. 0 long 0x10d i960 b.out relocatable object
  3230. >16 long >0 not stripped
  3231. #
  3232. # b.out archive (hp-rt on i960)
  3233. 0 string =!<bout> b.out archive
  3234. >8 string __.SYMDEF random library
  3235. #------------------------------------------------------------------------------
  3236. # $File: bsdi,v 1.6 2013/01/09 22:37:24 christos Exp $
  3237. # bsdi: file(1) magic for BSD/OS (from BSDI) objects
  3238. # Some object/executable formats use the same magic numbers as are used
  3239. # in other OSes; those are handled by entries in aout.
  3240. #
  3241. 0 lelong 0314 386 compact demand paged pure executable
  3242. >16 lelong >0 not stripped
  3243. >32 byte 0x6a (uses shared libs)
  3244. # same as in SunOS 4.x, except for static shared libraries
  3245. 0 belong&077777777 0600413 sparc demand paged
  3246. >0 byte &0x80
  3247. >>20 belong <4096 shared library
  3248. >>20 belong =4096 dynamically linked executable
  3249. >>20 belong >4096 dynamically linked executable
  3250. >0 byte ^0x80 executable
  3251. >16 belong >0 not stripped
  3252. >36 belong 0xb4100001 (uses shared libs)
  3253. 0 belong&077777777 0600410 sparc pure
  3254. >0 byte &0x80 dynamically linked executable
  3255. >0 byte ^0x80 executable
  3256. >16 belong >0 not stripped
  3257. >36 belong 0xb4100001 (uses shared libs)
  3258. 0 belong&077777777 0600407 sparc
  3259. >0 byte &0x80 dynamically linked executable
  3260. >0 byte ^0x80 executable
  3261. >16 belong >0 not stripped
  3262. >36 belong 0xb4100001 (uses shared libs)
  3263. # Chiasmus is a encryption standard developed by the German Federal
  3264. # Office for Information Security (Bundesamt fuer Sicherheit in der
  3265. # Informationstechnik).
  3266. # Extension: .xia
  3267. 0 string XIA1 Chiasmus encrypted data
  3268. # Extension: .xis
  3269. 0 string XIS Chiasmus key
  3270. #------------------------------------------------------------------------------
  3271. # $File: btsnoop,v 1.5 2009/09/19 16:28:08 christos Exp $
  3272. # BTSnoop: file(1) magic for BTSnoop files
  3273. #
  3274. # From <marcel@holtmann.org>
  3275. 0 string btsnoop\0 BTSnoop
  3276. >8 belong x version %d,
  3277. >12 belong 1001 Unencapsulated HCI
  3278. >12 belong 1002 HCI UART (H4)
  3279. >12 belong 1003 HCI BCSP
  3280. >12 belong 1004 HCI Serial (H5)
  3281. >>12 belong x type %d
  3282. #------------------------------------------------------------------------------
  3283. # $File: c64,v 1.5 2009/09/19 16:28:08 christos Exp $
  3284. # c64: file(1) magic for various commodore 64 related files
  3285. #
  3286. # From: Dirk Jagdmann <doj@cubic.org>
  3287. 0x16500 belong 0x12014100 D64 Image
  3288. 0x16500 belong 0x12014180 D71 Image
  3289. 0x61800 belong 0x28034400 D81 Image
  3290. 0 string C64\40CARTRIDGE CCS C64 Emultar Cartridge Image
  3291. 0 belong 0x43154164 X64 Image
  3292. 0 string GCR-1541 GCR Image
  3293. >8 byte x version: %i
  3294. >9 byte x tracks: %i
  3295. 9 string PSUR ARC archive (c64)
  3296. 2 string -LH1- LHA archive (c64)
  3297. 0 string C64File PC64 Emulator file
  3298. >8 string >\0 "%s"
  3299. 0 string C64Image PC64 Freezer Image
  3300. 0 beshort 0x38CD C64 PCLink Image
  3301. 0 string CBM\144\0\0 Power 64 C64 Emulator Snapshot
  3302. 0 belong 0xFF424CFF WRAptor packer (c64)
  3303. 0 string C64S\x20tape\x20file T64 tape Image
  3304. >32 leshort x Version:0x%x
  3305. >36 leshort !0 Entries:%i
  3306. >40 string x Name:%.24s
  3307. 0 string C64\x20tape\x20image\x20file\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0 T64 tape Image
  3308. >32 leshort x Version:0x%x
  3309. >36 leshort !0 Entries:%i
  3310. >40 string x Name:%.24s
  3311. 0 string C64S\x20tape\x20image\x20file\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0 T64 tape Image
  3312. >32 leshort x Version:0x%x
  3313. >36 leshort !0 Entries:%i
  3314. >40 string x Name:%.24s
  3315. #------------------------------------------------------------------------------
  3316. # $File: cad,v 1.12 2013/07/04 15:24:37 christos Exp $
  3317. # autocad: file(1) magic for cad files
  3318. #
  3319. # Microstation DGN/CIT Files (www.bentley.com)
  3320. # Last updated July 29, 2005 by Lester Hightower
  3321. # DGN is the default file extension of Microstation/Intergraph CAD files.
  3322. # CIT is the proprietary raster format (similar to TIFF) used to attach
  3323. # raster underlays to Microstation DGN (vector) drawings.
  3324. #
  3325. # http://www.wotsit.org/search.asp
  3326. # http://filext.com/detaillist.php?extdetail=DGN
  3327. # http://filext.com/detaillist.php?extdetail=CIT
  3328. #
  3329. # http://www.bentley.com/products/default.cfm?objectid=97F351F5-9C35-4E5E-89C2
  3330. # 3F86C928&method=display&p_objectid=97F351F5-9C35-4E5E-89C280A93F86C928
  3331. # http://www.bentley.com/products/default.cfm?objectid=A5C2FD43-3AC9-4C71-B682
  3332. # 721C479F&method=display&p_objectid=A5C2FD43-3AC9-4C71-B682C7BE721C479F
  3333. 0 string \010\011\376 Microstation
  3334. >3 string \002
  3335. >>30 string \026\105 DGNFile
  3336. >>30 string \034\105 DGNFile
  3337. >>30 string \073\107 DGNFile
  3338. >>30 string \073\110 DGNFile
  3339. >>30 string \106\107 DGNFile
  3340. >>30 string \110\103 DGNFile
  3341. >>30 string \120\104 DGNFile
  3342. >>30 string \172\104 DGNFile
  3343. >>30 string \172\105 DGNFile
  3344. >>30 string \172\106 DGNFile
  3345. >>30 string \234\106 DGNFile
  3346. >>30 string \273\105 DGNFile
  3347. >>30 string \306\106 DGNFile
  3348. >>30 string \310\104 DGNFile
  3349. >>30 string \341\104 DGNFile
  3350. >>30 string \372\103 DGNFile
  3351. >>30 string \372\104 DGNFile
  3352. >>30 string \372\106 DGNFile
  3353. >>30 string \376\103 DGNFile
  3354. >4 string \030\000\000 CITFile
  3355. >4 string \030\000\003 CITFile
  3356. # AutoCAD
  3357. # Merge of the different contributions and updates from http://en.wikipedia.org/wiki/Dwg
  3358. # and http://www.iana.org/assignments/media-types/image/vnd.dwg
  3359. 0 string MC0.0 DWG AutoDesk AutoCAD Release 1.0
  3360. !:mime image/vnd.dwg
  3361. 0 string AC1.2 DWG AutoDesk AutoCAD Release 1.2
  3362. !:mime image/vnd.dwg
  3363. 0 string AC1.3 DWG AutoDesk AutoCAD Release 1.3
  3364. !:mime image/vnd.dwg
  3365. 0 string AC1.40 DWG AutoDesk AutoCAD Release 1.40
  3366. !:mime image/vnd.dwg
  3367. 0 string AC1.50 DWG AutoDesk AutoCAD Release 2.05
  3368. !:mime image/vnd.dwg
  3369. 0 string AC2.10 DWG AutoDesk AutoCAD Release 2.10
  3370. !:mime image/vnd.dwg
  3371. 0 string AC2.21 DWG AutoDesk AutoCAD Release 2.21
  3372. !:mime image/vnd.dwg
  3373. 0 string AC2.22 DWG AutoDesk AutoCAD Release 2.22
  3374. !:mime image/vnd.dwg
  3375. 0 string AC1001 DWG AutoDesk AutoCAD Release 2.22
  3376. !:mime image/vnd.dwg
  3377. 0 string AC1002 DWG AutoDesk AutoCAD Release 2.50
  3378. !:mime image/vnd.dwg
  3379. 0 string AC1003 DWG AutoDesk AutoCAD Release 2.60
  3380. !:mime image/vnd.dwg
  3381. 0 string AC1004 DWG AutoDesk AutoCAD Release 9
  3382. !:mime image/vnd.dwg
  3383. 0 string AC1006 DWG AutoDesk AutoCAD Release 10
  3384. !:mime image/vnd.dwg
  3385. 0 string AC1009 DWG AutoDesk AutoCAD Release 11/12
  3386. !:mime image/vnd.dwg
  3387. # AutoCAD DWG versions R13/R14 (www.autodesk.com)
  3388. # Written December 01, 2003 by Lester Hightower
  3389. # Based on the DWG File Format Specifications at http://www.opendwg.org/
  3390. # AutoCad, from Nahuel Greco
  3391. # AutoCAD DWG versions R12/R13/R14 (www.autodesk.com)
  3392. 0 string AC1012 DWG AutoDesk AutoCAD Release 13
  3393. !:mime image/vnd.dwg
  3394. 0 string AC1014 DWG AutoDesk AutoCAD Release 14
  3395. !:mime image/vnd.dwg
  3396. 0 string AC1015 DWG AutoDesk AutoCAD 2000/2002
  3397. !:mime image/vnd.dwg
  3398. # A new version of AutoCAD DWG
  3399. # Sergey Zaykov (mail_of_sergey@mail.ru, sergey_zaikov@rambler.ru,
  3400. # ICQ 358572321)
  3401. # From various sources like:
  3402. # http://autodesk.blogs.com/between_the_lines/autocad-release-history.html
  3403. 0 string AC1018 DWG AutoDesk AutoCAD 2004/2005/2006
  3404. !:mime image/vnd.dwg
  3405. 0 string AC1021 DWG AutoDesk AutoCAD 2007/2008/2009
  3406. !:mime image/vnd.dwg
  3407. 0 string AC1024 DWG AutoDesk AutoCAD 2010/2011/2012
  3408. !:mime image/vnd.dwg
  3409. 0 string AC1027 DWG AutoDesk AutoCAD 2013/2014
  3410. !:mime image/vnd.dwg
  3411. # KOMPAS 2D drawing from ASCON
  3412. # This is KOMPAS 2D drawing or fragment of drawing but is not detailed nor
  3413. # gathered nor specification
  3414. # ASCON http://ascon.net/main/ in English,
  3415. # http://ascon.ru/ main site in Russian
  3416. # Extension is CDW for drawing and FRW for fragment of drawing
  3417. # Sergey Zaykov (mail_of_sergey@mail.ru, sergey_zaikov@rambler.ru,
  3418. # ICQ 358572321, http://vkontakte.ru/id16076543)
  3419. # From:
  3420. # http://sd.ascon.ru/otrs/customer.pl?Action=CustomerFAQ&CategoryID=4&ItemID=292
  3421. # (in russian) and my experiments
  3422. 0 string KF
  3423. >2 belong 0x4E00000C Kompas drawing 12.0 SP1
  3424. >2 belong 0x4D00000C Kompas drawing 12.0
  3425. >2 belong 0x3200000B Kompas drawing 11.0 SP1
  3426. >2 belong 0x3100000B Kompas drawing 11.0
  3427. >2 belong 0x2310000A Kompas drawing 10.0 SP1
  3428. >2 belong 0x2110000A Kompas drawing 10.0
  3429. >2 belong 0x08000009 Kompas drawing 9.0 SP1
  3430. >2 belong 0x05000009 Kompas drawing 9.0
  3431. >2 belong 0x33010008 Kompas drawing 8+
  3432. >2 belong 0x1A000008 Kompas drawing 8.0
  3433. >2 belong 0x2C010107 Kompas drawing 7+
  3434. >2 belong 0x05000007 Kompas drawing 7.0
  3435. >2 belong 0x32000006 Kompas drawing 6+
  3436. >2 belong 0x09000006 Kompas drawing 6.0
  3437. >2 belong 0x5C009005 Kompas drawing 5.11R03
  3438. >2 belong 0x54009005 Kompas drawing 5.11R02
  3439. >2 belong 0x51009005 Kompas drawing 5.11R01
  3440. >2 belong 0x22009005 Kompas drawing 5.10R03
  3441. >2 belong 0x22009005 Kompas drawing 5.10R02 mar
  3442. >2 belong 0x21009005 Kompas drawing 5.10R02 febr
  3443. >2 belong 0x19009005 Kompas drawing 5.10R01
  3444. >2 belong 0xF4008005 Kompas drawing 5.9R01.003
  3445. >2 belong 0x1C008005 Kompas drawing 5.9R01.002
  3446. >2 belong 0x11008005 Kompas drawing 5.8R01.003
  3447. # CAD: file(1) magic for computer aided design files
  3448. # Phillip Griffith <phillip dot griffith at gmail dot com>
  3449. # AutoCAD magic taken from the Open Design Alliance's OpenDWG specifications.
  3450. #
  3451. 0 belong 0x08051700 Bentley/Intergraph MicroStation DGN cell library
  3452. 0 belong 0x0809fe02 Bentley/Intergraph MicroStation DGN vector CAD
  3453. 0 belong 0xc809fe02 Bentley/Intergraph MicroStation DGN vector CAD
  3454. 0 beshort 0x0809 Bentley/Intergraph MicroStation
  3455. >0x02 byte 0xfe
  3456. >>0x04 beshort 0x1800 CIT raster CAD
  3457. # 3DS (3d Studio files) Conflicts with diff output 0x3d '='
  3458. #16 beshort 0x3d3d image/x-3ds
  3459. #------------------------------------------------------------------------------
  3460. # $File: cafebabe,v 1.14 2013/02/27 16:59:59 christos Exp $
  3461. # Cafe Babes unite!
  3462. #
  3463. # Since Java bytecode and Mach-O universal binaries have the same magic number,
  3464. # the test must be performed in the same "magic" sequence to get both right.
  3465. # The long at offset 4 in a Mach-O universal binary tells the number of
  3466. # architectures; the short at offset 4 in a Java bytecode file is the JVM minor
  3467. # version and the short at offset 6 is the JVM major version. Since there are only
  3468. # only 18 labeled Mach-O architectures at current, and the first released
  3469. # Java class format was version 43.0, we can safely choose any number
  3470. # between 18 and 39 to test the number of architectures against
  3471. # (and use as a hack). Let's not use 18, because the Mach-O people
  3472. # might add another one or two as time goes by...
  3473. #
  3474. ### JAVA START ###
  3475. 0 belong 0xcafebabe
  3476. !:mime application/x-java-applet
  3477. >4 belong >30 compiled Java class data,
  3478. >>6 beshort x version %d.
  3479. >>4 beshort x \b%d
  3480. # Which is which?
  3481. #>>4 belong 0x032d (Java 1.0)
  3482. #>>4 belong 0x032d (Java 1.1)
  3483. >>4 belong 0x002e (Java 1.2)
  3484. >>4 belong 0x002f (Java 1.3)
  3485. >>4 belong 0x0030 (Java 1.4)
  3486. >>4 belong 0x0031 (Java 1.5)
  3487. >>4 belong 0x0032 (Java 1.6)
  3488. 0 belong 0xcafed00d JAR compressed with pack200,
  3489. >5 byte x version %d.
  3490. >4 byte x \b%d
  3491. !:mime application/x-java-pack200
  3492. 0 belong 0xcafed00d JAR compressed with pack200,
  3493. >5 byte x version %d.
  3494. >4 byte x \b%d
  3495. !:mime application/x-java-pack200
  3496. ### JAVA END ###
  3497. ### MACH-O START ###
  3498. 0 name mach-o \b [
  3499. >0 use mach-o-cpu \b
  3500. >&(8.L) indirect \b:
  3501. >0 belong x \b]
  3502. 0 belong 0xcafebabe
  3503. >4 belong 1 Mach-O universal binary with 1 architecture:
  3504. >>8 use mach-o \b
  3505. >4 belong >1
  3506. >>4 belong <20 Mach-O universal binary with %ld architectures:
  3507. >>>8 use mach-o \b
  3508. >>>28 use mach-o \b
  3509. >>4 belong >2
  3510. >>>48 use mach-o \b
  3511. >>4 belong >3
  3512. >>>68 use mach-o \b
  3513. ### MACH-O END ###
  3514. #------------------------------------------------------------------------------
  3515. # $File: cddb,v 1.4 2009/09/19 16:28:08 christos Exp $
  3516. # CDDB: file(1) magic for CDDB(tm) format CD text data files
  3517. #
  3518. # From <steve@gracenote.com>
  3519. #
  3520. # This is the /etc/magic entry to decode datafiles as used by
  3521. # CDDB-enabled CD player applications.
  3522. #
  3523. 0 search/1/w #\040xmcd CDDB(tm) format CD text data
  3524. #------------------------------------------------------------------------------
  3525. # $File: chord,v 1.5 2010/09/20 19:19:16 rrt Exp $
  3526. # chord: file(1) magic for Chord music sheet typesetting utility input files
  3527. #
  3528. # From Philippe De Muyter <phdm@macqel.be>
  3529. # File format is actually free, but many distributed files begin with `{title'
  3530. #
  3531. 0 string {title Chord text file
  3532. # Type: PowerTab file format
  3533. # URL: http://www.power-tab.net/
  3534. # From: Jelmer Vernooij <jelmer@samba.org>
  3535. 0 string ptab\003\000 Power-Tab v3 Tablature File
  3536. 0 string ptab\004\000 Power-Tab v4 Tablature File
  3537. #------------------------------------------------------------------------------
  3538. # $File: cisco,v 1.4 2009/09/19 16:28:08 christos Exp $
  3539. # cisco: file(1) magic for cisco Systems routers
  3540. #
  3541. # Most cisco file-formats are covered by the generic elf code
  3542. #
  3543. # Microcode files are non-ELF, 0x8501 conflicts with NetBSD/alpha.
  3544. 0 belong&0xffffff00 0x85011400 cisco IOS microcode
  3545. >7 string >\0 for '%s'
  3546. 0 belong&0xffffff00 0x8501cb00 cisco IOS experimental microcode
  3547. >7 string >\0 for '%s'
  3548. #------------------------------------------------------------------------------
  3549. # $File: citrus,v 1.4 2009/09/19 16:28:08 christos Exp $
  3550. # citrus locale declaration
  3551. #
  3552. 0 string RuneCT Citrus locale declaration for LC_CTYPE
  3553. #------------------------------------------------------------------------------
  3554. # $File: c-lang,v 1.18 2013/08/14 13:06:43 christos Exp $
  3555. # c-lang: file(1) magic for C and related languages programs
  3556. #
  3557. # BCPL
  3558. 0 search/8192 "libhdr" BCPL source text
  3559. !:mime text/x-bcpl
  3560. 0 search/8192 "LIBHDR" BCPL source text
  3561. !:mime text/x-bcpl
  3562. # C
  3563. 0 regex \^#include C source text
  3564. !:mime text/x-c
  3565. 0 regex \^char[\ \t\n]+ C source text
  3566. !:mime text/x-c
  3567. 0 regex \^double[\ \t\n]+ C source text
  3568. !:mime text/x-c
  3569. 0 regex \^extern[\ \t\n]+ C source text
  3570. !:mime text/x-c
  3571. 0 regex \^float[\ \t\n]+ C source text
  3572. !:mime text/x-c
  3573. 0 regex \^struct[\ \t\n]+ C source text
  3574. !:mime text/x-c
  3575. 0 regex \^union[\ \t\n]+ C source text
  3576. !:mime text/x-c
  3577. 0 search/8192 main( C source text
  3578. !:mime text/x-c
  3579. # C++
  3580. # The strength of these rules is increased so they beat the C rules above
  3581. 0 regex \^template[\ \t\n]+ C++ source text
  3582. !:strength + 5
  3583. !:mime text/x-c++
  3584. 0 regex \^virtual[\ \t\n]+ C++ source text
  3585. !:strength + 5
  3586. !:mime text/x-c++
  3587. 0 regex \^class[\ \t\n]+ C++ source text
  3588. !:strength + 5
  3589. !:mime text/x-c++
  3590. 0 regex \^public: C++ source text
  3591. !:strength + 5
  3592. !:mime text/x-c++
  3593. 0 regex \^private: C++ source text
  3594. !:strength + 5
  3595. !:mime text/x-c++
  3596. # From: Mikhail Teterin <mi@aldan.algebra.com>
  3597. 0 string cscope cscope reference data
  3598. >7 string x version %.2s
  3599. # We skip the path here, because it is often long (so file will
  3600. # truncate it) and mostly redundant.
  3601. # The inverted index functionality was added some time between
  3602. # versions 11 and 15, so look for -q if version is above 14:
  3603. >7 string >14
  3604. >>10 search/100 \ -q\ with inverted index
  3605. >10 search/100 \ -c\ text (non-compressed)
  3606. #------------------------------------------------------------------------------
  3607. # $File: clarion,v 1.4 2009/09/19 16:28:08 christos Exp $
  3608. # clarion: file(1) magic for # Clarion Personal/Professional Developer
  3609. # (v2 and above)
  3610. # From: Julien Blache <jb@jblache.org>
  3611. # Database files
  3612. # signature
  3613. 0 leshort 0x3343 Clarion Developer (v2 and above) data file
  3614. # attributes
  3615. >2 leshort &0x0001 \b, locked
  3616. >2 leshort &0x0004 \b, encrypted
  3617. >2 leshort &0x0008 \b, memo file exists
  3618. >2 leshort &0x0010 \b, compressed
  3619. >2 leshort &0x0040 \b, read only
  3620. # number of records
  3621. >5 lelong x \b, %ld records
  3622. # Memo files
  3623. 0 leshort 0x334d Clarion Developer (v2 and above) memo data
  3624. # Key/Index files
  3625. # No magic? :(
  3626. # Help files
  3627. 0 leshort 0x49e0 Clarion Developer (v2 and above) help data
  3628. #------------------------------------------------------------------------------
  3629. # $File: claris,v 1.6 2012/06/20 21:19:05 christos Exp $
  3630. # claris: file(1) magic for claris
  3631. # "H. Nanosecond" <aldomel@ix.netcom.com>
  3632. # Claris Works a word processor, etc.
  3633. # Version 3.0
  3634. # .pct claris works clip art files
  3635. #0000000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000
  3636. #*
  3637. #0001000 #010 250 377 377 377 377 000 213 000 230 000 021 002 377 014 000
  3638. #null to byte 1000 octal
  3639. 514 string \377\377\377\377\000
  3640. >0 string \0\0\0\0\0\0\0\0\0\0\0\0\0 Claris clip art
  3641. 514 string \377\377\377\377\001
  3642. >0 string \0\0\0\0\0\0\0\0\0\0\0\0\0 Claris clip art
  3643. # Claris works files
  3644. # .cwk
  3645. 0 string \002\000\210\003\102\117\102\117\000\001\206 Claris works document
  3646. # .plt
  3647. 0 string \020\341\000\000\010\010 Claris Works palette files .plt
  3648. # .msp a dictionary file I am not sure about this I have only one .msp file
  3649. 0 string \002\271\262\000\040\002\000\164 Claris works dictionary
  3650. # .usp are user dictionary bits
  3651. # I am not sure about a magic header:
  3652. #0000000 001 123 160 146 070 125 104 040 136 123 015 012 160 157 144 151
  3653. # soh S p f 8 U D sp ^ S cr nl p o d i
  3654. #0000020 141 164 162 151 163 164 040 136 123 015 012 144 151 166 040 043
  3655. # a t r i s t sp ^ S cr nl d i v sp #
  3656. # .mth Thesaurus
  3657. # starts with \0 but no magic header
  3658. # .chy Hyphenation file
  3659. # I am not sure: 000 210 034 000 000
  3660. # other claris files
  3661. #./windows/claris/useng.ndx: data
  3662. #./windows/claris/xtndtran.l32: data
  3663. #./windows/claris/xtndtran.lst: data
  3664. #./windows/claris/clworks.lbl: data
  3665. #./windows/claris/clworks.prf: data
  3666. #./windows/claris/userd.spl: data
  3667. #------------------------------------------------------------------------------
  3668. # $File: clipper,v 1.6 2009/09/19 16:28:08 christos Exp $
  3669. # clipper: file(1) magic for Intergraph (formerly Fairchild) Clipper.
  3670. #
  3671. # XXX - what byte order does the Clipper use?
  3672. #
  3673. # XXX - what's the "!" stuff:
  3674. #
  3675. # >18 short !074000,000000 C1 R1
  3676. # >18 short !074000,004000 C2 R1
  3677. # >18 short !074000,010000 C3 R1
  3678. # >18 short !074000,074000 TEST
  3679. #
  3680. # I shall assume it's ANDing the field with the first value and
  3681. # comparing it with the second, and rewrite it as:
  3682. #
  3683. # >18 short&074000 000000 C1 R1
  3684. # >18 short&074000 004000 C2 R1
  3685. # >18 short&074000 010000 C3 R1
  3686. # >18 short&074000 074000 TEST
  3687. #
  3688. # as SVR3.1's "file" doesn't support anything of the "!074000,000000"
  3689. # sort, nor does SunOS 4.x, so either it's something Intergraph added
  3690. # in CLIX, or something AT&T added in SVR3.2 or later, or something
  3691. # somebody else thought was a good idea; it's not documented in the
  3692. # man page for this version of "magic", nor does it appear to be
  3693. # implemented (at least not after I blew off the bogus code to turn
  3694. # old-style "&"s into new-style "&"s, which just didn't work at all).
  3695. #
  3696. 0 short 0575 CLIPPER COFF executable (VAX #)
  3697. >20 short 0407 (impure)
  3698. >20 short 0410 (5.2 compatible)
  3699. >20 short 0411 (pure)
  3700. >20 short 0413 (demand paged)
  3701. >20 short 0443 (target shared library)
  3702. >12 long >0 not stripped
  3703. >22 short >0 - version %ld
  3704. 0 short 0577 CLIPPER COFF executable
  3705. >18 short&074000 000000 C1 R1
  3706. >18 short&074000 004000 C2 R1
  3707. >18 short&074000 010000 C3 R1
  3708. >18 short&074000 074000 TEST
  3709. >20 short 0407 (impure)
  3710. >20 short 0410 (pure)
  3711. >20 short 0411 (separate I&D)
  3712. >20 short 0413 (paged)
  3713. >20 short 0443 (target shared library)
  3714. >12 long >0 not stripped
  3715. >22 short >0 - version %ld
  3716. >48 long&01 01 alignment trap enabled
  3717. >52 byte 1 -Ctnc
  3718. >52 byte 2 -Ctsw
  3719. >52 byte 3 -Ctpw
  3720. >52 byte 4 -Ctcb
  3721. >53 byte 1 -Cdnc
  3722. >53 byte 2 -Cdsw
  3723. >53 byte 3 -Cdpw
  3724. >53 byte 4 -Cdcb
  3725. >54 byte 1 -Csnc
  3726. >54 byte 2 -Cssw
  3727. >54 byte 3 -Cspw
  3728. >54 byte 4 -Cscb
  3729. 4 string pipe CLIPPER instruction trace
  3730. 4 string prof CLIPPER instruction profile
  3731. #------------------------------------------------------------------------------
  3732. # $File: commands,v 1.46 2013/03/25 14:06:55 christos Exp $
  3733. # commands: file(1) magic for various shells and interpreters
  3734. #
  3735. #0 string/w : shell archive or script for antique kernel text
  3736. 0 string/wt #!\ /bin/sh POSIX shell script text executable
  3737. !:mime text/x-shellscript
  3738. 0 string/wt #!\ /bin/csh C shell script text executable
  3739. !:mime text/x-shellscript
  3740. # korn shell magic, sent by George Wu, gwu@clyde.att.com
  3741. 0 string/wt #!\ /bin/ksh Korn shell script text executable
  3742. !:mime text/x-shellscript
  3743. 0 string/wt #!\ /bin/tcsh Tenex C shell script text executable
  3744. !:mime text/x-shellscript
  3745. 0 string/wt #!\ /usr/bin/tcsh Tenex C shell script text executable
  3746. !:mime text/x-shellscript
  3747. 0 string/wt #!\ /usr/local/tcsh Tenex C shell script text executable
  3748. !:mime text/x-shellscript
  3749. 0 string/wt #!\ /usr/local/bin/tcsh Tenex C shell script text executable
  3750. !:mime text/x-shellscript
  3751. #
  3752. # zsh/ash/ae/nawk/gawk magic from cameron@cs.unsw.oz.au (Cameron Simpson)
  3753. 0 string/wt #!\ /bin/zsh Paul Falstad's zsh script text executable
  3754. !:mime text/x-shellscript
  3755. 0 string/wt #!\ /usr/bin/zsh Paul Falstad's zsh script text executable
  3756. !:mime text/x-shellscript
  3757. 0 string/wt #!\ /usr/local/bin/zsh Paul Falstad's zsh script text executable
  3758. !:mime text/x-shellscript
  3759. 0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text executable
  3760. !:mime text/x-shellscript
  3761. 0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text executable
  3762. !:mime text/x-shellscript
  3763. 0 string/wt #!\ /bin/nawk new awk script text executable
  3764. !:mime text/x-nawk
  3765. 0 string/wt #!\ /usr/bin/nawk new awk script text executable
  3766. !:mime text/x-nawk
  3767. 0 string/wt #!\ /usr/local/bin/nawk new awk script text executable
  3768. !:mime text/x-nawk
  3769. 0 string/wt #!\ /bin/gawk GNU awk script text executable
  3770. !:mime text/x-gawk
  3771. 0 string/wt #!\ /usr/bin/gawk GNU awk script text executable
  3772. !:mime text/x-gawk
  3773. 0 string/wt #!\ /usr/local/bin/gawk GNU awk script text executable
  3774. !:mime text/x-gawk
  3775. #
  3776. 0 string/wt #!\ /bin/awk awk script text executable
  3777. !:mime text/x-awk
  3778. 0 string/wt #!\ /usr/bin/awk awk script text executable
  3779. !:mime text/x-awk
  3780. 0 regex =^\\s{0,100}BEGIN\\s{0,100}[{] awk script text
  3781. # AT&T Bell Labs' Plan 9 shell
  3782. 0 string/wt #!\ /bin/rc Plan 9 rc shell script text executable
  3783. # bash shell magic, from Peter Tobias (tobias@server.et-inf.fho-emden.de)
  3784. 0 string/wt #!\ /bin/bash Bourne-Again shell script text executable
  3785. !:mime text/x-shellscript
  3786. 0 string/wt #!\ /usr/bin/bash Bourne-Again shell script text executable
  3787. !:mime text/x-shellscript
  3788. 0 string/wt #!\ /usr/local/bash Bourne-Again shell script text executable
  3789. !:mime text/x-shellscript
  3790. 0 string/wt #!\ /usr/local/bin/bash Bourne-Again shell script text executable
  3791. !:mime text/x-shellscript
  3792. # PHP scripts
  3793. # Ulf Harnhammar <ulfh@update.uu.se>
  3794. 0 search/1/c =<?php PHP script text
  3795. !:strength + 10
  3796. !:mime text/x-php
  3797. 0 search/1 =<?\n PHP script text
  3798. !:mime text/x-php
  3799. 0 search/1 =<?\r PHP script text
  3800. !:mime text/x-php
  3801. 0 search/1/w #!\ /usr/local/bin/php PHP script text executable
  3802. !:strength + 10
  3803. !:mime text/x-php
  3804. 0 search/1/w #!\ /usr/bin/php PHP script text executable
  3805. !:strength + 10
  3806. !:mime text/x-php
  3807. # Smarty compiled template, http://www.smarty.net/
  3808. # Elan Ruusamae <glen@delfi.ee>
  3809. 0 string =<?php\ /*\ Smarty\ version Smarty compiled template
  3810. >24 regex [0-9.]+ \b, version %s
  3811. !:mime text/x-php
  3812. 0 string Zend\x00 PHP script Zend Optimizer data
  3813. 0 string/t $! DCL command file
  3814. # Type: Pdmenu
  3815. # URL: http://packages.debian.org/pdmenu
  3816. # From: Edward Betts <edward@debian.org>
  3817. 0 string #!/usr/bin/pdmenu Pdmenu configuration file text
  3818. #----------------------------------------------------------------------------
  3819. # $File: communications,v 1.5 2009/09/19 16:28:08 christos Exp $
  3820. # communication
  3821. # TTCN is the Tree and Tabular Combined Notation described in ISO 9646-3.
  3822. # It is used for conformance testing of communication protocols.
  3823. # Added by W. Borgert <debacle@debian.org>.
  3824. 0 string $Suite TTCN Abstract Test Suite
  3825. >&1 string $SuiteId
  3826. >>&1 string >\n %s
  3827. >&2 string $SuiteId
  3828. >>&1 string >\n %s
  3829. >&3 string $SuiteId
  3830. >>&1 string >\n %s
  3831. # MSC (message sequence charts) are a formal description technique,
  3832. # described in ITU-T Z.120, mainly used for communication protocols.
  3833. # Added by W. Borgert <debacle@debian.org>.
  3834. 0 string mscdocument Message Sequence Chart (document)
  3835. 0 string msc Message Sequence Chart (chart)
  3836. 0 string submsc Message Sequence Chart (subchart)
  3837. #------------------------------------------------------------------------------
  3838. # $File: compress,v 1.53 2014/01/05 15:55:21 christos Exp $
  3839. # compress: file(1) magic for pure-compression formats (no archives)
  3840. #
  3841. # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc.
  3842. #
  3843. # Formats for various forms of compressed data
  3844. # Formats for "compress" proper have been moved into "compress.c",
  3845. # because it tries to uncompress it to figure out what's inside.
  3846. # standard unix compress
  3847. 0 string \037\235 compress'd data
  3848. !:mime application/x-compress
  3849. !:apple LZIVZIVU
  3850. >2 byte&0x80 >0 block compressed
  3851. >2 byte&0x1f x %d bits
  3852. # gzip (GNU zip, not to be confused with Info-ZIP or PKWARE zip archiver)
  3853. # Edited by Chris Chittleborough <cchittleborough@yahoo.com.au>, March 2002
  3854. # * Original filename is only at offset 10 if "extra field" absent
  3855. # * Produce shorter output - notably, only report compression methods
  3856. # other than 8 ("deflate", the only method defined in RFC 1952).
  3857. 0 string \037\213 gzip compressed data
  3858. !:mime application/x-gzip
  3859. !:strength * 2
  3860. >2 byte <8 \b, reserved method
  3861. >2 byte >8 \b, unknown method
  3862. >3 byte &0x01 \b, ASCII
  3863. >3 byte &0x02 \b, has CRC
  3864. >3 byte &0x04 \b, extra field
  3865. >3 byte&0xC =0x08
  3866. >>10 string x \b, was "%s"
  3867. >3 byte &0x10 \b, has comment
  3868. >3 byte &0x20 \b, encrypted
  3869. >4 ledate >0 \b, last modified: %s
  3870. >8 byte 2 \b, max compression
  3871. >8 byte 4 \b, max speed
  3872. >9 byte =0x00 \b, from FAT filesystem (MS-DOS, OS/2, NT)
  3873. >9 byte =0x01 \b, from Amiga
  3874. >9 byte =0x02 \b, from VMS
  3875. >9 byte =0x03 \b, from Unix
  3876. >9 byte =0x04 \b, from VM/CMS
  3877. >9 byte =0x05 \b, from Atari
  3878. >9 byte =0x06 \b, from HPFS filesystem (OS/2, NT)
  3879. >9 byte =0x07 \b, from MacOS
  3880. >9 byte =0x08 \b, from Z-System
  3881. >9 byte =0x09 \b, from CP/M
  3882. >9 byte =0x0A \b, from TOPS/20
  3883. >9 byte =0x0B \b, from NTFS filesystem (NT)
  3884. >9 byte =0x0C \b, from QDOS
  3885. >9 byte =0x0D \b, from Acorn RISCOS
  3886. # packed data, Huffman (minimum redundancy) codes on a byte-by-byte basis
  3887. 0 string \037\036 packed data
  3888. !:mime application/octet-stream
  3889. >2 belong >1 \b, %d characters originally
  3890. >2 belong =1 \b, %d character originally
  3891. #
  3892. # This magic number is byte-order-independent.
  3893. 0 short 0x1f1f old packed data
  3894. !:mime application/octet-stream
  3895. # XXX - why *two* entries for "compacted data", one of which is
  3896. # byte-order independent, and one of which is byte-order dependent?
  3897. #
  3898. 0 short 0x1fff compacted data
  3899. !:mime application/octet-stream
  3900. # This string is valid for SunOS (BE) and a matching "short" is listed
  3901. # in the Ultrix (LE) magic file.
  3902. 0 string \377\037 compacted data
  3903. !:mime application/octet-stream
  3904. 0 short 0145405 huf output
  3905. !:mime application/octet-stream
  3906. # bzip2
  3907. 0 string BZh bzip2 compressed data
  3908. !:mime application/x-bzip2
  3909. >3 byte >47 \b, block size = %c00k
  3910. # lzip
  3911. 0 string LZIP lzip compressed data
  3912. !:mime application/x-lzip
  3913. >4 byte x \b, version: %d
  3914. # squeeze and crunch
  3915. # Michael Haardt <michael@cantor.informatik.rwth-aachen.de>
  3916. 0 beshort 0x76FF squeezed data,
  3917. >4 string x original name %s
  3918. 0 beshort 0x76FE crunched data,
  3919. >2 string x original name %s
  3920. 0 beshort 0x76FD LZH compressed data,
  3921. >2 string x original name %s
  3922. # Freeze
  3923. 0 string \037\237 frozen file 2.1
  3924. 0 string \037\236 frozen file 1.0 (or gzip 0.5)
  3925. # SCO compress -H (LZH)
  3926. 0 string \037\240 SCO compress -H (LZH) data
  3927. # European GSM 06.10 is a provisional standard for full-rate speech
  3928. # transcoding, prI-ETS 300 036, which uses RPE/LTP (residual pulse
  3929. # excitation/long term prediction) coding at 13 kbit/s.
  3930. #
  3931. # There's only a magic nibble (4 bits); that nibble repeats every 33
  3932. # bytes. This isn't suited for use, but maybe we can use it someday.
  3933. #
  3934. # This will cause very short GSM files to be declared as data and
  3935. # mismatches to be declared as data too!
  3936. #0 byte&0xF0 0xd0 data
  3937. #>33 byte&0xF0 0xd0
  3938. #>66 byte&0xF0 0xd0
  3939. #>99 byte&0xF0 0xd0
  3940. #>132 byte&0xF0 0xd0 GSM 06.10 compressed audio
  3941. # bzip a block-sorting file compressor
  3942. # by Julian Seward <sewardj@cs.man.ac.uk> and others
  3943. #
  3944. #0 string BZ bzip compressed data
  3945. #>2 byte x \b, version: %c
  3946. #>3 string =1 \b, compression block size 100k
  3947. #>3 string =2 \b, compression block size 200k
  3948. #>3 string =3 \b, compression block size 300k
  3949. #>3 string =4 \b, compression block size 400k
  3950. #>3 string =5 \b, compression block size 500k
  3951. #>3 string =6 \b, compression block size 600k
  3952. #>3 string =7 \b, compression block size 700k
  3953. #>3 string =8 \b, compression block size 800k
  3954. #>3 string =9 \b, compression block size 900k
  3955. # lzop from <markus.oberhumer@jk.uni-linz.ac.at>
  3956. 0 string \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a lzop compressed data
  3957. >9 beshort <0x0940
  3958. >>9 byte&0xf0 =0x00 - version 0.
  3959. >>9 beshort&0x0fff x \b%03x,
  3960. >>13 byte 1 LZO1X-1,
  3961. >>13 byte 2 LZO1X-1(15),
  3962. >>13 byte 3 LZO1X-999,
  3963. ## >>22 bedate >0 last modified: %s,
  3964. >>14 byte =0x00 os: MS-DOS
  3965. >>14 byte =0x01 os: Amiga
  3966. >>14 byte =0x02 os: VMS
  3967. >>14 byte =0x03 os: Unix
  3968. >>14 byte =0x05 os: Atari
  3969. >>14 byte =0x06 os: OS/2
  3970. >>14 byte =0x07 os: MacOS
  3971. >>14 byte =0x0A os: Tops/20
  3972. >>14 byte =0x0B os: WinNT
  3973. >>14 byte =0x0E os: Win32
  3974. >9 beshort >0x0939
  3975. >>9 byte&0xf0 =0x00 - version 0.
  3976. >>9 byte&0xf0 =0x10 - version 1.
  3977. >>9 byte&0xf0 =0x20 - version 2.
  3978. >>9 beshort&0x0fff x \b%03x,
  3979. >>15 byte 1 LZO1X-1,
  3980. >>15 byte 2 LZO1X-1(15),
  3981. >>15 byte 3 LZO1X-999,
  3982. ## >>25 bedate >0 last modified: %s,
  3983. >>17 byte =0x00 os: MS-DOS
  3984. >>17 byte =0x01 os: Amiga
  3985. >>17 byte =0x02 os: VMS
  3986. >>17 byte =0x03 os: Unix
  3987. >>17 byte =0x05 os: Atari
  3988. >>17 byte =0x06 os: OS/2
  3989. >>17 byte =0x07 os: MacOS
  3990. >>17 byte =0x0A os: Tops/20
  3991. >>17 byte =0x0B os: WinNT
  3992. >>17 byte =0x0E os: Win32
  3993. # 4.3BSD-Quasijarus Strong Compression
  3994. # http://minnie.tuhs.org/Quasijarus/compress.html
  3995. 0 string \037\241 Quasijarus strong compressed data
  3996. # From: Cory Dikkers <cdikkers@swbell.net>
  3997. 0 string XPKF Amiga xpkf.library compressed data
  3998. 0 string PP11 Power Packer 1.1 compressed data
  3999. 0 string PP20 Power Packer 2.0 compressed data,
  4000. >4 belong 0x09090909 fast compression
  4001. >4 belong 0x090A0A0A mediocre compression
  4002. >4 belong 0x090A0B0B good compression
  4003. >4 belong 0x090A0C0C very good compression
  4004. >4 belong 0x090A0C0D best compression
  4005. # 7-zip archiver, from Thomas Klausner (wiz@danbala.tuwien.ac.at)
  4006. # http://www.7-zip.org or DOC/7zFormat.txt
  4007. #
  4008. 0 string 7z\274\257\047\034 7-zip archive data,
  4009. >6 byte x version %d
  4010. >7 byte x \b.%d
  4011. !:mime application/x-7z-compressed
  4012. # Type: LZMA
  4013. 0 lelong&0xffffff =0x5d
  4014. !:mime application/x-lzma
  4015. >12 leshort 0xff LZMA compressed data,
  4016. >>5 lequad =0xffffffffffffffff streamed
  4017. >>5 lequad !0xffffffffffffffff non-streamed, size %lld
  4018. >12 leshort 0 LZMA compressed data,
  4019. >>5 lequad =0xffffffffffffffff streamed
  4020. >>5 lequad !0xffffffffffffffff non-streamed, size %lld
  4021. # http://tukaani.org/xz/xz-file-format.txt
  4022. 0 ustring \xFD7zXZ\x00 XZ compressed data
  4023. !:mime application/x-xz
  4024. # https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt
  4025. 0 string LRZI LRZIP compressed data
  4026. >4 byte x - version %d
  4027. >5 byte x \b.%d
  4028. !:mime application/x-lrzip
  4029. # http://fastcompression.blogspot.fi/2013/04/lz4-streaming-format-final.html
  4030. 0 lelong 0x184d2204 LZ4 compressed data
  4031. !:mime application/x-lz4
  4032. 0 lelong 0x184c2102 LZ4 compressed data, legacy format
  4033. !:mime application/x-lz4
  4034. # AFX compressed files (Wolfram Kleff)
  4035. 2 string -afx- AFX compressed file data
  4036. # Supplementary magic data for the file(1) command to support
  4037. # rzip(1). The format is described in magic(5).
  4038. #
  4039. # Copyright (C) 2003 by Andrew Tridgell. You may do whatever you want with
  4040. # this file.
  4041. #
  4042. 0 string RZIP rzip compressed data
  4043. >4 byte x - version %d
  4044. >5 byte x \b.%d
  4045. >6 belong x (%d bytes)
  4046. 0 string ArC\x01 FreeArc archive <http://freearc.org>
  4047. # Type: DACT compressed files
  4048. 0 long 0x444354C3 DACT compressed data
  4049. >4 byte >-1 (version %i.
  4050. >5 byte >-1 %i.
  4051. >6 byte >-1 %i)
  4052. >7 long >0 , original size: %i bytes
  4053. >15 long >30 , block size: %i bytes
  4054. # Valve Pack (VPK) files
  4055. 0 lelong 0x55aa1234 Valve Pak file
  4056. >0x4 lelong x \b, version %u
  4057. >0x8 lelong x \b, %u entries
  4058. #------------------------------------------------------------------------------
  4059. # $File: console,v 1.19 2013/02/06 14:18:52 christos Exp $
  4060. # Console game magic
  4061. # Toby Deshane <hac@shoelace.digivill.net>
  4062. # ines: file(1) magic for Marat's iNES Nintendo Entertainment System
  4063. # ROM dump format
  4064. 0 string NES\032 iNES ROM dump,
  4065. >4 byte x %dx16k PRG
  4066. >5 byte x \b, %dx8k CHR
  4067. >6 byte&0x01 =0x1 \b, [Vert.]
  4068. >6 byte&0x01 =0x0 \b, [Horiz.]
  4069. >6 byte&0x02 =0x2 \b, [SRAM]
  4070. >6 byte&0x04 =0x4 \b, [Trainer]
  4071. >6 byte&0x04 =0x8 \b, [4-Scr]
  4072. #------------------------------------------------------------------------------
  4073. # game boy: file(1) magic for the Nintendo (Color) Game Boy raw ROM format
  4074. #
  4075. 0x104 belong 0xCEED6666 Game Boy ROM:
  4076. >0x134 string >\0 "%.16s"
  4077. >0x146 byte 0x03 \b,[SGB]
  4078. >0x147 byte 0x00 \b, [ROM ONLY]
  4079. >0x147 byte 0x01 \b, [ROM+MBC1]
  4080. >0x147 byte 0x02 \b, [ROM+MBC1+RAM]
  4081. >0x147 byte 0x03 \b, [ROM+MBC1+RAM+BATT]
  4082. >0x147 byte 0x05 \b, [ROM+MBC2]
  4083. >0x147 byte 0x06 \b, [ROM+MBC2+BATTERY]
  4084. >0x147 byte 0x08 \b, [ROM+RAM]
  4085. >0x147 byte 0x09 \b, [ROM+RAM+BATTERY]
  4086. >0x147 byte 0x0B \b, [ROM+MMM01]
  4087. >0x147 byte 0x0C \b, [ROM+MMM01+SRAM]
  4088. >0x147 byte 0x0D \b, [ROM+MMM01+SRAM+BATT]
  4089. >0x147 byte 0x0F \b, [ROM+MBC3+TIMER+BATT]
  4090. >0x147 byte 0x10 \b, [ROM+MBC3+TIMER+RAM+BATT]
  4091. >0x147 byte 0x11 \b, [ROM+MBC3]
  4092. >0x147 byte 0x12 \b, [ROM+MBC3+RAM]
  4093. >0x147 byte 0x13 \b, [ROM+MBC3+RAM+BATT]
  4094. >0x147 byte 0x19 \b, [ROM+MBC5]
  4095. >0x147 byte 0x1A \b, [ROM+MBC5+RAM]
  4096. >0x147 byte 0x1B \b, [ROM+MBC5+RAM+BATT]
  4097. >0x147 byte 0x1C \b, [ROM+MBC5+RUMBLE]
  4098. >0x147 byte 0x1D \b, [ROM+MBC5+RUMBLE+SRAM]
  4099. >0x147 byte 0x1E \b, [ROM+MBC5+RUMBLE+SRAM+BATT]
  4100. >0x147 byte 0x1F \b, [Pocket Camera]
  4101. >0x147 byte 0xFD \b, [Bandai TAMA5]
  4102. >0x147 byte 0xFE \b, [Hudson HuC-3]
  4103. >0x147 byte 0xFF \b, [Hudson HuC-1]
  4104. >0x148 byte 0 \b, ROM: 256Kbit
  4105. >0x148 byte 1 \b, ROM: 512Kbit
  4106. >0x148 byte 2 \b, ROM: 1Mbit
  4107. >0x148 byte 3 \b, ROM: 2Mbit
  4108. >0x148 byte 4 \b, ROM: 4Mbit
  4109. >0x148 byte 5 \b, ROM: 8Mbit
  4110. >0x148 byte 6 \b, ROM: 16Mbit
  4111. >0x148 byte 0x52 \b, ROM: 9Mbit
  4112. >0x148 byte 0x53 \b, ROM: 10Mbit
  4113. >0x148 byte 0x54 \b, ROM: 12Mbit
  4114. >0x149 byte 1 \b, RAM: 16Kbit
  4115. >0x149 byte 2 \b, RAM: 64Kbit
  4116. >0x149 byte 3 \b, RAM: 128Kbit
  4117. >0x149 byte 4 \b, RAM: 1Mbit
  4118. #>0x14e long x \b, CRC: %x
  4119. #------------------------------------------------------------------------------
  4120. # genesis: file(1) magic for the Sega MegaDrive/Genesis raw ROM format
  4121. #
  4122. 0x100 string SEGA Sega MegaDrive/Genesis raw ROM dump
  4123. >0x120 string >\0 Name: "%.16s"
  4124. >0x110 string >\0 %.16s
  4125. >0x1B0 string RA with SRAM
  4126. #------------------------------------------------------------------------------
  4127. # genesis: file(1) magic for the Super MegaDrive ROM dump format
  4128. #
  4129. 0x280 string EAGN Super MagicDrive ROM dump
  4130. >0 byte x %dx16k blocks
  4131. >2 byte 0 \b, last in series or standalone
  4132. >2 byte >0 \b, split ROM
  4133. >8 byte 0xAA
  4134. >9 byte 0xBB
  4135. #------------------------------------------------------------------------------
  4136. # genesis: file(1) alternate magic for the Super MegaDrive ROM dump format
  4137. #
  4138. 0x280 string EAMG Super MagicDrive ROM dump
  4139. >0 byte x %dx16k blocks
  4140. >2 byte x \b, last in series or standalone
  4141. >8 byte 0xAA
  4142. >9 byte 0xBB
  4143. #------------------------------------------------------------------------------
  4144. # smsgg: file(1) magic for Sega Master System and Game Gear ROM dumps
  4145. #
  4146. # Does not detect all images. Very preliminary guesswork. Need more data
  4147. # on format.
  4148. #
  4149. # FIXME: need a little more info...;P
  4150. #
  4151. #0 byte 0xF3
  4152. #>1 byte 0xED Sega Master System/Game Gear ROM dump
  4153. #>1 byte 0x31 Sega Master System/Game Gear ROM dump
  4154. #>1 byte 0xDB Sega Master System/Game Gear ROM dump
  4155. #>1 byte 0xAF Sega Master System/Game Gear ROM dump
  4156. #>1 byte 0xC3 Sega Master System/Game Gear ROM dump
  4157. #------------------------------------------------------------------------------
  4158. # dreamcast: file(1) uncertain magic for the Sega Dreamcast VMU image format
  4159. #
  4160. 0 belong 0x21068028 Sega Dreamcast VMU game image
  4161. 0 string LCDi Dream Animator file
  4162. #------------------------------------------------------------------------------
  4163. # v64: file(1) uncertain magic for the V64 format N64 ROM dumps
  4164. #
  4165. 0 belong 0x37804012 V64 Nintendo 64 ROM dump
  4166. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  4167. # Nintendo .nds
  4168. 192 string \044\377\256Qi\232 Nintendo DS Game ROM Image
  4169. # Nintendo .gba
  4170. 0 string \056\000\000\352$\377\256Qi Nintendo Game Boy Advance ROM Image
  4171. #------------------------------------------------------------------------------
  4172. # msx: file(1) magic for MSX game cartridge dumps
  4173. # Too simple - MPi
  4174. #0 beshort 0x4142 MSX game cartridge dump
  4175. #------------------------------------------------------------------------------
  4176. # Sony Playstation executables (Adam Sjoegren <asjo@diku.dk>) :
  4177. 0 string PS-X\ EXE Sony Playstation executable
  4178. # Area:
  4179. >113 string x (%s)
  4180. #------------------------------------------------------------------------------
  4181. # Microsoft Xbox executables .xbe (Esa Hyytia <ehyytia@cc.hut.fi>)
  4182. 0 string XBEH XBE, Microsoft Xbox executable
  4183. # probabilistic checks whether signed or not
  4184. >0x0004 ulelong =0x0
  4185. >>&2 ulelong =0x0
  4186. >>>&2 ulelong =0x0 \b, not signed
  4187. >0x0004 ulelong >0
  4188. >>&2 ulelong >0
  4189. >>>&2 ulelong >0 \b, signed
  4190. # expect base address of 0x10000
  4191. >0x0104 ulelong =0x10000
  4192. >>(0x0118-0x0FF60) ulelong&0x80000007 0x80000007 \b, all regions
  4193. >>(0x0118-0x0FF60) ulelong&0x80000007 !0x80000007
  4194. >>>(0x0118-0x0FF60) ulelong >0 (regions:
  4195. >>>>(0x0118-0x0FF60) ulelong &0x00000001 NA
  4196. >>>>(0x0118-0x0FF60) ulelong &0x00000002 Japan
  4197. >>>>(0x0118-0x0FF60) ulelong &0x00000004 Rest_of_World
  4198. >>>>(0x0118-0x0FF60) ulelong &0x80000000 Manufacturer
  4199. >>>(0x0118-0x0FF60) ulelong >0 \b)
  4200. # --------------------------------
  4201. # Microsoft Xbox data file formats
  4202. 0 string XIP0 XIP, Microsoft Xbox data
  4203. 0 string XTF0 XTF, Microsoft Xbox data
  4204. # Atari Lynx cartridge dump (EXE/BLL header)
  4205. # From: "Stefan A. Haubenthal" <polluks@web.de>
  4206. # Double-check that the image type matches too, 0x8008 conflicts with
  4207. # 8 character OMF-86 object file headers.
  4208. 0 beshort 0x8008
  4209. >6 string BS93 Lynx homebrew cartridge
  4210. >>2 beshort x \b, RAM start $%04x
  4211. >6 string LYNX Lynx cartridge
  4212. >>2 beshort x \b, RAM start $%04x
  4213. # Opera file system that is used on the 3DO console
  4214. # From: Serge van den Boom <svdb@stack.nl>
  4215. 0 string \x01ZZZZZ\x01 3DO "Opera" file system
  4216. # From Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
  4217. 0 string GBS Nintendo Game Boy Music/Audio Data
  4218. 12 string GameBoy\ Music\ Module Nintendo Game Boy Music Module
  4219. # Playstations Patch Files from: From: Thomas Klausner <tk@giga.or.at>
  4220. 0 string PPF30 Playstation Patch File version 3.0
  4221. >5 byte 0 \b, PPF 1.0 patch
  4222. >5 byte 1 \b, PPF 2.0 patch
  4223. >5 byte 2 \b, PPF 3.0 patch
  4224. >>56 byte 0 \b, Imagetype BIN (any)
  4225. >>56 byte 1 \b, Imagetype GI (PrimoDVD)
  4226. >>57 byte 0 \b, Blockcheck disabled
  4227. >>57 byte 1 \b, Blockcheck enabled
  4228. >>58 byte 0 \b, Undo data not available
  4229. >>58 byte 1 \b, Undo data available
  4230. >6 string x \b, description: %s
  4231. 0 string PPF20 Playstation Patch File version 2.0
  4232. >5 byte 0 \b, PPF 1.0 patch
  4233. >5 byte 1 \b, PPF 2.0 patch
  4234. >>56 lelong >0 \b, size of file to patch %d
  4235. >6 string x \b, description: %s
  4236. 0 string PPF10 Playstation Patch File version 1.0
  4237. >5 byte 0 \b, Simple Encoding
  4238. >6 string x \b, description: %s
  4239. # From: Daniel Dawson <ddawson@icehouse.net>
  4240. # SNES9x .smv "movie" file format.
  4241. 0 string SMV\x1A SNES9x input recording
  4242. >0x4 lelong x \b, version %d
  4243. # version 4 is latest so far
  4244. >0x4 lelong <5
  4245. >>0x8 ledate x \b, recorded at %s
  4246. >>0xc lelong >0 \b, rerecorded %d times
  4247. >>0x10 lelong x \b, %d frames long
  4248. >>0x14 byte >0 \b, data for controller(s):
  4249. >>>0x14 byte &0x1 #1
  4250. >>>0x14 byte &0x2 #2
  4251. >>>0x14 byte &0x4 #3
  4252. >>>0x14 byte &0x8 #4
  4253. >>>0x14 byte &0x10 #5
  4254. >>0x15 byte ^0x1 \b, begins from snapshot
  4255. >>0x15 byte &0x1 \b, begins from reset
  4256. >>0x15 byte ^0x2 \b, NTSC standard
  4257. >>0x15 byte &0x2 \b, PAL standard
  4258. >>0x17 byte &0x1 \b, settings:
  4259. # WIP1Timing not used as of version 4
  4260. >>>0x4 lelong <4
  4261. >>>>0x17 byte &0x2 WIP1Timing
  4262. >>>0x17 byte &0x4 Left+Right
  4263. >>>0x17 byte &0x8 VolumeEnvX
  4264. >>>0x17 byte &0x10 FakeMute
  4265. >>>0x17 byte &0x20 SyncSound
  4266. # New flag as of version 4
  4267. >>>0x4 lelong >3
  4268. >>>>0x17 byte &0x80 NoCPUShutdown
  4269. >>0x4 lelong <4
  4270. >>>0x18 lelong >0x23
  4271. >>>>0x20 leshort !0
  4272. >>>>>0x20 lestring16 x \b, metadata: "%s"
  4273. >>0x4 lelong >3
  4274. >>>0x24 byte >0 \b, port 1:
  4275. >>>>0x24 byte 1 joypad
  4276. >>>>0x24 byte 2 mouse
  4277. >>>>0x24 byte 3 SuperScope
  4278. >>>>0x24 byte 4 Justifier
  4279. >>>>0x24 byte 5 multitap
  4280. >>>0x24 byte >0 \b, port 2:
  4281. >>>>0x25 byte 1 joypad
  4282. >>>>0x25 byte 2 mouse
  4283. >>>>0x25 byte 3 SuperScope
  4284. >>>>0x25 byte 4 Justifier
  4285. >>>>0x25 byte 5 multitap
  4286. >>>0x18 lelong >0x43
  4287. >>>>0x40 leshort !0
  4288. >>>>>0x40 lestring16 x \b, metadata: "%s"
  4289. >>0x17 byte &0x40 \b, ROM:
  4290. >>>(0x18.l-26) lelong x CRC32 0x%08x
  4291. >>>(0x18.l-23) string x "%s"
  4292. # Type: scummVM savegame files
  4293. # From: Sven Hartge <debian@ds9.argh.org>
  4294. 0 string SCVM ScummVM savegame
  4295. >12 string >\0 "%s"
  4296. #------------------------------------------------------------------------------
  4297. # $File: convex,v 1.8 2012/10/03 23:44:43 christos Exp $
  4298. # convex: file(1) magic for Convex boxes
  4299. #
  4300. # Convexes are big-endian.
  4301. #
  4302. # /*\
  4303. # * Below are the magic numbers and tests added for Convex.
  4304. # * Added at beginning, because they are expected to be used most.
  4305. # \*/
  4306. 0 belong 0507 Convex old-style object
  4307. >16 belong >0 not stripped
  4308. 0 belong 0513 Convex old-style demand paged executable
  4309. >16 belong >0 not stripped
  4310. 0 belong 0515 Convex old-style pre-paged executable
  4311. >16 belong >0 not stripped
  4312. 0 belong 0517 Convex old-style pre-paged, non-swapped executable
  4313. >16 belong >0 not stripped
  4314. 0 belong 0x011257 Core file
  4315. #
  4316. # The following are a series of dump format magic numbers. Each one
  4317. # corresponds to a drastically different dump format. The first on is
  4318. # the original dump format on a 4.1 BSD or earlier file system. The
  4319. # second marks the change between the 4.1 file system and the 4.2 file
  4320. # system. The Third marks the changing of the block size from 1K
  4321. # to 2K to be compatible with an IDC file system. The fourth indicates
  4322. # a dump that is dependent on Convex Storage Manager, because data in
  4323. # secondary storage is not physically contained within the dump.
  4324. # The restore program uses these number to determine how the data is
  4325. # to be extracted.
  4326. #
  4327. 24 belong =60013 dump format, 4.2 or 4.3 BSD (IDC compatible)
  4328. 24 belong =60014 dump format, Convex Storage Manager by-reference dump
  4329. #
  4330. # what follows is a bunch of bit-mask checks on the flags field of the opthdr.
  4331. # If there is no `=' sign, assume just checking for whether the bit is set?
  4332. #
  4333. 0 belong 0601 Convex SOFF
  4334. >88 belong&0x000f0000 =0x00000000 c1
  4335. >88 belong &0x00010000 c2
  4336. >88 belong &0x00020000 c2mp
  4337. >88 belong &0x00040000 parallel
  4338. >88 belong &0x00080000 intrinsic
  4339. >88 belong &0x00000001 demand paged
  4340. >88 belong &0x00000002 pre-paged
  4341. >88 belong &0x00000004 non-swapped
  4342. >88 belong &0x00000008 POSIX
  4343. #
  4344. >84 belong &0x80000000 executable
  4345. >84 belong &0x40000000 object
  4346. >84 belong&0x20000000 =0 not stripped
  4347. >84 belong&0x18000000 =0x00000000 native fpmode
  4348. >84 belong&0x18000000 =0x10000000 ieee fpmode
  4349. >84 belong&0x18000000 =0x18000000 undefined fpmode
  4350. #
  4351. 0 belong 0605 Convex SOFF core
  4352. #
  4353. 0 belong 0607 Convex SOFF checkpoint
  4354. >88 belong&0x000f0000 =0x00000000 c1
  4355. >88 belong &0x00010000 c2
  4356. >88 belong &0x00020000 c2mp
  4357. >88 belong &0x00040000 parallel
  4358. >88 belong &0x00080000 intrinsic
  4359. >88 belong &0x00000008 POSIX
  4360. #
  4361. >84 belong&0x18000000 =0x00000000 native fpmode
  4362. >84 belong&0x18000000 =0x10000000 ieee fpmode
  4363. >84 belong&0x18000000 =0x18000000 undefined fpmode
  4364. #------------------------------------------------------------------------------
  4365. # $File: cracklib,v 1.7 2009/09/19 16:28:08 christos Exp $
  4366. # cracklib: file (1) magic for cracklib v2.7
  4367. 0 lelong 0x70775631 Cracklib password index, little endian
  4368. >4 long >0 (%i words)
  4369. >4 long 0 ("64-bit")
  4370. >>8 long >-1 (%i words)
  4371. 0 belong 0x70775631 Cracklib password index, big endian
  4372. >4 belong >-1 (%i words)
  4373. # really bellong 0x0000000070775631
  4374. 0 search/1 \0\0\0\0pwV1 Cracklib password index, big endian ("64-bit")
  4375. >12 belong >0 (%i words)
  4376. # ----------------------------------------------------------------------------
  4377. # $File: ctags,v 1.6 2009/09/19 16:28:08 christos Exp $
  4378. # ctags: file (1) magic for Exuberant Ctags files
  4379. # From: Alexander Mai <mai@migdal.ikp.physik.tu-darmstadt.de>
  4380. 0 search/1 =!_TAG Exuberant Ctags tag file text
  4381. #--------------------------------------------------------------
  4382. # ctf: file(1) magic for CTF (Common Trace Format) trace files
  4383. #
  4384. # Specs. available here: <http://www.efficios.com/ctf>
  4385. #--------------------------------------------------------------
  4386. # CTF trace data
  4387. 0 lelong 0xc1fc1fc1 Common Trace Format (CTF) trace data (LE)
  4388. 0 belong 0xc1fc1fc1 Common Trace Format (CTF) trace data (BE)
  4389. # CTF metadata (packetized)
  4390. 0 lelong 0x75d11d57 Common Trace Format (CTF) packetized metadata (LE)
  4391. >35 byte x \b, v%d
  4392. >36 byte x \b.%d
  4393. 0 belong 0x75d11d57 Common Trace Format (CTF) packetized metadata (BE)
  4394. >35 byte x \b, v%d
  4395. >36 byte x \b.%d
  4396. # CTF metadata (plain text)
  4397. 0 string /*\x20CTF\x20 Common Trace Format (CTF) plain text metadata
  4398. !:strength + 5 # this is to make sure we beat C
  4399. >&0 regex [0-9]+\.[0-9]+ \b, v%s
  4400. #------------------------------------------------------------------------------
  4401. # $File: cubemap,v 1.1 2012/06/06 13:03:20 christos Exp $
  4402. # file(1) magic(5) data for cubemaps Martin Erik Werner <martinerikwerner@gmail.com>
  4403. #
  4404. 0 string ACMP Map file for the AssaultCube FPS game
  4405. 0 string CUBE Map file for cube and cube2 engine games
  4406. 0 string MAPZ) Map file for the Blood Frontier/Red Eclipse FPS games
  4407. #------------------------------------------------------------------------------
  4408. # $File: cups,v 1.2 2012/11/02 21:50:29 christos Exp $
  4409. # Cups: file(1) magic for the cups raster file format
  4410. # From: Laurent Martelli <martellilaurent@gmail.com>
  4411. # http://www.cups.org/documentation.php/spec-raster.html
  4412. #
  4413. 0 name cups-be
  4414. >280 lelong x \b, %d
  4415. >284 lelong x \bx%d dpi
  4416. >376 lelong x \b, %dx
  4417. >380 lelong x \b%d pixels
  4418. >388 lelong x %d bits/color
  4419. >392 lelong x %d bits/pixel
  4420. >400 lelong 0 ColorOrder=Chunky
  4421. >400 lelong 1 ColorOrder=Banded
  4422. >400 lelong 2 ColorOrder=Planar
  4423. >404 lelong 0 ColorSpace=gray
  4424. >404 lelong 1 ColorSpace=RGB
  4425. >404 lelong 2 ColorSpace=RGBA
  4426. >404 lelong 3 ColorSpace=black
  4427. >404 lelong 4 ColorSpace=CMY
  4428. >404 lelong 5 ColorSpace=YMC
  4429. >404 lelong 6 ColorSpace=CMYK
  4430. >404 lelong 7 ColorSpace=YMCK
  4431. >404 lelong 8 ColorSpace=KCMY
  4432. >404 lelong 9 ColorSpace=KCMYcm
  4433. >404 lelong 10 ColorSpace=GMCK
  4434. >404 lelong 11 ColorSpace=GMCS
  4435. >404 lelong 12 ColorSpace=WHITE
  4436. >404 lelong 13 ColorSpace=GOLD
  4437. >404 lelong 14 ColorSpace=SILVER
  4438. >404 lelong 15 ColorSpace=CIE XYZ
  4439. >404 lelong 16 ColorSpace=CIE Lab
  4440. >404 lelong 17 ColorSpace=RGBW
  4441. >404 lelong 18 ColorSpace=sGray
  4442. >404 lelong 19 ColorSpace=sRGB
  4443. >404 lelong 20 ColorSpace=AdobeRGB
  4444. # Cups Raster image format, Big Endian
  4445. 0 string RaS
  4446. >3 string t Cups Raster version 1, Big Endian
  4447. >3 string 2 Cups Raster version 2, Big Endian
  4448. >3 string 3 Cups Raster version 3, Big Endian
  4449. !:mime application/vnd.cups-raster
  4450. >0 use ^cups-be
  4451. # Cups Raster image format, Little Endian
  4452. 1 string SaR
  4453. >0 string t Cups Raster version 1, Little Endian
  4454. >0 string 2 Cups Raster version 2, Little Endian
  4455. >0 string 3 Cups Raster version 3, Little Endian
  4456. !:mime application/vnd.cups-raster
  4457. >0 use \^cups-be
  4458. #------------------------------------------------------------------------------
  4459. # $File: dact,v 1.4 2009/09/19 16:28:08 christos Exp $
  4460. # dact: file(1) magic for DACT compressed files
  4461. #
  4462. 0 long 0x444354C3 DACT compressed data
  4463. >4 byte >-1 (version %i.
  4464. >5 byte >-1 $BS%i.
  4465. >6 byte >-1 $BS%i)
  4466. >7 long >0 $BS, original size: %i bytes
  4467. >15 long >30 $BS, block size: %i bytes
  4468. #------------------------------------------------------------------------------
  4469. # $File: database,v 1.36 2013/12/09 20:31:53 christos Exp $
  4470. # database: file(1) magic for various databases
  4471. #
  4472. # extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk)
  4473. #
  4474. #
  4475. # GDBM magic numbers
  4476. # Will be maintained as part of the GDBM distribution in the future.
  4477. # <downsj@teeny.org>
  4478. 0 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian
  4479. !:mime application/x-gdbm
  4480. 0 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian
  4481. !:mime application/x-gdbm
  4482. 0 string GDBM GNU dbm 2.x database
  4483. !:mime application/x-gdbm
  4484. #
  4485. # Berkeley DB
  4486. #
  4487. # Ian Darwin's file /etc/magic files: big/little-endian version.
  4488. #
  4489. # Hash 1.85/1.86 databases store metadata in network byte order.
  4490. # Btree 1.85/1.86 databases store the metadata in host byte order.
  4491. # Hash and Btree 2.X and later databases store the metadata in host byte order.
  4492. 0 long 0x00061561 Berkeley DB
  4493. !:mime application/x-dbm
  4494. >8 belong 4321
  4495. >>4 belong >2 1.86
  4496. >>4 belong <3 1.85
  4497. >>4 belong >0 (Hash, version %d, native byte-order)
  4498. >8 belong 1234
  4499. >>4 belong >2 1.86
  4500. >>4 belong <3 1.85
  4501. >>4 belong >0 (Hash, version %d, little-endian)
  4502. 0 belong 0x00061561 Berkeley DB
  4503. >8 belong 4321
  4504. >>4 belong >2 1.86
  4505. >>4 belong <3 1.85
  4506. >>4 belong >0 (Hash, version %d, big-endian)
  4507. >8 belong 1234
  4508. >>4 belong >2 1.86
  4509. >>4 belong <3 1.85
  4510. >>4 belong >0 (Hash, version %d, native byte-order)
  4511. 0 long 0x00053162 Berkeley DB 1.85/1.86
  4512. >4 long >0 (Btree, version %d, native byte-order)
  4513. 0 belong 0x00053162 Berkeley DB 1.85/1.86
  4514. >4 belong >0 (Btree, version %d, big-endian)
  4515. 0 lelong 0x00053162 Berkeley DB 1.85/1.86
  4516. >4 lelong >0 (Btree, version %d, little-endian)
  4517. 12 long 0x00061561 Berkeley DB
  4518. >16 long >0 (Hash, version %d, native byte-order)
  4519. 12 belong 0x00061561 Berkeley DB
  4520. >16 belong >0 (Hash, version %d, big-endian)
  4521. 12 lelong 0x00061561 Berkeley DB
  4522. >16 lelong >0 (Hash, version %d, little-endian)
  4523. 12 long 0x00053162 Berkeley DB
  4524. >16 long >0 (Btree, version %d, native byte-order)
  4525. 12 belong 0x00053162 Berkeley DB
  4526. >16 belong >0 (Btree, version %d, big-endian)
  4527. 12 lelong 0x00053162 Berkeley DB
  4528. >16 lelong >0 (Btree, version %d, little-endian)
  4529. 12 long 0x00042253 Berkeley DB
  4530. >16 long >0 (Queue, version %d, native byte-order)
  4531. 12 belong 0x00042253 Berkeley DB
  4532. >16 belong >0 (Queue, version %d, big-endian)
  4533. 12 lelong 0x00042253 Berkeley DB
  4534. >16 lelong >0 (Queue, version %d, little-endian)
  4535. # From Max Bowsher.
  4536. 12 long 0x00040988 Berkeley DB
  4537. >16 long >0 (Log, version %d, native byte-order)
  4538. 12 belong 0x00040988 Berkeley DB
  4539. >16 belong >0 (Log, version %d, big-endian)
  4540. 12 lelong 0x00040988 Berkeley DB
  4541. >16 lelong >0 (Log, version %d, little-endian)
  4542. #
  4543. #
  4544. # Round Robin Database Tool by Tobias Oetiker <oetiker@ee.ethz.ch>
  4545. 0 string/b RRD\0 RRDTool DB
  4546. >4 string/b x version %s
  4547. >>10 short !0 16bit aligned
  4548. >>>10 bedouble 8.642135e+130 big-endian
  4549. >>>>18 short x 32bit long (m68k)
  4550. >>10 short 0
  4551. >>>12 long !0 32bit aligned
  4552. >>>>12 bedouble 8.642135e+130 big-endian
  4553. >>>>>20 long 0 64bit long
  4554. >>>>>20 long !0 32bit long
  4555. >>>>12 ledouble 8.642135e+130 little-endian
  4556. >>>>>24 long 0 64bit long
  4557. >>>>>24 long !0 32bit long (i386)
  4558. >>>>12 string \x43\x2b\x1f\x5b\x2f\x25\xc0\xc7 middle-endian
  4559. >>>>>24 short !0 32bit long (arm)
  4560. >>8 quad 0 64bit aligned
  4561. >>>16 bedouble 8.642135e+130 big-endian
  4562. >>>>24 long 0 64bit long (s390x)
  4563. >>>>24 long !0 32bit long (hppa/mips/ppc/s390/sparc)
  4564. >>>16 ledouble 8.642135e+130 little-endian
  4565. >>>>28 long 0 64bit long (alpha/amd64/ia64)
  4566. >>>>28 long !0 32bit long (armel/mipsel)
  4567. #----------------------------------------------------------------------
  4568. # ROOT: file(1) magic for ROOT databases
  4569. #
  4570. 0 string root\0 ROOT file
  4571. >4 belong x Version %d
  4572. >33 belong x (Compression: %d)
  4573. # XXX: Weak magic.
  4574. # Alex Ott <ott@jet.msk.su>
  4575. ## Paradox file formats
  4576. #2 leshort 0x0800 Paradox
  4577. #>0x39 byte 3 v. 3.0
  4578. #>0x39 byte 4 v. 3.5
  4579. #>0x39 byte 9 v. 4.x
  4580. #>0x39 byte 10 v. 5.x
  4581. #>0x39 byte 11 v. 5.x
  4582. #>0x39 byte 12 v. 7.x
  4583. #>>0x04 byte 0 indexed .DB data file
  4584. #>>0x04 byte 1 primary index .PX file
  4585. #>>0x04 byte 2 non-indexed .DB data file
  4586. #>>0x04 byte 3 non-incrementing secondary index .Xnn file
  4587. #>>0x04 byte 4 secondary index .Ynn file
  4588. #>>0x04 byte 5 incrementing secondary index .Xnn file
  4589. #>>0x04 byte 6 non-incrementing secondary index .XGn file
  4590. #>>0x04 byte 7 secondary index .YGn file
  4591. #>>>0x04 byte 8 incrementing secondary index .XGn file
  4592. ## XBase database files
  4593. # updated by Joerg Jenderek at Feb 2013
  4594. # http://www.dbase.com/Knowledgebase/INT/db7_file_fmt.htm
  4595. # http://www.clicketyclick.dk/databases/xbase/format/dbf.html
  4596. # http://home.f1.htw-berlin.de/scheibl/db/intern/dBase.htm
  4597. # inspect VVYYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
  4598. 0 ubelong&0x0000FFFF <0x00000C20
  4599. # skip Infocom game Z-machine
  4600. >2 ubyte >0
  4601. # skip Androids *.xml
  4602. >>3 ubyte >0
  4603. >>>3 ubyte <32
  4604. # 1 < version VV
  4605. >>>>0 ubyte >1
  4606. # skip HELP.CA3 by test for reserved byte ( NULL )
  4607. >>>>>27 ubyte 0
  4608. # reserved bytes not always 0 ; also found 0x3901 (T4.DBF) ,0x7101 (T5.DBF,T6.DBF)
  4609. #>>>>>30 ubeshort x 30NULL?%x
  4610. # possible production flag,tag numbers(<=0x30),tag length(<=0x20), reserved (NULL)
  4611. >>>>>>24 ubelong&0xffFFFFff >0x01302000
  4612. # .DBF or .MDX
  4613. >>>>>>24 ubelong&0xffFFFFff <0x01302001
  4614. # for Xbase Database file (*.DBF) reserved (NULL) for multi-user
  4615. >>>>>>>24 ubelong&0xffFFFFff =0
  4616. # test for 2 reserved NULL bytes,transaction and encryption byte flag
  4617. >>>>>>>>12 ubelong&0xFFFFfEfE 0
  4618. # test for MDX flag
  4619. >>>>>>>>>28 ubyte x
  4620. >>>>>>>>>28 ubyte&0xf8 0
  4621. # header size >= 32
  4622. >>>>>>>>>>8 uleshort >31
  4623. # skip PIC15736.PCX by test for language driver name or field name
  4624. >>>>>>>>>>>32 ubyte >0
  4625. !:mime application/x-dbf
  4626. #!:mime application/x-dbf; charset=unknown-8bit ??
  4627. #!:mime application/x-dbase
  4628. >>>>>>>>>>>>0 use xbase-type
  4629. # database file
  4630. >>>>>>>>>>>>0 ubyte x \b DBF
  4631. >>>>>>>>>>>>4 lelong 0 \b, no records
  4632. >>>>>>>>>>>>4 lelong >0 \b, %ld record
  4633. # plural s appended
  4634. >>>>>>>>>>>>>4 lelong >1 \bs
  4635. # http://www.clicketyclick.dk/databases/xbase/format/dbf_check.html#CHECK_DBF
  4636. # 1 <= record size <= 4000 (dBase 3,4) or 32 * KB (=0x8000)
  4637. >>>>>>>>>>>>10 uleshort x * %d
  4638. # file size = records * record size + header size
  4639. >>>>>>>>>>>>1 ubyte x \b, update-date
  4640. >>>>>>>>>>>>1 use xbase-date
  4641. # http://msdn.microsoft.com/de-de/library/cc483186(v=vs.71).aspx
  4642. #>>>>>>>>>>>>29 ubyte =0 \b, codepage ID=0x%x
  4643. # 2~cp850 , 3~cp1252 , 0x1b~?? ; what code page is 0x1b ?
  4644. >>>>>>>>>>>>29 ubyte >0 \b, codepage ID=0x%x
  4645. #>>>>>>>>>>>>28 ubyte&0x01 0 \b, no index file
  4646. >>>>>>>>>>>>28 ubyte&0x01 1 \b, with index file .MDX
  4647. >>>>>>>>>>>>28 ubyte&0x02 2 \b, with memo .FPT
  4648. >>>>>>>>>>>>28 ubyte&0x04 4 \b, DataBaseContainer
  4649. # 1st record offset + 1 = header size
  4650. >>>>>>>>>>>>8 uleshort >0
  4651. >>>>>>>>>>>>(8.s+1) ubyte >0
  4652. >>>>>>>>>>>>>8 uleshort >0 \b, at offset %d
  4653. >>>>>>>>>>>>>(8.s+1) ubyte >0
  4654. >>>>>>>>>>>>>>&-1 string >\0 1st record "%s"
  4655. # for multiple index files (*.MDX) Production flag,tag numbers(<=0x30),tag length(<=0x20), reserverd (NULL)
  4656. >>>>>>>24 ubelong&0x0133f7ff >0
  4657. # test for reserved NULL byte
  4658. >>>>>>>>47 ubyte x
  4659. # test for valid TAG key format (0x10 or 0)
  4660. >>>>>>>>>559 ubyte&0xeF 0
  4661. # test MM <= 12
  4662. >>>>>>>>>45 ubeshort <0x0C20
  4663. >>>>>>>>>>45 ubyte >0
  4664. >>>>>>>>>>>46 ubyte <32
  4665. >>>>>>>>>>>>46 ubyte >0
  4666. #!:mime application/x-mdx
  4667. >>>>>>>>>>>>>0 use xbase-type
  4668. >>>>>>>>>>>>>0 ubyte x \b MDX
  4669. >>>>>>>>>>>>>1 ubyte x \b, creation-date
  4670. >>>>>>>>>>>>>1 use xbase-date
  4671. >>>>>>>>>>>>>44 ubyte x \b, update-date
  4672. >>>>>>>>>>>>>44 use xbase-date
  4673. # No.of tags in use (1,2,5,12)
  4674. >>>>>>>>>>>>>28 uleshort x \b, %d
  4675. # No. of entries in tag (0x30)
  4676. >>>>>>>>>>>>>25 ubyte x \b/%d tags
  4677. # Length of tag
  4678. >>>>>>>>>>>>>26 ubyte x * %d
  4679. # 1st tag name_
  4680. >>>>>>>>>>>>>548 string x \b, 1st tag "%.11s"
  4681. # 2nd tag name
  4682. #>>>>>>>>>>>>(26.b+548) string x \b, 2nd tag "%.11s"
  4683. #
  4684. # Print the xBase names of different version variants
  4685. 0 name xbase-type
  4686. >0 ubyte <2
  4687. # 1 < version
  4688. >0 ubyte >1
  4689. >>0 ubyte 0x02 FoxBase
  4690. # FoxBase+/dBaseIII+, no memo
  4691. >>0 ubyte 0x03 FoxBase+/dBase III
  4692. # dBASE IV no memo file
  4693. >>0 ubyte 0x04 dBase IV
  4694. # dBASE V no memo file
  4695. >>0 ubyte 0x05 dBase V
  4696. >>0 ubyte 0x30 Visual FoxPro
  4697. >>0 ubyte 0x31 Visual FoxPro, autoincrement
  4698. # Visual FoxPro, with field type Varchar or Varbinary
  4699. >>0 ubyte 0x32 Visual FoxPro, with field type Varchar
  4700. # dBASE IV SQL, no memo;dbv memo var size (Flagship)
  4701. >>0 ubyte 0x43 dBase IV, with SQL table
  4702. # http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  4703. #>>0 ubyte 0x62 dBase IV, with SQL table
  4704. # dBASE IV, with memo!!
  4705. >>0 ubyte 0x7b dBase IV, with memo
  4706. # http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  4707. #>>0 ubyte 0x82 dBase IV, with SQL system
  4708. # FoxBase+/dBaseIII+ with memo .DBT!
  4709. >>0 ubyte 0x83 FoxBase+/dBase III, with memo .DBT
  4710. # VISUAL OBJECTS (first 1.0 versions) for the Dbase III files (NTX clipper driver); memo file
  4711. >>0 ubyte 0x87 VISUAL OBJECTS, with memo file
  4712. # http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  4713. #>>0 ubyte 0x8A FoxBase+/dBase III, with memo .DBT
  4714. # dBASE IV with memo!
  4715. >>0 ubyte 0x8B dBase IV, with memo .DBT
  4716. # dBase IV with SQL Table,no memo?
  4717. >>0 ubyte 0x8E dBase IV, with SQL table
  4718. # .dbv and .dbt memo (Flagship)?
  4719. >>0 ubyte 0xB3 Flagship
  4720. # http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  4721. #>>0 ubyte 0xCA dBase IV with memo .DBT
  4722. # dBASE IV with SQL table, with memo .DBT
  4723. >>0 ubyte 0xCB dBase IV with SQL table, with memo .DBT
  4724. # HiPer-Six format;Clipper SIX, with SMT memo file
  4725. >>0 ubyte 0xE5 Clipper SIX with memo
  4726. # http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  4727. #>>0 ubyte 0xF4 dBase IV, with SQL table, with memo
  4728. >>0 ubyte 0xF5 FoxPro with memo
  4729. # http://msdn.microsoft.com/en-US/library/st4a0s68(v=vs.80).aspx
  4730. #>>0 ubyte 0xFA FoxPro 2.x, with memo
  4731. # unkown version (should not happen)
  4732. >>0 default x xBase
  4733. >>>0 ubyte x (0x%x)
  4734. # flags in version byte
  4735. # DBT flag (with dBASE III memo .DBT)!!
  4736. # >>0 ubyte&0x80 >0 DBT_FLAG=%x
  4737. # memo flag ??
  4738. # >>0 ubyte&0x08 >0 MEMO_FLAG=%x
  4739. # SQL flag ??
  4740. # >>0 ubyte&0x70 >0 SQL_FLAG=%x
  4741. # test and print the date of xBase .DBF .MDX
  4742. 0 name xbase-date
  4743. # inspect YYMMDD , where 1<= MM <= 12 and 1<= DD <= 31
  4744. >0 ubelong x
  4745. >1 ubyte <13
  4746. >>1 ubyte >0
  4747. >>>2 ubyte >0
  4748. >>>>2 ubyte <32
  4749. >>>>>0 ubyte x
  4750. # YY is interpreted as 20YY or 19YY
  4751. >>>>>>0 ubyte <100 \b %.2d
  4752. # YY is interpreted 1900+YY; TODO: display yy or 20yy instead 1YY
  4753. >>>>>>0 ubyte >99 \b %d
  4754. >>>>>1 ubyte x \b-%d
  4755. >>>>>2 ubyte x \b-%d
  4756. # dBase memo files .DBT or .FPT
  4757. # http://msdn.microsoft.com/en-us/library/8599s21w(v=vs.80).aspx
  4758. 16 ubyte <4
  4759. >16 ubyte !2
  4760. >>16 ubyte !1
  4761. # next free block index is positive
  4762. >>>0 ulelong >0
  4763. # skip many JPG. ZIP, BZ2 by test for reserved bytes NULL , 0|2 , 0|1 , low byte of block size
  4764. >>>>17 ubelong&0xFFfdFE00 0x00000000
  4765. # skip many RAR by test for low byte 0 ,high byte 0|2|even of block size, 0|a|e|d7 , 0|64h
  4766. >>>>>20 ubelong&0xFF01209B 0x00000000
  4767. # dBASE III
  4768. >>>>>>16 ubyte 3
  4769. # dBASE III DBT
  4770. >>>>>>>0 use xbase-memo-print
  4771. # dBASE IV DBT , FoxPro FPT or many PNG , ZIP , DBF garbage
  4772. >>>>>>16 ubyte 0
  4773. # dBASE IV DBT with DBF name or DBF garbage
  4774. >>>>>>>8 ubelong >0x40000000
  4775. # skip DBF and catch dBASE IV DBT with DBF name and with non big index of next free block
  4776. >>>>>>>>0 ulelong <0x01010002
  4777. >>>>>>>>>0 use xbase-memo-print
  4778. >>>>>>>8 ubelong 0
  4779. # skip MM*DD*.bin by test for for reserved NULL byte
  4780. >>>>>>>>508 ubelong 0
  4781. # real memo files should contain text here
  4782. >>>>>>>>>520 ubelong >0x20202019
  4783. >>>>>>>>>>520 ubelong <0xFEFEFEFF
  4784. >>>>>>>>>>>0 use xbase-memo-print
  4785. # garbage PCX , ZIP , JAR , XPI
  4786. >>>>>>>8 default x
  4787. # Print the information of dBase DBT or FoxPro FPT memo files
  4788. 0 name xbase-memo-print
  4789. >0 ubyte x
  4790. # test version
  4791. # memo file
  4792. >>16 ubyte 3 dBase III DBT
  4793. >>16 ubyte 0
  4794. >>>512 ubelong <0x00000003 FoxPro FPT
  4795. # Size of blocks for FoxPro
  4796. >>>>6 ubeshort x \b, blocks size %lu
  4797. # Number of next available block for appending data for FoxPro
  4798. >>>>0 ubelong =0 \b, next free block index %lu
  4799. >>>>0 ubelong !0 \b, next free block index %lu
  4800. >>>512 default x dBase IV DBT
  4801. # DBF file name without extention
  4802. >>>>8 string >\0 \b of %-.8s.DBF
  4803. # size of blocks ; not reliable 0x2020204C
  4804. #>>>>4 ulelong =0 \b, blocks size %lu
  4805. >>>>4 ulelong !0 \b, blocks size %lu
  4806. # Block length found 0 , 512
  4807. #>>>>20 uleshort =0 \b, block length %u
  4808. >>>>20 uleshort !0 \b, block length %u
  4809. # Number of next available block for appending data
  4810. >>>>0 ulelong =0 \b, next free block index %lu
  4811. >>>>0 ulelong !0 \b, next free block index %lu
  4812. >>512 ubelong x
  4813. >>>512 ubelong =0xFFFF0800
  4814. >>>>520 string >\0 \b, 1st used item "%s"
  4815. # FoxPro
  4816. >>>512 ubelong <3
  4817. # FoxPro memo
  4818. >>>>512 ubelong =1
  4819. >>>>520 string >\0 \b, 1st used item "%s"
  4820. >>>512 default x
  4821. # may be deleted memo field
  4822. >>>>512 string >\0 \b, 1st item "%s"
  4823. # TODO:
  4824. # DBASE index file *.NDX
  4825. # DBASE Compound Index file *.CDX
  4826. # dBASE IV Printer Driver *.PRF
  4827. ## End of XBase database stuff
  4828. # MS Access database
  4829. 4 string Standard\ Jet\ DB Microsoft Access Database
  4830. !:mime application/x-msaccess
  4831. 4 string Standard\ ACE\ DB Microsoft Access Database
  4832. !:mime application/x-msaccess
  4833. # TDB database from Samba et al - Martin Pool <mbp@samba.org>
  4834. 0 string TDB\ file TDB database
  4835. >32 lelong 0x2601196D version 6, little-endian
  4836. >>36 lelong x hash size %d bytes
  4837. # SE Linux policy database
  4838. 0 lelong 0xf97cff8c SE Linux policy
  4839. >16 lelong x v%d
  4840. >20 lelong 1 MLS
  4841. >24 lelong x %d symbols
  4842. >28 lelong x %d ocons
  4843. # ICE authority file data (Wolfram Kleff)
  4844. 2 string ICE ICE authority data
  4845. # X11 Xauthority file (Wolfram Kleff)
  4846. 10 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  4847. 11 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  4848. 12 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  4849. 13 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  4850. 14 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  4851. 15 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  4852. 16 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  4853. 17 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  4854. 18 string MIT-MAGIC-COOKIE-1 X11 Xauthority data
  4855. # From: Maxime Henrion <mux@FreeBSD.org>
  4856. # PostgreSQL's custom dump format, Maxime Henrion <mux@FreeBSD.org>
  4857. 0 string PGDMP PostgreSQL custom database dump
  4858. >5 byte x - v%d
  4859. >6 byte x \b.%d
  4860. >5 beshort <0x101 \b-0
  4861. >5 beshort >0x100
  4862. >>7 byte x \b-%d
  4863. # Type: Advanced Data Format (ADF) database
  4864. # URL: http://www.grc.nasa.gov/WWW/cgns/adf/
  4865. # From: Nicolas Chauvat <nicolas.chauvat@logilab.fr>
  4866. 0 string @(#)ADF\ Database CGNS Advanced Data Format
  4867. # Tokyo Cabinet magic data
  4868. # http://tokyocabinet.sourceforge.net/index.html
  4869. 0 string ToKyO\ CaBiNeT\n Tokyo Cabinet
  4870. >14 string x \b (%s)
  4871. >32 byte 0 \b, Hash
  4872. !:mime application/x-tokyocabinet-hash
  4873. >32 byte 1 \b, B+ tree
  4874. !:mime application/x-tokyocabinet-btree
  4875. >32 byte 2 \b, Fixed-length
  4876. !:mime application/x-tokyocabinet-fixed
  4877. >32 byte 3 \b, Table
  4878. !:mime application/x-tokyocabinet-table
  4879. >33 byte &1 \b, [open]
  4880. >33 byte &2 \b, [fatal]
  4881. >34 byte x \b, apow=%d
  4882. >35 byte x \b, fpow=%d
  4883. >36 byte &0x01 \b, [large]
  4884. >36 byte &0x02 \b, [deflate]
  4885. >36 byte &0x04 \b, [bzip]
  4886. >36 byte &0x08 \b, [tcbs]
  4887. >36 byte &0x10 \b, [excodec]
  4888. >40 lequad x \b, bnum=%lld
  4889. >48 lequad x \b, rnum=%lld
  4890. >56 lequad x \b, fsiz=%lld
  4891. # Type: QDBM Quick Database Manager
  4892. # From: Benoit Sibaud <bsibaud@april.org>
  4893. 0 string \\[depot\\]\n\f Quick Database Manager, little endian
  4894. 0 string \\[DEPOT\\]\n\f Quick Database Manager, big endian
  4895. # Type: TokyoCabinet database
  4896. # URL: http://tokyocabinet.sourceforge.net/
  4897. # From: Benoit Sibaud <bsibaud@april.org>
  4898. 0 string ToKyO\ CaBiNeT\n TokyoCabinet database
  4899. >14 string x (version %s)
  4900. # From: Stephane Blondon http://www.yaal.fr
  4901. # Database file for Zope (done by FileStorage)
  4902. 0 string FS21 Zope Object Database File Storage (data)
  4903. # Cache file for the database of Zope (done by ClientStorage)
  4904. 0 string ZEC3 Zope Object Database Client Cache File (data)
  4905. # IDA (Interactive Disassembler) database
  4906. 0 string IDA1 IDA (Interactive Disassembler) database
  4907. #------------------------------------------------------------------------------
  4908. # $File: diamond,v 1.7 2009/09/19 16:28:08 christos Exp $
  4909. # diamond: file(1) magic for Diamond system
  4910. #
  4911. # ... diamond is a multi-media mail and electronic conferencing system....
  4912. #
  4913. # XXX - I think it was either renamed Slate, or replaced by Slate....
  4914. #
  4915. # The full deal is too long...
  4916. #0 string <list>\n<protocol\ bbn-multimedia-format> Diamond Multimedia Document
  4917. 0 string =<list>\n<protocol\ bbn-m Diamond Multimedia Document
  4918. #------------------------------------------------------------------------------
  4919. # $File: diff,v 1.14 2012/09/16 23:08:54 christos Exp $
  4920. # diff: file(1) magic for diff(1) output
  4921. #
  4922. 0 search/1 diff\ diff output text
  4923. !:mime text/x-diff
  4924. 0 search/1 ***\ diff output text
  4925. !:mime text/x-diff
  4926. 0 search/1 Only\ in\ diff output text
  4927. !:mime text/x-diff
  4928. 0 search/1 Common\ subdirectories:\ diff output text
  4929. !:mime text/x-diff
  4930. 0 search/1 Index: RCS/CVS diff output text
  4931. !:mime text/x-diff
  4932. # bsdiff: file(1) magic for bsdiff(1) output
  4933. 0 string/b BSDIFF40 bsdiff(1) patch file
  4934. # unified diff
  4935. 0 search/4096 ---\
  4936. >&0 search/1024 \n
  4937. >>&0 search/1 +++\
  4938. >>>&0 search/1024 \n
  4939. >>>>&0 search/1 @@ unified diff output text
  4940. !:mime text/x-diff
  4941. !:strength + 90
  4942. # librsync -- the library for network deltas
  4943. #
  4944. # Copyright (C) 2001 by Martin Pool. You may do whatever you want with
  4945. # this file.
  4946. #
  4947. 0 belong 0x72730236 rdiff network-delta data
  4948. 0 belong 0x72730136 rdiff network-delta signature data
  4949. >4 belong x (block length=%d,
  4950. >8 belong x signature strength=%d)
  4951. #------------------------------------------------------------------------------
  4952. # $File: digital,v 1.11 2013/01/11 16:45:23 christos Exp $
  4953. # Digital UNIX - Info
  4954. #
  4955. 0 string =!<arch>\n________64E Alpha archive
  4956. >22 string X -- out of date
  4957. #
  4958. 0 leshort 0603
  4959. >24 leshort 0410 COFF format alpha pure
  4960. >24 leshort 0413 COFF format alpha demand paged
  4961. >>22 leshort&030000 !020000 executable
  4962. >>22 leshort&020000 !0 dynamically linked
  4963. >>16 lelong !0 not stripped
  4964. >>16 lelong 0 stripped
  4965. >>27 byte x - version %d
  4966. >>26 byte x \b.%d
  4967. >>28 byte x \b-%d
  4968. >24 leshort 0407 COFF format alpha object
  4969. >>22 leshort&030000 020000 shared library
  4970. >>27 byte x - version %d
  4971. >>26 byte x \b.%d
  4972. >>28 byte x \b-%d
  4973. # Basic recognition of Digital UNIX core dumps - Mike Bremford <mike@opac.bl.uk>
  4974. #
  4975. # The actual magic number is just "Core", followed by a 2-byte version
  4976. # number; however, treating any file that begins with "Core" as a Digital
  4977. # UNIX core dump file may produce too many false hits, so we include one
  4978. # byte of the version number as well; DU 5.0 appears only to be up to
  4979. # version 2.
  4980. #
  4981. 0 string Core\001 Alpha COFF format core dump (Digital UNIX)
  4982. >24 string >\0 \b, from '%s'
  4983. 0 string Core\002 Alpha COFF format core dump (Digital UNIX)
  4984. >24 string >\0 \b, from '%s'
  4985. #
  4986. # The next is incomplete, we could tell more about this format,
  4987. # but its not worth it.
  4988. 0 leshort 0x188 Alpha compressed COFF
  4989. 0 leshort 0x18f Alpha u-code object
  4990. #
  4991. #
  4992. # Some other interesting Digital formats,
  4993. 0 string \377\377\177 ddis/ddif
  4994. 0 string \377\377\174 ddis/dots archive
  4995. 0 string \377\377\176 ddis/dtif table data
  4996. 0 string \033c\033 LN03 output
  4997. 0 long 04553207 X image
  4998. #
  4999. 0 string =!<PDF>!\n profiling data file
  5000. #
  5001. # Locale data tables (MIPS and Alpha).
  5002. #
  5003. 0 short 0x0501 locale data table
  5004. >6 short 0x24 for MIPS
  5005. >6 short 0x40 for Alpha
  5006. #------------------------------------------------------------------------------
  5007. # $File: dolby,v 1.7 2014/01/08 22:37:23 christos Exp $
  5008. # ATSC A/53 aka AC-3 aka Dolby Digital <ashitaka@gmx.at>
  5009. # from http://www.atsc.org/standards/a_52a.pdf
  5010. # corrections, additions, etc. are always welcome!
  5011. #
  5012. # syncword
  5013. 0 beshort 0x0b77 ATSC A/52 aka AC-3 aka Dolby Digital stream,
  5014. # Proposed audio/ac3 RFC/4184
  5015. !:mime audio/vnd.dolby.dd-raw
  5016. # fscod
  5017. >4 byte&0xc0 = 0x00 48 kHz,
  5018. >4 byte&0xc0 = 0x40 44.1 kHz,
  5019. >4 byte&0xc0 = 0x80 32 kHz,
  5020. # is this one used for 96 kHz?
  5021. >4 byte&0xc0 = 0xc0 reserved frequency,
  5022. #
  5023. >5 byte&0x07 = 0x00 \b, complete main (CM)
  5024. >5 byte&0x07 = 0x01 \b, music and effects (ME)
  5025. >5 byte&0x07 = 0x02 \b, visually impaired (VI)
  5026. >5 byte&0x07 = 0x03 \b, hearing impaired (HI)
  5027. >5 byte&0x07 = 0x04 \b, dialogue (D)
  5028. >5 byte&0x07 = 0x05 \b, commentary (C)
  5029. >5 byte&0x07 = 0x06 \b, emergency (E)
  5030. >5 beshort&0x07e0 0x0720 \b, voiceover (VO)
  5031. >5 beshort&0x07e0 >0x0720 \b, karaoke
  5032. # acmod
  5033. >6 byte&0xe0 = 0x00 1+1 front,
  5034. >>6 byte&0x10 = 0x10 LFE on,
  5035. >6 byte&0xe0 = 0x20 1 front/0 rear,
  5036. >>6 byte&0x10 = 0x10 LFE on,
  5037. >6 byte&0xe0 = 0x40 2 front/0 rear,
  5038. # dsurmod (for stereo only)
  5039. >>6 byte&0x18 = 0x00 Dolby Surround not indicated
  5040. >>6 byte&0x18 = 0x08 not Dolby Surround encoded
  5041. >>6 byte&0x18 = 0x10 Dolby Surround encoded
  5042. >>6 byte&0x18 = 0x18 reserved Dolby Surround mode
  5043. >>6 byte&0x04 = 0x04 LFE on,
  5044. >6 byte&0xe0 = 0x60 3 front/0 rear,
  5045. >>6 byte&0x04 = 0x04 LFE on,
  5046. >6 byte&0xe0 = 0x80 2 front/1 rear,
  5047. >>6 byte&0x04 = 0x04 LFE on,
  5048. >6 byte&0xe0 = 0xa0 3 front/1 rear,
  5049. >>6 byte&0x01 = 0x01 LFE on,
  5050. >6 byte&0xe0 = 0xc0 2 front/2 rear,
  5051. >>6 byte&0x04 = 0x04 LFE on,
  5052. >6 byte&0xe0 = 0xe0 3 front/2 rear,
  5053. >>6 byte&0x01 = 0x01 LFE on,
  5054. #
  5055. >4 byte&0x3e = 0x00 \b, 32 kbit/s
  5056. >4 byte&0x3e = 0x02 \b, 40 kbit/s
  5057. >4 byte&0x3e = 0x04 \b, 48 kbit/s
  5058. >4 byte&0x3e = 0x06 \b, 56 kbit/s
  5059. >4 byte&0x3e = 0x08 \b, 64 kbit/s
  5060. >4 byte&0x3e = 0x0a \b, 80 kbit/s
  5061. >4 byte&0x3e = 0x0c \b, 96 kbit/s
  5062. >4 byte&0x3e = 0x0e \b, 112 kbit/s
  5063. >4 byte&0x3e = 0x10 \b, 128 kbit/s
  5064. >4 byte&0x3e = 0x12 \b, 160 kbit/s
  5065. >4 byte&0x3e = 0x14 \b, 192 kbit/s
  5066. >4 byte&0x3e = 0x16 \b, 224 kbit/s
  5067. >4 byte&0x3e = 0x18 \b, 256 kbit/s
  5068. >4 byte&0x3e = 0x1a \b, 320 kbit/s
  5069. >4 byte&0x3e = 0x1c \b, 384 kbit/s
  5070. >4 byte&0x3e = 0x1e \b, 448 kbit/s
  5071. >4 byte&0x3e = 0x20 \b, 512 kbit/s
  5072. >4 byte&0x3e = 0x22 \b, 576 kbit/s
  5073. >4 byte&0x3e = 0x24 \b, 640 kbit/s
  5074. #------------------------------------------------------------------------------
  5075. # $File: dump,v 1.12 2012/11/01 04:26:40 christos Exp $
  5076. # dump: file(1) magic for dump file format--for new and old dump filesystems
  5077. #
  5078. # We specify both byte orders in order to recognize byte-swapped dumps.
  5079. #
  5080. 0 name new-dump-be
  5081. >4 bedate x Previous dump %s,
  5082. >8 bedate x This dump %s,
  5083. >12 belong >0 Volume %ld,
  5084. >692 belong 0 Level zero, type:
  5085. >692 belong >0 Level %d, type:
  5086. >0 belong 1 tape header,
  5087. >0 belong 2 beginning of file record,
  5088. >0 belong 3 map of inodes on tape,
  5089. >0 belong 4 continuation of file record,
  5090. >0 belong 5 end of volume,
  5091. >0 belong 6 map of inodes deleted,
  5092. >0 belong 7 end of medium (for floppy),
  5093. >676 string >\0 Label %s,
  5094. >696 string >\0 Filesystem %s,
  5095. >760 string >\0 Device %s,
  5096. >824 string >\0 Host %s,
  5097. >888 belong >0 Flags %x
  5098. 0 name old-dump-be
  5099. #>4 bedate x Previous dump %s,
  5100. #>8 bedate x This dump %s,
  5101. >12 belong >0 Volume %ld,
  5102. >692 belong 0 Level zero, type:
  5103. >692 belong >0 Level %d, type:
  5104. >0 belong 1 tape header,
  5105. >0 belong 2 beginning of file record,
  5106. >0 belong 3 map of inodes on tape,
  5107. >0 belong 4 continuation of file record,
  5108. >0 belong 5 end of volume,
  5109. >0 belong 6 map of inodes deleted,
  5110. >0 belong 7 end of medium (for floppy),
  5111. >676 string >\0 Label %s,
  5112. >696 string >\0 Filesystem %s,
  5113. >760 string >\0 Device %s,
  5114. >824 string >\0 Host %s,
  5115. >888 belong >0 Flags %x
  5116. 0 name ufs2-dump-be
  5117. >896 beqdate x Previous dump %s,
  5118. >904 beqdate x This dump %s,
  5119. >12 belong >0 Volume %ld,
  5120. >692 belong 0 Level zero, type:
  5121. >692 belong >0 Level %d, type:
  5122. >0 belong 1 tape header,
  5123. >0 belong 2 beginning of file record,
  5124. >0 belong 3 map of inodes on tape,
  5125. >0 belong 4 continuation of file record,
  5126. >0 belong 5 end of volume,
  5127. >0 belong 6 map of inodes deleted,
  5128. >0 belong 7 end of medium (for floppy),
  5129. >676 string >\0 Label %s,
  5130. >696 string >\0 Filesystem %s,
  5131. >760 string >\0 Device %s,
  5132. >824 string >\0 Host %s,
  5133. >888 belong >0 Flags %x
  5134. 24 belong 60012 new-fs dump file (big endian),
  5135. >0 use new-dump-be
  5136. 24 belong 60011 old-fs dump file (big endian),
  5137. >0 use old-dump-be
  5138. 24 lelong 60012 new-fs dump file (little endian),
  5139. >0 use \^new-dump-be
  5140. 24 lelong 60011 old-fs dump file (little endian),
  5141. >0 use \^old-dump-be
  5142. 24 belong 0x19540119 new-fs dump file (ufs2, big endian),
  5143. >0 use ufs2-dump-be
  5144. 24 lelong 0x19540119 new-fs dump file (ufs2, little endian),
  5145. >0 use \^ufs2-dump-be
  5146. 18 leshort 60011 old-fs dump file (16-bit, assuming PDP-11 endianness),
  5147. >2 medate x Previous dump %s,
  5148. >6 medate x This dump %s,
  5149. >10 leshort >0 Volume %ld,
  5150. >0 leshort 1 tape header.
  5151. >0 leshort 2 beginning of file record.
  5152. >0 leshort 3 map of inodes on tape.
  5153. >0 leshort 4 continuation of file record.
  5154. >0 leshort 5 end of volume.
  5155. >0 leshort 6 map of inodes deleted.
  5156. >0 leshort 7 end of medium (for floppy).
  5157. #------------------------------------------------------------------------------
  5158. # $File: dyadic,v 1.5 2010/09/20 18:55:20 rrt Exp $
  5159. # Dyadic: file(1) magic for Dyalog APL.
  5160. #
  5161. 0 byte 0xaa
  5162. >1 byte <4 Dyalog APL
  5163. >>1 byte 0x00 incomplete workspace
  5164. >>1 byte 0x01 component file
  5165. >>1 byte 0x02 external variable
  5166. >>1 byte 0x03 workspace
  5167. >>2 byte x version %d
  5168. >>3 byte x .%d
  5169. 0 beshort 0xaa03 Dyalog APL
  5170. >2 byte x workspace type %d
  5171. >3 byte x subtype %d
  5172. >7 byte&0x28 0x00 32-bit
  5173. >7 byte&0x28 0x20 64-bit
  5174. >7 byte&0x0c 0x00 classic
  5175. >7 byte&0x0c 0x04 unicode
  5176. >7 byte&0x88 0x00 big-endian
  5177. >7 byte&0x88 0x80 little-endian
  5178. 0 byte 0xaa Dyalog APL
  5179. >1 byte 0x00 aplcore
  5180. >1 byte 0x01 component file 32-bit non-journaled non-checksummed
  5181. >1 byte 0x02 external variable exclusive
  5182. >1 byte 0x06 external variable shared
  5183. >1 byte 0x07 session
  5184. >1 byte 0x08 mapped file 32-bit
  5185. >1 byte 0x09 component file 64-bit non-journaled non-checksummed
  5186. >1 byte 0x0a mapped file 64-bit
  5187. >1 byte 0x0b component file 32-bit level 1 journaled non-checksummed
  5188. >1 byte 0x0c component file 64-bit level 1 journaled non-checksummed
  5189. >1 byte 0x0d component file 32-bit level 1 journaled checksummed
  5190. >1 byte 0x0e component file 64-bit level 1 journaled checksummed
  5191. >1 byte 0x0f component file 32-bit level 2 journaled checksummed
  5192. >1 byte 0x10 component file 64-bit level 2 journaled checksummed
  5193. >1 byte 0x11 component file 32-bit level 3 journaled checksummed
  5194. >1 byte 0x12 component file 64-bit level 3 journaled checksummed
  5195. >1 byte 0x13 component file 32-bit non-journaled checksummed
  5196. >1 byte 0x14 component file 64-bit non-journaled checksummed
  5197. >1 byte 0x80 DDB
  5198. 0 short 0x6060 Dyalog APL transfer
  5199. #------------------------------------------------------------------------------
  5200. # $File: ebml,v 1.1 2010/07/02 00:07:03 christos Exp $
  5201. # ebml: file(1) magic for various Extensible Binary Meta Language
  5202. # http://www.matroska.org/technical/specs/index.html#track
  5203. 0 belong 0x1a45dfa3 EBML file
  5204. >4 search/b/100 \102\202
  5205. >>&1 string x \b, creator %.8s
  5206. #------------------------------------------------------------------------------
  5207. # $File: editors,v 1.8 2009/09/19 16:28:09 christos Exp $
  5208. # T602 editor documents
  5209. # by David Necas <yeti@physics.muni.cz>
  5210. 0 string @CT\ T602 document data,
  5211. >4 string 0 Kamenicky
  5212. >4 string 1 CP 852
  5213. >4 string 2 KOI8-CS
  5214. >4 string >2 unknown encoding
  5215. # Vi IMproved Encrypted file
  5216. # by David Necas <yeti@physics.muni.cz>
  5217. 0 string VimCrypt~ Vim encrypted file data
  5218. # Vi IMproved Swap file
  5219. # by Sven Wegener <swegener@gentoo.org>
  5220. 0 string b0VIM\ Vim swap file
  5221. >&0 string >\0 \b, version %s
  5222. #------------------------------------------------------------------------------
  5223. # $File: efi,v 1.4 2009/09/19 16:28:09 christos Exp $
  5224. # efi: file(1) magic for Universal EFI binaries
  5225. 0 lelong 0x0ef1fab9
  5226. >4 lelong 1 Universal EFI binary with 1 architecture
  5227. >>&0 lelong 7 \b, i386
  5228. >>&0 lelong 0x01000007 \b, x86_64
  5229. >4 lelong 2 Universal EFI binary with 2 architectures
  5230. >>&0 lelong 7 \b, i386
  5231. >>&0 lelong 0x01000007 \b, x86_64
  5232. >>&20 lelong 7 \b, i386
  5233. >>&20 lelong 0x01000007 \b, x86_64
  5234. >4 lelong >2 Universal EFI binary with %ld architectures
  5235. #------------------------------------------------------------------------------
  5236. # $File: elf,v 1.64 2013/08/04 09:31:47 christos Exp $
  5237. # elf: file(1) magic for ELF executables
  5238. #
  5239. # We have to check the byte order flag to see what byte order all the
  5240. # other stuff in the header is in.
  5241. #
  5242. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  5243. #
  5244. # Created by: unknown
  5245. # Modified by (1): Daniel Quinlan <quinlan@yggdrasil.com>
  5246. # Modified by (2): Peter Tobias <tobias@server.et-inf.fho-emden.de> (core support)
  5247. # Modified by (3): Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de> (fix of core support)
  5248. # Modified by (4): <gerardo.cacciari@gmail.com> (VMS Itanium)
  5249. # Modified by (5): Matthias Urlichs <smurf@debian.org> (Listing of many architectures)
  5250. 0 name elf-le
  5251. >16 leshort 0 no file type,
  5252. !:mime application/octet-stream
  5253. >16 leshort 1 relocatable,
  5254. !:mime application/x-object
  5255. >16 leshort 2 executable,
  5256. !:mime application/x-executable
  5257. >16 leshort 3 shared object,
  5258. !:mime application/x-sharedlib
  5259. >16 leshort 4 core file
  5260. !:mime application/x-coredump
  5261. # Core file detection is not reliable.
  5262. #>>>(0x38+0xcc) string >\0 of '%s'
  5263. #>>>(0x38+0x10) lelong >0 (signal %d),
  5264. >16 leshort &0xff00 processor-specific,
  5265. >18 clear x
  5266. >18 leshort 0 no machine,
  5267. >18 leshort 1 AT&T WE32100
  5268. >18 leshort 2 SPARC
  5269. >18 leshort 3 Intel 80386,
  5270. >18 leshort 4 Motorola
  5271. >>4 byte 1
  5272. >>>36 lelong &0x01000000 68000,
  5273. >>>36 lelong &0x00810000 CPU32,
  5274. >>>36 lelong 0 68020,
  5275. >18 leshort 5 Motorola 88000,
  5276. >18 leshort 6 Intel 80486,
  5277. >18 leshort 7 Intel 80860,
  5278. # The official e_machine number for MIPS is now #8, regardless of endianness.
  5279. # The second number (#10) will be deprecated later. For now, we still
  5280. # say something if #10 is encountered, but only gory details for #8.
  5281. >18 leshort 8 MIPS,
  5282. >>4 byte 1
  5283. >>>36 lelong &0x20 N32
  5284. >18 leshort 10 MIPS,
  5285. >>4 byte 1
  5286. >>>36 lelong &0x20 N32
  5287. >18 leshort 8
  5288. # only for 32-bit
  5289. >>4 byte 1
  5290. >>>36 lelong&0xf0000000 0x00000000 MIPS-I
  5291. >>>36 lelong&0xf0000000 0x10000000 MIPS-II
  5292. >>>36 lelong&0xf0000000 0x20000000 MIPS-III
  5293. >>>36 lelong&0xf0000000 0x30000000 MIPS-IV
  5294. >>>36 lelong&0xf0000000 0x40000000 MIPS-V
  5295. >>>36 lelong&0xf0000000 0x50000000 MIPS32
  5296. >>>36 lelong&0xf0000000 0x60000000 MIPS64
  5297. >>>36 lelong&0xf0000000 0x70000000 MIPS32 rel2
  5298. >>>36 lelong&0xf0000000 0x80000000 MIPS64 rel2
  5299. # only for 64-bit
  5300. >>4 byte 2
  5301. >>>48 lelong&0xf0000000 0x00000000 MIPS-I
  5302. >>>48 lelong&0xf0000000 0x10000000 MIPS-II
  5303. >>>48 lelong&0xf0000000 0x20000000 MIPS-III
  5304. >>>48 lelong&0xf0000000 0x30000000 MIPS-IV
  5305. >>>48 lelong&0xf0000000 0x40000000 MIPS-V
  5306. >>>48 lelong&0xf0000000 0x50000000 MIPS32
  5307. >>>48 lelong&0xf0000000 0x60000000 MIPS64
  5308. >>>48 lelong&0xf0000000 0x70000000 MIPS32 rel2
  5309. >>>48 lelong&0xf0000000 0x80000000 MIPS64 rel2
  5310. >18 leshort 9 Amdahl,
  5311. >18 leshort 10 MIPS (deprecated),
  5312. >18 leshort 11 RS6000,
  5313. >18 leshort 15 PA-RISC,
  5314. # only for 32-bit
  5315. >>4 byte 1
  5316. >>>38 leshort 0x0214 2.0
  5317. >>>36 leshort &0x0008 (LP64)
  5318. # only for 64-bit
  5319. >>4 byte 2
  5320. >>>50 leshort 0x0214 2.0
  5321. >>>48 leshort &0x0008 (LP64)
  5322. >18 leshort 16 nCUBE,
  5323. >18 leshort 17 Fujitsu VPP500,
  5324. >18 leshort 18 SPARC32PLUS,
  5325. # only for 32-bit
  5326. >>4 byte 1
  5327. >>>36 lelong&0xffff00 0x000100 V8+ Required,
  5328. >>>36 lelong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required,
  5329. >>>36 lelong&0xffff00 0x000400 HaL R1 Extensions Required,
  5330. >>>36 lelong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required,
  5331. >18 leshort 20 PowerPC or cisco 4500,
  5332. >18 leshort 21 64-bit PowerPC or cisco 7500,
  5333. >18 leshort 22 IBM S/390,
  5334. >18 leshort 23 Cell SPU,
  5335. >18 leshort 24 cisco SVIP,
  5336. >18 leshort 25 cisco 7200,
  5337. >18 leshort 36 NEC V800 or cisco 12000,
  5338. >18 leshort 37 Fujitsu FR20,
  5339. >18 leshort 38 TRW RH-32,
  5340. >18 leshort 39 Motorola RCE,
  5341. >18 leshort 40 ARM,
  5342. >>4 byte 1
  5343. >>>36 lelong&0xff000000 0x04000000 EABI4
  5344. >>>36 lelong&0xff000000 0x05000000 EABI5
  5345. >>>36 lelong &0x00800000 BE8
  5346. >>>36 lelong &0x00400000 LE8
  5347. >18 leshort 41 Alpha,
  5348. >18 leshort 0xa390 IBM S/390 (obsolete),
  5349. >18 leshort 42 Renesas SH,
  5350. >18 leshort 43 SPARC V9,
  5351. >>4 byte 2
  5352. >>>48 lelong&0xffff00 0x000200 Sun UltraSPARC1 Extensions Required,
  5353. >>>48 lelong&0xffff00 0x000400 HaL R1 Extensions Required,
  5354. >>>48 lelong&0xffff00 0x000800 Sun UltraSPARC3 Extensions Required,
  5355. >>>48 lelong&0x3 0 total store ordering,
  5356. >>>48 lelong&0x3 1 partial store ordering,
  5357. >>>48 lelong&0x3 2 relaxed memory ordering,
  5358. >18 leshort 44 Siemens Tricore Embedded Processor,
  5359. >18 leshort 45 Argonaut RISC Core, Argonaut Technologies Inc.,
  5360. >18 leshort 46 Renesas H8/300,
  5361. >18 leshort 47 Renesas H8/300H,
  5362. >18 leshort 48 Renesas H8S,
  5363. >18 leshort 49 Renesas H8/500,
  5364. >18 leshort 50 IA-64,
  5365. >18 leshort 51 Stanford MIPS-X,
  5366. >18 leshort 52 Motorola Coldfire,
  5367. >18 leshort 53 Motorola M68HC12,
  5368. >18 leshort 54 Fujitsu MMA,
  5369. >18 leshort 55 Siemens PCP,
  5370. >18 leshort 56 Sony nCPU,
  5371. >18 leshort 57 Denso NDR1,
  5372. >18 leshort 58 Start*Core,
  5373. >18 leshort 59 Toyota ME16,
  5374. >18 leshort 60 ST100,
  5375. >18 leshort 61 Tinyj emb.,
  5376. >18 leshort 62 x86-64,
  5377. >18 leshort 63 Sony DSP,
  5378. >18 leshort 66 FX66,
  5379. >18 leshort 67 ST9+ 8/16 bit,
  5380. >18 leshort 68 ST7 8 bit,
  5381. >18 leshort 69 MC68HC16,
  5382. >18 leshort 70 MC68HC11,
  5383. >18 leshort 71 MC68HC08,
  5384. >18 leshort 72 MC68HC05,
  5385. >18 leshort 73 SGI SVx or Cray NV1,
  5386. >18 leshort 74 ST19 8 bit,
  5387. >18 leshort 75 Digital VAX,
  5388. >18 leshort 76 Axis cris,
  5389. >18 leshort 77 Infineon 32-bit embedded,
  5390. >18 leshort 78 Element 14 64-bit DSP,
  5391. >18 leshort 79 LSI Logic 16-bit DSP,
  5392. >18 leshort 80 MMIX,
  5393. >18 leshort 81 Harvard machine-independent,
  5394. >18 leshort 82 SiTera Prism,
  5395. >18 leshort 83 Atmel AVR 8-bit,
  5396. >18 leshort 84 Fujitsu FR30,
  5397. >18 leshort 85 Mitsubishi D10V,
  5398. >18 leshort 86 Mitsubishi D30V,
  5399. >18 leshort 87 NEC v850,
  5400. >18 leshort 88 Renesas M32R,
  5401. >18 leshort 89 Matsushita MN10300,
  5402. >18 leshort 90 Matsushita MN10200,
  5403. >18 leshort 91 picoJava,
  5404. >18 leshort 92 OpenRISC,
  5405. >18 leshort 93 ARC Cores Tangent-A5,
  5406. >18 leshort 94 Tensilica Xtensa,
  5407. >18 leshort 97 NatSemi 32k,
  5408. >18 leshort 106 Analog Devices Blackfin,
  5409. >18 leshort 113 Altera Nios II,
  5410. >18 beshort 138 LatticeMico32,
  5411. >18 leshort 174 META,
  5412. >18 leshort 183 ARM aarch64,
  5413. >18 leshort 187 Tilera TILE64,
  5414. >18 leshort 188 Tilera TILEPro,
  5415. >18 leshort 191 Tilera TILE-Gx,
  5416. >18 leshort 0x3426 OpenRISC (obsolete),
  5417. >18 leshort 0x8472 OpenRISC (obsolete),
  5418. >18 leshort 0x9026 Alpha (unofficial),
  5419. >18 default x
  5420. >>18 leshort x *unknown arch 0x%x*
  5421. >20 lelong 0 invalid version
  5422. >20 lelong 1 version 1
  5423. 0 string \177ELF ELF
  5424. !:strength *2
  5425. >4 byte 0 invalid class
  5426. >4 byte 1 32-bit
  5427. >4 byte 2 64-bit
  5428. >5 byte 0 invalid byte order
  5429. >5 byte 1 LSB
  5430. >>0 use elf-le
  5431. >5 byte 2 MSB
  5432. >>0 use \^elf-le
  5433. # Up to now only 0, 1 and 2 are defined; I've seen a file with 0x83, it seemed
  5434. # like proper ELF, but extracting the string had bad results.
  5435. >4 byte <0x80
  5436. >>8 string >\0 (%s)
  5437. >8 string \0
  5438. >>7 byte 0 (SYSV)
  5439. >>7 byte 1 (HP-UX)
  5440. >>7 byte 2 (NetBSD)
  5441. >>7 byte 3 (GNU/Linux)
  5442. >>7 byte 4 (GNU/Hurd)
  5443. >>7 byte 5 (86Open)
  5444. >>7 byte 6 (Solaris)
  5445. >>7 byte 7 (Monterey)
  5446. >>7 byte 8 (IRIX)
  5447. >>7 byte 9 (FreeBSD)
  5448. >>7 byte 10 (Tru64)
  5449. >>7 byte 11 (Novell Modesto)
  5450. >>7 byte 12 (OpenBSD)
  5451. >8 string \2
  5452. >>7 byte 13 (OpenVMS)
  5453. >>7 byte 97 (ARM)
  5454. >>7 byte 255 (embedded)
  5455. #------------------------------------------------------------------------------
  5456. # $File: encore,v 1.6 2009/09/19 16:28:09 christos Exp $
  5457. # encore: file(1) magic for Encore machines
  5458. #
  5459. # XXX - needs to have the byte order specified (NS32K was little-endian,
  5460. # dunno whether they run the 88K in little-endian mode or not).
  5461. #
  5462. 0 short 0x154 Encore
  5463. >20 short 0x107 executable
  5464. >20 short 0x108 pure executable
  5465. >20 short 0x10b demand-paged executable
  5466. >20 short 0x10f unsupported executable
  5467. >12 long >0 not stripped
  5468. >22 short >0 - version %ld
  5469. >22 short 0 -
  5470. #>4 date x stamp %s
  5471. 0 short 0x155 Encore unsupported executable
  5472. >12 long >0 not stripped
  5473. >22 short >0 - version %ld
  5474. >22 short 0 -
  5475. #>4 date x stamp %s
  5476. #------------------------------------------------------------------------------
  5477. # $File: epoc,v 1.9 2013/12/21 14:28:15 christos Exp $
  5478. # EPOC : file(1) magic for EPOC documents [Psion Series 5/Osaris/Geofox 1]
  5479. # Stefan Praszalowicz <hpicollo@worldnet.fr> and Peter Breitenlohner <peb@mppmu.mpg.de>
  5480. # Useful information for improving this file can be found at:
  5481. # http://software.frodo.looijaard.name/psiconv/formats/Index.html
  5482. #------------------------------------------------------------------------------
  5483. 0 lelong 0x10000037 Psion Series 5
  5484. >4 lelong 0x10000039 font file
  5485. >4 lelong 0x1000003A printer driver
  5486. >4 lelong 0x1000003B clipboard
  5487. >4 lelong 0x10000042 multi-bitmap image
  5488. !:mime image/x-epoc-mbm
  5489. >4 lelong 0x1000006A application information file
  5490. >4 lelong 0x1000006D
  5491. >>8 lelong 0x1000007D Sketch image
  5492. !:mime image/x-epoc-sketch
  5493. >>8 lelong 0x1000007E voice note
  5494. >>8 lelong 0x1000007F Word file
  5495. !:mime application/x-epoc-word
  5496. >>8 lelong 0x10000085 OPL program (TextEd)
  5497. !:mime application/x-epoc-opl
  5498. >>8 lelong 0x10000087 Comms settings
  5499. >>8 lelong 0x10000088 Sheet file
  5500. !:mime application/x-epoc-sheet
  5501. >>8 lelong 0x100001C4 EasyFax initialisation file
  5502. >4 lelong 0x10000073 OPO module
  5503. !:mime application/x-epoc-opo
  5504. >4 lelong 0x10000074 OPL application
  5505. !:mime application/x-epoc-app
  5506. >4 lelong 0x1000008A exported multi-bitmap image
  5507. >4 lelong 0x1000016D
  5508. >>8 lelong 0x10000087 Comms names
  5509. 0 lelong 0x10000041 Psion Series 5 ROM multi-bitmap image
  5510. 0 lelong 0x10000050 Psion Series 5
  5511. >4 lelong 0x1000006D database
  5512. >>8 lelong 0x10000084 Agenda file
  5513. !:mime application/x-epoc-agenda
  5514. >>8 lelong 0x10000086 Data file
  5515. !:mime application/x-epoc-data
  5516. >>8 lelong 0x10000CEA Jotter file
  5517. !:mime application/x-epoc-jotter
  5518. >4 lelong 0x100000E4 ini file
  5519. 0 lelong 0x10000079 Psion Series 5 binary:
  5520. >4 lelong 0x00000000 DLL
  5521. >4 lelong 0x10000049 comms hardware library
  5522. >4 lelong 0x1000004A comms protocol library
  5523. >4 lelong 0x1000005D OPX
  5524. >4 lelong 0x1000006C application
  5525. >4 lelong 0x1000008D DLL
  5526. >4 lelong 0x100000AC logical device driver
  5527. >4 lelong 0x100000AD physical device driver
  5528. >4 lelong 0x100000E5 file transfer protocol
  5529. >4 lelong 0x100000E5 file transfer protocol
  5530. >4 lelong 0x10000140 printer definition
  5531. >4 lelong 0x10000141 printer definition
  5532. 0 lelong 0x1000007A Psion Series 5 executable
  5533. #------------------------------------------------------------------------------
  5534. # $File: erlang,v 1.6 2010/09/20 19:19:17 rrt Exp $
  5535. # erlang: file(1) magic for Erlang JAM and BEAM files
  5536. # URL: http://www.erlang.org/faq/x779.html#AEN812
  5537. # OTP R3-R4
  5538. 0 string \0177BEAM! Old Erlang BEAM file
  5539. >6 short >0 - version %d
  5540. # OTP R5 and onwards
  5541. 0 string FOR1
  5542. >8 string BEAM Erlang BEAM file
  5543. # 4.2 version may have a copyright notice!
  5544. 4 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2
  5545. 79 string Tue\ Jan\ 22\ 14:32:44\ MET\ 1991 Erlang JAM file - version 4.2
  5546. 4 string 1.0\ Fri\ Feb\ 3\ 09:55:56\ MET\ 1995 Erlang JAM file - version 4.3
  5547. 0 bequad 0x0000000000ABCDEF Erlang DETS file
  5548. #------------------------------------------------------------------------------
  5549. # $File: esri,v 1.4 2009/09/19 16:28:09 christos Exp $
  5550. # ESRI Shapefile format (.shp .shx .dbf=DBaseIII)
  5551. # Based on info from
  5552. # <URL:http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf>
  5553. 0 belong 9994 ESRI Shapefile
  5554. >4 belong =0
  5555. >8 belong =0
  5556. >12 belong =0
  5557. >16 belong =0
  5558. >20 belong =0
  5559. >28 lelong x version %d
  5560. >24 belong x length %d
  5561. >32 lelong =0 type Null Shape
  5562. >32 lelong =1 type Point
  5563. >32 lelong =3 type PolyLine
  5564. >32 lelong =5 type Polygon
  5565. >32 lelong =8 type MultiPoint
  5566. >32 lelong =11 type PointZ
  5567. >32 lelong =13 type PolyLineZ
  5568. >32 lelong =15 type PolygonZ
  5569. >32 lelong =18 type MultiPointZ
  5570. >32 lelong =21 type PointM
  5571. >32 lelong =23 type PolyLineM
  5572. >32 lelong =25 type PolygonM
  5573. >32 lelong =28 type MultiPointM
  5574. >32 lelong =31 type MultiPatch
  5575. #------------------------------------------------------------------------------
  5576. # $File: fcs,v 1.4 2009/09/19 16:28:09 christos Exp $
  5577. # fcs: file(1) magic for FCS (Flow Cytometry Standard) data files
  5578. # From Roger Leigh <roger@whinlatter.uklinux.net>
  5579. 0 string FCS1.0 Flow Cytometry Standard (FCS) data, version 1.0
  5580. 0 string FCS2.0 Flow Cytometry Standard (FCS) data, version 2.0
  5581. 0 string FCS3.0 Flow Cytometry Standard (FCS) data, version 3.0
  5582. #------------------------------------------------------------------------------
  5583. # $File: filesystems,v 1.85 2013/11/19 23:54:05 christos Exp $
  5584. # filesystems: file(1) magic for different filesystems
  5585. #
  5586. 0 name partid
  5587. >0 ubyte 0x00 Unused
  5588. >0 ubyte 0x01 12-bit FAT
  5589. >0 ubyte 0x02 XENIX /
  5590. >0 ubyte 0x03 XENIX /usr
  5591. >0 ubyte 0x04 16-bit FAT, less than 32M
  5592. >0 ubyte 0x05 extended partition
  5593. >0 ubyte 0x06 16-bit FAT, more than 32M
  5594. >0 ubyte 0x07 OS/2 HPFS, NTFS, QNX2, Adv. UNIX
  5595. >0 ubyte 0x08 AIX or os, or etc.
  5596. >0 ubyte 0x09 AIX boot partition or Coherent
  5597. >0 ubyte 0x0a O/2 boot manager or Coherent swap
  5598. >0 ubyte 0x0b 32-bit FAT
  5599. >0 ubyte 0x0c 32-bit FAT, LBA-mapped
  5600. >0 ubyte 0x0d 7XXX, LBA-mapped
  5601. >0 ubyte 0x0e 16-bit FAT, LBA-mapped
  5602. >0 ubyte 0x0f extended partition, LBA-mapped
  5603. >0 ubyte 0x10 OPUS
  5604. >0 ubyte 0x11 OS/2 DOS 12-bit FAT
  5605. >0 ubyte 0x12 Compaq diagnostics
  5606. >0 ubyte 0x14 OS/2 DOS 16-bit FAT <32M
  5607. >0 ubyte 0x16 OS/2 DOS 16-bit FAT >=32M
  5608. >0 ubyte 0x17 OS/2 hidden IFS
  5609. >0 ubyte 0x18 AST Windows swapfile
  5610. >0 ubyte 0x19 Willowtech Photon coS
  5611. >0 ubyte 0x1b hidden win95 fat 32
  5612. >0 ubyte 0x1c hidden win95 fat 32 lba
  5613. >0 ubyte 0x1d hidden win95 fat 16 lba
  5614. >0 ubyte 0x20 Willowsoft OFS1
  5615. >0 ubyte 0x21 reserved
  5616. >0 ubyte 0x23 reserved
  5617. >0 ubyte 0x24 NEC DOS
  5618. >0 ubyte 0x26 reserved
  5619. >0 ubyte 0x31 reserved
  5620. >0 ubyte 0x32 Alien Internet Services NOS
  5621. >0 ubyte 0x33 reserved
  5622. >0 ubyte 0x34 reserved
  5623. >0 ubyte 0x35 JFS on OS2
  5624. >0 ubyte 0x36 reserved
  5625. >0 ubyte 0x38 Theos
  5626. >0 ubyte 0x39 Plan 9, or Theos spanned
  5627. >0 ubyte 0x3a Theos ver 4 4gb partition
  5628. >0 ubyte 0x3b Theos ve 4 extended partition
  5629. >0 ubyte 0x3c PartitionMagic recovery
  5630. >0 ubyte 0x3d Hidden Netware
  5631. >0 ubyte 0x40 VENIX 286 or LynxOS
  5632. >0 ubyte 0x41 PReP
  5633. >0 ubyte 0x42 linux swap sharing DRDOS disk
  5634. >0 ubyte 0x43 linux sharing DRDOS disk
  5635. >0 ubyte 0x44 GoBack change utility
  5636. >0 ubyte 0x45 Boot US Boot manager
  5637. >0 ubyte 0x46 EUMEL/Elan or Ergos 3
  5638. >0 ubyte 0x47 EUMEL/Elan or Ergos 3
  5639. >0 ubyte 0x48 EUMEL/Elan or Ergos 3
  5640. >0 ubyte 0x4a ALFX/THIN filesystem for DOS
  5641. >0 ubyte 0x4c Oberon partition
  5642. >0 ubyte 0x4d QNX4.x
  5643. >0 ubyte 0x4e QNX4.x 2nd part
  5644. >0 ubyte 0x4f QNX4.x 3rd part
  5645. >0 ubyte 0x50 DM (disk manager)
  5646. >0 ubyte 0x51 DM6 Aux1 (or Novell)
  5647. >0 ubyte 0x52 CP/M or Microport SysV/AT
  5648. >0 ubyte 0x53 DM6 Aux3
  5649. >0 ubyte 0x54 DM6 DDO
  5650. >0 ubyte 0x55 EZ-Drive (disk manager)
  5651. >0 ubyte 0x56 Golden Bow (disk manager)
  5652. >0 ubyte 0x57 Drive PRO
  5653. >0 ubyte 0x5c Priam Edisk (disk manager)
  5654. >0 ubyte 0x61 SpeedStor
  5655. >0 ubyte 0x63 GNU HURD or Mach or Sys V/386
  5656. >0 ubyte 0x64 Novell Netware 2.xx or Speedstore
  5657. >0 ubyte 0x65 Novell Netware 3.xx
  5658. >0 ubyte 0x66 Novell 386 Netware
  5659. >0 ubyte 0x67 Novell
  5660. >0 ubyte 0x68 Novell
  5661. >0 ubyte 0x69 Novell
  5662. >0 ubyte 0x70 DiskSecure Multi-Boot
  5663. >0 ubyte 0x71 reserved
  5664. >0 ubyte 0x73 reserved
  5665. >0 ubyte 0x74 reserved
  5666. >0 ubyte 0x75 PC/IX
  5667. >0 ubyte 0x76 reserved
  5668. >0 ubyte 0x77 M2FS/M2CS partition
  5669. >0 ubyte 0x78 XOSL boot loader filesystem
  5670. >0 ubyte 0x80 MINIX until 1.4a
  5671. >0 ubyte 0x81 MINIX since 1.4b
  5672. >0 ubyte 0x82 Linux swap or Solaris
  5673. >0 ubyte 0x83 Linux native
  5674. >0 ubyte 0x84 OS/2 hidden C: drive
  5675. >0 ubyte 0x85 Linux extended partition
  5676. >0 ubyte 0x86 NT FAT volume set
  5677. >0 ubyte 0x87 NTFS volume set or HPFS mirrored
  5678. >0 ubyte 0x8a Linux Kernel AiR-BOOT partition
  5679. >0 ubyte 0x8b Legacy Fault tolerant FAT32
  5680. >0 ubyte 0x8c Legacy Fault tolerant FAT32 ext
  5681. >0 ubyte 0x8d Hidden free FDISK FAT12
  5682. >0 ubyte 0x8e Linux Logical Volume Manager
  5683. >0 ubyte 0x90 Hidden free FDISK FAT16
  5684. >0 ubyte 0x91 Hidden free FDISK DOS EXT
  5685. >0 ubyte 0x92 Hidden free FDISK FAT16 Big
  5686. >0 ubyte 0x93 Amoeba filesystem
  5687. >0 ubyte 0x94 Amoeba bad block table
  5688. >0 ubyte 0x95 MIT EXOPC native partitions
  5689. >0 ubyte 0x97 Hidden free FDISK FAT32
  5690. >0 ubyte 0x98 Datalight ROM-DOS Super-Boot
  5691. >0 ubyte 0x99 Mylex EISA SCSI
  5692. >0 ubyte 0x9a Hidden free FDISK FAT16 LBA
  5693. >0 ubyte 0x9b Hidden free FDISK EXT LBA
  5694. >0 ubyte 0x9f BSDI?
  5695. >0 ubyte 0xa0 IBM Thinkpad hibernation
  5696. >0 ubyte 0xa1 HP Volume expansion (SpeedStor)
  5697. >0 ubyte 0xa3 HP Volume expansion (SpeedStor)
  5698. >0 ubyte 0xa4 HP Volume expansion (SpeedStor)
  5699. >0 ubyte 0xa5 386BSD partition type
  5700. >0 ubyte 0xa6 OpenBSD partition type
  5701. >0 ubyte 0xa7 NeXTSTEP 486
  5702. >0 ubyte 0xa8 Apple UFS
  5703. >0 ubyte 0xa9 NetBSD partition type
  5704. >0 ubyte 0xaa Olivetty Fat12 1.44MB Service part
  5705. >0 ubyte 0xab Apple Boot
  5706. >0 ubyte 0xae SHAG OS filesystem
  5707. >0 ubyte 0xaf Apple HFS
  5708. >0 ubyte 0xb0 BootStar Dummy
  5709. >0 ubyte 0xb1 reserved
  5710. >0 ubyte 0xb3 reserved
  5711. >0 ubyte 0xb4 reserved
  5712. >0 ubyte 0xb6 reserved
  5713. >0 ubyte 0xb7 BSDI BSD/386 filesystem
  5714. >0 ubyte 0xb8 BSDI BSD/386 swap
  5715. >0 ubyte 0xbb Boot Wizard Hidden
  5716. >0 ubyte 0xbe Solaris 8 partition type
  5717. >0 ubyte 0xbf Solaris partition type
  5718. >0 ubyte 0xc0 CTOS
  5719. >0 ubyte 0xc1 DRDOS/sec (FAT-12)
  5720. >0 ubyte 0xc2 Hidden Linux
  5721. >0 ubyte 0xc3 Hidden Linux swap
  5722. >0 ubyte 0xc4 DRDOS/sec (FAT-16, < 32M)
  5723. >0 ubyte 0xc5 DRDOS/sec (EXT)
  5724. >0 ubyte 0xc6 DRDOS/sec (FAT-16, >= 32M)
  5725. >0 ubyte 0xc7 Syrinx (Cyrnix?) or HPFS disabled
  5726. >0 ubyte 0xc8 Reserved for DR-DOS 8.0+
  5727. >0 ubyte 0xc9 Reserved for DR-DOS 8.0+
  5728. >0 ubyte 0xca Reserved for DR-DOS 8.0+
  5729. >0 ubyte 0xcb DR-DOS 7.04+ Secured FAT32 CHS
  5730. >0 ubyte 0xcc DR-DOS 7.04+ Secured FAT32 LBA
  5731. >0 ubyte 0xcd CTOS Memdump
  5732. >0 ubyte 0xce DR-DOS 7.04+ FAT16X LBA
  5733. >0 ubyte 0xcf DR-DOS 7.04+ EXT LBA
  5734. >0 ubyte 0xd0 REAL/32 secure big partition
  5735. >0 ubyte 0xd1 Old Multiuser DOS FAT12
  5736. >0 ubyte 0xd4 Old Multiuser DOS FAT16 Small
  5737. >0 ubyte 0xd5 Old Multiuser DOS Extended
  5738. >0 ubyte 0xd6 Old Multiuser DOS FAT16 Big
  5739. >0 ubyte 0xd8 CP/M 86
  5740. >0 ubyte 0xdb CP/M or Concurrent CP/M
  5741. >0 ubyte 0xdd Hidden CTOS Memdump
  5742. >0 ubyte 0xde Dell PowerEdge Server utilities
  5743. >0 ubyte 0xdf DG/UX virtual disk manager
  5744. >0 ubyte 0xe0 STMicroelectronics ST AVFS
  5745. >0 ubyte 0xe1 DOS access or SpeedStor 12-bit
  5746. >0 ubyte 0xe3 DOS R/O or Storage Dimensions
  5747. >0 ubyte 0xe4 SpeedStor 16-bit FAT < 1024 cyl.
  5748. >0 ubyte 0xe5 reserved
  5749. >0 ubyte 0xe6 reserved
  5750. >0 ubyte 0xeb BeOS
  5751. >0 ubyte 0xee GPT Protective MBR
  5752. >0 ubyte 0xef EFI system partition
  5753. >0 ubyte 0xf0 Linux PA-RISC boot loader
  5754. >0 ubyte 0xf1 SpeedStor or Storage Dimensions
  5755. >0 ubyte 0xf2 DOS 3.3+ Secondary
  5756. >0 ubyte 0xf3 reserved
  5757. >0 ubyte 0xf4 SpeedStor large partition
  5758. >0 ubyte 0xf5 Prologue multi-volumen partition
  5759. >0 ubyte 0xf6 reserved
  5760. >0 ubyte 0xf9 pCache: ext2/ext3 persistent cache
  5761. >0 ubyte 0xfa Bochs x86 emulator
  5762. >0 ubyte 0xfb VMware File System
  5763. >0 ubyte 0xfc VMware Swap
  5764. >0 ubyte 0xfd Linux RAID partition persistent sb
  5765. >0 ubyte 0xfe LANstep or IBM PS/2 IML
  5766. >0 ubyte 0xff Xenix Bad Block Table
  5767. 0 string \366\366\366\366 PC formatted floppy with no filesystem
  5768. # Sun disk labels
  5769. # From /usr/include/sun/dklabel.h:
  5770. 0774 beshort 0xdabe
  5771. # modified by Joerg Jenderek, because original test
  5772. # succeeds for Cabinet archive dao360.dl_ with negative blocks
  5773. >0770 long >0 Sun disk label
  5774. >>0 string x '%s
  5775. >>>31 string >\0 \b%s
  5776. >>>>63 string >\0 \b%s
  5777. >>>>>95 string >\0 \b%s
  5778. >>0 string x \b'
  5779. >>0734 short >0 %d rpm,
  5780. >>0736 short >0 %d phys cys,
  5781. >>0740 short >0 %d alts/cyl,
  5782. >>0746 short >0 %d interleave,
  5783. >>0750 short >0 %d data cyls,
  5784. >>0752 short >0 %d alt cyls,
  5785. >>0754 short >0 %d heads/partition,
  5786. >>0756 short >0 %d sectors/track,
  5787. >>0764 long >0 start cyl %ld,
  5788. >>0770 long x %ld blocks
  5789. # Is there a boot block written 1 sector in?
  5790. >512 belong&077777777 0600407 \b, boot block present
  5791. # Joerg Jenderek: Smart Boot Manager backup file is 25 (MSDOS) or 41 (LINUX) byte header + first sectors of disk
  5792. # (http://btmgr.sourceforge.net/docs/user-guide-3.html)
  5793. 0 string SBMBAKUP_ Smart Boot Manager backup file
  5794. >9 string x \b, version %-5.5s
  5795. >>14 string =_
  5796. >>>15 string x %-.1s
  5797. >>>>16 string =_ \b.
  5798. >>>>>17 string x \b%-.1s
  5799. >>>>>>18 string =_ \b.
  5800. >>>>>>>19 string x \b%-.1s
  5801. >>>22 ubyte 0
  5802. >>>>21 ubyte x \b, from drive 0x%x
  5803. >>>22 ubyte >0
  5804. >>>>21 string x \b, from drive %s
  5805. >>>535 search/17 \x55\xAA
  5806. >>>>&-512 indirect x \b; contains
  5807. # updated by Joerg Jenderek at Nov 2012
  5808. # DOS Emulator image is 128 byte, null right padded header + harddisc image
  5809. 0 string DOSEMU\0
  5810. >0x27E leshort 0xAA55
  5811. #offset is 128
  5812. >>19 ubyte 128
  5813. >>>(19.b-1) ubyte 0x0 DOS Emulator image
  5814. >>>>7 ulelong >0 \b, %u heads
  5815. >>>>11 ulelong >0 \b, %d sectors/track
  5816. >>>>15 ulelong >0 \b, %d cylinders
  5817. >>>>128 indirect x \b; contains
  5818. # added by Joerg Jenderek at Nov 2012
  5819. # http://www.thenakedpc.com/articles/v04/08/0408-05.html
  5820. # Symantec (Peter Norton) Image.dat file consists of variable header, bootrecord, part of FAT and root directory data
  5821. 0 string PNCIHISK\0 Norton Utilities disc image data
  5822. # real x86 boot sector with jump instruction
  5823. >509 search/1026 \x55\xAA\xeb
  5824. >>&-1 indirect x \b; contains
  5825. # http://file-extension.net/seeker/file_extension_dat
  5826. 0 string PNCIUNDO Norton Disk Doctor UnDo file
  5827. #
  5828. # DOS/MBR boot sector updated by Joerg Jenderek at Sep 2007,May 2011
  5829. # for any allowed sector sizes
  5830. 30 search/481 \x55\xAA
  5831. # 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)
  5832. # DOS BPB information (70) and after DOS floppy (120) like in previous file version
  5833. !:strength +72
  5834. # for sector sizes < 512 Bytes
  5835. >11 uleshort <512
  5836. >>(11.s-2) uleshort 0xAA55 DOS/MBR boot sector
  5837. # for sector sizes with 512 or more Bytes
  5838. >0x1FE leshort 0xAA55 DOS/MBR boot sector
  5839. # keep old DOS/MBR boot sector as dummy for mbr and bootloader displaying
  5840. # only for sector sizes with 512 or more Bytes
  5841. 0x1FE leshort 0xAA55 DOS/MBR boot sector
  5842. !:strength +72
  5843. # to display information (50) before DOS BPB (strength=70) and after DOS floppy (120) like in old file version
  5844. #!:strength +21
  5845. >2 string OSBS \b, OS/BS MBR
  5846. # added by Joerg Jenderek at Feb 2013 according to http://thestarman.pcministry.com/asm/mbr/
  5847. # and http://en.wikipedia.org/wiki/Master_Boot_Record
  5848. # test for nearly all MS-DOS Master Boot Record initial program loader (IPL) is now done by
  5849. # characteristic assembler instructions: xor ax,ax;mov ss,ax;mov sp,7c00
  5850. >0 search/2 \x33\xc0\x8e\xd0\xbc\x00\x7c MS-MBR
  5851. # Microsoft Windows 95A and early ( http://thestarman.pcministry.com/asm/mbr/STDMBR.htm )
  5852. # assembler instructions: mov si,sp;push ax;pop es;push ax;pop ds;sti;cld
  5853. >>8 ubequad 0x8bf45007501ffbfc
  5854. # http://thestarman.pcministry.com/asm/mbr/200MBR.htm
  5855. >>>0x16 ubyte 0xF3 \b,DOS 2
  5856. >>>>219 regex Author\ -\ Author:
  5857. # found "David Litton" , "A Pehrsson "
  5858. >>>>>&0 string x "%s"
  5859. >>>0x16 ubyte 0xF2
  5860. # NEC MS-DOS 3.30 Rev. 3 . See http://thestarman.pcministry.com/asm/mbr/DOS33MBR.htm
  5861. # assembler instructions: mov di,077c;cmp word ptrl[di],a55a;jnz
  5862. >>>>0x22 ubequad 0xbf7c07813d5aa575 \b,NEC 3.3
  5863. # version MS-DOS 3.30 til MS-Windows 95A (WinVer=4.00.1111)
  5864. >>>>0x22 default x \b,D0S version 3.3-7.0
  5865. # error messages are printed by assembler instructions: mov si,06nn;...;int 10 (0xBEnn06;...)
  5866. # where nn is string offset varying for different languages
  5867. # "Invalid partition table" nn=0x8b for english version
  5868. >>>>>(0x49.b) string Invalid\ partition\ table english
  5869. >>>>>(0x49.b) string Ung\201ltige\ Partitionstabelle german
  5870. >>>>>(0x49.b) string Table\ de\ partition\ invalide french
  5871. >>>>>(0x49.b) string Tabela\ de\ parti\207ao\ inv\240lida portuguese
  5872. >>>>>(0x49.b) string Tabla\ de\ partici\242n\ no\ v\240lida spanish
  5873. >>>>>(0x49.b) string Tavola\ delle\ partizioni\ non\ valida italian
  5874. >>>>>0x49 ubyte >0 at offset 0x%x
  5875. >>>>>>(0x49.b) string >\0 "%s"
  5876. # "Error loading operating system" nn=0xa3 for english version
  5877. # "Fehler beim Laden des Betriebssystems" nn=0xa7 for german version
  5878. # "Erreur en chargeant syst\212me d'exploitation" nn=0xa7 for french version
  5879. # "Erro na inicializa\207ao do sistema operacional" nn=0xa7 for portuguese Brazilian version
  5880. # "Error al cargar sistema operativo" nn=0xa8 for spanish version
  5881. # "Errore durante il caricamento del sistema operativo" nn=0xae for italian version
  5882. >>>>>0x74 ubyte >0 at offset 0x%x
  5883. >>>>>>(0x74.b) string >\0 "%s"
  5884. # "Missing operating system" nn=0xc2 for english version
  5885. # "Betriebssystem fehlt" nn=0xcd for german version
  5886. # "Syst\212me d'exploitation absent" nn=0xd2 for french version
  5887. # "Sistema operacional nao encontrado" nn=0xd4 for portuguese Brazilian version
  5888. # "Falta sistema operativo" nn=0xca for spanish version
  5889. # "Sistema operativo mancante" nn=0xe2 for italian version
  5890. >>>>>0x79 ubyte >0 at offset 0x%x
  5891. >>>>>>(0x79.b) string >\0 "%s"
  5892. # Microsoft Windows 95B to XP (http://thestarman.pcministry.com/asm/mbr/95BMEMBR.htm)
  5893. # assembler instructions: push ax;pop es;push ax;pop ds;cld;mov si,7c1b
  5894. >>8 ubequad 0x5007501ffcbe1b7c
  5895. # assembler instructions: rep;movsb;retf;mov si,07be;mov cl,04
  5896. >>>24 ubequad 0xf3a4cbbebe07b104 9M
  5897. # "Invalid partition table" nn=0x10F for english version
  5898. # "Ungültige Partitionstabelle" nn=0x10F for german version
  5899. # "Table de partition erronée" nn=0x10F for french version
  5900. # "\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
  5901. >>>>(0x3C.b+0x0FF) string Invalid\ partition\ table english
  5902. >>>>(0x3C.b+0x0FF) string Ung\201ltige\ Partitionstabelle german
  5903. >>>>(0x3C.b+0x0FF) string Table\ de\ partition\ erron\202e french
  5904. >>>>(0x3C.b+0x0FF) string \215\245\257\340\240\242\250\253\354\255\240\357\ \342\240\241\253\250\346\240 russian
  5905. >>>>0x3C ubyte x at offset 0x%x+0xFF
  5906. >>>>(0x3C.b+0x0FF) string >\0 "%s"
  5907. # "Error loading operating system" nn=0x127 for english version
  5908. # "Fehler beim Laden des Betriebssystems" nn=0x12b for german version
  5909. # "Erreur lors du chargement du système d'exploitation" nn=0x12a for french version
  5910. # "\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
  5911. >>>>0xBD ubyte x at offset 0x1%x
  5912. >>>>(0xBD.b+0x100) string >\0 "%s"
  5913. # "Missing operating system" nn=0x146 for english version
  5914. # "Betriebssystem fehlt" nn=0x151 for german version
  5915. # "Système d'exploitation manquant" nn=0x15e for french version
  5916. # "\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
  5917. >>>>0xA9 ubyte x at offset 0x1%x
  5918. >>>>(0xA9.b+0x100) string >\0 "%s"
  5919. # http://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm
  5920. # assembler instructions: rep;movsb;retf;mov BP,07be;mov cl,04
  5921. >>>24 ubequad 0xf3a4cbbdbe07b104 XP
  5922. # where xxyyzz are lower bits from offsets of error messages varying for different languages
  5923. >>>>0x1B4 ubelong&0x00FFFFFF 0x002c4463 english
  5924. >>>>0x1B4 ubelong&0x00FFFFFF 0x002c486e german
  5925. # "Invalid partition table" xx=0x12C for english version
  5926. # "Ungültige Partitionstabelle" xx=0x12C for german version
  5927. >>>>0x1b5 ubyte >0 at offset 0x1%x
  5928. >>>>(0x1b5.b+0x100) string >\0 "%s"
  5929. # "Error loading operating system" yy=0x144 for english version
  5930. # "Fehler beim Laden des Betriebssystems" yy=0x148 for german version
  5931. >>>>0x1b6 ubyte >0 at offset 0x1%x
  5932. >>>>(0x1b6.b+0x100) string >\0 "%s"
  5933. # "Missing operating system" zz=0x163 for english version
  5934. # "Betriebssystem nicht vorhanden" zz=0x16e for german version
  5935. >>>>0x1b7 ubyte >0 at offset 0x1%x
  5936. >>>>(0x1b7.b+0x100) string >\0 "%s"
  5937. # Microsoft Windows Vista or 7
  5938. # assembler instructions: ..;mov ds,ax;mov si,7c00;mov di,..00
  5939. >>8 ubequad 0xc08ed8be007cbf00
  5940. # Microsoft Windows Vista (http://thestarman.pcministry.com/asm/mbr/VistaMBR.htm)
  5941. # assembler instructions: jnz 0729;cmp ebx,"TCPA"
  5942. >>>0xEC ubequad 0x753b6681fb544350 Vista
  5943. # where xxyyzz are lower bits from offsets of error messages varying for different languages
  5944. >>>>0x1B4 ubelong&0x00FFFFFF 0x00627a99 english
  5945. #>>>>0x1B4 ubelong&0x00FFFFFF ? german
  5946. # "Invalid partition table" xx=0x162 for english version
  5947. # "Ungültige Partitionstabelle" xx=0x1?? for german version
  5948. >>>>0x1b5 ubyte >0 at offset 0x1%x
  5949. >>>>(0x1b5.b+0x100) string >\0 "%s"
  5950. # "Error loading operating system" yy=0x17a for english version
  5951. # "Fehler beim Laden des Betriebssystems" yy= 0x1?? for german version
  5952. >>>>0x1b6 ubyte >0 at offset 0x1%x
  5953. >>>>(0x1b6.b+0x100) string >\0 "%s"
  5954. # "Missing operating system" zz=0x199 for english version
  5955. # "Betriebssystem nicht vorhanden" zz=0x1?? for german version
  5956. >>>>0x1b7 ubyte >0 at offset 0x1%x
  5957. >>>>(0x1b7.b+0x100) string >\0 "%s"
  5958. # Microsoft Windows 7 (http://thestarman.pcministry.com/asm/mbr/W7MBR.htm)
  5959. # assembler instructions: cmp ebx,"TCPA";cmp
  5960. >>>0xEC ubequad 0x6681fb5443504175 Windows 7
  5961. # where xxyyzz are lower bits from offsets of error messages varying for different languages
  5962. >>>>0x1B4 ubelong&0x00FFFFFF 0x00637b9a english
  5963. #>>>>0x1B4 ubelong&0x00FFFFFF ? german
  5964. # "Invalid partition table" xx=0x163 for english version
  5965. # "Ungültige Partitionstabelle" xx=0x1?? for german version
  5966. >>>>0x1b5 ubyte >0 at offset 0x1%x
  5967. >>>>(0x1b5.b+0x100) string >\0 "%s"
  5968. # "Error loading operating system" yy=0x17b for english version
  5969. # "Fehler beim Laden des Betriebssystems" yy=0x1?? for german version
  5970. >>>>0x1b6 ubyte >0 at offset 0x1%x
  5971. >>>>(0x1b6.b+0x100) string >\0 "%s"
  5972. # "Missing operating system" zz=0x19a for english version
  5973. # "Betriebssystem nicht vorhanden" zz=0x1?? for german version
  5974. >>>>0x1b7 ubyte >0 at offset 0x1%x
  5975. >>>>(0x1b7.b+0x100) string >\0 "%s"
  5976. # http://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm#DiskSigs
  5977. # http://en.wikipedia.org/wiki/MBR_disk_signature#ID
  5978. >>0x1b8 ulelong >0 \b, disk signature 0x%-.4x
  5979. # driveID/timestamp for Win 95B,98,98SE and ME. See http://thestarman.pcministry.com/asm/mbr/mystery.htm
  5980. >>0xDA uleshort 0
  5981. >>>0xDC ulelong >0 \b, created
  5982. # physical drive number (0x80-0xFF) when the Windows wrote that byte to the drive
  5983. >>>>0xDC ubyte x with driveID 0x%x
  5984. # hours, minutes and seconds
  5985. >>>>0xDf ubyte x at %x
  5986. >>>>0xDe ubyte x \b:%x
  5987. >>>>0xDd ubyte x \b:%x
  5988. # special case for Microsoft MS-DOS 3.21 spanish
  5989. # assembler instructions: cli;mov $0x30,%ax;mov %ax,%ss;mov
  5990. >0 ubequad 0xfab830008ed0bc00
  5991. # assembler instructions: $0x1f00,%sp;mov $0x80cb,%di;add %cl,(%bx,%si);in (%dx),%ax;mov
  5992. >>8 ubequad 0x1fbfcb800008ed8 MS-MBR,D0S version 3.21 spanish
  5993. # Microsoft MBR IPL end
  5994. # dr-dos with some upper-, lowercase variants
  5995. >0x9D string Invalid\ partition\ table$
  5996. >>181 string No\ Operating\ System$
  5997. >>>201 string Operating\ System\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
  5998. >0x9D string Invalid\ partition\ table$
  5999. >>181 string No\ operating\ system$
  6000. >>>201 string Operating\ system\ load\ error$ \b, DR-DOS MBR, Version 7.01 to 7.03
  6001. >342 string Invalid\ partition\ table$
  6002. >>366 string No\ operating\ system$
  6003. >>>386 string Operating\ system\ load\ error$ \b, DR-DOS MBR, version 7.01 to 7.03
  6004. >295 string NEWLDR\0
  6005. >>302 string Bad\ PT\ $
  6006. >>>310 string No\ OS\ $
  6007. >>>>317 string OS\ load\ err$
  6008. >>>>>329 string Moved\ or\ missing\ IBMBIO.LDR\n\r
  6009. >>>>>>358 string Press\ any\ key\ to\ continue.\n\r$
  6010. >>>>>>>387 string Copyright\ (c)\ 1984,1998
  6011. >>>>>>>>411 string Caldera\ Inc.\0 \b, DR-DOS MBR (IBMBIO.LDR)
  6012. #
  6013. # tests for different MS-DOS Master Boot Records (MBR) moved and merged
  6014. #
  6015. #>0x145 string Default:\ F \b, FREE-DOS MBR
  6016. #>0x14B string Default:\ F \b, FREE-DOS 1.0 MBR
  6017. >0x145 search/7 Default:\ F \b, FREE-DOS MBR
  6018. #>>313 string F0\ .\ .\ .
  6019. #>>>322 string disk\ 1
  6020. #>>>>382 string FAT3
  6021. >64 string no\ active\ partition\ found
  6022. >>96 string read\ error\ while\ reading\ drive \b, FREE-DOS Beta 0.9 MBR
  6023. # Ranish Partition Manager http://www.ranish.com/part/
  6024. >387 search/4 \0\ Error!\r
  6025. >>378 search/7 Virus!
  6026. >>>397 search/4 Booting\
  6027. >>>>408 search/4 HD1/\0 \b, Ranish MBR (
  6028. >>>>>416 string Writing\ changes... \b2.37
  6029. >>>>>>438 ubyte x \b,0x%x dots
  6030. >>>>>>440 ubyte >0 \b,virus check
  6031. >>>>>>441 ubyte >0 \b,partition %c
  6032. #2.38,2.42,2.44
  6033. >>>>>416 string !Writing\ changes... \b
  6034. >>>>>>418 ubyte 1 \bvirus check,
  6035. >>>>>>419 ubyte x \b0x%x seconds
  6036. >>>>>>420 ubyte&0x0F >0 \b,partition
  6037. >>>>>>>420 ubyte&0x0F <5 \b %x
  6038. >>>>>>>420 ubyte&0x0F 0Xf \b ask
  6039. >>>>>420 ubyte x \b)
  6040. #
  6041. # SYSLINUX MBR moved
  6042. # http://www.acronis.de/
  6043. >362 string MBR\ Error\ \0\r
  6044. >>376 string ress\ any\ key\ to\
  6045. >>>392 string boot\ from\ floppy...\0 \b, Acronis MBR
  6046. # added by Joerg Jenderek
  6047. # http://www.visopsys.org/
  6048. # http://partitionlogic.org.uk/
  6049. >309 string No\ bootable\ partition\ found\r
  6050. >>339 string I/O\ Error\ reading\ boot\ sector\r \b, Visopsys MBR
  6051. >349 string No\ bootable\ partition\ found\r
  6052. >>379 string I/O\ Error\ reading\ boot\ sector\r \b, simple Visopsys MBR
  6053. # bootloader, bootmanager
  6054. >0x40 string SBML
  6055. # label with 11 characters of FAT 12 bit filesystem
  6056. >>43 string SMART\ BTMGR
  6057. >>>430 string SBMK\ Bad!\r \b, Smart Boot Manager
  6058. # OEM-ID not always "SBM"
  6059. #>>>>3 strings SBM
  6060. >>>>6 string >\0 \b, version %s
  6061. >382 string XOSLLOADXCF \b, eXtended Operating System Loader
  6062. >6 string LILO \b, LInux i386 boot LOader
  6063. >>120 string LILO \b, version 22.3.4 SuSe
  6064. >>172 string LILO \b, version 22.5.8 Debian
  6065. # updated by Joerg Jenderek at Oct 2008
  6066. # variables according to grub-0.97/stage1/stage1.S or
  6067. # http://www.gnu.org/software/grub/manual/grub.html#Embedded-data
  6068. # usual values are marked with comments to get only informations of strange GRUB loaders
  6069. >342 search/60 \0Geom\0
  6070. #>0 ulelong x %x=0x009048EB , 0x2a9048EB 0
  6071. >>0x41 ubyte <2
  6072. >>>0x3E ubyte >2 \b; GRand Unified Bootloader
  6073. # 0x3 for 0.5.95,0.93,0.94,0.96 0x4 for 1.90
  6074. >>>>0x3E ubyte x \b, stage1 version 0x%x
  6075. #If it is 0xFF, use a drive passed by BIOS
  6076. >>>>0x40 ubyte <0xFF \b, boot drive 0x%x
  6077. # in most case 0,1,0x2e for GRUB 0.5.95
  6078. >>>>0x41 ubyte >0 \b, LBA flag 0x%x
  6079. >>>>0x42 uleshort <0x8000 \b, stage2 address 0x%x
  6080. #>>>>0x42 uleshort =0x8000 \b, stage2 address 0x%x (usual)
  6081. >>>>0x42 uleshort >0x8000 \b, stage2 address 0x%x
  6082. #>>>>0x44 ulelong =1 \b, 1st sector stage2 0x%x (default)
  6083. >>>>0x44 ulelong >1 \b, 1st sector stage2 0x%x
  6084. >>>>0x48 uleshort <0x800 \b, stage2 segment 0x%x
  6085. #>>>>0x48 uleshort =0x800 \b, stage2 segment 0x%x (usual)
  6086. >>>>0x48 uleshort >0x800 \b, stage2 segment 0x%x
  6087. >>>>402 string Geom\0Hard\ Disk\0Read\0\ Error\0
  6088. >>>>>394 string stage1 \b, GRUB version 0.5.95
  6089. >>>>382 string Geom\0Hard\ Disk\0Read\0\ Error\0
  6090. >>>>>376 string GRUB\ \0 \b, GRUB version 0.93 or 1.94
  6091. >>>>383 string Geom\0Hard\ Disk\0Read\0\ Error\0
  6092. >>>>>377 string GRUB\ \0 \b, GRUB version 0.94
  6093. >>>>385 string Geom\0Hard\ Disk\0Read\0\ Error\0
  6094. >>>>>379 string GRUB\ \0 \b, GRUB version 0.95 or 0.96
  6095. >>>>391 string Geom\0Hard\ Disk\0Read\0\ Error\0
  6096. >>>>>385 string GRUB\ \0 \b, GRUB version 0.97
  6097. #unkown version
  6098. >>>343 string Geom\0Read\0\ Error\0
  6099. >>>>321 string Loading\ stage1.5 \b, GRUB version x.y
  6100. >>>380 string Geom\0Hard\ Disk\0Read\0\ Error\0
  6101. >>>>374 string GRUB\ \0 \b, GRUB version n.m
  6102. # SYSLINUX bootloader moved
  6103. >395 string chksum\0\ ERROR!\0 \b, Gujin bootloader
  6104. # http://www.bcdwb.de/bcdw/index_e.htm
  6105. >3 string BCDL
  6106. >>498 string BCDL\ \ \ \ BIN \b, Bootable CD Loader (1.50Z)
  6107. # mbr partition table entries updated by Joerg Jenderek at Sep 2013
  6108. # skip Norton Utilities disc image data
  6109. >3 string !IHISK
  6110. # skip Linux style boot sector starting with assember instructions mov 0x7c0,ax;
  6111. >>0 belong !0xb8c0078e
  6112. # not Linux kernel
  6113. >>>514 string !HdrS
  6114. # not BeOS
  6115. >>>>422 string !Be\ Boot\ Loader
  6116. # jump over BPB instruction implies DOS bootsector or AdvanceMAME mbr
  6117. >>>>>0 ubelong&0xFD000000 =0xE9000000
  6118. # AdvanceMAME mbr
  6119. >>>>>>(1.b+2) ubequad 0xfa31c08ed88ec08e
  6120. >>>>>>>446 use partition-table
  6121. # mbr, Norton Utilities disc image data, or 2nd,etc. sector of x86 bootloader
  6122. >>>>>0 ubelong&0xFD000000 !0xE9000000
  6123. # skip FSInfosector
  6124. >>>>>>0 string !RRaA
  6125. # skip 3rd sector of MS x86 bootloader with assember instructions cli;MOVZX EAX,BYTE PTR [BP+10];MOV ECX,
  6126. # http://thestarman.pcministry.com/asm/mbr/MSWIN41.htm
  6127. >>>>>>>0 ubequad !0xfa660fb64610668b
  6128. # skip 13rd sector of MS x86 bootloader
  6129. >>>>>>>>0 ubequad !0x660fb64610668b4e
  6130. # skip sector starting with DOS new line
  6131. >>>>>>>>>0 string !\r\n
  6132. # allowed active flag 0,80h-FFh
  6133. >>>>>>>>>>446 ubyte 0
  6134. >>>>>>>>>>>446 use partition-table
  6135. >>>>>>>>>>446 ubyte >0x7F
  6136. >>>>>>>>>>>446 use partition-table
  6137. # TODO: test for extended bootrecord (ebr) moved and merged with mbr partition table entries
  6138. # mbr partition table entries end
  6139. # http://www.acronis.de/
  6140. #FAT label=ACRONIS\ SZ
  6141. #OEM-ID=BOOTWIZ0
  6142. >442 string Non-system\ disk,\
  6143. >>459 string press\ any\ key...\x7\0 \b, Acronis Startup Recovery Loader
  6144. # updated by Joerg Jenderek at Nov 2012
  6145. # DOS names like F11.SYS or BOOTWIZ.SYS are 8 right space padded bytes+3 bytes
  6146. >>>477 ubyte&0xDF >0
  6147. >>>>477 string x \b %-.3s
  6148. >>>>>480 ubyte&0xDF >0
  6149. >>>>>>480 string x \b%-.4s
  6150. >>>>>>>484 ubyte&0xDF >0
  6151. >>>>>>>>484 string x \b%-.1s
  6152. >>>>485 ubyte&0xDF >0
  6153. >>>>>485 string x \b.%-.3s
  6154. #
  6155. >185 string FDBOOT\ Version\
  6156. >>204 string \rNo\ Systemdisk.\
  6157. >>>220 string Booting\ from\ harddisk.\n\r
  6158. >>>245 string Cannot\ load\ from\ harddisk.\n\r
  6159. >>>>273 string Insert\ Systemdisk\
  6160. >>>>>291 string and\ press\ any\ key.\n\r \b, FDBOOT harddisk Bootloader
  6161. >>>>>>200 string >\0 \b, version %-3s
  6162. >242 string Bootsector\ from\ C.H.\ Hochst\204
  6163. # http://freecode.com/projects/dosfstools dosfstools-n.m/src/mkdosfs.c
  6164. # updated by Joerg Jenderek at Nov 2012. Use search directive with offset instead of string
  6165. # skip name "C.H. Hochstaetter" partly because it is sometimes written without umlaut
  6166. >242 search/127 Bootsector\ from\ C.H.\ Hochst
  6167. >>278 search/127 No\ Systemdisk.\ Booting\ from\ harddisk
  6168. # followed by variants with point,CR-NL or NL-CR
  6169. >>>208 search/261 Cannot\ load\ from\ harddisk.
  6170. # followed by variants CR-NL or NL-CR
  6171. >>>>236 search/235 Insert\ Systemdisk\ and\ press\ any\ key.
  6172. # followed by variants with point,CR-NL or NL-CR
  6173. >>>>>180 search/96 Disk\ formatted\ with\ WinImage\ \b, WinImage harddisk Bootloader
  6174. # followed by string like "6.50 (c) 1993-2004 Gilles Vollant"
  6175. >>>>>>&0 string x \b, version %-4.4s
  6176. >(1.b+2) ubyte 0xe
  6177. >>(1.b+3) ubyte 0x1f
  6178. >>>(1.b+4) ubyte 0xbe
  6179. # message offset found at (1.b+5) is 0x77 for FAT32 or 0x5b for others
  6180. >>>>(1.b+5) ubyte&0xd3 0x53
  6181. >>>>>(1.b+6) ubyte 0x7c
  6182. # assembler instructions: lodsb;and al,al;jz 0xb;push si;mov ah,
  6183. >>>>>>(1.b+7) ubyte 0xac
  6184. >>>>>>>(1.b+8) ubyte 0x22
  6185. >>>>>>>>(1.b+9) ubyte 0xc0
  6186. >>>>>>>>>(1.b+10) ubyte 0x74
  6187. >>>>>>>>>>(1.b+11) ubyte 0x0b
  6188. >>>>>>>>>>>(1.b+12) ubyte 0x56
  6189. >>>>>>>>>>>>(1.b+13) ubyte 0xb4 \b, mkdosfs boot message display
  6190. # FAT1X version
  6191. >>>>>>>>>>>>>(1.b+5) ubyte 0x5b
  6192. >>>>>>>>>>>>>>0x5b string >\0 "%-s"
  6193. # FAT32 version
  6194. >>>>>>>>>>>>>(1.b+5) ubyte 0x77
  6195. >>>>>>>>>>>>>>0x77 string >\0 "%-s"
  6196. >214 string Please\ try\ to\ install\ FreeDOS\ \b, DOS Emulator boot message display
  6197. #>>244 string from\ dosemu-freedos-*-bin.tgz\r
  6198. #>>>170 string Sorry,\ could\ not\ load\ an\
  6199. #>>>>195 string operating\ system.\r\n
  6200. #
  6201. >103 string This\ is\ not\ a\ bootable\ disk.\
  6202. >>132 string Please\ insert\ a\ bootable\
  6203. >>>157 string floppy\ and\r\n
  6204. >>>>169 string press\ any\ key\ to\ try\ again...\r \b, FREE-DOS message display
  6205. #
  6206. >66 string Solaris\ Boot\ Sector
  6207. >>99 string Incomplete\ MDBoot\ load.
  6208. >>>89 string Version \b, Sun Solaris Bootloader
  6209. >>>>97 byte x version %c
  6210. #
  6211. >408 string OS/2\ !!\ SYS01475\r\0
  6212. >>429 string OS/2\ !!\ SYS02025\r\0
  6213. >>>450 string OS/2\ !!\ SYS02027\r\0
  6214. >>>469 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp bootloader
  6215. #
  6216. >409 string OS/2\ !!\ SYS01475\r\0
  6217. >>430 string OS/2\ !!\ SYS02025\r\0
  6218. >>>451 string OS/2\ !!\ SYS02027\r\0
  6219. >>>470 string OS2BOOT\ \ \ \ \b, IBM OS/2 Warp Bootloader
  6220. >112 string This\ disk\ is\ not\ bootable\r
  6221. >>142 string If\ you\ wish\ to\ make\ it\ bootable
  6222. >>>176 string run\ the\ DOS\ program\ SYS\
  6223. >>>200 string after\ the\r
  6224. >>>>216 string system\ has\ been\ loaded\r\n
  6225. >>>>>242 string Please\ insert\ a\ DOS\ diskette\
  6226. >>>>>271 string into\r\n\ the\ drive\ and\
  6227. >>>>>>292 string strike\ any\ key...\0 \b, IBM OS/2 Warp message display
  6228. # XP
  6229. >430 string NTLDR\ is\ missing\xFF\r\n
  6230. >>449 string Disk\ error\xFF\r\n
  6231. >>>462 string Press\ any\ key\ to\ restart\r \b, Microsoft Windows XP Bootloader
  6232. # DOS names like NTLDR,CMLDR,$LDR$ are 8 right space padded bytes+3 bytes
  6233. >>>>417 ubyte&0xDF >0
  6234. >>>>>417 string x %-.5s
  6235. >>>>>>422 ubyte&0xDF >0
  6236. >>>>>>>422 string x \b%-.3s
  6237. >>>>>425 ubyte&0xDF >0
  6238. >>>>>>425 string >\ \b.%-.3s
  6239. #
  6240. >>>>371 ubyte >0x20
  6241. >>>>>368 ubyte&0xDF >0
  6242. >>>>>>368 string x %-.5s
  6243. >>>>>>>373 ubyte&0xDF >0
  6244. >>>>>>>>373 string x \b%-.3s
  6245. >>>>>>376 ubyte&0xDF >0
  6246. >>>>>>>376 string x \b.%-.3s
  6247. #
  6248. >430 string NTLDR\ nicht\ gefunden\xFF\r\n
  6249. >>453 string Datentr\204gerfehler\xFF\r\n
  6250. >>>473 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (german)
  6251. >>>>417 ubyte&0xDF >0
  6252. >>>>>417 string x %-.5s
  6253. >>>>>>422 ubyte&0xDF >0
  6254. >>>>>>>422 string x \b%-.3s
  6255. >>>>>425 ubyte&0xDF >0
  6256. >>>>>>425 string >\ \b.%-.3s
  6257. # offset variant
  6258. >>>>379 string \0
  6259. >>>>>368 ubyte&0xDF >0
  6260. >>>>>>368 string x %-.5s
  6261. >>>>>>>373 ubyte&0xDF >0
  6262. >>>>>>>>373 string x \b%-.3s
  6263. #
  6264. >430 string NTLDR\ fehlt\xFF\r\n
  6265. >>444 string Datentr\204gerfehler\xFF\r\n
  6266. >>>464 string Neustart\ mit\ beliebiger\ Taste\r \b, Microsoft Windows XP Bootloader (2.german)
  6267. >>>>417 ubyte&0xDF >0
  6268. >>>>>417 string x %-.5s
  6269. >>>>>>422 ubyte&0xDF >0
  6270. >>>>>>>422 string x \b%-.3s
  6271. >>>>>425 ubyte&0xDF >0
  6272. >>>>>>425 string >\ \b.%-.3s
  6273. # variant
  6274. >>>>371 ubyte >0x20
  6275. >>>>>368 ubyte&0xDF >0
  6276. >>>>>>368 string x %-.5s
  6277. >>>>>>>373 ubyte&0xDF >0
  6278. >>>>>>>>373 string x \b%-.3s
  6279. >>>>>>376 ubyte&0xDF >0
  6280. >>>>>>>376 string x \b.%-.3s
  6281. #
  6282. >430 string NTLDR\ fehlt\xFF\r\n
  6283. >>444 string Medienfehler\xFF\r\n
  6284. >>>459 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (3.german)
  6285. >>>>371 ubyte >0x20
  6286. >>>>>368 ubyte&0xDF >0
  6287. >>>>>>368 string x %-.5s
  6288. >>>>>>>373 ubyte&0xDF >0
  6289. >>>>>>>>373 string x \b%-.3s
  6290. >>>>>>376 ubyte&0xDF >0
  6291. >>>>>>>376 string x \b.%-.3s
  6292. # variant
  6293. >>>>417 ubyte&0xDF >0
  6294. >>>>>417 string x %-.5s
  6295. >>>>>>422 ubyte&0xDF >0
  6296. >>>>>>>422 string x \b%-.3s
  6297. >>>>>425 ubyte&0xDF >0
  6298. >>>>>>425 string >\ \b.%-.3s
  6299. #
  6300. >430 string Datentr\204ger\ entfernen\xFF\r\n
  6301. >>454 string Medienfehler\xFF\r\n
  6302. >>>469 string Neustart:\ Taste\ dr\201cken\r \b, Microsoft Windows XP Bootloader (4.german)
  6303. >>>>379 string \0
  6304. >>>>>368 ubyte&0xDF >0
  6305. >>>>>>368 string x %-.5s
  6306. >>>>>>>373 ubyte&0xDF >0
  6307. >>>>>>>>373 string x \b%-.3s
  6308. >>>>>>376 ubyte&0xDF >0
  6309. >>>>>>>376 string x \b.%-.3s
  6310. # variant
  6311. >>>>417 ubyte&0xDF >0
  6312. >>>>>417 string x %-.5s
  6313. >>>>>>422 ubyte&0xDF >0
  6314. >>>>>>>422 string x \b%-.3s
  6315. >>>>>425 ubyte&0xDF >0
  6316. >>>>>>425 string >\ \b.%-.3s
  6317. #
  6318. #>3 string NTFS\ \ \ \
  6319. >389 string Fehler\ beim\ Lesen\
  6320. >>407 string des\ Datentr\204gers
  6321. >>>426 string NTLDR\ fehlt
  6322. >>>>440 string NTLDR\ ist\ komprimiert
  6323. >>>>>464 string Neustart\ mit\ Strg+Alt+Entf\r \b, Microsoft Windows XP Bootloader NTFS (german)
  6324. #>3 string NTFS\ \ \ \
  6325. >313 string A\ disk\ read\ error\ occurred.\r
  6326. >>345 string A\ kernel\ file\ is\ missing\
  6327. >>>370 string from\ the\ disk.\r
  6328. >>>>484 string NTLDR\ is\ compressed
  6329. >>>>>429 string Insert\ a\ system\ diskette\
  6330. >>>>>>454 string and\ restart\r\nthe\ system.\r \b, Microsoft Windows XP Bootloader NTFS
  6331. # DOS loader variants different languages,offsets
  6332. >472 ubyte&0xDF >0
  6333. >>389 string Invalid\ system\ disk\xFF\r\n
  6334. >>>411 string Disk\ I/O\ error
  6335. >>>>428 string Replace\ the\ disk,\ and\
  6336. >>>>>455 string press\ any\ key \b, Microsoft Windows 98 Bootloader
  6337. #IO.SYS
  6338. >>>>>>472 ubyte&0xDF >0
  6339. >>>>>>>472 string x \b %-.2s
  6340. >>>>>>>>474 ubyte&0xDF >0
  6341. >>>>>>>>>474 string x \b%-.5s
  6342. >>>>>>>>>>479 ubyte&0xDF >0
  6343. >>>>>>>>>>>479 string x \b%-.1s
  6344. >>>>>>>480 ubyte&0xDF >0
  6345. >>>>>>>>480 string x \b.%-.3s
  6346. #MSDOS.SYS
  6347. >>>>>>>483 ubyte&0xDF >0 \b+
  6348. >>>>>>>>483 string x \b%-.5s
  6349. >>>>>>>>>488 ubyte&0xDF >0
  6350. >>>>>>>>>>488 string x \b%-.3s
  6351. >>>>>>>>491 ubyte&0xDF >0
  6352. >>>>>>>>>491 string x \b.%-.3s
  6353. #
  6354. >>390 string Invalid\ system\ disk\xFF\r\n
  6355. >>>412 string Disk\ I/O\ error\xFF\r\n
  6356. >>>>429 string Replace\ the\ disk,\ and\
  6357. >>>>>451 string then\ press\ any\ key\r \b, Microsoft Windows 98 Bootloader
  6358. >>388 string Ungueltiges\ System\ \xFF\r\n
  6359. >>>410 string E/A-Fehler\ \ \ \ \xFF\r\n
  6360. >>>>427 string Datentraeger\ wechseln\ und\
  6361. >>>>>453 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (german)
  6362. #WINBOOT.SYS only not spaces (0xDF)
  6363. >>>>>>497 ubyte&0xDF >0
  6364. >>>>>>>497 string x %-.5s
  6365. >>>>>>>>502 ubyte&0xDF >0
  6366. >>>>>>>>>502 string x \b%-.1s
  6367. >>>>>>>>>>503 ubyte&0xDF >0
  6368. >>>>>>>>>>>503 string x \b%-.1s
  6369. >>>>>>>>>>>>504 ubyte&0xDF >0
  6370. >>>>>>>>>>>>>504 string x \b%-.1s
  6371. >>>>>>505 ubyte&0xDF >0
  6372. >>>>>>>505 string x \b.%-.3s
  6373. #IO.SYS
  6374. >>>>>>472 ubyte&0xDF >0 or
  6375. >>>>>>>472 string x \b %-.2s
  6376. >>>>>>>>474 ubyte&0xDF >0
  6377. >>>>>>>>>474 string x \b%-.5s
  6378. >>>>>>>>>>479 ubyte&0xDF >0
  6379. >>>>>>>>>>>479 string x \b%-.1s
  6380. >>>>>>>480 ubyte&0xDF >0
  6381. >>>>>>>>480 string x \b.%-.3s
  6382. #MSDOS.SYS
  6383. >>>>>>>483 ubyte&0xDF >0 \b+
  6384. >>>>>>>>483 string x \b%-.5s
  6385. >>>>>>>>>488 ubyte&0xDF >0
  6386. >>>>>>>>>>488 string x \b%-.3s
  6387. >>>>>>>>491 ubyte&0xDF >0
  6388. >>>>>>>>>491 string x \b.%-.3s
  6389. #
  6390. >>390 string Ungueltiges\ System\ \xFF\r\n
  6391. >>>412 string E/A-Fehler\ \ \ \ \xFF\r\n
  6392. >>>>429 string Datentraeger\ wechseln\ und\
  6393. >>>>>455 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (German)
  6394. #WINBOOT.SYS only not spaces (0xDF)
  6395. >>>>>>497 ubyte&0xDF >0
  6396. >>>>>>>497 string x %-.7s
  6397. >>>>>>>>504 ubyte&0xDF >0
  6398. >>>>>>>>>504 string x \b%-.1s
  6399. >>>>>>505 ubyte&0xDF >0
  6400. >>>>>>>505 string x \b.%-.3s
  6401. #IO.SYS
  6402. >>>>>>472 ubyte&0xDF >0 or
  6403. >>>>>>>472 string x \b %-.2s
  6404. >>>>>>>>474 ubyte&0xDF >0
  6405. >>>>>>>>>474 string x \b%-.6s
  6406. >>>>>>>480 ubyte&0xDF >0
  6407. >>>>>>>>480 string x \b.%-.3s
  6408. #MSDOS.SYS
  6409. >>>>>>>483 ubyte&0xDF >0 \b+
  6410. >>>>>>>>483 string x \b%-.5s
  6411. >>>>>>>>>488 ubyte&0xDF >0
  6412. >>>>>>>>>>488 string x \b%-.3s
  6413. >>>>>>>>491 ubyte&0xDF >0
  6414. >>>>>>>>>491 string x \b.%-.3s
  6415. #
  6416. >>389 string Ungueltiges\ System\ \xFF\r\n
  6417. >>>411 string E/A-Fehler\ \ \ \ \xFF\r\n
  6418. >>>>428 string Datentraeger\ wechseln\ und\
  6419. >>>>>454 string Taste\ druecken\r \b, Microsoft Windows 95/98/ME Bootloader (GERMAN)
  6420. # DOS names like IO.SYS,WINBOOT.SYS,MSDOS.SYS,WINBOOT.INI are 8 right space padded bytes+3 bytes
  6421. >>>>>>472 string x %-.2s
  6422. >>>>>>>474 ubyte&0xDF >0
  6423. >>>>>>>>474 string x \b%-.5s
  6424. >>>>>>>>479 ubyte&0xDF >0
  6425. >>>>>>>>>479 string x \b%-.1s
  6426. >>>>>>480 ubyte&0xDF >0
  6427. >>>>>>>480 string x \b.%-.3s
  6428. >>>>>>483 ubyte&0xDF >0 \b+
  6429. >>>>>>>483 string x \b%-.5s
  6430. >>>>>>>488 ubyte&0xDF >0
  6431. >>>>>>>>488 string x \b%-.2s
  6432. >>>>>>>>490 ubyte&0xDF >0
  6433. >>>>>>>>>490 string x \b%-.1s
  6434. >>>>>>>491 ubyte&0xDF >0
  6435. >>>>>>>>491 string x \b.%-.3s
  6436. >479 ubyte&0xDF >0
  6437. >>416 string Kein\ System\ oder\
  6438. >>>433 string Laufwerksfehler
  6439. >>>>450 string Wechseln\ und\ Taste\ dr\201cken \b, Microsoft DOS Bootloader (german)
  6440. #IO.SYS
  6441. >>>>>479 string x \b %-.2s
  6442. >>>>>>481 ubyte&0xDF >0
  6443. >>>>>>>481 string x \b%-.6s
  6444. >>>>>487 ubyte&0xDF >0
  6445. >>>>>>487 string x \b.%-.3s
  6446. #MSDOS.SYS
  6447. >>>>>>490 ubyte&0xDF >0 \b+
  6448. >>>>>>>490 string x \b%-.5s
  6449. >>>>>>>>495 ubyte&0xDF >0
  6450. >>>>>>>>>495 string x \b%-.3s
  6451. >>>>>>>498 ubyte&0xDF >0
  6452. >>>>>>>>498 string x \b.%-.3s
  6453. #
  6454. >376 search/41 Non-System\ disk\ or\
  6455. >>395 search/41 disk\ error\r
  6456. >>>407 search/41 Replace\ and\
  6457. >>>>419 search/41 press\ \b,
  6458. >>>>419 search/41 strike\ \b, old
  6459. >>>>426 search/41 any\ key\ when\ ready\r MS or PC-DOS bootloader
  6460. #449 Disk\ Boot\ failure\r MS 3.21
  6461. #466 Boot\ Failure\r MS 3.30
  6462. >>>>>468 search/18 \0
  6463. #IO.SYS,IBMBIO.COM
  6464. >>>>>>&0 string x \b %-.2s
  6465. >>>>>>>&-20 ubyte&0xDF >0
  6466. >>>>>>>>&-1 string x \b%-.4s
  6467. >>>>>>>>>&-16 ubyte&0xDF >0
  6468. >>>>>>>>>>&-1 string x \b%-.2s
  6469. >>>>>>&8 ubyte&0xDF >0 \b.
  6470. >>>>>>>&-1 string x \b%-.3s
  6471. #MSDOS.SYS,IBMDOS.COM
  6472. >>>>>>&11 ubyte&0xDF >0 \b+
  6473. >>>>>>>&-1 string x \b%-.5s
  6474. >>>>>>>>&-6 ubyte&0xDF >0
  6475. >>>>>>>>>&-1 string x \b%-.1s
  6476. >>>>>>>>>>&-5 ubyte&0xDF >0
  6477. >>>>>>>>>>>&-1 string x \b%-.2s
  6478. >>>>>>>&7 ubyte&0xDF >0 \b.
  6479. >>>>>>>>&-1 string x \b%-.3s
  6480. >441 string Cannot\ load\ from\ harddisk.\n\r
  6481. >>469 string Insert\ Systemdisk\
  6482. >>>487 string and\ press\ any\ key.\n\r \b, MS (2.11) DOS bootloader
  6483. #>43 string \224R-LOADER\ \ SYS =label
  6484. >54 string SYS
  6485. >>324 string VASKK
  6486. >>>495 string NEWLDR\0 \b, DR-DOS Bootloader (LOADER.SYS)
  6487. #
  6488. >98 string Press\ a\ key\ to\ retry\0\r
  6489. >>120 string Cannot\ find\ file\ \0\r
  6490. >>>139 string Disk\ read\ error\0\r
  6491. >>>>156 string Loading\ ...\0 \b, DR-DOS (3.41) Bootloader
  6492. #DRBIOS.SYS
  6493. >>>>>44 ubyte&0xDF >0
  6494. >>>>>>44 string x \b %-.6s
  6495. >>>>>>>50 ubyte&0xDF >0
  6496. >>>>>>>>50 string x \b%-.2s
  6497. >>>>>>52 ubyte&0xDF >0
  6498. >>>>>>>52 string x \b.%-.3s
  6499. #
  6500. >70 string IBMBIO\ \ COM
  6501. >>472 string Cannot\ load\ DOS!\
  6502. >>>489 string Any\ key\ to\ retry \b, DR-DOS Bootloader
  6503. >>471 string Cannot\ load\ DOS\
  6504. >>487 string press\ key\ to\ retry \b, Open-DOS Bootloader
  6505. #??
  6506. >444 string KERNEL\ \ SYS
  6507. >>314 string BOOT\ error! \b, FREE-DOS Bootloader
  6508. >499 string KERNEL\ \ SYS
  6509. >>305 string BOOT\ err!\0 \b, Free-DOS Bootloader
  6510. >449 string KERNEL\ \ SYS
  6511. >>319 string BOOT\ error! \b, FREE-DOS 0.5 Bootloader
  6512. #
  6513. >449 string Loading\ FreeDOS
  6514. >>0x1AF ulelong >0 \b, FREE-DOS 0.95,1.0 Bootloader
  6515. >>>497 ubyte&0xDF >0
  6516. >>>>497 string x \b %-.6s
  6517. >>>>>503 ubyte&0xDF >0
  6518. >>>>>>503 string x \b%-.1s
  6519. >>>>>>>504 ubyte&0xDF >0
  6520. >>>>>>>>504 string x \b%-.1s
  6521. >>>>505 ubyte&0xDF >0
  6522. >>>>>505 string x \b.%-.3s
  6523. #
  6524. >331 string Error!.0 \b, FREE-DOS 1.0 bootloader
  6525. #
  6526. >125 string Loading\ FreeDOS...\r
  6527. >>311 string BOOT\ error!\r \b, FREE-DOS bootloader
  6528. >>>441 ubyte&0xDF >0
  6529. >>>>441 string x \b %-.6s
  6530. >>>>>447 ubyte&0xDF >0
  6531. >>>>>>447 string x \b%-.1s
  6532. >>>>>>>448 ubyte&0xDF >0
  6533. >>>>>>>>448 string x \b%-.1s
  6534. >>>>449 ubyte&0xDF >0
  6535. >>>>>449 string x \b.%-.3s
  6536. >124 string FreeDOS\0
  6537. >>331 string \ err\0 \b, FREE-DOS BETa 0.9 Bootloader
  6538. # DOS names like KERNEL.SYS,KERNEL16.SYS,KERNEL32.SYS,METAKERN.SYS are 8 right space padded bytes+3 bytes
  6539. >>>497 ubyte&0xDF >0
  6540. >>>>497 string x \b %-.6s
  6541. >>>>>503 ubyte&0xDF >0
  6542. >>>>>>503 string x \b%-.1s
  6543. >>>>>>>504 ubyte&0xDF >0
  6544. >>>>>>>>504 string x \b%-.1s
  6545. >>>>505 ubyte&0xDF >0
  6546. >>>>>505 string x \b.%-.3s
  6547. >>333 string \ err\0 \b, FREE-DOS BEta 0.9 Bootloader
  6548. >>>497 ubyte&0xDF >0
  6549. >>>>497 string x \b %-.6s
  6550. >>>>>503 ubyte&0xDF >0
  6551. >>>>>>503 string x \b%-.1s
  6552. >>>>>>>504 ubyte&0xDF >0
  6553. >>>>>>>>504 string x \b%-.1s
  6554. >>>>505 ubyte&0xDF >0
  6555. >>>>>505 string x \b.%-.3s
  6556. >>334 string \ err\0 \b, FREE-DOS Beta 0.9 Bootloader
  6557. >>>497 ubyte&0xDF >0
  6558. >>>>497 string x \b %-.6s
  6559. >>>>>503 ubyte&0xDF >0
  6560. >>>>>>503 string x \b%-.1s
  6561. >>>>>>>504 ubyte&0xDF >0
  6562. >>>>>>>>504 string x \b%-.1s
  6563. >>>>505 ubyte&0xDF >0
  6564. >>>>>505 string x \b.%-.3s
  6565. >336 string Error!\
  6566. >>343 string Hit\ a\ key\ to\ reboot. \b, FREE-DOS Beta 0.9sr1 Bootloader
  6567. >>>497 ubyte&0xDF >0
  6568. >>>>497 string x \b %-.6s
  6569. >>>>>503 ubyte&0xDF >0
  6570. >>>>>>503 string x \b%-.1s
  6571. >>>>>>>504 ubyte&0xDF >0
  6572. >>>>>>>>504 string x \b%-.1s
  6573. >>>>505 ubyte&0xDF >0
  6574. >>>>>505 string x \b.%-.3s
  6575. # added by Joerg Jenderek
  6576. # http://www.visopsys.org/
  6577. # http://partitionlogic.org.uk/
  6578. # OEM-ID=Visopsys
  6579. >478 ulelong 0
  6580. >>(1.b+326) string I/O\ Error\ reading\
  6581. >>>(1.b+344) string Visopsys\ loader\r
  6582. >>>>(1.b+361) string Press\ any\ key\ to\ continue.\r \b, Visopsys loader
  6583. # http://alexfru.chat.ru/epm.html#bootprog
  6584. >494 ubyte >0x4D
  6585. >>495 string >E
  6586. >>>495 string <S
  6587. #OEM-ID is not reliable
  6588. >>>>3 string BootProg
  6589. # It just looks for a program file name at the root directory
  6590. # and loads corresponding file with following execution.
  6591. # DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
  6592. >>>>499 ubyte&0xDF >0 \b, COM/EXE Bootloader
  6593. >>>>>499 string x \b %-.1s
  6594. >>>>>>500 ubyte&0xDF >0
  6595. >>>>>>>500 string x \b%-.1s
  6596. >>>>>>>>501 ubyte&0xDF >0
  6597. >>>>>>>>>501 string x \b%-.1s
  6598. >>>>>>>>>>502 ubyte&0xDF >0
  6599. >>>>>>>>>>>502 string x \b%-.1s
  6600. >>>>>>>>>>>>503 ubyte&0xDF >0
  6601. >>>>>>>>>>>>>503 string x \b%-.1s
  6602. >>>>>>>>>>>>>>504 ubyte&0xDF >0
  6603. >>>>>>>>>>>>>>>504 string x \b%-.1s
  6604. >>>>>>>>>>>>>>>>505 ubyte&0xDF >0
  6605. >>>>>>>>>>>>>>>>>505 string x \b%-.1s
  6606. >>>>>>>>>>>>>>>>>>506 ubyte&0xDF >0
  6607. >>>>>>>>>>>>>>>>>>>506 string x \b%-.1s
  6608. #name extension
  6609. >>>>>507 ubyte&0xDF >0 \b.
  6610. >>>>>>507 string x \b%-.1s
  6611. >>>>>>>508 ubyte&0xDF >0
  6612. >>>>>>>>508 string x \b%-.1s
  6613. >>>>>>>>>509 ubyte&0xDF >0
  6614. >>>>>>>>>>509 string x \b%-.1s
  6615. #If the boot sector fails to read any other sector,
  6616. #it prints a very short message ("RE") to the screen and hangs the computer.
  6617. #If the boot sector fails to find needed program in the root directory,
  6618. #it also hangs with another message ("NF").
  6619. >>>>>492 string RENF \b, FAT (12 bit)
  6620. >>>>>495 string RENF \b, FAT (16 bit)
  6621. # http://alexfru.chat.ru/epm.html#bootprog
  6622. >494 ubyte >0x4D
  6623. >>495 string >E
  6624. >>>495 string <S
  6625. #OEM-ID is not reliable
  6626. >>>>3 string BootProg
  6627. # It just looks for a program file name at the root directory
  6628. # and loads corresponding file with following execution.
  6629. # DOS names like STARTUP.BIN,STARTUPC.COM,STARTUPE.EXE are 8 right space padded bytes+3 bytes
  6630. >>>>499 ubyte&0xDF >0 \b, COM/EXE Bootloader
  6631. >>>>>499 string x \b %-.1s
  6632. >>>>>>500 ubyte&0xDF >0
  6633. >>>>>>>500 string x \b%-.1s
  6634. >>>>>>>>501 ubyte&0xDF >0
  6635. >>>>>>>>>501 string x \b%-.1s
  6636. >>>>>>>>>>502 ubyte&0xDF >0
  6637. >>>>>>>>>>>502 string x \b%-.1s
  6638. >>>>>>>>>>>>503 ubyte&0xDF >0
  6639. >>>>>>>>>>>>>503 string x \b%-.1s
  6640. >>>>>>>>>>>>>>504 ubyte&0xDF >0
  6641. >>>>>>>>>>>>>>>504 string x \b%-.1s
  6642. >>>>>>>>>>>>>>>>505 ubyte&0xDF >0
  6643. >>>>>>>>>>>>>>>>>505 string x \b%-.1s
  6644. >>>>>>>>>>>>>>>>>>506 ubyte&0xDF >0
  6645. >>>>>>>>>>>>>>>>>>>506 string x \b%-.1s
  6646. #name extension
  6647. >>>>>507 ubyte&0xDF >0 \b.
  6648. >>>>>>507 string x \b%-.1s
  6649. >>>>>>>508 ubyte&0xDF >0
  6650. >>>>>>>>508 string x \b%-.1s
  6651. >>>>>>>>>509 ubyte&0xDF >0
  6652. >>>>>>>>>>509 string x \b%-.1s
  6653. #If the boot sector fails to read any other sector,
  6654. #it prints a very short message ("RE") to the screen and hangs the computer.
  6655. #If the boot sector fails to find needed program in the root directory,
  6656. #it also hangs with another message ("NF").
  6657. >>>>>492 string RENF \b, FAT (12 bit)
  6658. >>>>>495 string RENF \b, FAT (16 bit)
  6659. # x86 bootloader end
  6660. # by Joerg Jenderek at Apr 2013
  6661. # Print the DOS filenames from directory entry form with 8 right space padded bytes + 3 bytes for extension
  6662. # like IO.SYS. MSDOS.SYS , KERNEL.SYS , DRBIO.SYS
  6663. 0 name DOS-filename
  6664. # space=0x20 (00100000b) means empty
  6665. >0 ubyte&0xDF >0
  6666. >>0 ubyte x \b%c
  6667. >>>1 ubyte&0xDF >0
  6668. >>>>1 ubyte x \b%c
  6669. >>>>>2 ubyte&0xDF >0
  6670. >>>>>>2 ubyte x \b%c
  6671. >>>>>>>3 ubyte&0xDF >0
  6672. >>>>>>>>3 ubyte x \b%c
  6673. >>>>>>>>>4 ubyte&0xDF >0
  6674. >>>>>>>>>>4 ubyte x \b%c
  6675. >>>>>>>>>>>5 ubyte&0xDF >0
  6676. >>>>>>>>>>>>5 ubyte x \b%c
  6677. >>>>>>>>>>>>>6 ubyte&0xDF >0
  6678. >>>>>>>>>>>>>>6 ubyte x \b%c
  6679. >>>>>>>>>>>>>>>7 ubyte&0xDF >0
  6680. >>>>>>>>>>>>>>>>7 ubyte x \b%c
  6681. # DOS filename extension
  6682. >>8 ubyte&0xDF >0 \b.
  6683. >>>8 ubyte x \b%c
  6684. >>>>9 ubyte&0xDF >0
  6685. >>>>>9 ubyte x \b%c
  6686. >>>>>>10 ubyte&0xDF >0
  6687. >>>>>>>10 ubyte x \b%c
  6688. # Print 2 following DOS filenames from directory entry form
  6689. # like IO.SYS+MSDOS.SYS or ibmbio.com+ibmdos.com
  6690. 0 name 2xDOS-filename
  6691. # display 1 space
  6692. >0 ubyte x \b
  6693. >0 use DOS-filename
  6694. >11 ubyte x \b+
  6695. >11 use DOS-filename
  6696. # added by Joerg Jenderek at Feb 2013 according to http://thestarman.pcministry.com/asm/mbr/MSWIN41.htm#FSINFO
  6697. # and http://en.wikipedia.org/wiki/File_Allocation_Table#FS_Information_Sector
  6698. >0 string RRaA
  6699. >>0x1E4 string rrAa \b, FSInfosector
  6700. #>>0x1FC uleshort =0 SHOULD BE ZERO
  6701. >>>0x1E8 ulelong <0xffffffff \b, %u free clusters
  6702. >>>0x1EC ulelong <0xffffffff \b, last allocated cluster %u
  6703. # updated by Joerg Jenderek at Sep 2007
  6704. >3 ubyte 0
  6705. #no active flag
  6706. >>446 ubyte 0
  6707. # partition 1 not empty
  6708. >>>450 ubyte >0
  6709. # partitions 3,4 empty
  6710. >>>>482 ubyte 0
  6711. >>>>>498 ubyte 0
  6712. # partition 2 ID=0,5,15
  6713. >>>>>>466 ubyte <0x10
  6714. >>>>>>>466 ubyte 0x05 \b, extended partition table
  6715. >>>>>>>466 ubyte 0x0F \b, extended partition table (LBA)
  6716. >>>>>>>466 ubyte 0x0 \b, extended partition table (last)
  6717. # DOS x86 sector separated and moved from "DOS/MBR boot sector" by Joerg Jenderek at May 2011
  6718. >0x200 lelong 0x82564557 \b, BSD disklabel
  6719. # http://en.wikipedia.org/wiki/Master_boot_record#PTE
  6720. # display standard partition table
  6721. 0 name partition-table
  6722. #>0 ubyte x PARTITION-TABLE
  6723. # test and display 1st til 4th partition table entry
  6724. >0 use partition-entry-test
  6725. >16 use partition-entry-test
  6726. >32 use partition-entry-test
  6727. >48 use partition-entry-test
  6728. # test for entry of partition table
  6729. 0 name partition-entry-test
  6730. # partition type ID > 0
  6731. >4 ubyte >0
  6732. # active flag 0
  6733. >>0 ubyte 0
  6734. >>>0 use partition-entry
  6735. # active flag 0x80, 0x81, ...
  6736. >>0 ubyte >0x7F
  6737. >>>0 use partition-entry
  6738. # Print entry of partition table
  6739. 0 name partition-entry
  6740. # partition type ID > 0
  6741. >4 ubyte >0 \b; partition
  6742. >>64 leshort 0xAA55 1
  6743. >>48 leshort 0xAA55 2
  6744. >>32 leshort 0xAA55 3
  6745. >>16 leshort 0xAA55 4
  6746. >>4 ubyte x : ID=0x%x
  6747. >>0 ubyte&0x80 0x80 \b, active
  6748. >>0 ubyte >0x80 0x%x
  6749. >>1 ubyte x \b, start-CHS (
  6750. >>1 use partition-chs
  6751. >>5 ubyte x \b), end-CHS (
  6752. >>5 use partition-chs
  6753. >>8 ulelong x \b), startsector %u
  6754. >>12 ulelong x \b, %u sectors
  6755. # Print cylinder,head,sector (CHS) of partition entry
  6756. 0 name partition-chs
  6757. # cylinder
  6758. >1 ubyte x \b0x
  6759. >1 ubyte&0xC0 0x40 \b1
  6760. >1 ubyte&0xC0 0x80 \b2
  6761. >1 ubyte&0xC0 0xC0 \b3
  6762. >2 ubyte x \b%x
  6763. # head
  6764. >0 ubyte x \b,%u
  6765. # sector
  6766. >1 ubyte&0x3F x \b,%u
  6767. # FATX
  6768. 0 string FATX FATX filesystem data
  6769. # romfs filesystems - Juan Cespedes <cespedes@debian.org>
  6770. 0 string -rom1fs- romfs filesystem, version 1
  6771. >8 belong x %d bytes,
  6772. >16 string x named %s.
  6773. # netboot image - Juan Cespedes <cespedes@debian.org>
  6774. 0 lelong 0x1b031336L Netboot image,
  6775. >4 lelong&0xFFFFFF00 0
  6776. >>4 lelong&0x100 0x000 mode 2
  6777. >>4 lelong&0x100 0x100 mode 3
  6778. >4 lelong&0xFFFFFF00 !0 unknown mode
  6779. 0x18b string OS/2 OS/2 Boot Manager
  6780. # updated by Joerg Jenderek at Oct 2008 and Sep 2012
  6781. # http://syslinux.zytor.com/iso.php
  6782. # 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
  6783. # assembler instructions: cli;jmp 0:7Cyy (yy=0x40,0x5e,0x6c,0x6e,0x77);nop;nop
  6784. 0 ulequad&0x909000007cc0eafa 0x909000007c40eafa
  6785. >631 search/689 ISOLINUX\ isolinux Loader
  6786. >>&0 string x (version %-4.4s)
  6787. # http://syslinux.zytor.com/pxe.php
  6788. # assembler instructions: jmp 7C05
  6789. 0 ulelong 0x007c05ea pxelinux loader (version 2.13 or older)
  6790. # assembler instructions: pushfd;pushad
  6791. 0 ulelong 0x60669c66 pxelinux loader
  6792. # assembler instructions: jmp 05
  6793. 0 ulelong 0xc00005ea pxelinux loader (version 3.70 or newer)
  6794. # http://syslinux.zytor.com/wiki/index.php/SYSLINUX
  6795. 0 string LDLINUX\ SYS\ SYSLINUX loader
  6796. >12 string x (older version %-4.4s)
  6797. 0 string \r\nSYSLINUX\ SYSLINUX loader
  6798. >11 string x (version %-4.4s)
  6799. # syslinux updated and separated from "DOS/MBR boot sector" by Joerg Jenderek at Sep 2012
  6800. # assembler instructions: jmp yy (yy=0x3c,0x58);nop;"SYSLINUX"
  6801. 0 ulelong&0x80909bEB 0x009018EB
  6802. # OEM-ID not always "SYSLINUX"
  6803. >434 search/47 Boot\ failed
  6804. # followed by \r\n\0 or :\
  6805. >>482 search/132 \0LDLINUX\ SYS Syslinux bootloader (version 2.13 or older)
  6806. >>1 ubyte 0x58 Syslinux bootloader (version 3.0-3.9)
  6807. >459 search/30 Boot\ error\r\n\0
  6808. >>1 ubyte 0x58 Syslinux bootloader (version 3.10 or newer)
  6809. # SYSLINUX MBR updated and separated from "DOS/MBR boot sector" by Joerg Jenderek at Sep 2012
  6810. # assembler instructions: mov di,0600h;mov cx,0100h
  6811. 16 search/4 \xbf\x00\x06\xb9\x00\x01
  6812. # to display SYSLINUX MBR (36) before old DOS/MBR boot sector one with partition table (strength=50+21)
  6813. !:strength +36
  6814. >94 search/249 Missing\ operating\ system
  6815. # followed by \r for versions older 3.35 , .\r for versions newer 3.52 and point for other
  6816. # skip Ranish MBR
  6817. >>408 search/4 HD1/\0
  6818. >>408 default x
  6819. >>>250 search/118 \0Operating\ system\ load SYSLINUX MBR
  6820. # followed by "ing " or space
  6821. >>>>292 search/98 error
  6822. >>>>>&0 string \r (version 3.35 or older)
  6823. >>>>>&0 string .\r (version 3.52 or newer)
  6824. >>>>>&0 default x (version 3.36-3.51 )
  6825. >368 search/106 \0Disk\ error\ on\ boot\r\n SYSLINUX GPT-MBR
  6826. >>156 search/10 \0Boot\ partition\ not\ found\r\n
  6827. >>>270 search/10 \0OS\ not\ bootable\r\n (version 3.86 or older)
  6828. >>174 search/10 \0Missing\ OS\r\n
  6829. >>>189 search/10 \0Multiple\ active\ partitions\r\n (version 4.00 or newer)
  6830. # SYSLINUX END
  6831. # NetBSD mbr variants (master-boot-code version 1.22) added by Joerg Jenderek at Nov 2012
  6832. # assembler instructions: xor ax,ax;mov ax,ss;mov sp,0x7c00;mov ax,
  6833. 0 ubequad 0x31c08ed0bc007c8e
  6834. # mbr_bootsel magic before partition table not reliable with small ipl fragments
  6835. #>444 uleshort 0xb5e1
  6836. >0004 uleshort x
  6837. # ERRorTeXT
  6838. >>181 search/166 Error\ \0\r\n NetBSD mbr
  6839. # NT Drive Serial Number http://thestarman.pcministry.com/asm/mbr/Win2kmbr.htm#DS
  6840. >>>0x1B8 ubelong >0 \b,Serial 0x%-.8x
  6841. # BOOTSEL definitions contains assembler instructions: int 0x13;pop dx;push dx;push dx
  6842. >>>0xbb search/71 \xcd\x13\x5a\x52\x52 \b,bootselector
  6843. # BOOT_EXTENDED definitions contains assembler instructions:
  6844. # xchg ecx,edx;addl ecx,edx;movw lba_info,si;movb 0x42,ah;pop dx;push dx;int 0x13
  6845. >>>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
  6846. # COM_PORT_VAL definitions contains assembler instructions: outb al,dx;add 5,dl;inb %dx;test 0x40,al
  6847. >>>0x130 search/55 \xee\x80\xc2\x05\xec\xa8\x40 \b,serial IO
  6848. # not TERSE_ERROR
  6849. >>>196 search/106 No\ active\ partition\0
  6850. >>>>&0 string Disk\ read\ error\0
  6851. >>>>>&0 string No\ operating\ system\0 \b,verbose
  6852. # not NO_CHS definitions contains assembler instructions: pop dx;push dx;movb $8,ah;int0x13
  6853. >>>0x7d search/7 \x5a\x52\xb4\x08\xcd\x13 \b,CHS
  6854. # not NO_LBA_CHECK definitions contains assembler instructions: movw 0x55aa,bx;movb 0x41,ah;pop dx;push dx;int 0x13
  6855. >>>0xa4 search/84 \xbb\xaa\x55\xb4\x41\x5a\x52\xcd\x13 \b,LBA-check
  6856. # assembler instructions: movw nametab,bx
  6857. >>>0x26 search/21 \xBB\x94\x07
  6858. # not NO_BANNER definitions contains assembler instructions: mov banner,si;call message_crlf
  6859. >>>>&-9 ubequad&0xBE00f0E800febb94 0xBE0000E80000bb94
  6860. >>>>>181 search/166 Error\ \0
  6861. # "a: disk" , "Fn: diskn" or "NetBSD MBR boot"
  6862. >>>>>>&3 string x \b,"%s"
  6863. # Andrea Mazzoleni AdvanceCD mbr loader of http://advancemame.sourceforge.net/boot-readme.html
  6864. # added by Joerg Jenderek at Nov 2012 for versions 1.3 - 1.4
  6865. # assembler instructions: jmp short 0x58;nop;ASCII
  6866. 0 ubequad&0xeb58908000000000 0xeb58900000000000
  6867. # assembler instructions: cli;xor ax,ax;mov ds,ax;mov es,ax;mov ss,
  6868. >(1.b+2) ubequad 0xfa31c08ed88ec08e
  6869. # Error messages at end of code
  6870. >>376 string No\ operating\ system\r\n\0
  6871. >>>398 string Disk\ error\r\n\0FDD\0HDD\0
  6872. >>>>419 string \ EBIOS\r\n\0 AdvanceMAME mbr
  6873. # Neil Turton mbr loader variant of http://www.chiark.greenend.org.uk/~neilt/mbr/
  6874. # added by Joerg Jenderek at Mar 2011 for versions 1.0.0 - 1.1.11
  6875. # for 1st version assembler instructions: cld;xor ax,ax;mov DS,ax;MOV ES,AX;mov SI,
  6876. # or cld;xor ax,ax;mov SS,ax;XOR SP,SP;mov DS,
  6877. 0 ulequad&0xcE1b40D48EC031FC 0x8E0000D08EC031FC
  6878. # pointer to the data starting with Neil Turton signature string
  6879. >(0x1BC.s) string NDTmbr
  6880. >>&-14 string 1234F\0 Turton mbr (
  6881. # parameters also viewed by install-mbr --list
  6882. >>>(0x1BC.s+7) ubyte x \b%u<=
  6883. >>>(0x1BC.s+9) ubyte x \bVersion<=%u
  6884. #>>>(0x1BC.s+8) ubyte x asm_flag_%x
  6885. >>>(0x1BC.s+8) ubyte&1 1 \b,Y2K-Fix
  6886. # variant used by testdisk of http://www.cgsecurity.org/wiki/Menu_MBRCode
  6887. >>>(0x1BC.s+8) ubyte&2 2 \b,TestDisk
  6888. #0x1~1,..,0x8~4,0x10~F,0x80~A enabled
  6889. #>>>(0x1BC.s+10) ubyte x \b,flags 0x%x
  6890. #0x0~1,0x1~2,...,0x3~4,0x4~F,0x7~D default boot
  6891. #>>>(0x1BC.s+11) ubyte x \b,cfg_def 0x%x
  6892. # for older versions
  6893. >>>(0x1BC.s+9) ubyte <2
  6894. #>>>>(0x1BC.s+12) ubyte 18 \b,%u/18 seconds
  6895. >>>>(0x1BC.s+12) ubyte !18 \b,%u/18 seconds
  6896. # floppy A: or B:
  6897. >>>>(0x1BC.s+13) ubyte <2 \b,floppy 0x%x
  6898. >>>>(0x1BC.s+13) ubyte >1
  6899. # 1st hard disc
  6900. #>>>>>(0x1BC.s+13) ubyte 0x80 \b,drive 0x%x
  6901. # not 1st hard disc
  6902. >>>>>(0x1BC.s+13) ubyte !0x80 \b,drive 0x%x
  6903. # for version >= 2 maximal timeout can be 65534
  6904. >>>(0x1BC.s+9) ubyte >1
  6905. #>>>>(0x1BC.s+12) uleshort 18 \b,%u/18 seconds
  6906. >>>>(0x1BC.s+12) uleshort !18 \b,%u/18 seconds
  6907. # floppy A: or B:
  6908. >>>>(0x1BC.s+14) ubyte <2 \b,floppy 0x%x
  6909. >>>>(0x1BC.s+14) ubyte >1
  6910. # 1st hard disc
  6911. #>>>>>(0x1BC.s+14) ubyte 0x80 \b,drive 0x%x
  6912. # not 1st hard disc
  6913. >>>>>(0x1BC.s+14) ubyte !0x80 \b,drive 0x%x
  6914. >>>0 ubyte x \b)
  6915. # added by Joerg Jenderek
  6916. # In the second sector (+0x200) are variables according to grub-0.97/stage2/asm.S or
  6917. # grub-1.94/kern/i386/pc/startup.S
  6918. # http://www.gnu.org/software/grub/manual/grub.html#Embedded-data
  6919. # usual values are marked with comments to get only informations of strange GRUB loaders
  6920. 0x200 uleshort 0x70EA
  6921. # found only version 3.{1,2}
  6922. >0x206 ubeshort >0x0300
  6923. # GRUB version (0.5.)95,0.93,0.94,0.96,0.97 > "00"
  6924. >>0x212 ubyte >0x29
  6925. >>>0x213 ubyte >0x29
  6926. # not iso9660_stage1_5
  6927. #>>>0 ulelong&0x00BE5652 0x00BE5652
  6928. >>>>0x213 ubyte >0x29 GRand Unified Bootloader
  6929. # config_file for stage1_5 is 0xffffffff + default "/boot/grub/stage2"
  6930. >>>>0x217 ubyte 0xFF stage1_5
  6931. >>>>0x217 ubyte <0xFF stage2
  6932. >>>>0x206 ubyte x \b version %u
  6933. >>>>0x207 ubyte x \b.%u
  6934. # module_size for 1.94
  6935. >>>>0x208 ulelong <0xffffff \b, installed partition %u
  6936. #>>>>0x208 ulelong =0xffffff \b, %u (default)
  6937. >>>>0x208 ulelong >0xffffff \b, installed partition %u
  6938. # GRUB 0.5.95 unofficial
  6939. >>>>0x20C ulelong&0x2E300000 0x2E300000
  6940. # 0=stage2 1=ffs 2=e2fs 3=fat 4=minix 5=reiserfs
  6941. >>>>>0x20C ubyte x \b, identifier 0x%x
  6942. #>>>>>0x20D ubyte =0 \b, LBA flag 0x%x (default)
  6943. >>>>>0x20D ubyte >0 \b, LBA flag 0x%x
  6944. # GRUB version as string
  6945. >>>>>0x20E string >\0 \b, GRUB version %-s
  6946. # for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
  6947. >>>>>>0x215 ulong 0xffffffff
  6948. >>>>>>>0x219 string >\0 \b, configuration file %-s
  6949. >>>>>>0x215 ulong !0xffffffff
  6950. >>>>>>>0x215 string >\0 \b, configuration file %-s
  6951. # newer GRUB versions
  6952. >>>>0x20C ulelong&0x2E300000 !0x2E300000
  6953. ##>>>>>0x20C ulelong =0 \b, saved entry %d (usual)
  6954. >>>>>0x20C ulelong >0 \b, saved entry %d
  6955. # for 1.94 contains kernel image size
  6956. # for 0.93,0.94,0.96,0.97
  6957. # 0=stage2 1=ffs 2=e2fs 3=fat 4=minix 5=reiserfs 6=vstafs 7=jfs 8=xfs 9=iso9660 a=ufs2
  6958. >>>>>0x210 ubyte x \b, identifier 0x%x
  6959. # The flag for LBA forcing is in most cases 0
  6960. #>>>>>0x211 ubyte =0 \b, LBA flag 0x%x (default)
  6961. >>>>>0x211 ubyte >0 \b, LBA flag 0x%x
  6962. # GRUB version as string
  6963. >>>>>0x212 string >\0 \b, GRUB version %-s
  6964. # for stage1_5 is 0xffffffff + config_file "/boot/grub/stage2" default
  6965. >>>>>0x217 ulong 0xffffffff
  6966. >>>>>>0x21b string >\0 \b, configuration file %-s
  6967. >>>>>0x217 ulong !0xffffffff
  6968. >>>>>>0x217 string >\0 \b, configuration file %-s
  6969. # DOS x86 sector updated and separated from "DOS/MBR boot sector" by Joerg Jenderek at May 2011
  6970. # JuMP short bootcodeoffset NOP assembler instructions will usually be EB xx 90
  6971. # over BIOS parameter block (BPB)
  6972. # http://thestarman.pcministry.com/asm/2bytejumps.htm#FWD
  6973. # older drives may use Near JuMP instruction E9 xx xx
  6974. # minimal short forward jump found 0x29 for bootloaders or 0x0
  6975. # maximal short forward jump is 0x7f
  6976. # OEM-ID is empty or contain readable bytes
  6977. 0 ulelong&0x804000E9 0x000000E9
  6978. # mtools-3.9.8/msdos.h
  6979. # usual values are marked with comments to get only informations of strange FAT systems
  6980. # valid sectorsize must be a power of 2 from 32 to 32768
  6981. >11 uleshort&0xf001f 0
  6982. >>11 uleshort <32769
  6983. >>>11 uleshort >31
  6984. >>>>21 ubyte&0xf0 0xF0
  6985. >>>>>0 ubyte 0xEB
  6986. >>>>>>1 ubyte x \b, code offset 0x%x+2
  6987. >>>>>0 ubyte 0xE9
  6988. >>>>>>1 uleshort x \b, code offset 0x%x+2
  6989. >>>>>3 string >\0 \b, OEM-ID "%-.8s"
  6990. #http://mirror.href.com/thestarman/asm/debug/debug2.htm#IHC
  6991. >>>>>>8 string IHC \b cached by Windows 9M
  6992. >>>>>11 uleshort >512 \b, Bytes/sector %u
  6993. #>>>>>11 uleshort =512 \b, Bytes/sector %u=512 (usual)
  6994. >>>>>11 uleshort <512 \b, Bytes/sector %u
  6995. >>>>>13 ubyte >1 \b, sectors/cluster %u
  6996. #>>>>>13 ubyte =1 \b, sectors/cluster %u (usual on Floppies)
  6997. >>>>>82 string FAT32
  6998. >>>>>>14 uleshort !32 \b, reserved sectors %u
  6999. #>>>>>>14 uleshort =32 \b, reserved sectors %u (usual Fat32)
  7000. >>>>>82 string !FAT32
  7001. >>>>>>14 uleshort >1 \b, reserved sectors %u
  7002. #>>>>>>14 uleshort =1 \b, reserved sectors %u (usual FAT12,FAT16)
  7003. #>>>>>>14 uleshort 0 \b, reserved sectors %u (usual NTFS)
  7004. >>>>>16 ubyte >2 \b, FATs %u
  7005. #>>>>>16 ubyte =2 \b, FATs %u (usual)
  7006. >>>>>16 ubyte =1 \b, FAT %u
  7007. >>>>>16 ubyte >0
  7008. >>>>>17 uleshort >0 \b, root entries %u
  7009. #>>>>>17 uleshort =0 \b, root entries %u=0 (usual Fat32)
  7010. >>>>>19 uleshort >0 \b, sectors %u (volumes <=32 MB)
  7011. #>>>>>19 uleshort =0 \b, sectors %u=0 (usual Fat32)
  7012. >>>>>21 ubyte >0xF0 \b, Media descriptor 0x%x
  7013. #>>>>>21 ubyte =0xF0 \b, Media descriptor 0x%x (usual floppy)
  7014. >>>>>21 ubyte <0xF0 \b, Media descriptor 0x%x
  7015. >>>>>22 uleshort >0 \b, sectors/FAT %u
  7016. #>>>>>22 uleshort =0 \b, sectors/FAT %u=0 (usual Fat32)
  7017. >>>>>24 uleshort x \b, sectors/track %u
  7018. >>>>>26 ubyte >2 \b, heads %u
  7019. #>>>>>26 ubyte =2 \b, heads %u (usual floppy)
  7020. >>>>>26 ubyte =1 \b, heads %u
  7021. # valid only for sector sizes with more then 32 Bytes
  7022. >>>>>11 uleshort >32
  7023. # skip for Digital Research DOS (version 3.41) 1440 kB Bootdisk
  7024. >>>>>>38 ubyte !0x70
  7025. >>>>>>>28 ulelong >0 \b, hidden sectors %u
  7026. #>>>>>>>28 ulelong =0 \b, hidden sectors %u (usual floppy)
  7027. >>>>>>>32 ulelong >0 \b, sectors %u (volumes > 32 MB)
  7028. #>>>>>>>32 ulelong =0 \b, sectors %u (volumes > 32 MB)
  7029. # FAT<32 bit specific
  7030. >>>>>>>82 string !FAT32
  7031. #>>>>>>>>36 ubyte 0x80 \b, physical drive 0x%x=0x80 (usual harddisk)
  7032. #>>>>>>>>36 ubyte 0 \b, physical drive 0x%x=0 (usual floppy)
  7033. >>>>>>>>36 ubyte !0x80
  7034. >>>>>>>>>36 ubyte !0 \b, physical drive 0x%x
  7035. >>>>>>>>37 ubyte >0 \b, reserved 0x%x
  7036. #>>>>>>>>37 ubyte =0 \b, reserved 0x%x
  7037. # value is 0x80 for NTFS
  7038. >>>>>>>>38 ubyte !0x29 \b, dos < 4.0 BootSector (0x%x)
  7039. >>>>>>>>38 ubyte =0x29
  7040. >>>>>>>>>39 ulelong x \b, serial number 0x%x
  7041. >>>>>>>>>43 string <NO\ NAME \b, label: "%11.11s"
  7042. >>>>>>>>>43 string >NO\ NAME \b, label: "%11.11s"
  7043. >>>>>>>>>43 string =NO\ NAME \b, unlabeled
  7044. # there exist some old floppies without word FAT at offset 54
  7045. # a word like "FATnm " is only a hint for a FAT size on nm-bits
  7046. # Normally the number of clusters is calculated by the values of BPP.
  7047. # if it is small enough FAT is 12 bit, if it is too big enough FAT is 32 bit,
  7048. # otherwise FAT is 16 bit.
  7049. # http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/determining-fat-widths.html
  7050. >>>>>>54 string FAT \b, FAT
  7051. >>>>>>>54 string FAT12 \b (12 bit)
  7052. >>>>>>>54 string FAT16 \b (16 bit)
  7053. # FAT32 bit specific
  7054. >>>>>82 string FAT32 \b, FAT (32 bit)
  7055. >>>>>>36 ulelong x \b, sectors/FAT %u
  7056. # http://technet.microsoft.com/en-us/library/cc977221.aspx
  7057. >>>>>>40 uleshort >0 \b, extension flags 0x%x
  7058. #>>>>>>40 uleshort =0 \b, extension flags %u
  7059. >>>>>>42 uleshort >0 \b, fsVersion %u
  7060. #>>>>>>42 uleshort =0 \b, fsVersion %u (usual)
  7061. >>>>>>44 ulelong >2 \b, rootdir cluster %u
  7062. #>>>>>>44 ulelong =2 \b, rootdir cluster %u
  7063. #>>>>>>44 ulelong =1 \b, rootdir cluster %u
  7064. >>>>>>48 uleshort >1 \b, infoSector %u
  7065. #>>>>>>48 uleshort =1 \b, infoSector %u (usual)
  7066. >>>>>>48 uleshort <1 \b, infoSector %u
  7067. >>>>>>50 uleshort >6 \b, Backup boot sector %u
  7068. #>>>>>>50 uleshort =6 \b, Backup boot sector %u (usual)
  7069. >>>>>>50 uleshort <6 \b, Backup boot sector %u
  7070. # corrected by Joerg Jenderek at Feb 2011 according to http://thestarman.pcministry.com/asm/mbr/MSWIN41.htm#FSINFO
  7071. >>>>>>52 ulelong >0 \b, reserved1 0x%x
  7072. >>>>>>56 ulelong >0 \b, reserved2 0x%x
  7073. >>>>>>60 ulelong >0 \b, reserved3 0x%x
  7074. # same structure as FAT1X
  7075. #>>>>>>64 ubyte =0x80 \b, physical drive 0x%x=80 (usual harddisk)
  7076. #>>>>>>64 ubyte =0 \b, physical drive 0x%x=0 (usual floppy)
  7077. >>>>>>64 ubyte !0x80
  7078. >>>>>>>64 ubyte >0 \b, physical drive 0x%x
  7079. # in Windows NT bit 0 is a dirty flag to request chkdsk at boot time. bit 1 requests surface scan too
  7080. >>>>>>65 ubyte >0 \b, reserved 0x%x
  7081. >>>>>>66 ubyte !0x29 \b, dos < 4.0 BootSector (0x%x)
  7082. >>>>>>66 ubyte =0x29
  7083. >>>>>>>67 ulelong x \b, serial number 0x%x
  7084. >>>>>>>71 string <NO\ NAME \b, label: "%11.11s"
  7085. >>>>>>>71 string >NO\ NAME \b, label: "%11.11s"
  7086. >>>>>>>71 string =NO\ NAME \b, unlabeled
  7087. # additional tests for floppy image added by Joerg Jenderek
  7088. # no fixed disk
  7089. >>>>>21 ubyte !0xF8
  7090. # floppy media with 12 bit FAT
  7091. >>>>>>54 string !FAT16
  7092. # test for FAT after bootsector
  7093. >>>>>>>(11.s) ulelong&0x00ffffF0 0x00ffffF0 \b, followed by FAT
  7094. # floppy image
  7095. !:mime application/x-ima
  7096. # NTFS specific added by Joerg Jenderek at Mar 2011 according to http://thestarman.pcministry.com/asm/mbr/NTFSBR.htm
  7097. # and http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/bios-parameter-block.html
  7098. # 0 FATs
  7099. >>>>>16 ubyte =0
  7100. # 0 root entries
  7101. >>>>>>17 uleshort =0
  7102. # 0 DOS sectors
  7103. >>>>>>>19 uleshort =0
  7104. # 0 sectors/FAT
  7105. # dos < 4.0 BootSector value found is 0x80
  7106. #38 ubyte =0x80 \b, dos < 4.0 BootSector (0x%x)
  7107. >>>>>>>>22 uleshort =0 \b; NTFS
  7108. >>>>>>>>>24 uleshort >0 \b, sectors/track %u
  7109. >>>>>>>>>36 ulelong !0x800080 \b, physical drive 0x%x
  7110. >>>>>>>>>40 ulequad >0 \b, sectors %lld
  7111. >>>>>>>>>48 ulequad >0 \b, $MFT start cluster %lld
  7112. >>>>>>>>>56 ulequad >0 \b, $MFTMirror start cluster %lld
  7113. # Values 0 to 127 represent MFT record sizes of 0 to 127 clusters.
  7114. # Values 128 to 255 represent MFT record sizes of 2^(256-N) bytes.
  7115. >>>>>>>>>64 lelong <256
  7116. >>>>>>>>>>64 lelong <128 \b, clusters/RecordSegment %d
  7117. >>>>>>>>>>64 ubyte >127 \b, bytes/RecordSegment 2^(-1*%hhi)
  7118. # Values 0 to 127 represent index block sizes of 0 to 127 clusters.
  7119. # Values 128 to 255 represent index block sizes of 2^(256-N) byte
  7120. >>>>>>>>>68 ulelong <256
  7121. >>>>>>>>>>68 ulelong <128 \b, clusters/index block %d
  7122. #>>>>>>>>>>68 ulelong >127 \b, bytes/index block 2^(256-%d)
  7123. >>>>>>>>>>68 ubyte >127 \b, bytes/index block 2^(-1*%hhi)
  7124. >>>>>>>>>72 ulequad x \b, serial number 0%llx
  7125. >>>>>>>>>80 ulelong >0 \b, checksum 0x%x
  7126. #>>>>>>>>>80 ulelong =0 \b, checksum 0x%x=0 (usual)
  7127. >>>>>>>>>0x258 ulelong&0x00009090 =0x00009090
  7128. >>>>>>>>>>&-92 indirect x \b; contains
  7129. # For 2nd NTFS sector added by Joerg Jenderek at Jan 2013
  7130. # http://thestarman.pcministry.com/asm/mbr/NTFSbrHexEd.htm
  7131. # unused assembler instructions JMP y2;NOP;NOP
  7132. 0x056 ulelong&0xFFFF0FFF 0x909002EB
  7133. # unicode loadername terminated by CTRL-D
  7134. >(0.s*2) ulelong&0xFFFFFF00 0x00040000
  7135. # loadernames are NTLDR,CMLDR,PELDR,$LDR$ or BOOTMGR
  7136. >>0x002 lestring16 x Microsoft Windows XP/VISTA bootloader %-5.5s
  7137. >>0x12 string $
  7138. >>>0x0c lestring16 x \b%-2.2s
  7139. ### DOS,NTFS boot sectors end
  7140. 9564 lelong 0x00011954 Unix Fast File system [v1] (little-endian),
  7141. >8404 string x last mounted on %s,
  7142. #>9504 ledate x last checked at %s,
  7143. >8224 ledate x last written at %s,
  7144. >8401 byte x clean flag %d,
  7145. >8228 lelong x number of blocks %d,
  7146. >8232 lelong x number of data blocks %d,
  7147. >8236 lelong x number of cylinder groups %d,
  7148. >8240 lelong x block size %d,
  7149. >8244 lelong x fragment size %d,
  7150. >8252 lelong x minimum percentage of free blocks %d,
  7151. >8256 lelong x rotational delay %dms,
  7152. >8260 lelong x disk rotational speed %drps,
  7153. >8320 lelong 0 TIME optimization
  7154. >8320 lelong 1 SPACE optimization
  7155. 42332 lelong 0x19540119 Unix Fast File system [v2] (little-endian)
  7156. >&-1164 string x last mounted on %s,
  7157. >&-696 string >\0 volume name %s,
  7158. >&-304 leqldate x last written at %s,
  7159. >&-1167 byte x clean flag %d,
  7160. >&-1168 byte x readonly flag %d,
  7161. >&-296 lequad x number of blocks %lld,
  7162. >&-288 lequad x number of data blocks %lld,
  7163. >&-1332 lelong x number of cylinder groups %d,
  7164. >&-1328 lelong x block size %d,
  7165. >&-1324 lelong x fragment size %d,
  7166. >&-180 lelong x average file size %d,
  7167. >&-176 lelong x average number of files in dir %d,
  7168. >&-272 lequad x pending blocks to free %lld,
  7169. >&-264 lelong x pending inodes to free %ld,
  7170. >&-664 lequad x system-wide uuid %0llx,
  7171. >&-1316 lelong x minimum percentage of free blocks %d,
  7172. >&-1248 lelong 0 TIME optimization
  7173. >&-1248 lelong 1 SPACE optimization
  7174. 66908 lelong 0x19540119 Unix Fast File system [v2] (little-endian)
  7175. >&-1164 string x last mounted on %s,
  7176. >&-696 string >\0 volume name %s,
  7177. >&-304 leqldate x last written at %s,
  7178. >&-1167 byte x clean flag %d,
  7179. >&-1168 byte x readonly flag %d,
  7180. >&-296 lequad x number of blocks %lld,
  7181. >&-288 lequad x number of data blocks %lld,
  7182. >&-1332 lelong x number of cylinder groups %d,
  7183. >&-1328 lelong x block size %d,
  7184. >&-1324 lelong x fragment size %d,
  7185. >&-180 lelong x average file size %d,
  7186. >&-176 lelong x average number of files in dir %d,
  7187. >&-272 lequad x pending blocks to free %lld,
  7188. >&-264 lelong x pending inodes to free %ld,
  7189. >&-664 lequad x system-wide uuid %0llx,
  7190. >&-1316 lelong x minimum percentage of free blocks %d,
  7191. >&-1248 lelong 0 TIME optimization
  7192. >&-1248 lelong 1 SPACE optimization
  7193. 9564 belong 0x00011954 Unix Fast File system [v1] (big-endian),
  7194. >7168 belong 0x4c41424c Apple UFS Volume
  7195. >>7186 string x named %s,
  7196. >>7176 belong x volume label version %d,
  7197. >>7180 bedate x created on %s,
  7198. >8404 string x last mounted on %s,
  7199. #>9504 bedate x last checked at %s,
  7200. >8224 bedate x last written at %s,
  7201. >8401 byte x clean flag %d,
  7202. >8228 belong x number of blocks %d,
  7203. >8232 belong x number of data blocks %d,
  7204. >8236 belong x number of cylinder groups %d,
  7205. >8240 belong x block size %d,
  7206. >8244 belong x fragment size %d,
  7207. >8252 belong x minimum percentage of free blocks %d,
  7208. >8256 belong x rotational delay %dms,
  7209. >8260 belong x disk rotational speed %drps,
  7210. >8320 belong 0 TIME optimization
  7211. >8320 belong 1 SPACE optimization
  7212. 42332 belong 0x19540119 Unix Fast File system [v2] (big-endian)
  7213. >&-1164 string x last mounted on %s,
  7214. >&-696 string >\0 volume name %s,
  7215. >&-304 beqldate x last written at %s,
  7216. >&-1167 byte x clean flag %d,
  7217. >&-1168 byte x readonly flag %d,
  7218. >&-296 bequad x number of blocks %lld,
  7219. >&-288 bequad x number of data blocks %lld,
  7220. >&-1332 belong x number of cylinder groups %d,
  7221. >&-1328 belong x block size %d,
  7222. >&-1324 belong x fragment size %d,
  7223. >&-180 belong x average file size %d,
  7224. >&-176 belong x average number of files in dir %d,
  7225. >&-272 bequad x pending blocks to free %lld,
  7226. >&-264 belong x pending inodes to free %ld,
  7227. >&-664 bequad x system-wide uuid %0llx,
  7228. >&-1316 belong x minimum percentage of free blocks %d,
  7229. >&-1248 belong 0 TIME optimization
  7230. >&-1248 belong 1 SPACE optimization
  7231. 66908 belong 0x19540119 Unix Fast File system [v2] (big-endian)
  7232. >&-1164 string x last mounted on %s,
  7233. >&-696 string >\0 volume name %s,
  7234. >&-304 beqldate x last written at %s,
  7235. >&-1167 byte x clean flag %d,
  7236. >&-1168 byte x readonly flag %d,
  7237. >&-296 bequad x number of blocks %lld,
  7238. >&-288 bequad x number of data blocks %lld,
  7239. >&-1332 belong x number of cylinder groups %d,
  7240. >&-1328 belong x block size %d,
  7241. >&-1324 belong x fragment size %d,
  7242. >&-180 belong x average file size %d,
  7243. >&-176 belong x average number of files in dir %d,
  7244. >&-272 bequad x pending blocks to free %lld,
  7245. >&-264 belong x pending inodes to free %ld,
  7246. >&-664 bequad x system-wide uuid %0llx,
  7247. >&-1316 belong x minimum percentage of free blocks %d,
  7248. >&-1248 belong 0 TIME optimization
  7249. >&-1248 belong 1 SPACE optimization
  7250. # ext2/ext3 filesystems - Andreas Dilger <adilger@dilger.ca>
  7251. # ext4 filesystem - Eric Sandeen <sandeen@sandeen.net>
  7252. # volume label and UUID Russell Coker
  7253. # http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
  7254. 0x438 leshort 0xEF53 Linux
  7255. >0x44c lelong x rev %d
  7256. >0x43e leshort x \b.%d
  7257. # No journal? ext2
  7258. >0x45c lelong ^0x0000004 ext2 filesystem data
  7259. >>0x43a leshort ^0x0000001 (mounted or unclean)
  7260. # Has a journal? ext3 or ext4
  7261. >0x45c lelong &0x0000004
  7262. # and small INCOMPAT?
  7263. >>0x460 lelong <0x0000040
  7264. # and small RO_COMPAT?
  7265. >>>0x464 lelong <0x0000008 ext3 filesystem data
  7266. # else large RO_COMPAT?
  7267. >>>0x464 lelong >0x0000007 ext4 filesystem data
  7268. # else large INCOMPAT?
  7269. >>0x460 lelong >0x000003f ext4 filesystem data
  7270. >0x468 belong x \b, UUID=%08x
  7271. >0x46c beshort x \b-%04x
  7272. >0x46e beshort x \b-%04x
  7273. >0x470 beshort x \b-%04x
  7274. >0x472 belong x \b-%08x
  7275. >0x476 beshort x \b%04x
  7276. >0x478 string >0 \b, volume name "%s"
  7277. # General flags for any ext* fs
  7278. >0x460 lelong &0x0000004 (needs journal recovery)
  7279. >0x43a leshort &0x0000002 (errors)
  7280. # INCOMPAT flags
  7281. >0x460 lelong &0x0000001 (compressed)
  7282. #>0x460 lelong &0x0000002 (filetype)
  7283. #>0x460 lelong &0x0000010 (meta bg)
  7284. >0x460 lelong &0x0000040 (extents)
  7285. >0x460 lelong &0x0000080 (64bit)
  7286. #>0x460 lelong &0x0000100 (mmp)
  7287. #>0x460 lelong &0x0000200 (flex bg)
  7288. # RO_INCOMPAT flags
  7289. #>0x464 lelong &0x0000001 (sparse super)
  7290. >0x464 lelong &0x0000002 (large files)
  7291. >0x464 lelong &0x0000008 (huge files)
  7292. #>0x464 lelong &0x0000010 (gdt checksum)
  7293. #>0x464 lelong &0x0000020 (many subdirs)
  7294. #>0x463 lelong &0x0000040 (extra isize)
  7295. # Minix filesystems - Juan Cespedes <cespedes@debian.org>
  7296. 0x410 leshort 0x137f
  7297. !:strength / 2
  7298. >0x402 beshort < 100
  7299. >0x402 beshort > -1 Minix filesystem, V1, %d zones
  7300. >0x1e string minix \b, bootable
  7301. 0x410 beshort 0x137f
  7302. !:strength / 2
  7303. >0x402 beshort < 100
  7304. >0x402 beshort > -1 Minix filesystem, V1 (big endian), %d zones
  7305. >0x1e string minix \b, bootable
  7306. 0x410 leshort 0x138f
  7307. !:strength / 2
  7308. >0x402 beshort < 100
  7309. >0x402 beshort > -1 Minix filesystem, V1, 30 char names, %d zones
  7310. >0x1e string minix \b, bootable
  7311. 0x410 beshort 0x138f
  7312. !:strength / 2
  7313. >0x402 beshort < 100
  7314. >0x402 beshort > -1 Minix filesystem, V1, 30 char names (big endian), %d zones
  7315. >0x1e string minix \b, bootable
  7316. 0x410 leshort 0x2468
  7317. >0x402 beshort < 100
  7318. >>0x402 beshort > -1 Minix filesystem, V2, %d zones
  7319. >0x1e string minix \b, bootable
  7320. 0x410 beshort 0x2468
  7321. >0x402 beshort < 100
  7322. >0x402 beshort > -1 Minix filesystem, V2 (big endian), %d zones
  7323. >0x1e string minix \b, bootable
  7324. 0x410 leshort 0x2478
  7325. >0x402 beshort < 100
  7326. >0x402 beshort > -1 Minix filesystem, V2, 30 char names, %d zones
  7327. >0x1e string minix \b, bootable
  7328. 0x410 leshort 0x2478
  7329. >0x402 beshort < 100
  7330. >0x402 beshort > -1 Minix filesystem, V2, 30 char names, %d zones
  7331. >0x1e string minix \b, bootable
  7332. 0x410 beshort 0x2478
  7333. >0x402 beshort !0 Minix filesystem, V2, 30 char names (big endian), %d zones
  7334. >0x1e string minix \b, bootable
  7335. 0x410 leshort 0x4d5a
  7336. >0x402 beshort !0 Minix filesystem, V3, %d zones
  7337. >0x1e string minix \b, bootable
  7338. # SGI disk labels - Nathan Scott <nathans@debian.org>
  7339. 0 belong 0x0BE5A941 SGI disk label (volume header)
  7340. # SGI XFS filesystem - Nathan Scott <nathans@debian.org>
  7341. 0 belong 0x58465342 SGI XFS filesystem data
  7342. >0x4 belong x (blksz %d,
  7343. >0x68 beshort x inosz %d,
  7344. >0x64 beshort ^0x2004 v1 dirs)
  7345. >0x64 beshort &0x2004 v2 dirs)
  7346. ############################################################################
  7347. # Minix-ST kernel floppy
  7348. 0x800 belong 0x46fc2700 Atari-ST Minix kernel image
  7349. # http://en.wikipedia.org/wiki/BIOS_parameter_block
  7350. # floppies with valid BPB and any instruction at beginning
  7351. >19 string \240\005\371\005\0\011\0\2\0 \b, 720k floppy
  7352. >19 string \320\002\370\005\0\011\0\1\0 \b, 360k floppy
  7353. ############################################################################
  7354. # Hmmm, is this a better way of detecting _standard_ floppy images ?
  7355. 19 string \320\002\360\003\0\011\0\1\0 DOS floppy 360k
  7356. >0x1FE leshort 0xAA55 \b, DOS/MBR hard disk boot sector
  7357. 19 string \240\005\371\003\0\011\0\2\0 DOS floppy 720k
  7358. >0x1FE leshort 0xAA55 \b, DOS/MBR hard disk boot sector
  7359. 19 string \100\013\360\011\0\022\0\2\0 DOS floppy 1440k
  7360. >0x1FE leshort 0xAA55 \b, DOS/MBR hard disk boot sector
  7361. 19 string \240\005\371\005\0\011\0\2\0 DOS floppy 720k, IBM
  7362. >0x1FE leshort 0xAA55 \b, DOS/MBR hard disk boot sector
  7363. 19 string \100\013\371\005\0\011\0\2\0 DOS floppy 1440k, mkdosfs
  7364. >0x1FE leshort 0xAA55 \b, DOS/MBR hard disk boot sector
  7365. 19 string \320\002\370\005\0\011\0\1\0 Atari-ST floppy 360k
  7366. 19 string \240\005\371\005\0\011\0\2\0 Atari-ST floppy 720k
  7367. # | | | | |
  7368. # | | | | heads
  7369. # | | | sectors/track
  7370. # | | sectors/FAT
  7371. # | media descriptor
  7372. # BPB: sectors
  7373. # Valid media descriptor bytes for MS-DOS:
  7374. #
  7375. # Byte Capacity Media Size and Type
  7376. # -------------------------------------------------
  7377. #
  7378. # F0 2.88 MB 3.5-inch, 2-sided, 36-sector
  7379. # F0 1.44 MB 3.5-inch, 2-sided, 18-sector
  7380. # F9 720K 3.5-inch, 2-sided, 9-sector
  7381. # F9 1.2 MB 5.25-inch, 2-sided, 15-sector
  7382. # FD 360K 5.25-inch, 2-sided, 9-sector
  7383. # FF 320K 5.25-inch, 2-sided, 8-sector
  7384. # FC 180K 5.25-inch, 1-sided, 9-sector
  7385. # FE 160K 5.25-inch, 1-sided, 8-sector
  7386. # FE 250K 8-inch, 1-sided, single-density
  7387. # FD 500K 8-inch, 2-sided, single-density
  7388. # FE 1.2 MB 8-inch, 2-sided, double-density
  7389. # F8 ----- Fixed disk
  7390. #
  7391. # FC xxxK Apricot 70x1x9 boot disk.
  7392. #
  7393. # Originally a bitmap:
  7394. # xxxxxxx0 Not two sided
  7395. # xxxxxxx1 Double sided
  7396. # xxxxxx0x Not 8 SPT
  7397. # xxxxxx1x 8 SPT
  7398. # xxxxx0xx Not Removable drive
  7399. # xxxxx1xx Removable drive
  7400. # 11111xxx Must be one.
  7401. #
  7402. # But now it's rather random:
  7403. # 111111xx Low density disk
  7404. # 00 SS, Not 8 SPT
  7405. # 01 DS, Not 8 SPT
  7406. # 10 SS, 8 SPT
  7407. # 11 DS, 8 SPT
  7408. #
  7409. # 11111001 Double density 3 1/2 floppy disk, high density 5 1/4
  7410. # 11110000 High density 3 1/2 floppy disk
  7411. # 11111000 Hard disk any format
  7412. #
  7413. # all FAT12 (strength=70) floppies with sectorsize 512 added by Joerg Jenderek at Jun 2013
  7414. # http://en.wikipedia.org/wiki/File_Allocation_Table#Exceptions
  7415. 512 ubelong&0xE0ffff00 0xE0ffff00
  7416. # without valid Media descriptor in place of BPB, cases with are done at other places
  7417. >21 ubyte <0xE5 floppy with old FAT filesystem
  7418. # but valid Media descriptor at begin of FAT
  7419. #>>512 ubyte =0xed 720k
  7420. #>>512 ubyte =0xf0 1440k
  7421. #>>512 ubyte =0xf8 720k
  7422. #>>512 ubyte =0xf9 1220k
  7423. #>>512 ubyte =0xfa 320k
  7424. #>>512 ubyte =0xfb 640k
  7425. >>512 ubyte =0xfc 180k
  7426. # look like an an old DOS directory entry
  7427. >>>0xA0E ubequad 0
  7428. >>>>0xA00 ubequad !0
  7429. !:mime application/x-ima
  7430. >>512 ubyte =0xfd
  7431. # look for 2nd FAT at different location to distinguish between 360k and 500k
  7432. >>>0x600 ubelong&0xE0ffff00 0xE0ffff00 360k
  7433. #>>>0x500 ubelong&0xE0ffff00 0xE0ffff00 500k
  7434. >>>0xA0E ubequad 0
  7435. !:mime application/x-ima
  7436. >>512 ubyte =0xfe
  7437. >>>0x400 ubelong&0xE0ffff00 0xE0ffff00 160k
  7438. >>>>0x60E ubequad 0
  7439. >>>>>0x600 ubequad !0
  7440. !:mime application/x-ima
  7441. #>>>0xC00 ubelong&0xE0ffff00 0xE0ffff00 1200k
  7442. >>512 ubyte =0xff 320k
  7443. >>>0x60E ubequad 0
  7444. >>>>0x600 ubequad !0
  7445. !:mime application/x-ima
  7446. >>512 ubyte x \b, Media descriptor 0x%x
  7447. # without x86 jump instruction
  7448. >>0 ulelong&0x804000E9 !0x000000E9
  7449. # assembler instructions: CLI;MOV SP,1E7;MOV AX;07c0;MOV
  7450. >>>0 ubequad 0xfabce701b8c0078e \b, MS-DOS 1.12 bootloader
  7451. # IOSYS.COM+MSDOS.COM
  7452. >>>>0xc4 use 2xDOS-filename
  7453. >>0 ulelong&0x804000E9 =0x000000E9
  7454. # only x86 short jump instruction found
  7455. >>>0 ubyte =0xEB
  7456. >>>>1 ubyte x \b, code offset 0x%x+2
  7457. # http://thestarman.pcministry.com/DOS/ibm100/Boot.htm
  7458. # assembler instructions: CLI;MOV AX,CS;MOV DS,AX;MOV DX,0
  7459. >>>>(1.b+2) ubequad 0xfa8cc88ed8ba0000 \b, PC-DOS 1.0 bootloader
  7460. # ibmbio.com+ibmdos.com
  7461. >>>>>0x176 use DOS-filename
  7462. >>>>>0x181 ubyte x \b+
  7463. >>>>>0x182 use DOS-filename
  7464. # http://thestarman.pcministry.com/DOS/ibm110/Boot.htm
  7465. # assembler instructions: CLI;MOV AX,CS;MOV DS,AX;XOR DX,DX;MOV
  7466. >>>>(1.b+2) ubequad 0xfa8cc88ed833d28e \b, PC-DOS 1.1 bootloader
  7467. # ibmbio.com+ibmdos.com
  7468. >>>>>0x18b use DOS-filename
  7469. >>>>>0x196 ubyte x \b+
  7470. >>>>>0x197 use DOS-filename
  7471. # http://en.wikipedia.org/wiki/Zenith_Data_Systems
  7472. # assembler instructions: MOV BX,07c0;MOV SS,BX;MOV SP,01c6
  7473. >>>>(1.b+2) ubequad 0xbbc0078ed3bcc601 \b, Zenith Data Systems MS-DOS 1.25 bootloader
  7474. # IO.SYS+MSDOS.SYS
  7475. >>>>>0x20 use 2xDOS-filename
  7476. # http://en.wikipedia.org/wiki/Corona_Data_Systems
  7477. # assembler instructions: MOV AX,CS;MOV DS,AX;CLI;MOV SS,AX;
  7478. >>>>(1.b+2) ubequad 0x8cc88ed8fa8ed0bc \b, MS-DOS 1.25 bootloader
  7479. # IO.SYS+MSDOS.SYS
  7480. >>>>>0x69 use 2xDOS-filename
  7481. # assembler instructions: CLI;PUSH CS;POP SS;MOV SP,7c00;
  7482. >>>>(1.b+2) ubequad 0xfa0e17bc007cb860 \b, MS-DOS 2.11 bootloader
  7483. # defect IO.SYS+MSDOS.SYS ?
  7484. #>>>>>0x162 use 2xDOS-filename
  7485. # CDROM Filesystems
  7486. # Modified for UDF by gerardo.cacciari@gmail.com
  7487. 32769 string CD001 #
  7488. !:mime application/x-iso9660-image
  7489. >38913 string !NSR0 ISO 9660 CD-ROM filesystem data
  7490. >38913 string NSR0 UDF filesystem data
  7491. >>38917 string 1 (version 1.0)
  7492. >>38917 string 2 (version 1.5)
  7493. >>38917 string 3 (version 2.0)
  7494. >>38917 byte >0x33 (unknown version, ID 0x%X)
  7495. >>38917 byte <0x31 (unknown version, ID 0x%X)
  7496. # "application id" which appears to be used as a volume label
  7497. >32808 string/T >\0 '%s'
  7498. >34816 string \000CD001\001EL\ TORITO\ SPECIFICATION (bootable)
  7499. 37633 string CD001 ISO 9660 CD-ROM filesystem data (raw 2352 byte sectors)
  7500. !:mime application/x-iso9660-image
  7501. 32777 string CDROM High Sierra CD-ROM filesystem data
  7502. # .cso files
  7503. 0 string CISO Compressed ISO CD image
  7504. # cramfs filesystem - russell@coker.com.au
  7505. 0 lelong 0x28cd3d45 Linux Compressed ROM File System data, little endian
  7506. >4 lelong x size %lu
  7507. >8 lelong &1 version #2
  7508. >8 lelong &2 sorted_dirs
  7509. >8 lelong &4 hole_support
  7510. >32 lelong x CRC 0x%x,
  7511. >36 lelong x edition %lu,
  7512. >40 lelong x %lu blocks,
  7513. >44 lelong x %lu files
  7514. 0 belong 0x28cd3d45 Linux Compressed ROM File System data, big endian
  7515. >4 belong x size %lu
  7516. >8 belong &1 version #2
  7517. >8 belong &2 sorted_dirs
  7518. >8 belong &4 hole_support
  7519. >32 belong x CRC 0x%x,
  7520. >36 belong x edition %lu,
  7521. >40 belong x %lu blocks,
  7522. >44 belong x %lu files
  7523. # reiserfs - russell@coker.com.au
  7524. 0x10034 string ReIsErFs ReiserFS V3.5
  7525. 0x10034 string ReIsEr2Fs ReiserFS V3.6
  7526. 0x10034 string ReIsEr3Fs ReiserFS V3.6.19
  7527. >0x1002c leshort x block size %d
  7528. >0x10032 leshort &2 (mounted or unclean)
  7529. >0x10000 lelong x num blocks %d
  7530. >0x10040 lelong 1 tea hash
  7531. >0x10040 lelong 2 yura hash
  7532. >0x10040 lelong 3 r5 hash
  7533. # JFFS - russell@coker.com.au
  7534. 0 lelong 0x34383931 Linux Journalled Flash File system, little endian
  7535. 0 belong 0x34383931 Linux Journalled Flash File system, big endian
  7536. # EST flat binary format (which isn't, but anyway)
  7537. # From: Mark Brown <broonie@sirena.org.uk>
  7538. 0 string ESTFBINR EST flat binary
  7539. # Aculab VoIP firmware
  7540. # From: Mark Brown <broonie@sirena.org.uk>
  7541. 0 string VoIP\ Startup\ and Aculab VoIP firmware
  7542. >35 string x format %s
  7543. # From: Mark Brown <broonie@sirena.org.uk> [old]
  7544. # From: Behan Webster <behanw@websterwood.com>
  7545. 0 belong 0x27051956 u-boot legacy uImage,
  7546. >32 string x %s,
  7547. >28 byte 0 Invalid os/
  7548. >28 byte 1 OpenBSD/
  7549. >28 byte 2 NetBSD/
  7550. >28 byte 3 FreeBSD/
  7551. >28 byte 4 4.4BSD/
  7552. >28 byte 5 Linux/
  7553. >28 byte 6 SVR4/
  7554. >28 byte 7 Esix/
  7555. >28 byte 8 Solaris/
  7556. >28 byte 9 Irix/
  7557. >28 byte 10 SCO/
  7558. >28 byte 11 Dell/
  7559. >28 byte 12 NCR/
  7560. >28 byte 13 LynxOS/
  7561. >28 byte 14 VxWorks/
  7562. >28 byte 15 pSOS/
  7563. >28 byte 16 QNX/
  7564. >28 byte 17 Firmware/
  7565. >28 byte 18 RTEMS/
  7566. >28 byte 19 ARTOS/
  7567. >28 byte 20 Unity OS/
  7568. >28 byte 21 INTEGRITY/
  7569. >29 byte 0 \bInvalid CPU,
  7570. >29 byte 1 \bAlpha,
  7571. >29 byte 2 \bARM,
  7572. >29 byte 3 \bIntel x86,
  7573. >29 byte 4 \bIA64,
  7574. >29 byte 5 \bMIPS,
  7575. >29 byte 6 \bMIPS 64-bit,
  7576. >29 byte 7 \bPowerPC,
  7577. >29 byte 8 \bIBM S390,
  7578. >29 byte 9 \bSuperH,
  7579. >29 byte 10 \bSparc,
  7580. >29 byte 11 \bSparc 64-bit,
  7581. >29 byte 12 \bM68K,
  7582. >29 byte 13 \bNios-32,
  7583. >29 byte 14 \bMicroBlaze,
  7584. >29 byte 15 \bNios-II,
  7585. >29 byte 16 \bBlackfin,
  7586. >29 byte 17 \bAVR32,
  7587. >29 byte 18 \bSTMicroelectronics ST200,
  7588. >30 byte 0 Invalid Image
  7589. >30 byte 1 Standalone Program
  7590. >30 byte 2 OS Kernel Image
  7591. >30 byte 3 RAMDisk Image
  7592. >30 byte 4 Multi-File Image
  7593. >30 byte 5 Firmware Image
  7594. >30 byte 6 Script File
  7595. >30 byte 7 Filesystem Image (any type)
  7596. >30 byte 8 Binary Flat Device Tree BLOB
  7597. >31 byte 0 (Not compressed),
  7598. >31 byte 1 (gzip),
  7599. >31 byte 2 (bzip2),
  7600. >31 byte 3 (lzma),
  7601. >12 belong x %d bytes,
  7602. >8 bedate x %s,
  7603. >16 belong x Load Address: 0x%08X,
  7604. >20 belong x Entry Point: 0x%08X,
  7605. >4 belong x Header CRC: 0x%08X,
  7606. >24 belong x Data CRC: 0x%08X
  7607. # JFFS2 file system
  7608. 0 leshort 0x1984 Linux old jffs2 filesystem data little endian
  7609. 0 leshort 0x1985 Linux jffs2 filesystem data little endian
  7610. # Squashfs
  7611. 0 string sqsh Squashfs filesystem, big endian,
  7612. >28 beshort x version %d.
  7613. >30 beshort x \b%d,
  7614. >28 beshort <3
  7615. >>8 belong x %d bytes,
  7616. >28 beshort >2
  7617. >>28 beshort <4
  7618. >>>63 bequad x %lld bytes,
  7619. >>28 beshort >3
  7620. >>>40 bequad x %lld bytes,
  7621. #>>67 belong x %d bytes,
  7622. >4 belong x %d inodes,
  7623. >28 beshort <2
  7624. >>32 beshort x blocksize: %d bytes,
  7625. >28 beshort >1
  7626. >>28 beshort <4
  7627. >>>51 belong x blocksize: %d bytes,
  7628. >>28 beshort >3
  7629. >>>12 belong x blocksize: %d bytes,
  7630. >28 beshort <4
  7631. >>39 bedate x created: %s
  7632. >28 beshort >3
  7633. >>8 bedate x created: %s
  7634. 0 string hsqs Squashfs filesystem, little endian,
  7635. >28 leshort x version %d.
  7636. >30 leshort x \b%d,
  7637. >28 leshort <3
  7638. >>8 lelong x %d bytes,
  7639. >28 leshort >2
  7640. >>28 leshort <4
  7641. >>>63 lequad x %lld bytes,
  7642. >>28 leshort >3
  7643. >>>40 lequad x %lld bytes,
  7644. #>>63 lelong x %d bytes,
  7645. >4 lelong x %d inodes,
  7646. >28 leshort <2
  7647. >>32 leshort x blocksize: %d bytes,
  7648. >28 leshort >1
  7649. >>28 leshort <4
  7650. >>>51 lelong x blocksize: %d bytes,
  7651. >>28 leshort >3
  7652. >>>12 lelong x blocksize: %d bytes,
  7653. >28 leshort <4
  7654. >>39 ledate x created: %s
  7655. >28 leshort >3
  7656. >>8 ledate x created: %s
  7657. # AFS Dump Magic
  7658. # From: Ty Sarna <tsarna@sarna.org>
  7659. 0 string \x01\xb3\xa1\x13\x22 AFS Dump
  7660. >&0 belong x (v%d)
  7661. >>&0 byte 0x76
  7662. >>>&0 belong x Vol %d,
  7663. >>>>&0 byte 0x6e
  7664. >>>>>&0 string x %s
  7665. >>>>>>&1 byte 0x74
  7666. >>>>>>>&0 beshort 2
  7667. >>>>>>>>&4 bedate x on: %s
  7668. >>>>>>>>&0 bedate =0 full dump
  7669. >>>>>>>>&0 bedate !0 incremental since: %s
  7670. #----------------------------------------------------------
  7671. #delta ISO Daniel Novotny (dnovotny@redhat.com)
  7672. 0 string DISO Delta ISO data
  7673. >4 belong x version %d
  7674. # VMS backup savesets - gerardo.cacciari@gmail.com
  7675. #
  7676. 4 string \x01\x00\x01\x00\x01\x00
  7677. >(0.s+16) string \x01\x01
  7678. >>&(&0.b+8) byte 0x42 OpenVMS backup saveset data
  7679. >>>40 lelong x (block size %d,
  7680. >>>49 string >\0 original name '%s',
  7681. >>>2 short 1024 VAX generated)
  7682. >>>2 short 2048 AXP generated)
  7683. >>>2 short 4096 I64 generated)
  7684. # Summary: Oracle Clustered Filesystem
  7685. # Created by: Aaron Botsis <redhat@digitalmafia.org>
  7686. 8 string OracleCFS Oracle Clustered Filesystem,
  7687. >4 long x rev %d
  7688. >0 long x \b.%d,
  7689. >560 string x label: %.64s,
  7690. >136 string x mountpoint: %.128s
  7691. # Summary: Oracle ASM tagged volume
  7692. # Created by: Aaron Botsis <redhat@digitalmafia.org>
  7693. 32 string ORCLDISK Oracle ASM Volume,
  7694. >40 string x Disk Name: %0.12s
  7695. 32 string ORCLCLRD Oracle ASM Volume (cleared),
  7696. >40 string x Disk Name: %0.12s
  7697. # Oracle Clustered Filesystem - Aaron Botsis <redhat@digitalmafia.org>
  7698. 8 string OracleCFS Oracle Clustered Filesystem,
  7699. >4 long x rev %d
  7700. >0 long x \b.%d,
  7701. >560 string x label: %.64s,
  7702. >136 string x mountpoint: %.128s
  7703. # Oracle ASM tagged volume - Aaron Botsis <redhat@digitalmafia.org>
  7704. 32 string ORCLDISK Oracle ASM Volume,
  7705. >40 string x Disk Name: %0.12s
  7706. 32 string ORCLCLRD Oracle ASM Volume (cleared),
  7707. >40 string x Disk Name: %0.12s
  7708. # Compaq/HP RILOE floppy image
  7709. # From: Dirk Jagdmann <doj@cubic.org>
  7710. 0 string CPQRFBLO Compaq/HP RILOE floppy image
  7711. #------------------------------------------------------------------------------
  7712. # Files-11 On-Disk Structure (File system for various RSX-11 and VMS flavours).
  7713. # These bits come from LBN 1 (home block) of ODS-1, ODS-2 and ODS-5 volumes,
  7714. # which is mapped to VBN 2 of [000000]INDEXF.SYS;1 - gerardo.cacciari@gmail.com
  7715. #
  7716. 1008 string DECFILE11 Files-11 On-Disk Structure
  7717. >525 byte x Level %d
  7718. >525 byte x (ODS-%d);
  7719. >1017 string A RSX-11, VAX/VMS or OpenVMS VAX file system;
  7720. >1017 string B
  7721. >>525 byte 2 VAX/VMS or OpenVMS file system;
  7722. >>525 byte 5 OpenVMS Alpha or Itanium file system;
  7723. >984 string x volume label is '%-12.12s'
  7724. # From: Thomas Klausner <wiz@NetBSD.org>
  7725. # http://filext.com/file-extension/DAA
  7726. # describes the daa file format. The magic would be:
  7727. 0 string DAA\x0\x0\x0\x0\x0 PowerISO Direct-Access-Archive
  7728. # From Albert Cahalan <acahalan@gmail.com>
  7729. # really le32 operation,destination,payloadsize (but quite predictable)
  7730. # 01 00 00 00 00 00 00 c0 00 02 00 00
  7731. 0 string \1\0\0\0\0\0\0\300\0\2\0\0 Marvell Libertas firmware
  7732. # From Eric Sandeen
  7733. # GFS2
  7734. 0x10000 belong 0x01161970
  7735. >0x10018 belong 0x0000051d GFS1 Filesystem
  7736. >>0x10024 belong x (blocksize %d,
  7737. >>0x10060 string >\0 lockproto %s)
  7738. >0x10018 belong 0x00000709 GFS2 Filesystem
  7739. >>0x10024 belong x (blocksize %d,
  7740. >>0x10060 string >\0 lockproto %s)
  7741. # BTRFS
  7742. 0x10040 string _BHRfS_M BTRFS Filesystem
  7743. >0x1012b string >\0 (label "%s",
  7744. >0x10090 lelong x sectorsize %d,
  7745. >0x10094 lelong x nodesize %d,
  7746. >0x10098 lelong x leafsize %d)
  7747. # dvdisaster's .ecc
  7748. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  7749. 0 string *dvdisaster* dvdisaster error correction file
  7750. # xfs metadump image
  7751. # mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog
  7752. # but can we do the << ? For now it's always 512 (0x200) anyway.
  7753. 0 string XFSM
  7754. >0x200 string XFSB XFS filesystem metadump image
  7755. # Type: CROM filesystem
  7756. # From: Werner Fink <werner@suse.de>
  7757. 0 string CROMFS CROMFS
  7758. >6 string >\0 \b version %2.2s,
  7759. >8 ulequad >0 \b block data at %lld,
  7760. >16 ulequad >0 \b fblock table at %lld,
  7761. >24 ulequad >0 \b inode table at %lld,
  7762. >32 ulequad >0 \b root at %lld,
  7763. >40 ulelong >0 \b fblock size = %ld,
  7764. >44 ulelong >0 \b block size = %ld,
  7765. >48 ulequad >0 \b bytes = %lld
  7766. # Type: xfs metadump image
  7767. # From: Daniel Novotny <dnovotny@redhat.com>
  7768. # mb_magic XFSM at 0; superblock magic XFSB at 1 << mb_blocklog
  7769. # but can we do the << ? For now it's always 512 (0x200) anyway.
  7770. 0 string XFSM
  7771. >0x200 string XFSB XFS filesystem metadump image
  7772. # Type: delta ISO
  7773. # From: Daniel Novotny <dnovotny@redhat.com>
  7774. 0 string DISO Delta ISO data,
  7775. >4 belong x version %d
  7776. # JFS2 (Journaling File System) image. (Old JFS1 has superblock at 0x1000.)
  7777. # See linux/fs/jfs/jfs_superblock.h for layout; see jfs_filsys.h for flags.
  7778. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  7779. 0x8000 string JFS1
  7780. # Because it's text-only magic, check a binary value (version) to be sure.
  7781. # Should always be 2, but mkfs.jfs writes it as 1. Needs to be 2 or 1 to be
  7782. # mountable.
  7783. >&0 lelong <3 JFS2 filesystem image
  7784. # Label is followed by a UUID; we have to limit string length to avoid
  7785. # appending the UUID in the case of a 16-byte label.
  7786. >>&144 regex [\x20-\x7E]{1,16} (label "%s")
  7787. >>&0 lequad x \b, %lld blocks
  7788. >>&8 lelong x \b, blocksize %d
  7789. >>&32 lelong&0x00000006 >0 (dirty)
  7790. >>&36 lelong >0 (compressed)
  7791. # LFS
  7792. 0 lelong 0x070162 LFS filesystem image
  7793. >4 lelong 1 version 1,
  7794. >>8 lelong x \b blocks %u,
  7795. >>12 lelong x \b blocks per segment %u,
  7796. >4 lelong 2 version 2,
  7797. >>8 lelong x \b fragments %u,
  7798. >>12 lelong x \b bytes per segment %u,
  7799. >16 lelong x \b disk blocks %u,
  7800. >20 lelong x \b block size %u,
  7801. >24 lelong x \b fragment size %u,
  7802. >28 lelong x \b fragments per block %u,
  7803. >32 lelong x \b start for free list %u,
  7804. >36 lelong x \b number of free blocks %d,
  7805. >40 lelong x \b number of files %u,
  7806. >44 lelong x \b blocks available for writing %d,
  7807. >48 lelong x \b inodes in cache %d,
  7808. >52 lelong x \b inode file disk address 0x%x,
  7809. >56 lelong x \b inode file inode number %u,
  7810. >60 lelong x \b address of last segment written 0x%x,
  7811. >64 lelong x \b address of next segment to write 0x%x,
  7812. >68 lelong x \b address of current segment written 0x%x
  7813. 0 string td\000 floppy image data (TeleDisk, compressed)
  7814. 0 string TD\000 floppy image data (TeleDisk)
  7815. 0 string CQ\024 floppy image data (CopyQM,
  7816. >16 leshort x %d sectors,
  7817. >18 leshort x %d heads.)
  7818. 0 string ACT\020Apricot\020disk\020image\032\004 floppy image data (ApriDisk)
  7819. 0 beshort 0xAA58 floppy image data (IBM SaveDskF, old)
  7820. 0 beshort 0xAA59 floppy image data (IBM SaveDskF)
  7821. 0 beshort 0xAA5A floppy image data (IBM SaveDskF, compressed)
  7822. 0 string \074CPM_Disk\076 disk image data (YAZE)
  7823. # ReFS
  7824. # Richard W.M. Jones <rjones@redhat.com>
  7825. 0 string \0\0\0ReFS\0 ReFS filesystem image
  7826. # EFW encase image file format:
  7827. # Gregoire Passault
  7828. # http://www.forensicswiki.org/wiki/Encase_image_file_format
  7829. 0 string EVF\x09\x0d\x0a\xff\x00 EWF/Expert Witness/EnCase image file format
  7830. #------------------------------------------------------------------------------
  7831. # $File: flash,v 1.9 2009/11/08 01:30:01 christos Exp $
  7832. # flash: file(1) magic for Macromedia Flash file format
  7833. #
  7834. # See
  7835. #
  7836. # http://www.macromedia.com/software/flash/open/
  7837. #
  7838. 0 string FWS Macromedia Flash data,
  7839. >3 byte x version %d
  7840. !:mime application/x-shockwave-flash
  7841. 0 string CWS Macromedia Flash data (compressed),
  7842. !:mime application/x-shockwave-flash
  7843. >3 byte x version %d
  7844. # From: Cal Peake <cp@absolutedigital.net>
  7845. 0 string FLV Macromedia Flash Video
  7846. !:mime video/x-flv
  7847. #
  7848. # Yosu Gomez
  7849. 0 string AGD2\xbe\xb8\xbb\xcd\x00 Macromedia Freehand 7 Document
  7850. 0 string AGD3\xbe\xb8\xbb\xcc\x00 Macromedia Freehand 8 Document
  7851. # From Dave Wilson
  7852. 0 string AGD4\xbe\xb8\xbb\xcb\x00 Macromedia Freehand 9 Document
  7853. #------------------------------------------------------------------------------
  7854. # $File: fonts,v 1.26 2013/03/09 22:36:00 christos Exp $
  7855. # fonts: file(1) magic for font data
  7856. #
  7857. 0 search/1 FONT ASCII vfont text
  7858. 0 short 0436 Berkeley vfont data
  7859. 0 short 017001 byte-swapped Berkeley vfont data
  7860. # PostScript fonts (must precede "printer" entries), quinlan@yggdrasil.com
  7861. 0 string %!PS-AdobeFont-1. PostScript Type 1 font text
  7862. >20 string >\0 (%s)
  7863. 6 string %!PS-AdobeFont-1. PostScript Type 1 font program data
  7864. 0 string %!FontType1 PostScript Type 1 font program data
  7865. 6 string %!FontType1 PostScript Type 1 font program data
  7866. 0 string %!PS-Adobe-3.0\ Resource-Font PostScript Type 1 font text
  7867. # X11 font files in SNF (Server Natural Format) format
  7868. # updated by Joerg Jenderek at Feb 2013
  7869. # http://computer-programming-forum.com/51-perl/8f22fb96d2e34bab.htm
  7870. 0 belong 00000004 X11 SNF font data, MSB first
  7871. #>104 belong 00000004 X11 SNF font data, MSB first
  7872. !:mime application/x-font-sfn
  7873. # GRR: line below too general as it catches also Xbase index file t3-CHAR.NDX
  7874. 0 lelong 00000004
  7875. >104 lelong 00000004 X11 SNF font data, LSB first
  7876. !:mime application/x-font-sfn
  7877. # X11 Bitmap Distribution Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  7878. 0 search/1 STARTFONT\ X11 BDF font text
  7879. # X11 fonts, from Daniel Quinlan (quinlan@yggdrasil.com)
  7880. # PCF must come before SGI additions ("MIPSEL MIPS-II COFF" collides)
  7881. 0 string \001fcp X11 Portable Compiled Font data
  7882. >12 byte 0x02 \b, LSB first
  7883. >12 byte 0x0a \b, MSB first
  7884. 0 string D1.0\015 X11 Speedo font data
  7885. #------------------------------------------------------------------------------
  7886. # FIGlet fonts and controlfiles
  7887. # From figmagic supplied with Figlet version 2.2
  7888. # "David E. O'Brien" <obrien@FreeBSD.ORG>
  7889. 0 string flf FIGlet font
  7890. >3 string >2a version %-2.2s
  7891. 0 string flc FIGlet controlfile
  7892. >3 string >2a version %-2.2s
  7893. # libGrx graphics lib fonts, from Albert Cahalan (acahalan@cs.uml.edu)
  7894. # Used with djgpp (DOS Gnu C++), sometimes Linux or Turbo C++
  7895. 0 belong 0x14025919 libGrx font data,
  7896. >8 leshort x %dx
  7897. >10 leshort x \b%d
  7898. >40 string x %s
  7899. # Misc. DOS VGA fonts, from Albert Cahalan (acahalan@cs.uml.edu)
  7900. 0 belong 0xff464f4e DOS code page font data collection
  7901. 7 belong 0x00454741 DOS code page font data
  7902. 7 belong 0x00564944 DOS code page font data (from Linux?)
  7903. 4098 string DOSFONT DOSFONT2 encrypted font data
  7904. # downloadable fonts for browser (prints type) anthon@mnt.org
  7905. 0 string PFR1 PFR1 font
  7906. >102 string >0 \b: %s
  7907. # True Type fonts
  7908. 0 string \000\001\000\000\000 TrueType font data
  7909. !:mime application/x-font-ttf
  7910. 0 string \007\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
  7911. 0 string \012\001\001\000Copyright\ (c)\ 199 Adobe Multiple Master font
  7912. # TrueType/OpenType font collections (.ttc)
  7913. # http://www.microsoft.com/typography/otspec/otff.htm
  7914. 0 string ttcf TrueType font collection data
  7915. >4 belong 0x00010000 \b, 1.0
  7916. >>8 belong >0 \b, %d fonts
  7917. >4 belong 0x00020000 \b, 2.0
  7918. >>8 belong >0 \b, %d fonts
  7919. # 0x44454947 = 'DSIG'
  7920. >>>16 belong 0x44534947 \b, digitally signed
  7921. # Opentype font data from Avi Bercovich
  7922. 0 string OTTO OpenType font data
  7923. !:mime application/vnd.ms-opentype
  7924. # Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
  7925. 0 string SplineFontDB: Spline Font Database
  7926. !:mime application/vnd.font-fontforge-sfd
  7927. >14 string x version %s
  7928. # EOT
  7929. 34 string LP Embedded OpenType (EOT)
  7930. !:mime application/vnd.ms-fontobject
  7931. # Web Open Font Format (.woff)
  7932. # http://www.w3.org/TR/WOFF/
  7933. 0 string wOFF Web Open Font Format
  7934. >4 belong x \b, flavor %d
  7935. >8 belong x \b, length %d
  7936. >20 beshort x \b, version %hd
  7937. >22 beshort x \b.%hd
  7938. #------------------------------------------------------------------------------
  7939. # $File: fortran,v 1.7 2012/06/21 01:55:02 christos Exp $
  7940. # FORTRAN source
  7941. 0 regex/100 \^[Cc][\ \t] FORTRAN program
  7942. !:mime text/x-fortran
  7943. !:strength - 5
  7944. #------------------------------------------------------------------------------
  7945. # $File: frame,v 1.12 2009/09/19 16:28:09 christos Exp $
  7946. # frame: file(1) magic for FrameMaker files
  7947. #
  7948. # This stuff came on a FrameMaker demo tape, most of which is
  7949. # copyright, but this file is "published" as witness the following:
  7950. #
  7951. # Note that this is the Framemaker Maker Interchange Format, not the
  7952. # Normal format which would be application/vnd.framemaker.
  7953. #
  7954. 0 string \<MakerFile FrameMaker document
  7955. !:mime application/x-mif
  7956. >11 string 5.5 (5.5
  7957. >11 string 5.0 (5.0
  7958. >11 string 4.0 (4.0
  7959. >11 string 3.0 (3.0
  7960. >11 string 2.0 (2.0
  7961. >11 string 1.0 (1.0
  7962. >14 byte x %c)
  7963. 0 string \<MIFFile FrameMaker MIF (ASCII) file
  7964. !:mime application/x-mif
  7965. >9 string 4.0 (4.0)
  7966. >9 string 3.0 (3.0)
  7967. >9 string 2.0 (2.0)
  7968. >9 string 1.0 (1.x)
  7969. 0 search/1 \<MakerDictionary FrameMaker Dictionary text
  7970. !:mime application/x-mif
  7971. >17 string 3.0 (3.0)
  7972. >17 string 2.0 (2.0)
  7973. >17 string 1.0 (1.x)
  7974. 0 string \<MakerScreenFont FrameMaker Font file
  7975. !:mime application/x-mif
  7976. >17 string 1.01 (%s)
  7977. 0 string \<MML FrameMaker MML file
  7978. !:mime application/x-mif
  7979. 0 string \<BookFile FrameMaker Book file
  7980. !:mime application/x-mif
  7981. >10 string 3.0 (3.0
  7982. >10 string 2.0 (2.0
  7983. >10 string 1.0 (1.0
  7984. >13 byte x %c)
  7985. # XXX - this book entry should be verified, if you find one, uncomment this
  7986. #0 string \<Book\ FrameMaker Book (ASCII) file
  7987. #!:mime application/x-mif
  7988. #>6 string 3.0 (3.0)
  7989. #>6 string 2.0 (2.0)
  7990. #>6 string 1.0 (1.0)
  7991. 0 string \<Maker Intermediate Print File FrameMaker IPL file
  7992. !:mime application/x-mif
  7993. #------------------------------------------------------------------------------
  7994. # $File: freebsd,v 1.7 2009/09/19 16:28:09 christos Exp $
  7995. # freebsd: file(1) magic for FreeBSD objects
  7996. #
  7997. # All new-style FreeBSD magic numbers are in host byte order (i.e.,
  7998. # little-endian on x86).
  7999. #
  8000. # XXX - this comes from the file "freebsd" in a recent FreeBSD version of
  8001. # "file"; it, and the NetBSD stuff in "netbsd", appear to use different
  8002. # schemes for distinguishing between executable images, shared libraries,
  8003. # and object files.
  8004. #
  8005. # FreeBSD says:
  8006. #
  8007. # Regardless of whether it's pure, demand-paged, or none of the
  8008. # above:
  8009. #
  8010. # if the entry point is < 4096, then it's a shared library if
  8011. # the "has run-time loader information" bit is set, and is
  8012. # position-independent if the "is position-independent" bit
  8013. # is set;
  8014. #
  8015. # if the entry point is >= 4096 (or >4095, same thing), then it's
  8016. # an executable, and is dynamically-linked if the "has run-time
  8017. # loader information" bit is set.
  8018. #
  8019. # On x86, NetBSD says:
  8020. #
  8021. # If it's neither pure nor demand-paged:
  8022. #
  8023. # if it has the "has run-time loader information" bit set, it's
  8024. # a dynamically-linked executable;
  8025. #
  8026. # if it doesn't have that bit set, then:
  8027. #
  8028. # if it has the "is position-independent" bit set, it's
  8029. # position-independent;
  8030. #
  8031. # if the entry point is non-zero, it's an executable, otherwise
  8032. # it's an object file.
  8033. #
  8034. # If it's pure:
  8035. #
  8036. # if it has the "has run-time loader information" bit set, it's
  8037. # a dynamically-linked executable, otherwise it's just an
  8038. # executable.
  8039. #
  8040. # If it's demand-paged:
  8041. #
  8042. # if it has the "has run-time loader information" bit set,
  8043. # then:
  8044. #
  8045. # if the entry point is < 4096, it's a shared library;
  8046. #
  8047. # if the entry point is = 4096 or > 4096 (i.e., >= 4096),
  8048. # it's a dynamically-linked executable);
  8049. #
  8050. # if it doesn't have the "has run-time loader information" bit
  8051. # set, then it's just an executable.
  8052. #
  8053. # (On non-x86, NetBSD does much the same thing, except that it uses
  8054. # 8192 on 68K - except for "68k4k", which is presumably "68K with 4K
  8055. # pages - SPARC, and MIPS, presumably because Sun-3's and Sun-4's
  8056. # had 8K pages; dunno about MIPS.)
  8057. #
  8058. # I suspect the two will differ only in perverse and uninteresting cases
  8059. # ("shared" libraries that aren't demand-paged and whose pages probably
  8060. # won't actually be shared, executables with entry points <4096).
  8061. #
  8062. # I leave it to those more familiar with FreeBSD and NetBSD to figure out
  8063. # what the right answer is (although using ">4095", FreeBSD-style, is
  8064. # probably better than separately checking for "=4096" and ">4096",
  8065. # NetBSD-style). (The old "netbsd" file analyzed FreeBSD demand paged
  8066. # executables using the NetBSD technique.)
  8067. #
  8068. 0 lelong&0377777777 041400407 FreeBSD/i386
  8069. >20 lelong <4096
  8070. >>3 byte&0xC0 &0x80 shared library
  8071. >>3 byte&0xC0 0x40 PIC object
  8072. >>3 byte&0xC0 0x00 object
  8073. >20 lelong >4095
  8074. >>3 byte&0x80 0x80 dynamically linked executable
  8075. >>3 byte&0x80 0x00 executable
  8076. >16 lelong >0 not stripped
  8077. 0 lelong&0377777777 041400410 FreeBSD/i386 pure
  8078. >20 lelong <4096
  8079. >>3 byte&0xC0 &0x80 shared library
  8080. >>3 byte&0xC0 0x40 PIC object
  8081. >>3 byte&0xC0 0x00 object
  8082. >20 lelong >4095
  8083. >>3 byte&0x80 0x80 dynamically linked executable
  8084. >>3 byte&0x80 0x00 executable
  8085. >16 lelong >0 not stripped
  8086. 0 lelong&0377777777 041400413 FreeBSD/i386 demand paged
  8087. >20 lelong <4096
  8088. >>3 byte&0xC0 &0x80 shared library
  8089. >>3 byte&0xC0 0x40 PIC object
  8090. >>3 byte&0xC0 0x00 object
  8091. >20 lelong >4095
  8092. >>3 byte&0x80 0x80 dynamically linked executable
  8093. >>3 byte&0x80 0x00 executable
  8094. >16 lelong >0 not stripped
  8095. 0 lelong&0377777777 041400314 FreeBSD/i386 compact demand paged
  8096. >20 lelong <4096
  8097. >>3 byte&0xC0 &0x80 shared library
  8098. >>3 byte&0xC0 0x40 PIC object
  8099. >>3 byte&0xC0 0x00 object
  8100. >20 lelong >4095
  8101. >>3 byte&0x80 0x80 dynamically linked executable
  8102. >>3 byte&0x80 0x00 executable
  8103. >16 lelong >0 not stripped
  8104. # XXX gross hack to identify core files
  8105. # cores start with a struct tss; we take advantage of the following:
  8106. # byte 7: highest byte of the kernel stack pointer, always 0xfe
  8107. # 8/9: kernel (ring 0) ss value, always 0x0010
  8108. # 10 - 27: ring 1 and 2 ss/esp, unused, thus always 0
  8109. # 28: low order byte of the current PTD entry, always 0 since the
  8110. # PTD is page-aligned
  8111. #
  8112. 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
  8113. >1039 string >\0 from '%s'
  8114. # /var/run/ld.so.hints
  8115. # What are you laughing about?
  8116. 0 lelong 011421044151 ld.so hints file (Little Endian
  8117. >4 lelong >0 \b, version %d)
  8118. >4 belong <1 \b)
  8119. 0 belong 011421044151 ld.so hints file (Big Endian
  8120. >4 belong >0 \b, version %d)
  8121. >4 belong <1 \b)
  8122. #
  8123. # Files generated by FreeBSD scrshot(1)/vidcontrol(1) utilities
  8124. #
  8125. 0 string SCRSHOT_ scrshot(1) screenshot,
  8126. >8 byte x version %d,
  8127. >9 byte 2 %d bytes in header,
  8128. >>10 byte x %d chars wide by
  8129. >>11 byte x %d chars high
  8130. #------------------------------------------------------------------------------
  8131. # $File: fsav,v 1.13 2013/03/25 17:18:47 christos Exp $
  8132. # fsav: file(1) magic for datafellows fsav virus definition files
  8133. # Anthon van der Neut (anthon@mnt.org)
  8134. # ftp://ftp.f-prot.com/pub/{macrdef2.zip,nomacro.def}
  8135. 0 beshort 0x1575 fsav macro virus signatures
  8136. >8 leshort >0 (%d-
  8137. >11 byte >0 \b%02d-
  8138. >10 byte >0 \b%02d)
  8139. # ftp://ftp.f-prot.com/pub/sign.zip
  8140. #10 ubyte <12
  8141. #>9 ubyte <32
  8142. #>>8 ubyte 0x0a
  8143. #>>>12 ubyte 0x07
  8144. #>>>>11 uleshort >0 fsav DOS/Windows virus signatures (%d-
  8145. #>>>>10 byte 0 \b01-
  8146. #>>>>10 byte 1 \b02-
  8147. #>>>>10 byte 2 \b03-
  8148. #>>>>10 byte 3 \b04-
  8149. #>>>>10 byte 4 \b05-
  8150. #>>>>10 byte 5 \b06-
  8151. #>>>>10 byte 6 \b07-
  8152. #>>>>10 byte 7 \b08-
  8153. #>>>>10 byte 8 \b09-
  8154. #>>>>10 byte 9 \b10-
  8155. #>>>>10 byte 10 \b11-
  8156. #>>>>10 byte 11 \b12-
  8157. #>>>>9 ubyte >0 \b%02d)
  8158. # ftp://ftp.f-prot.com/pub/sign2.zip
  8159. #0 ubyte 0x62
  8160. #>1 ubyte 0xF5
  8161. #>>2 ubyte 0x1
  8162. #>>>3 ubyte 0x1
  8163. #>>>>4 ubyte 0x0e
  8164. #>>>>>13 ubyte >0 fsav virus signatures
  8165. #>>>>>>11 ubyte x size 0x%02x
  8166. #>>>>>>12 ubyte x \b%02x
  8167. #>>>>>>13 ubyte x \b%02x bytes
  8168. # Joerg Jenderek: joerg dot jenderek at web dot de
  8169. # http://www.clamav.net/doc/latest/html/node45.html
  8170. # .cvd files start with a 512 bytes colon separated header
  8171. # ClamAV-VDB:buildDate:version:signaturesNumbers:functionalityLevelRequired:MD5:Signature:builder:buildTime
  8172. # + gzipped tarball files
  8173. 0 string ClamAV-VDB:
  8174. >11 string >\0 Clam AntiVirus database %-.23s
  8175. >>34 string :
  8176. >>>35 string !: \b, version
  8177. >>>>35 string x \b%-.1s
  8178. >>>>>36 string !:
  8179. >>>>>>36 string x \b%-.1s
  8180. >>>>>>>37 string !:
  8181. >>>>>>>>37 string x \b%-.1s
  8182. >>>>>>>>>38 string !:
  8183. >>>>>>>>>>38 string x \b%-.1s
  8184. >512 string \037\213 \b, gzipped
  8185. >769 string ustar\0 \b, tarred
  8186. # Type: Grisoft AVG AntiVirus
  8187. # From: David Newgas <david@newgas.net>
  8188. 0 string AVG7_ANTIVIRUS_VAULT_FILE AVG 7 Antivirus vault file data
  8189. 0 string X5O!P%@AP[4\\PZX54(P^)7CC)7}$EICAR
  8190. >33 string -STANDARD-ANTIVIRUS-TEST-FILE!$H+H* EICAR virus test files
  8191. #------------------------------------------------------------------------------
  8192. # $File: fusecompress,v 1.2 2011/08/08 09:05:55 christos Exp $
  8193. # fusecompress: file(1) magic for fusecompress
  8194. 0 string \037\135\211 FuseCompress(ed) data
  8195. >3 byte 0x00 (none format)
  8196. >3 byte 0x01 (bz2 format)
  8197. >3 byte 0x02 (gz format)
  8198. >3 byte 0x03 (lzo format)
  8199. >3 byte 0x04 (xor format)
  8200. >3 byte >0x04 (unknown format)
  8201. >4 long x uncompressed size: %d
  8202. #------------------------------------------------------------------------------
  8203. # $File: games,v 1.13 2012/02/13 22:50:50 christos Exp $
  8204. # games: file(1) for games
  8205. # Fabio Bonelli <fabiobonelli@libero.it>
  8206. # Quake II - III data files
  8207. 0 string IDP2 Quake II 3D Model file,
  8208. >20 long x %lu skin(s),
  8209. >8 long x (%lu x
  8210. >12 long x %lu),
  8211. >40 long x %lu frame(s),
  8212. >16 long x Frame size %lu bytes,
  8213. >24 long x %lu vertices/frame,
  8214. >28 long x %lu texture coordinates,
  8215. >32 long x %lu triangles/frame
  8216. 0 string IBSP Quake
  8217. >4 long 0x26 II Map file (BSP)
  8218. >4 long 0x2E III Map file (BSP)
  8219. 0 string IDS2 Quake II SP2 sprite file
  8220. #---------------------------------------------------------------------------
  8221. # Doom and Quake
  8222. # submitted by Nicolas Patrois
  8223. 0 string \xcb\x1dBoom\xe6\xff\x03\x01 Boom or linuxdoom demo
  8224. # some doom lmp files don't match, I've got one beginning with \x6d\x02\x01\x01
  8225. 24 string LxD\ 203 Linuxdoom save
  8226. >0 string x , name=%s
  8227. >44 string x , world=%s
  8228. # Quake
  8229. 0 string PACK Quake I or II world or extension
  8230. >8 lelong >0 \b, %d entries
  8231. #0 string -1\x0a Quake I demo
  8232. #>30 string x version %.4s
  8233. #>61 string x level %s
  8234. #0 string 5\x0a Quake I save
  8235. # The levels
  8236. # Quake 1
  8237. 0 string 5\x0aIntroduction Quake I save: start Introduction
  8238. 0 string 5\x0athe_Slipgate_Complex Quake I save: e1m1 The slipgate complex
  8239. 0 string 5\x0aCastle_of_the_Damned Quake I save: e1m2 Castle of the damned
  8240. 0 string 5\x0athe_Necropolis Quake I save: e1m3 The necropolis
  8241. 0 string 5\x0athe_Grisly_Grotto Quake I save: e1m4 The grisly grotto
  8242. 0 string 5\x0aZiggurat_Vertigo Quake I save: e1m8 Ziggurat vertigo (secret)
  8243. 0 string 5\x0aGloom_Keep Quake I save: e1m5 Gloom keep
  8244. 0 string 5\x0aThe_Door_To_Chthon Quake I save: e1m6 The door to Chthon
  8245. 0 string 5\x0aThe_House_of_Chthon Quake I save: e1m7 The house of Chthon
  8246. 0 string 5\x0athe_Installation Quake I save: e2m1 The installation
  8247. 0 string 5\x0athe_Ogre_Citadel Quake I save: e2m2 The ogre citadel
  8248. 0 string 5\x0athe_Crypt_of_Decay Quake I save: e2m3 The crypt of decay (dopefish lives!)
  8249. 0 string 5\x0aUnderearth Quake I save: e2m7 Underearth (secret)
  8250. 0 string 5\x0athe_Ebon_Fortress Quake I save: e2m4 The ebon fortress
  8251. 0 string 5\x0athe_Wizard's_Manse Quake I save: e2m5 The wizard's manse
  8252. 0 string 5\x0athe_Dismal_Oubliette Quake I save: e2m6 The dismal oubliette
  8253. 0 string 5\x0aTermination_Central Quake I save: e3m1 Termination central
  8254. 0 string 5\x0aVaults_of_Zin Quake I save: e3m2 Vaults of Zin
  8255. 0 string 5\x0athe_Tomb_of_Terror Quake I save: e3m3 The tomb of terror
  8256. 0 string 5\x0aSatan's_Dark_Delight Quake I save: e3m4 Satan's dark delight
  8257. 0 string 5\x0athe_Haunted_Halls Quake I save: e3m7 The haunted halls (secret)
  8258. 0 string 5\x0aWind_Tunnels Quake I save: e3m5 Wind tunnels
  8259. 0 string 5\x0aChambers_of_Torment Quake I save: e3m6 Chambers of torment
  8260. 0 string 5\x0athe_Sewage_System Quake I save: e4m1 The sewage system
  8261. 0 string 5\x0aThe_Tower_of_Despair Quake I save: e4m2 The tower of despair
  8262. 0 string 5\x0aThe_Elder_God_Shrine Quake I save: e4m3 The elder god shrine
  8263. 0 string 5\x0athe_Palace_of_Hate Quake I save: e4m4 The palace of hate
  8264. 0 string 5\x0aHell's_Atrium Quake I save: e4m5 Hell's atrium
  8265. 0 string 5\x0athe_Nameless_City Quake I save: e4m8 The nameless city (secret)
  8266. 0 string 5\x0aThe_Pain_Maze Quake I save: e4m6 The pain maze
  8267. 0 string 5\x0aAzure_Agony Quake I save: e4m7 Azure agony
  8268. 0 string 5\x0aShub-Niggurath's_Pit Quake I save: end Shub-Niggurath's pit
  8269. # Quake DeathMatch levels
  8270. 0 string 5\x0aPlace_of_Two_Deaths Quake I save: dm1 Place of two deaths
  8271. 0 string 5\x0aClaustrophobopolis Quake I save: dm2 Claustrophobopolis
  8272. 0 string 5\x0aThe_Abandoned_Base Quake I save: dm3 The abandoned base
  8273. 0 string 5\x0aThe_Bad_Place Quake I save: dm4 The bad place
  8274. 0 string 5\x0aThe_Cistern Quake I save: dm5 The cistern
  8275. 0 string 5\x0aThe_Dark_Zone Quake I save: dm6 The dark zone
  8276. # Scourge of Armagon
  8277. 0 string 5\x0aCommand_HQ Quake I save: start Command HQ
  8278. 0 string 5\x0aThe_Pumping_Station Quake I save: hip1m1 The pumping station
  8279. 0 string 5\x0aStorage_Facility Quake I save: hip1m2 Storage facility
  8280. 0 string 5\x0aMilitary_Complex Quake I save: hip1m5 Military complex (secret)
  8281. 0 string 5\x0athe_Lost_Mine Quake I save: hip1m3 The lost mine
  8282. 0 string 5\x0aResearch_Facility Quake I save: hip1m4 Research facility
  8283. 0 string 5\x0aAncient_Realms Quake I save: hip2m1 Ancient realms
  8284. 0 string 5\x0aThe_Gremlin's_Domain Quake I save: hip2m6 The gremlin's domain (secret)
  8285. 0 string 5\x0aThe_Black_Cathedral Quake I save: hip2m2 The black cathedral
  8286. 0 string 5\x0aThe_Catacombs Quake I save: hip2m3 The catacombs
  8287. 0 string 5\x0athe_Crypt__ Quake I save: hip2m4 The crypt
  8288. 0 string 5\x0aMortum's_Keep Quake I save: hip2m5 Mortum's keep
  8289. 0 string 5\x0aTur_Torment Quake I save: hip3m1 Tur torment
  8290. 0 string 5\x0aPandemonium Quake I save: hip3m2 Pandemonium
  8291. 0 string 5\x0aLimbo Quake I save: hip3m3 Limbo
  8292. 0 string 5\x0athe_Edge_of_Oblivion Quake I save: hipdm1 The edge of oblivion (secret)
  8293. 0 string 5\x0aThe_Gauntlet Quake I save: hip3m4 The gauntlet
  8294. 0 string 5\x0aArmagon's_Lair Quake I save: hipend Armagon's lair
  8295. # Malice
  8296. 0 string 5\x0aThe_Academy Quake I save: start The academy
  8297. 0 string 5\x0aThe_Lab Quake I save: d1 The lab
  8298. 0 string 5\x0aArea_33 Quake I save: d1b Area 33
  8299. 0 string 5\x0aSECRET_MISSIONS Quake I save: d3b Secret missions
  8300. 0 string 5\x0aThe_Hospital Quake I save: d10 The hospital (secret)
  8301. 0 string 5\x0aThe_Genetics_Lab Quake I save: d11 The genetics lab (secret)
  8302. 0 string 5\x0aBACK_2_MALICE Quake I save: d4b Back to Malice
  8303. 0 string 5\x0aArea44 Quake I save: d1c Area 44
  8304. 0 string 5\x0aTakahiro_Towers Quake I save: d2 Takahiro towers
  8305. 0 string 5\x0aA_Rat's_Life Quake I save: d3 A rat's life
  8306. 0 string 5\x0aInto_The_Flood Quake I save: d4 Into the flood
  8307. 0 string 5\x0aThe_Flood Quake I save: d5 The flood
  8308. 0 string 5\x0aNuclear_Plant Quake I save: d6 Nuclear plant
  8309. 0 string 5\x0aThe_Incinerator_Plant Quake I save: d7 The incinerator plant
  8310. 0 string 5\x0aThe_Foundry Quake I save: d7b The foundry
  8311. 0 string 5\x0aThe_Underwater_Base Quake I save: d8 The underwater base
  8312. 0 string 5\x0aTakahiro_Base Quake I save: d9 Takahiro base
  8313. 0 string 5\x0aTakahiro_Laboratories Quake I save: d12 Takahiro laboratories
  8314. 0 string 5\x0aStayin'_Alive Quake I save: d13 Stayin' alive
  8315. 0 string 5\x0aB.O.S.S._HQ Quake I save: d14 B.O.S.S. HQ
  8316. 0 string 5\x0aSHOWDOWN! Quake I save: d15 Showdown!
  8317. # Malice DeathMatch levels
  8318. 0 string 5\x0aThe_Seventh_Precinct Quake I save: ddm1 The seventh precinct
  8319. 0 string 5\x0aSub_Station Quake I save: ddm2 Sub station
  8320. 0 string 5\x0aCrazy_Eights! Quake I save: ddm3 Crazy eights!
  8321. 0 string 5\x0aEast_Side_Invertationa Quake I save: ddm4 East side invertationa
  8322. 0 string 5\x0aSlaughterhouse Quake I save: ddm5 Slaughterhouse
  8323. 0 string 5\x0aDOMINO Quake I save: ddm6 Domino
  8324. 0 string 5\x0aSANDRA'S_LADDER Quake I save: ddm7 Sandra's ladder
  8325. 0 string MComprHD MAME CHD compressed hard disk image,
  8326. >12 belong x version %lu
  8327. # doom - submitted by Jon Dowland
  8328. 0 string =IWAD doom main IWAD data
  8329. >4 lelong x containing %d lumps
  8330. 0 string =PWAD doom patch PWAD data
  8331. >4 lelong x containing %d lumps
  8332. # Build engine group files (Duke Nukem, Shadow Warrior, ...)
  8333. # Extension: .grp
  8334. # Created by: "Ganael Laplanche" <ganael.laplanche@martymac.org>
  8335. 0 string KenSilverman Build engine group file
  8336. >12 lelong x containing %d files
  8337. # Summary: Warcraft 3 save
  8338. # Extension: .w3g
  8339. # Created by: "Nelson A. de Oliveira" <naoliv@gmail.com>
  8340. 0 string Warcraft\ III\ recorded\ game %s
  8341. # Summary: Warcraft 3 map
  8342. # Extension: .w3m
  8343. # Created by: "Nelson A. de Oliveira" <naoliv@gmail.com>
  8344. 0 string HM3W Warcraft III map file
  8345. # Summary: SGF Smart Game Format
  8346. # Extension: .sgf
  8347. # Reference: http://www.red-bean.com/sgf/
  8348. # Created by: Eduardo Sabbatella <eduardo_sabbatella@yahoo.com.ar>
  8349. # Modified by (1): Abel Cheung (regex, more game format)
  8350. # FIXME: Some games don't have GM (game type)
  8351. 0 regex \\(;.*GM\\[[0-9]{1,2}\\] Smart Game Format
  8352. >2 search/0x200/b GM[
  8353. >>&0 string 1] (Go)
  8354. >>&0 string 2] (Othello)
  8355. >>&0 string 3] (chess)
  8356. >>&0 string 4] (Gomoku+Renju)
  8357. >>&0 string 5] (Nine Men's Morris)
  8358. >>&0 string 6] (Backgammon)
  8359. >>&0 string 7] (Chinese chess)
  8360. >>&0 string 8] (Shogi)
  8361. >>&0 string 9] (Lines of Action)
  8362. >>&0 string 10] (Ataxx)
  8363. >>&0 string 11] (Hex)
  8364. >>&0 string 12] (Jungle)
  8365. >>&0 string 13] (Neutron)
  8366. >>&0 string 14] (Philosopher's Football)
  8367. >>&0 string 15] (Quadrature)
  8368. >>&0 string 16] (Trax)
  8369. >>&0 string 17] (Tantrix)
  8370. >>&0 string 18] (Amazons)
  8371. >>&0 string 19] (Octi)
  8372. >>&0 string 20] (Gess)
  8373. >>&0 string 21] (Twixt)
  8374. >>&0 string 22] (Zertz)
  8375. >>&0 string 23] (Plateau)
  8376. >>&0 string 24] (Yinsh)
  8377. >>&0 string 25] (Punct)
  8378. >>&0 string 26] (Gobblet)
  8379. >>&0 string 27] (hive)
  8380. >>&0 string 28] (Exxit)
  8381. >>&0 string 29] (Hnefatal)
  8382. >>&0 string 30] (Kuba)
  8383. >>&0 string 31] (Tripples)
  8384. >>&0 string 32] (Chase)
  8385. >>&0 string 33] (Tumbling Down)
  8386. >>&0 string 34] (Sahara)
  8387. >>&0 string 35] (Byte)
  8388. >>&0 string 36] (Focus)
  8389. >>&0 string 37] (Dvonn)
  8390. >>&0 string 38] (Tamsk)
  8391. >>&0 string 39] (Gipf)
  8392. >>&0 string 40] (Kropki)
  8393. ##############################################
  8394. # NetImmerse/Gamebryo game engine entries
  8395. # Summary: Gamebryo game engine file
  8396. # Extension: .nif, .kf
  8397. # Created by: Abel Cheung <abelcheung@gmail.com>
  8398. 0 string Gamebryo\ File\ Format,\ Version\ Gamebryo game engine file
  8399. >&0 regex [0-9a-z.]+ \b, version %s
  8400. # Summary: Gamebryo game engine file
  8401. # Extension: .kfm
  8402. # Created by: Abel Cheung <abelcheung@gmail.com>
  8403. 0 string ;Gamebryo\ KFM\ File\ Version\ Gamebryo game engine animation File
  8404. >&0 regex [0-9a-z.]+ \b, version %s
  8405. # Summary: NetImmerse game engine file
  8406. # Extension .nif
  8407. # Created by: Abel Cheung <abelcheung@gmail.com>
  8408. 0 string NetImmerse\ File\ Format,\ Versio
  8409. >&0 string n\ NetImmerse game engine file
  8410. >>&0 regex [0-9a-z.]+ \b, version %s
  8411. # Type: SGF Smart Game Format
  8412. # URL: http://www.red-bean.com/sgf/
  8413. # From: Eduardo Sabbatella <eduardo_sabbatella@yahoo.com.ar>
  8414. 2 regex/c \\(;.*GM\\[[0-9]{1,2}\\] Smart Game Format
  8415. >2 regex/c GM\\[1\\] - Go Game
  8416. >2 regex/c GM\\[6\\] - BackGammon Game
  8417. >2 regex/c GM\\[11\\] - Hex Game
  8418. >2 regex/c GM\\[18\\] - Amazons Game
  8419. >2 regex/c GM\\[19\\] - Octi Game
  8420. >2 regex/c GM\\[20\\] - Gess Game
  8421. >2 regex/c GM\\[21\\] - twix Game
  8422. # Epic Games/Unreal Engine Package
  8423. #
  8424. 0 lelong 0x9E2A83C1 Unreal Engine Package,
  8425. >4 leshort x version: %i
  8426. >12 lelong !0 \b, names: %i
  8427. >28 lelong !0 \b, imports: %i
  8428. >20 lelong !0 \b, exports: %i
  8429. #------------------------------------------------------------------------------
  8430. # $File: gcc,v 1.4 2009/09/19 16:28:09 christos Exp $
  8431. # gcc: file(1) magic for GCC special files
  8432. #
  8433. 0 string gpch GCC precompiled header
  8434. # The version field is annoying. It's 3 characters, not zero-terminated.
  8435. >5 byte x (version %c
  8436. >6 byte x \b%c
  8437. >7 byte x \b%c)
  8438. # 67 = 'C', 111 = 'o', 43 = '+', 79 = 'O'
  8439. >4 byte 67 for C
  8440. >4 byte 111 for Objective C
  8441. >4 byte 43 for C++
  8442. >4 byte 79 for Objective C++
  8443. #------------------------------------------------------------------------------
  8444. # $File: geo,v 1.3 2013/01/04 00:47:02 christos Exp $
  8445. # Geo- files from Kurt Schwehr <schwehr@ccom.unh.edu>
  8446. ######################################################################
  8447. #
  8448. # Acoustic Doppler Current Profilers (ADCP)
  8449. #
  8450. ######################################################################
  8451. 0 beshort 0x7f7f RDI Acoustic Doppler Current Profiler (ADCP)
  8452. ######################################################################
  8453. #
  8454. # Metadata
  8455. #
  8456. ######################################################################
  8457. 0 string Identification_Information FGDC ASCII metadata
  8458. ######################################################################
  8459. #
  8460. # Seimsic / Subbottom
  8461. #
  8462. ######################################################################
  8463. # Knudsen subbottom chirp profiler - Binary File Format: B9
  8464. # KEB D409-03167 V1.75 Huffman
  8465. 0 string KEB\ Knudsen seismic KEL binary (KEB) -
  8466. >4 regex [-A-Z0-9]* Software: %s
  8467. >>&1 regex V[0-9]*\.[0-9]* version %s
  8468. ######################################################################
  8469. #
  8470. # LIDAR - Laser altimetry or bathy
  8471. #
  8472. ######################################################################
  8473. # Caris LIDAR format for LADS comes as two parts... ascii location file and binary waveform data
  8474. 0 string HCA LADS Caris Ascii Format (CAF) bathymetric lidar
  8475. >4 regex [0-9]*\.[0-9]* version %s
  8476. 0 string HCB LADS Caris Binary Format (CBF) bathymetric lidar waveform data
  8477. >3 byte x version %d .
  8478. >4 byte x %d
  8479. ######################################################################
  8480. #
  8481. # MULTIBEAM SONARS http://www.ldeo.columbia.edu/res/pi/MB-System/formatdoc/
  8482. #
  8483. ######################################################################
  8484. # GeoAcoustics - GeoSwath Plus
  8485. 4 beshort 0x2002 GeoSwath RDF
  8486. 0 string Start:- GeoSwatch auf text file
  8487. # Seabeam 2100
  8488. # mbsystem code mb41
  8489. 0 string SB2100 SeaBeam 2100 multibeam sonar
  8490. 0 string SB2100DR SeaBeam 2100 DR multibeam sonar
  8491. 0 string SB2100PR SeaBeam 2100 PR multibeam sonar
  8492. # This corresponds to MB-System format 94, L-3/ELAC/SeaBeam XSE vendor
  8493. # format. It is the format of our upgraded SeaBeam 2112 on R/V KNORR.
  8494. 0 string $HSF XSE multibeam
  8495. # mb121 http://www.saic.com/maritime/gsf/
  8496. 8 string GSF-v SAIC generic sensor format (GSF) sonar data,
  8497. >&0 regex [0-9]*\.[0-9]* version %s
  8498. # MGD77 - http://www.ngdc.noaa.gov/mgg/dat/geodas/docs/mgd77.htm
  8499. # mb161
  8500. 9 string MGD77 MGD77 Header, Marine Geophysical Data Exchange Format
  8501. # MBSystem processing caches the mbinfo output
  8502. 1 string Swath\ Data\ File: mbsystem info cache
  8503. # Caris John Hughes Clark format
  8504. 0 string HDCS Caris multibeam sonar related data
  8505. 1 string Start/Stop\ parameter\ header: Caris ASCII project summary
  8506. ######################################################################
  8507. #
  8508. # Visualization and 3D modeling
  8509. #
  8510. ######################################################################
  8511. # IVS - IVS3d.com Tagged Data Represetation
  8512. 0 string %%\ TDR\ 2.0 IVS Fledermaus TDR file
  8513. # http://www.ecma-international.org/publications/standards/Ecma-363.htm
  8514. # 3D in PDFs
  8515. 0 string U3D ECMA-363, Universal 3D
  8516. ######################################################################
  8517. #
  8518. # Support files
  8519. #
  8520. ######################################################################
  8521. # https://midas.psi.ch/elog/
  8522. 0 string $@MID@$ elog journal entry
  8523. # Geospatial Designs http://www.geospatialdesigns.com/surfer6_format.htm
  8524. 0 string DSBB Surfer 6 binary grid file
  8525. >4 leshort x \b, %d
  8526. >6 leshort x \bx%d
  8527. >8 ledouble x \b, minx=%g
  8528. >16 ledouble x \b, maxx=%g
  8529. >24 ledouble x \b, miny=%g
  8530. >32 ledouble x \b, maxy=%g
  8531. >40 ledouble x \b, minz=%g
  8532. >48 ledouble x \b, maxz=%g
  8533. #------------------------------------------------------------------------------
  8534. # $File: geos,v 1.4 2009/09/19 16:28:09 christos Exp $
  8535. # GEOS files (Vidar Madsen, vidar@gimp.org)
  8536. # semi-commonly used in embedded and handheld systems.
  8537. 0 belong 0xc745c153 GEOS
  8538. >40 byte 1 executable
  8539. >40 byte 2 VMFile
  8540. >40 byte 3 binary
  8541. >40 byte 4 directory label
  8542. >40 byte <1 unknown
  8543. >40 byte >4 unknown
  8544. >4 string >\0 \b, name "%s"
  8545. #>44 short x \b, version %d
  8546. #>46 short x \b.%d
  8547. #>48 short x \b, rev %d
  8548. #>50 short x \b.%d
  8549. #>52 short x \b, proto %d
  8550. #>54 short x \br%d
  8551. #>168 string >\0 \b, copyright "%s"
  8552. #------------------------------------------------------------------------------
  8553. # $File: gimp,v 1.8 2013/12/21 14:29:45 christos Exp $
  8554. # GIMP Gradient: file(1) magic for the GIMP's gradient data files (.ggr)
  8555. # by Federico Mena <federico@nuclecu.unam.mx>
  8556. 0 string/t GIMP\ Gradient GIMP gradient data
  8557. # GIMP palette (.gpl)
  8558. # From: Markus Heidelberg <markus.heidelberg@web.de>
  8559. 0 string/t GIMP\ Palette GIMP palette data
  8560. #------------------------------------------------------------------------------
  8561. # XCF: file(1) magic for the XCF image format used in the GIMP (.xcf) developed
  8562. # by Spencer Kimball and Peter Mattis
  8563. # ('Bucky' LaDieu, nega@vt.edu)
  8564. 0 string gimp\ xcf GIMP XCF image data,
  8565. !:mime image/x-xcf
  8566. >9 string file version 0,
  8567. >9 string v version
  8568. >>10 string >\0 %s,
  8569. >14 belong x %lu x
  8570. >18 belong x %lu,
  8571. >22 belong 0 RGB Color
  8572. >22 belong 1 Greyscale
  8573. >22 belong 2 Indexed Color
  8574. >22 belong >2 Unknown Image Type.
  8575. #------------------------------------------------------------------------------
  8576. # XCF: file(1) magic for the patterns used in the GIMP (.pat), developed
  8577. # by Spencer Kimball and Peter Mattis
  8578. # ('Bucky' LaDieu, nega@vt.edu)
  8579. 20 string GPAT GIMP pattern data,
  8580. >24 string x %s
  8581. #------------------------------------------------------------------------------
  8582. # XCF: file(1) magic for the brushes used in the GIMP (.gbr), developed
  8583. # by Spencer Kimball and Peter Mattis
  8584. # ('Bucky' LaDieu, nega@vt.edu)
  8585. 20 string GIMP GIMP brush data
  8586. # GIMP Curves File
  8587. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  8588. 0 string #\040GIMP\040Curves\040File GIMP curve file
  8589. #------------------------------------------------------------------------------
  8590. # $File: gnome,v 1.3 2013/02/05 15:20:47 christos Exp $
  8591. # GNOME related files
  8592. # Contributed by Josh Triplett
  8593. # FIXME: Could be simplified if pstring supported two-byte counts
  8594. 0 string GnomeKeyring\n\r\0\n GNOME keyring
  8595. >&0 ubyte 0 \b, major version 0
  8596. >>&0 ubyte 0 \b, minor version 0
  8597. >>>&0 ubyte 0 \b, crypto type 0 (AES)
  8598. >>>&0 ubyte >0 \b, crypto type %hhu (unknown)
  8599. >>>&1 ubyte 0 \b, hash type 0 (MD5)
  8600. >>>&1 ubyte >0 \b, hash type %hhu (unknown)
  8601. >>>&2 ubelong 0xFFFFFFFF \b, name NULL
  8602. >>>&2 ubelong !0xFFFFFFFF
  8603. >>>>&-4 ubelong >255 \b, name too long for file's pstring type
  8604. >>>>&-4 ubelong <256
  8605. >>>>>&-1 pstring x \b, name "%s"
  8606. >>>>>>&0 ubeqdate x \b, last modified %s
  8607. >>>>>>&8 ubeqdate x \b, created %s
  8608. >>>>>>&16 ubelong &1
  8609. >>>>>>>&0 ubelong x \b, locked if idle for %u seconds
  8610. >>>>>>&16 ubelong ^1 \b, not locked if idle
  8611. >>>>>>&24 ubelong x \b, hash iterations %u
  8612. >>>>>>&28 ubequad x \b, salt %llu
  8613. >>>>>>&52 ubelong x \b, %u item(s)
  8614. # From: Alex Beregszaszi <alex@fsn.hu>
  8615. 4 string gtktalog GNOME Catalogue (gtktalog)
  8616. >13 string >\0 version %s
  8617. # Summary: GStreamer binary registry
  8618. # Extension: .bin
  8619. # Submitted by: Josh Triplett <josh@joshtriplett.org>
  8620. 0 belong 0xc0def00d GStreamer binary registry
  8621. >4 string x \b, version %s
  8622. # GVariant Database file
  8623. # By Elan Ruusamae <glen@delfi.ee>
  8624. # https://github.com/GNOME/gvdb/blob/master/gvdb-format.h
  8625. # It's always "GVariant", it's byte swapped on incompatible archs
  8626. # See https://github.com/GNOME/gvdb/blob/master/gvdb-builder.c
  8627. # file_builder_serialise()
  8628. # http://developer.gnome.org/glib/2.34/glib-GVariant.html#GVariant
  8629. 0 string GVariant GVariant Database file,
  8630. # version is never filled. probably future extension
  8631. >8 lelong x version %d
  8632. # not sure are these usable, so commented out
  8633. #>>16 lelong x start %d,
  8634. #>>>20 lelong x end %d
  8635. # G-IR database made by gobject-introspect toolset,
  8636. # http://live.gnome.org/GObjectIntrospection
  8637. 0 string GOBJ\nMETADATA\r\n\032 G-IR binary database
  8638. >16 byte x \b, v%d
  8639. >17 byte x \b.%d
  8640. >20 leshort x \b, %d entries
  8641. >22 leshort x \b/%d local
  8642. #------------------------------------------------------------------------------
  8643. # $File: gnu,v 1.15 2014/02/06 14:21:02 christos Exp $
  8644. # gnu: file(1) magic for various GNU tools
  8645. #
  8646. # GNU nlsutils message catalog file format
  8647. #
  8648. # GNU message catalog (.mo and .gmo files)
  8649. 0 string \336\22\4\225 GNU message catalog (little endian),
  8650. >6 leshort x revision %d.
  8651. >4 leshort >0 \b%d,
  8652. >>8 lelong x %d messages,
  8653. >>36 lelong x %d sysdep messages
  8654. >4 leshort =0 \b%d,
  8655. >>8 lelong x %d messages
  8656. 0 string \225\4\22\336 GNU message catalog (big endian),
  8657. >4 beshort x revision %d.
  8658. >6 beshort >0 \b%d,
  8659. >>8 belong x %d messages,
  8660. >>36 belong x %d sysdep messages
  8661. >6 beshort =0 \b%d,
  8662. >>8 belong x %d messages
  8663. # GnuPG
  8664. # The format is very similar to pgp
  8665. 0 string \001gpg GPG key trust database
  8666. >4 byte x version %d
  8667. # Note: magic.mime had 0x8501 for the next line instead of 0x8502
  8668. 0 beshort 0x8502 GPG encrypted data
  8669. !:mime text/PGP # encoding: data
  8670. # This magic is not particularly good, as the keyrings don't have true
  8671. # magic. Nevertheless, it covers many keyrings.
  8672. 0 beshort 0x9901 GPG key public ring
  8673. !:mime application/x-gnupg-keyring
  8674. # Symmetric encryption
  8675. 0 leshort 0x0d8c
  8676. >4 leshort 0x0203
  8677. >>2 leshort 0x0204 GPG symmetrically encrypted data (3DES cipher)
  8678. >>2 leshort 0x0304 GPG symmetrically encrypted data (CAST5 cipher)
  8679. >>2 leshort 0x0404 GPG symmetrically encrypted data (BLOWFISH cipher)
  8680. >>2 leshort 0x0704 GPG symmetrically encrypted data (AES cipher)
  8681. >>2 leshort 0x0804 GPG symmetrically encrypted data (AES192 cipher)
  8682. >>2 leshort 0x0904 GPG symmetrically encrypted data (AES256 cipher)
  8683. >>2 leshort 0x0a04 GPG symmetrically encrypted data (TWOFISH cipher)
  8684. >>2 leshort 0x0b04 GPG symmetrically encrypted data (CAMELLIA128 cipher)
  8685. >>2 leshort 0x0c04 GPG symmetrically encrypted data (CAMELLIA192 cipher)
  8686. >>2 leshort 0x0d04 GPG symmetrically encrypted data (CAMELLIA256 cipher)
  8687. # GnuPG Keybox file
  8688. # <http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=kbx/keybox-blob.c;hb=HEAD>
  8689. # From: Philipp Hahn <hahn@univention.de>
  8690. 0 belong 32
  8691. >4 byte 1
  8692. >>8 string KBXf GPG keybox database
  8693. >>>5 byte 1 version %d
  8694. >>>16 bedate x \b, created-at %s
  8695. >>>20 bedate x \b, last-maintained %s
  8696. # Gnumeric spreadsheet
  8697. # This entry is only semi-helpful, as Gnumeric compresses its files, so
  8698. # they will ordinarily reported as "compressed", but at least -z helps
  8699. 39 string =<gmr:Workbook Gnumeric spreadsheet
  8700. # From: James Youngman <jay@gnu.org>
  8701. # gnu find magic
  8702. 0 string \0LOCATE GNU findutils locate database data
  8703. >7 string >\0 \b, format %s
  8704. >7 string 02 \b (frcode)
  8705. # Files produced by GNU gettext
  8706. 0 long 0xDE120495 GNU-format message catalog data
  8707. 0 long 0x950412DE GNU-format message catalog data
  8708. # gettext message catalogue
  8709. 0 regex \^msgid\ GNU gettext message catalogue text
  8710. !:mime text/x-po
  8711. #------------------------------------------------------------------------------
  8712. # $File: gnumeric,v 1.4 2009/09/19 16:28:09 christos Exp $
  8713. # gnumeric: file(1) magic for Gnumeric spreadsheet
  8714. # This entry is only semi-helpful, as Gnumeric compresses its files, so
  8715. # they will ordinarily reported as "compressed", but at least -z helps
  8716. 39 string =<gmr:Workbook Gnumeric spreadsheet
  8717. !:mime application/x-gnumeric
  8718. #------------------------------------------------------------------------------
  8719. # $File: gpt,v 1.1 2013/02/18 18:31:09 christos Exp $
  8720. #
  8721. # GPT Partition table patterns.
  8722. # Author: Rogier Goossens (goossens.rogier@gmail.com)
  8723. # Note that a GPT-formatted disk must contain an MBR as well.
  8724. #
  8725. # The initial segment (up to >>>>>>>>422) was copied from the X86
  8726. # partition table code (aka MBR).
  8727. # This is kept separate, so that MBR partitions are not reported as well.
  8728. # (use -k if you do want them as well)
  8729. # First, detect the MBR partiton table
  8730. # If more than one GPT protective MBR partition exists, don't print anything
  8731. # (the other MBR detection code will then just print the MBR partition table)
  8732. 0x1FE leshort 0xAA55
  8733. >3 string !MS
  8734. >>3 string !SYSLINUX
  8735. >>>3 string !MTOOL
  8736. >>>>3 string !NEWLDR
  8737. >>>>>5 string !DOS
  8738. # not FAT (32 bit)
  8739. >>>>>>82 string !FAT32
  8740. #not Linux kernel
  8741. >>>>>>>514 string !HdrS
  8742. #not BeOS
  8743. >>>>>>>>422 string !Be\ Boot\ Loader
  8744. # GPT with protective MBR entry in partition 1 (only)
  8745. >>>>>>>>>450 ubyte 0xee
  8746. >>>>>>>>>>466 ubyte !0xee
  8747. >>>>>>>>>>>482 ubyte !0xee
  8748. >>>>>>>>>>>>498 ubyte !0xee
  8749. #>>>>>>>>>>>>>446 use gpt-mbr-partition
  8750. >>>>>>>>>>>>>(454.l*8192) string EFI\ PART GPT partition table
  8751. >>>>>>>>>>>>>>0 use gpt-mbr-type
  8752. >>>>>>>>>>>>>>&-8 use gpt-table
  8753. >>>>>>>>>>>>>>0 ubyte x of 8192 bytes
  8754. >>>>>>>>>>>>>(454.l*8192) string !EFI\ PART
  8755. >>>>>>>>>>>>>>(454.l*4096) string EFI\ PART GPT partition table
  8756. >>>>>>>>>>>>>>>0 use gpt-mbr-type
  8757. >>>>>>>>>>>>>>>&-8 use gpt-table
  8758. >>>>>>>>>>>>>>>0 ubyte x of 4096 bytes
  8759. >>>>>>>>>>>>>>(454.l*4096) string !EFI\ PART
  8760. >>>>>>>>>>>>>>>(454.l*2048) string EFI\ PART GPT partition table
  8761. >>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8762. >>>>>>>>>>>>>>>>&-8 use gpt-table
  8763. >>>>>>>>>>>>>>>>0 ubyte x of 2048 bytes
  8764. >>>>>>>>>>>>>>>(454.l*2048) string !EFI\ PART
  8765. >>>>>>>>>>>>>>>>(454.l*1024) string EFI\ PART GPT partition table
  8766. >>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8767. >>>>>>>>>>>>>>>>>&-8 use gpt-table
  8768. >>>>>>>>>>>>>>>>>0 ubyte x of 1024 bytes
  8769. >>>>>>>>>>>>>>>>(454.l*1024) string !EFI\ PART
  8770. >>>>>>>>>>>>>>>>>(454.l*512) string EFI\ PART GPT partition table
  8771. >>>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8772. >>>>>>>>>>>>>>>>>>&-8 use gpt-table
  8773. >>>>>>>>>>>>>>>>>>0 ubyte x of 512 bytes
  8774. # GPT with protective MBR entry in partition 2 (only)
  8775. >>>>>>>>>450 ubyte !0xee
  8776. >>>>>>>>>>466 ubyte 0xee
  8777. >>>>>>>>>>>482 ubyte !0xee
  8778. >>>>>>>>>>>>498 ubyte !0xee
  8779. #>>>>>>>>>>>>>462 use gpt-mbr-partition
  8780. >>>>>>>>>>>>>(470.l*8192) string EFI\ PART GPT partition table
  8781. >>>>>>>>>>>>>>0 use gpt-mbr-type
  8782. >>>>>>>>>>>>>>&-8 use gpt-table
  8783. >>>>>>>>>>>>>>0 ubyte x of 8192 bytes
  8784. >>>>>>>>>>>>>(470.l*8192) string !EFI\ PART
  8785. >>>>>>>>>>>>>>(470.l*4096) string EFI\ PART GPT partition table
  8786. >>>>>>>>>>>>>>>0 use gpt-mbr-type
  8787. >>>>>>>>>>>>>>>&-8 use gpt-table
  8788. >>>>>>>>>>>>>>>0 ubyte x of 4096 bytes
  8789. >>>>>>>>>>>>>>(470.l*4096) string !EFI\ PART
  8790. >>>>>>>>>>>>>>>(470.l*2048) string EFI\ PART GPT partition table
  8791. >>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8792. >>>>>>>>>>>>>>>>&-8 use gpt-table
  8793. >>>>>>>>>>>>>>>>0 ubyte x of 2048 bytes
  8794. >>>>>>>>>>>>>>>(470.l*2048) string !EFI\ PART
  8795. >>>>>>>>>>>>>>>>(470.l*1024) string EFI\ PART GPT partition table
  8796. >>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8797. >>>>>>>>>>>>>>>>>&-8 use gpt-table
  8798. >>>>>>>>>>>>>>>>>0 ubyte x of 1024 bytes
  8799. >>>>>>>>>>>>>>>>(470.l*1024) string !EFI\ PART
  8800. >>>>>>>>>>>>>>>>>(470.l*512) string EFI\ PART GPT partition table
  8801. >>>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8802. >>>>>>>>>>>>>>>>>>&-8 use gpt-table
  8803. >>>>>>>>>>>>>>>>>>0 ubyte x of 512 bytes
  8804. # GPT with protective MBR entry in partition 3 (only)
  8805. >>>>>>>>>450 ubyte !0xee
  8806. >>>>>>>>>>466 ubyte !0xee
  8807. >>>>>>>>>>>482 ubyte 0xee
  8808. >>>>>>>>>>>>498 ubyte !0xee
  8809. #>>>>>>>>>>>>>478 use gpt-mbr-partition
  8810. >>>>>>>>>>>>>(486.l*8192) string EFI\ PART GPT partition table
  8811. >>>>>>>>>>>>>>0 use gpt-mbr-type
  8812. >>>>>>>>>>>>>>&-8 use gpt-table
  8813. >>>>>>>>>>>>>>0 ubyte x of 8192 bytes
  8814. >>>>>>>>>>>>>(486.l*8192) string !EFI\ PART
  8815. >>>>>>>>>>>>>>(486.l*4096) string EFI\ PART GPT partition table
  8816. >>>>>>>>>>>>>>>0 use gpt-mbr-type
  8817. >>>>>>>>>>>>>>>&-8 use gpt-table
  8818. >>>>>>>>>>>>>>>0 ubyte x of 4096 bytes
  8819. >>>>>>>>>>>>>>(486.l*4096) string !EFI\ PART
  8820. >>>>>>>>>>>>>>>(486.l*2048) string EFI\ PART GPT partition table
  8821. >>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8822. >>>>>>>>>>>>>>>>&-8 use gpt-table
  8823. >>>>>>>>>>>>>>>>0 ubyte x of 2048 bytes
  8824. >>>>>>>>>>>>>>>(486.l*2048) string !EFI\ PART
  8825. >>>>>>>>>>>>>>>>(486.l*1024) string EFI\ PART GPT partition table
  8826. >>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8827. >>>>>>>>>>>>>>>>>&-8 use gpt-table
  8828. >>>>>>>>>>>>>>>>>0 ubyte x of 1024 bytes
  8829. >>>>>>>>>>>>>>>>(486.l*1024) string !EFI\ PART
  8830. >>>>>>>>>>>>>>>>>(486.l*512) string EFI\ PART GPT partition table
  8831. >>>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8832. >>>>>>>>>>>>>>>>>>&-8 use gpt-table
  8833. >>>>>>>>>>>>>>>>>>0 ubyte x of 512 bytes
  8834. # GPT with protective MBR entry in partition 4 (only)
  8835. >>>>>>>>>450 ubyte !0xee
  8836. >>>>>>>>>>466 ubyte !0xee
  8837. >>>>>>>>>>>482 ubyte !0xee
  8838. >>>>>>>>>>>>498 ubyte 0xee
  8839. #>>>>>>>>>>>>>494 use gpt-mbr-partition
  8840. >>>>>>>>>>>>>(502.l*8192) string EFI\ PART GPT partition table
  8841. >>>>>>>>>>>>>>0 use gpt-mbr-type
  8842. >>>>>>>>>>>>>>&-8 use gpt-table
  8843. >>>>>>>>>>>>>>0 ubyte x of 8192 bytes
  8844. >>>>>>>>>>>>>(502.l*8192) string !EFI\ PART
  8845. >>>>>>>>>>>>>>(502.l*4096) string EFI\ PART GPT partition table
  8846. >>>>>>>>>>>>>>>0 use gpt-mbr-type
  8847. >>>>>>>>>>>>>>>&-8 use gpt-table
  8848. >>>>>>>>>>>>>>>0 ubyte x of 4096 bytes
  8849. >>>>>>>>>>>>>>(502.l*4096) string !EFI\ PART
  8850. >>>>>>>>>>>>>>>(502.l*2048) string EFI\ PART GPT partition table
  8851. >>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8852. >>>>>>>>>>>>>>>>&-8 use gpt-table
  8853. >>>>>>>>>>>>>>>>0 ubyte x of 2048 bytes
  8854. >>>>>>>>>>>>>>>(502.l*2048) string !EFI\ PART
  8855. >>>>>>>>>>>>>>>>(502.l*1024) string EFI\ PART GPT partition table
  8856. >>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8857. >>>>>>>>>>>>>>>>>&-8 use gpt-table
  8858. >>>>>>>>>>>>>>>>>0 ubyte x of 1024 bytes
  8859. >>>>>>>>>>>>>>>>(502.l*1024) string !EFI\ PART
  8860. >>>>>>>>>>>>>>>>>(502.l*512) string EFI\ PART GPT partition table
  8861. >>>>>>>>>>>>>>>>>>0 use gpt-mbr-type
  8862. >>>>>>>>>>>>>>>>>>&-8 use gpt-table
  8863. >>>>>>>>>>>>>>>>>>0 ubyte x of 512 bytes
  8864. # The following code does GPT detection and processing, including
  8865. # sector size detection.
  8866. # It has to be duplicated above because the top-level pattern
  8867. # (i.e. not called using 'use') must print *something* for file
  8868. # to count it as a match. Text only printed in named patterns is
  8869. # not counted, and causes file to continue, and try and match
  8870. # other patterns.
  8871. #
  8872. # Unfortunately, when assuming sector sizes >=16k, if the sector size
  8873. # happens to be 512 instead, we may find confusing data after the GPT
  8874. # table... If the GPT table has less than 128 entries, this may even
  8875. # happen for assumed sector sizes as small as 4k
  8876. # This could be solved by checking for the presence of the backup GPT
  8877. # header as well, but that makes the logic extremely complex
  8878. ##0 name gpt-mbr-partition
  8879. ##>(8.l*8192) string EFI\ PART
  8880. ##>>(8.l*8192) use gpt-mbr-type
  8881. ##>>&-8 use gpt-table
  8882. ##>>0 ubyte x of 8192 bytes
  8883. ##>(8.l*8192) string !EFI\ PART
  8884. ##>>(8.l*4096) string EFI\ PART GPT partition table
  8885. ##>>>0 use gpt-mbr-type
  8886. ##>>>&-8 use gpt-table
  8887. ##>>>0 ubyte x of 4096 bytes
  8888. ##>>(8.l*4096) string !EFI\ PART
  8889. ##>>>(8.l*2048) string EFI\ PART GPT partition table
  8890. ##>>>>0 use gpt-mbr-type
  8891. ##>>>>&-8 use gpt-table
  8892. ##>>>>0 ubyte x of 2048 bytes
  8893. ##>>>(8.l*2048) string !EFI\ PART
  8894. ##>>>>(8.l*1024) string EFI\ PART GPT partition table
  8895. ##>>>>>0 use gpt-mbr-type
  8896. ##>>>>>&-8 use gpt-table
  8897. ##>>>>>0 ubyte x of 1024 bytes
  8898. ##>>>>(8.l*1024) string !EFI\ PART
  8899. ##>>>>>(8.l*512) string EFI\ PART GPT partition table
  8900. ##>>>>>>0 use gpt-mbr-type
  8901. ##>>>>>>&-8 use gpt-table
  8902. ##>>>>>>0 ubyte x of 512 bytes
  8903. # Print details of MBR type for a GPT-disk
  8904. # Calling code ensures that there is only one 0xee partition.
  8905. 0 name gpt-mbr-type
  8906. # GPT with protective MBR entry in partition 1
  8907. >450 ubyte 0xee
  8908. >>454 ulelong 1
  8909. >>>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)
  8910. >>454 ulelong !1 \b (nonstandard: not at LBA 1)
  8911. # GPT with protective MBR entry in partition 2
  8912. >466 ubyte 0xee
  8913. >>470 ulelong 1
  8914. >>>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
  8915. >>>>446 string !\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \b (with hybrid MBR)
  8916. >>>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)
  8917. >>470 ulelong !1 \b (nonstandard: not at LBA 1)
  8918. # GPT with protective MBR entry in partition 3
  8919. >482 ubyte 0xee
  8920. >>486 ulelong 1
  8921. >>>494 string \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
  8922. >>>>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)
  8923. >>>494 string !\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0 \b (with hybrid MBR)
  8924. >>486 ulelong !1 \b (nonstandard: not at LBA 1)
  8925. # GPT with protective MBR entry in partition 4
  8926. >498 ubyte 0xee
  8927. >>502 ulelong 1
  8928. >>>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)
  8929. >>502 ulelong !1 \b (nonstandard: not at LBA 1)
  8930. # Print the information from a GPT partition table structure
  8931. 0 name gpt-table
  8932. >10 uleshort x \b, version %u
  8933. >8 uleshort x \b.%u
  8934. # a GUID is just like a UUID, except it's displayed mixed-endian.
  8935. >56 ulelong x \b, GUID: %08x
  8936. >60 uleshort x \b-%04x
  8937. >62 uleshort x \b-%04x
  8938. >64 ubeshort x \b-%04x
  8939. >66 ubeshort x \b-%04x
  8940. >68 ubelong x \b%08x
  8941. #>80 uleshort x \b, %d partition entries
  8942. >32 ulequad+1 x \b, disk size: %lld sectors
  8943. # In case a GPT data-structure is at LBA 0, report it as well
  8944. # This covers systems which are not GPT-aware, and which show
  8945. # and allow access to the protective partition. This code will
  8946. # detect the contents of such a partition.
  8947. 0 string EFI\ PART GPT data structure (nonstandard: at LBA 0)
  8948. >0 use gpt-table
  8949. >0 ubyte x (sector size unknown)
  8950. #------------------------------------------------------------------------------
  8951. # $File: grace,v 1.4 2009/09/19 16:28:09 christos Exp $
  8952. # ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
  8953. #
  8954. # ACE/gr binary
  8955. 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
  8956. >39 byte >0 - version %c
  8957. # ACE/gr ascii
  8958. 0 string #\ xvgr\ parameter\ file ACE/gr ascii file
  8959. 0 string #\ xmgr\ parameter\ file ACE/gr ascii file
  8960. 0 string #\ ACE/gr\ parameter\ file ACE/gr ascii file
  8961. # Grace projects
  8962. 0 string #\ Grace\ project\ file Grace project file
  8963. >23 string @version\ (version
  8964. >>32 byte >0 %c
  8965. >>33 string >\0 \b.%.2s
  8966. >>35 string >\0 \b.%.2s)
  8967. # ACE/gr fit description files
  8968. 0 string #\ ACE/gr\ fit\ description\ ACE/gr fit description file
  8969. # end of ACE/gr and Grace type files - PLEASE DO NOT REMOVE THIS LINE
  8970. #------------------------------------------------------------------------------
  8971. # $File: graphviz,v 1.7 2009/09/19 16:28:09 christos Exp $
  8972. # graphviz: file(1) magic for http://www.graphviz.org/
  8973. # FIXME: These patterns match too generally. For example, the first
  8974. # line matches a LaTeX file containing the word "graph" (with a {
  8975. # following later) and the second line matches this file.
  8976. #0 regex/100 [\r\n\t\ ]*graph[\r\n\t\ ]+.*\\{ graphviz graph text
  8977. #!:mime text/vnd.graphviz
  8978. #0 regex/100 [\r\n\t\ ]*digraph[\r\n\t\ ]+.*\\{ graphviz digraph text
  8979. #!:mime text/vnd.graphviz
  8980. #------------------------------------------------------------------------------
  8981. # $File: gringotts,v 1.5 2009/09/19 16:28:09 christos Exp $
  8982. # gringotts: file(1) magic for Gringotts
  8983. # http://devel.pluto.linux.it/projects/Gringotts/
  8984. # author: Germano Rizzo <mano@pluto.linux.it>
  8985. #GRG3????Y
  8986. 0 string GRG Gringotts data file
  8987. #file format 1
  8988. >3 string 1 v.1, MCRYPT S2K, SERPENT crypt, SHA-256 hash, ZLib lvl.9
  8989. #file format 2
  8990. >3 string 2 v.2, MCRYPT S2K,
  8991. >>8 byte&0x70 0x00 RIJNDAEL-128 crypt,
  8992. >>8 byte&0x70 0x10 SERPENT crypt,
  8993. >>8 byte&0x70 0x20 TWOFISH crypt,
  8994. >>8 byte&0x70 0x30 CAST-256 crypt,
  8995. >>8 byte&0x70 0x40 SAFER+ crypt,
  8996. >>8 byte&0x70 0x50 LOKI97 crypt,
  8997. >>8 byte&0x70 0x60 3DES crypt,
  8998. >>8 byte&0x70 0x70 RIJNDAEL-256 crypt,
  8999. >>8 byte&0x08 0x00 SHA1 hash,
  9000. >>8 byte&0x08 0x08 RIPEMD-160 hash,
  9001. >>8 byte&0x04 0x00 ZLib
  9002. >>8 byte&0x04 0x04 BZip2
  9003. >>8 byte&0x03 0x00 lvl.0
  9004. >>8 byte&0x03 0x01 lvl.3
  9005. >>8 byte&0x03 0x02 lvl.6
  9006. >>8 byte&0x03 0x03 lvl.9
  9007. #file format 3
  9008. >3 string 3 v.3, OpenPGP S2K,
  9009. >>8 byte&0x70 0x00 RIJNDAEL-128 crypt,
  9010. >>8 byte&0x70 0x10 SERPENT crypt,
  9011. >>8 byte&0x70 0x20 TWOFISH crypt,
  9012. >>8 byte&0x70 0x30 CAST-256 crypt,
  9013. >>8 byte&0x70 0x40 SAFER+ crypt,
  9014. >>8 byte&0x70 0x50 LOKI97 crypt,
  9015. >>8 byte&0x70 0x60 3DES crypt,
  9016. >>8 byte&0x70 0x70 RIJNDAEL-256 crypt,
  9017. >>8 byte&0x08 0x00 SHA1 hash,
  9018. >>8 byte&0x08 0x08 RIPEMD-160 hash,
  9019. >>8 byte&0x04 0x00 ZLib
  9020. >>8 byte&0x04 0x04 BZip2
  9021. >>8 byte&0x03 0x00 lvl.0
  9022. >>8 byte&0x03 0x01 lvl.3
  9023. >>8 byte&0x03 0x02 lvl.6
  9024. >>8 byte&0x03 0x03 lvl.9
  9025. #file format >3
  9026. >3 string >3 v.%.1s (unknown details)
  9027. #------------------------------------------------------------------------------
  9028. # $File: guile,v 1.1 2011/12/16 17:44:33 christos Exp $
  9029. # Guile file magic from <dalepsmith@gmail.com>
  9030. # http://www.gnu.org/s/guile/
  9031. # http://git.savannah.gnu.org/gitweb/?p=guile.git;f=libguile/_scm.h;hb=HEAD#l250
  9032. 0 string GOOF---- Guile Object
  9033. >8 string LE \b, little endian
  9034. >8 string BE \b, big endian
  9035. >11 string 4 \b, 32bit
  9036. >11 string 8 \b, 64bit
  9037. >13 regex .\.. \b, bytecode v%s
  9038. #------------------------------------------------------------------------------
  9039. # $File: hitachi-sh,v 1.6 2013/01/29 19:31:33 christos Exp $
  9040. # hitach-sh: file(1) magic for Hitachi Super-H
  9041. #
  9042. # Super-H COFF
  9043. #
  9044. # below test line conflicts with 2nd NTFS filesystem sector
  9045. 0 beshort 0x0500 Hitachi SH big-endian COFF
  9046. # 2nd NTFS filesystem sector often starts with 0x05004e00 for unicode string 5 NTLDR
  9047. #0 ubelong&0xFFFFNMPQ 0x0500NMPQ Hitachi SH big-endian COFF
  9048. >18 beshort&0x0002 =0x0000 object
  9049. >18 beshort&0x0002 =0x0002 executable
  9050. >18 beshort&0x0008 =0x0008 \b, stripped
  9051. >18 beshort&0x0008 =0x0000 \b, not stripped
  9052. #
  9053. 0 leshort 0x0550 Hitachi SH little-endian COFF
  9054. >18 leshort&0x0002 =0x0000 object
  9055. >18 leshort&0x0002 =0x0002 executable
  9056. >18 leshort&0x0008 =0x0008 \b, stripped
  9057. >18 leshort&0x0008 =0x0000 \b, not stripped
  9058. #------------------------------------------------------------------------------
  9059. # $File: hp,v 1.23 2009/09/19 16:28:09 christos Exp $
  9060. # hp: file(1) magic for Hewlett Packard machines (see also "printer")
  9061. #
  9062. # XXX - somebody should figure out whether any byte order needs to be
  9063. # applied to the "TML" stuff; I'm assuming the Apollo stuff is
  9064. # big-endian as it was mostly 68K-based.
  9065. #
  9066. # I think the 500 series was the old stack-based machines, running a
  9067. # UNIX environment atop the "SUN kernel"; dunno whether it was
  9068. # big-endian or little-endian.
  9069. #
  9070. # Daniel Quinlan (quinlan@yggdrasil.com): hp200 machines are 68010 based;
  9071. # hp300 are 68020+68881 based; hp400 are also 68k. The following basic
  9072. # HP magic is useful for reference, but using "long" magic is a better
  9073. # practice in order to avoid collisions.
  9074. #
  9075. # Guy Harris (guy@netapp.com): some additions to this list came from
  9076. # HP-UX 10.0's "/usr/include/sys/unistd.h" (68030, 68040, PA-RISC 1.1,
  9077. # 1.2, and 2.0). The 1.2 and 2.0 stuff isn't in the HP-UX 10.0
  9078. # "/etc/magic", though, except for the "archive file relocatable library"
  9079. # stuff, and the 68030 and 68040 stuff isn't there at all - are they not
  9080. # used in executables, or have they just not yet updated "/etc/magic"
  9081. # completely?
  9082. #
  9083. # 0 beshort 200 hp200 (68010) BSD binary
  9084. # 0 beshort 300 hp300 (68020+68881) BSD binary
  9085. # 0 beshort 0x20c hp200/300 HP-UX binary
  9086. # 0 beshort 0x20d hp400 (68030) HP-UX binary
  9087. # 0 beshort 0x20e hp400 (68040?) HP-UX binary
  9088. # 0 beshort 0x20b PA-RISC1.0 HP-UX binary
  9089. # 0 beshort 0x210 PA-RISC1.1 HP-UX binary
  9090. # 0 beshort 0x211 PA-RISC1.2 HP-UX binary
  9091. # 0 beshort 0x214 PA-RISC2.0 HP-UX binary
  9092. #
  9093. # The "misc" stuff needs a byte order; the archives look suspiciously
  9094. # like the old 177545 archives (0xff65 = 0177545).
  9095. #
  9096. #### Old Apollo stuff
  9097. 0 beshort 0627 Apollo m68k COFF executable
  9098. >18 beshort ^040000 not stripped
  9099. >22 beshort >0 - version %ld
  9100. 0 beshort 0624 apollo a88k COFF executable
  9101. >18 beshort ^040000 not stripped
  9102. >22 beshort >0 - version %ld
  9103. 0 long 01203604016 TML 0123 byte-order format
  9104. 0 long 01702407010 TML 1032 byte-order format
  9105. 0 long 01003405017 TML 2301 byte-order format
  9106. 0 long 01602007412 TML 3210 byte-order format
  9107. #### PA-RISC 1.1
  9108. 0 belong 0x02100106 PA-RISC1.1 relocatable object
  9109. 0 belong 0x02100107 PA-RISC1.1 executable
  9110. >168 belong &0x00000004 dynamically linked
  9111. >(144) belong 0x054ef630 dynamically linked
  9112. >96 belong >0 - not stripped
  9113. 0 belong 0x02100108 PA-RISC1.1 shared executable
  9114. >168 belong&0x4 0x4 dynamically linked
  9115. >(144) belong 0x054ef630 dynamically linked
  9116. >96 belong >0 - not stripped
  9117. 0 belong 0x0210010b PA-RISC1.1 demand-load executable
  9118. >168 belong&0x4 0x4 dynamically linked
  9119. >(144) belong 0x054ef630 dynamically linked
  9120. >96 belong >0 - not stripped
  9121. 0 belong 0x0210010e PA-RISC1.1 shared library
  9122. >96 belong >0 - not stripped
  9123. 0 belong 0x0210010d PA-RISC1.1 dynamic load library
  9124. >96 belong >0 - not stripped
  9125. #### PA-RISC 2.0
  9126. 0 belong 0x02140106 PA-RISC2.0 relocatable object
  9127. 0 belong 0x02140107 PA-RISC2.0 executable
  9128. >168 belong &0x00000004 dynamically linked
  9129. >(144) belong 0x054ef630 dynamically linked
  9130. >96 belong >0 - not stripped
  9131. 0 belong 0x02140108 PA-RISC2.0 shared executable
  9132. >168 belong &0x00000004 dynamically linked
  9133. >(144) belong 0x054ef630 dynamically linked
  9134. >96 belong >0 - not stripped
  9135. 0 belong 0x0214010b PA-RISC2.0 demand-load executable
  9136. >168 belong &0x00000004 dynamically linked
  9137. >(144) belong 0x054ef630 dynamically linked
  9138. >96 belong >0 - not stripped
  9139. 0 belong 0x0214010e PA-RISC2.0 shared library
  9140. >96 belong >0 - not stripped
  9141. 0 belong 0x0214010d PA-RISC2.0 dynamic load library
  9142. >96 belong >0 - not stripped
  9143. #### 800
  9144. 0 belong 0x020b0106 PA-RISC1.0 relocatable object
  9145. 0 belong 0x020b0107 PA-RISC1.0 executable
  9146. >168 belong&0x4 0x4 dynamically linked
  9147. >(144) belong 0x054ef630 dynamically linked
  9148. >96 belong >0 - not stripped
  9149. 0 belong 0x020b0108 PA-RISC1.0 shared executable
  9150. >168 belong&0x4 0x4 dynamically linked
  9151. >(144) belong 0x054ef630 dynamically linked
  9152. >96 belong >0 - not stripped
  9153. 0 belong 0x020b010b PA-RISC1.0 demand-load executable
  9154. >168 belong&0x4 0x4 dynamically linked
  9155. >(144) belong 0x054ef630 dynamically linked
  9156. >96 belong >0 - not stripped
  9157. 0 belong 0x020b010e PA-RISC1.0 shared library
  9158. >96 belong >0 - not stripped
  9159. 0 belong 0x020b010d PA-RISC1.0 dynamic load library
  9160. >96 belong >0 - not stripped
  9161. 0 belong 0x213c6172 archive file
  9162. >68 belong 0x020b0619 - PA-RISC1.0 relocatable library
  9163. >68 belong 0x02100619 - PA-RISC1.1 relocatable library
  9164. >68 belong 0x02110619 - PA-RISC1.2 relocatable library
  9165. >68 belong 0x02140619 - PA-RISC2.0 relocatable library
  9166. #### 500
  9167. 0 long 0x02080106 HP s500 relocatable executable
  9168. >16 long >0 - version %ld
  9169. 0 long 0x02080107 HP s500 executable
  9170. >16 long >0 - version %ld
  9171. 0 long 0x02080108 HP s500 pure executable
  9172. >16 long >0 - version %ld
  9173. #### 200
  9174. 0 belong 0x020c0108 HP s200 pure executable
  9175. >4 beshort >0 - version %ld
  9176. >8 belong &0x80000000 save fp regs
  9177. >8 belong &0x40000000 dynamically linked
  9178. >8 belong &0x20000000 debuggable
  9179. >36 belong >0 not stripped
  9180. 0 belong 0x020c0107 HP s200 executable
  9181. >4 beshort >0 - version %ld
  9182. >8 belong &0x80000000 save fp regs
  9183. >8 belong &0x40000000 dynamically linked
  9184. >8 belong &0x20000000 debuggable
  9185. >36 belong >0 not stripped
  9186. 0 belong 0x020c010b HP s200 demand-load executable
  9187. >4 beshort >0 - version %ld
  9188. >8 belong &0x80000000 save fp regs
  9189. >8 belong &0x40000000 dynamically linked
  9190. >8 belong &0x20000000 debuggable
  9191. >36 belong >0 not stripped
  9192. 0 belong 0x020c0106 HP s200 relocatable executable
  9193. >4 beshort >0 - version %ld
  9194. >6 beshort >0 - highwater %d
  9195. >8 belong &0x80000000 save fp regs
  9196. >8 belong &0x20000000 debuggable
  9197. >8 belong &0x10000000 PIC
  9198. 0 belong 0x020a0108 HP s200 (2.x release) pure executable
  9199. >4 beshort >0 - version %ld
  9200. >36 belong >0 not stripped
  9201. 0 belong 0x020a0107 HP s200 (2.x release) executable
  9202. >4 beshort >0 - version %ld
  9203. >36 belong >0 not stripped
  9204. 0 belong 0x020c010e HP s200 shared library
  9205. >4 beshort >0 - version %ld
  9206. >6 beshort >0 - highwater %d
  9207. >36 belong >0 not stripped
  9208. 0 belong 0x020c010d HP s200 dynamic load library
  9209. >4 beshort >0 - version %ld
  9210. >6 beshort >0 - highwater %d
  9211. >36 belong >0 not stripped
  9212. #### MISC
  9213. 0 long 0x0000ff65 HP old archive
  9214. 0 long 0x020aff65 HP s200 old archive
  9215. 0 long 0x020cff65 HP s200 old archive
  9216. 0 long 0x0208ff65 HP s500 old archive
  9217. 0 long 0x015821a6 HP core file
  9218. 0 long 0x4da7eee8 HP-WINDOWS font
  9219. >8 byte >0 - version %ld
  9220. 0 string Bitmapfile HP Bitmapfile
  9221. 0 string IMGfile CIS compimg HP Bitmapfile
  9222. # XXX - see "lif"
  9223. #0 short 0x8000 lif file
  9224. 0 long 0x020c010c compiled Lisp
  9225. 0 string msgcat01 HP NLS message catalog,
  9226. >8 long >0 %d messages
  9227. # Summary: HP-48/49 calculator
  9228. # Created by: phk@data.fls.dk
  9229. # Modified by (1): AMAKAWA Shuhei <sa264@cam.ac.uk>
  9230. # Modified by (2): Samuel Thibault <samuel.thibault@ens-lyon.org> (HP49 support)
  9231. 0 string HPHP HP
  9232. >4 string 48 48 binary
  9233. >4 string 49 49 binary
  9234. >7 byte >64 - Rev %c
  9235. >8 leshort 0x2911 (ADR)
  9236. >8 leshort 0x2933 (REAL)
  9237. >8 leshort 0x2955 (LREAL)
  9238. >8 leshort 0x2977 (COMPLX)
  9239. >8 leshort 0x299d (LCOMPLX)
  9240. >8 leshort 0x29bf (CHAR)
  9241. >8 leshort 0x29e8 (ARRAY)
  9242. >8 leshort 0x2a0a (LNKARRAY)
  9243. >8 leshort 0x2a2c (STRING)
  9244. >8 leshort 0x2a4e (HXS)
  9245. >8 leshort 0x2a74 (LIST)
  9246. >8 leshort 0x2a96 (DIR)
  9247. >8 leshort 0x2ab8 (ALG)
  9248. >8 leshort 0x2ada (UNIT)
  9249. >8 leshort 0x2afc (TAGGED)
  9250. >8 leshort 0x2b1e (GROB)
  9251. >8 leshort 0x2b40 (LIB)
  9252. >8 leshort 0x2b62 (BACKUP)
  9253. >8 leshort 0x2b88 (LIBDATA)
  9254. >8 leshort 0x2d9d (PROG)
  9255. >8 leshort 0x2dcc (CODE)
  9256. >8 leshort 0x2e48 (GNAME)
  9257. >8 leshort 0x2e6d (LNAME)
  9258. >8 leshort 0x2e92 (XLIB)
  9259. 0 string %%HP: HP text
  9260. >6 string T(0) - T(0)
  9261. >6 string T(1) - T(1)
  9262. >6 string T(2) - T(2)
  9263. >6 string T(3) - T(3)
  9264. >10 string A(D) A(D)
  9265. >10 string A(R) A(R)
  9266. >10 string A(G) A(G)
  9267. >14 string F(.) F(.);
  9268. >14 string F(,) F(,);
  9269. # Summary: HP-38/39 calculator
  9270. # Created by: Samuel Thibault <samuel.thibault@ens-lyon.org>
  9271. 0 string HP3
  9272. >3 string 8 HP 38
  9273. >3 string 9 HP 39
  9274. >4 string Bin binary
  9275. >4 string Asc ASCII
  9276. >7 string A (Directory List)
  9277. >7 string B (Zaplet)
  9278. >7 string C (Note)
  9279. >7 string D (Program)
  9280. >7 string E (Variable)
  9281. >7 string F (List)
  9282. >7 string G (Matrix)
  9283. >7 string H (Library)
  9284. >7 string I (Target List)
  9285. >7 string J (ASCII Vector specification)
  9286. >7 string K (wildcard)
  9287. # Summary: HP-38/39 calculator
  9288. # Created by: Samuel Thibault <samuel.thibault@ens-lyon.org>
  9289. 0 string HP3
  9290. >3 string 8 HP 38
  9291. >3 string 9 HP 39
  9292. >4 string Bin binary
  9293. >4 string Asc ASCII
  9294. >7 string A (Directory List)
  9295. >7 string B (Zaplet)
  9296. >7 string C (Note)
  9297. >7 string D (Program)
  9298. >7 string E (Variable)
  9299. >7 string F (List)
  9300. >7 string G (Matrix)
  9301. >7 string H (Library)
  9302. >7 string I (Target List)
  9303. >7 string J (ASCII Vector specification)
  9304. >7 string K (wildcard)
  9305. # hpBSD magic numbers
  9306. 0 beshort 200 hp200 (68010) BSD
  9307. >2 beshort 0407 impure binary
  9308. >2 beshort 0410 read-only binary
  9309. >2 beshort 0413 demand paged binary
  9310. 0 beshort 300 hp300 (68020+68881) BSD
  9311. >2 beshort 0407 impure binary
  9312. >2 beshort 0410 read-only binary
  9313. >2 beshort 0413 demand paged binary
  9314. #
  9315. # From David Gero <dgero@nortelnetworks.com>
  9316. # HP-UX 10.20 core file format from /usr/include/sys/core.h
  9317. # Unfortunately, HP-UX uses corehead blocks without specifying the order
  9318. # There are four we care about:
  9319. # CORE_KERNEL, which starts with the string "HP-UX"
  9320. # CORE_EXEC, which contains the name of the command
  9321. # CORE_PROC, which contains the signal number that caused the core dump
  9322. # CORE_FORMAT, which contains the version of the core file format (== 1)
  9323. # The only observed order in real core files is KERNEL, EXEC, FORMAT, PROC
  9324. # but we include all 6 variations of the order of the first 3, and
  9325. # assume that PROC will always be last
  9326. # Order 1: KERNEL, EXEC, FORMAT, PROC
  9327. 0x10 string HP-UX
  9328. >0 belong 2
  9329. >>0xC belong 0x3C
  9330. >>>0x4C belong 0x100
  9331. >>>>0x58 belong 0x44
  9332. >>>>>0xA0 belong 1
  9333. >>>>>>0xAC belong 4
  9334. >>>>>>>0xB0 belong 1
  9335. >>>>>>>>0xB4 belong 4 core file
  9336. >>>>>>>>>0x90 string >\0 from '%s'
  9337. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  9338. >>>>>>>>>0xC4 belong 4 - received SIGILL
  9339. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  9340. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  9341. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  9342. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  9343. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  9344. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  9345. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  9346. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  9347. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  9348. # Order 2: KERNEL, FORMAT, EXEC, PROC
  9349. >>>0x4C belong 1
  9350. >>>>0x58 belong 4
  9351. >>>>>0x5C belong 1
  9352. >>>>>>0x60 belong 0x100
  9353. >>>>>>>0x6C belong 0x44
  9354. >>>>>>>>0xB4 belong 4 core file
  9355. >>>>>>>>>0xA4 string >\0 from '%s'
  9356. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  9357. >>>>>>>>>0xC4 belong 4 - received SIGILL
  9358. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  9359. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  9360. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  9361. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  9362. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  9363. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  9364. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  9365. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  9366. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  9367. # Order 3: FORMAT, KERNEL, EXEC, PROC
  9368. 0x24 string HP-UX
  9369. >0 belong 1
  9370. >>0xC belong 4
  9371. >>>0x10 belong 1
  9372. >>>>0x14 belong 2
  9373. >>>>>0x20 belong 0x3C
  9374. >>>>>>0x60 belong 0x100
  9375. >>>>>>>0x6C belong 0x44
  9376. >>>>>>>>0xB4 belong 4 core file
  9377. >>>>>>>>>0xA4 string >\0 from '%s'
  9378. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  9379. >>>>>>>>>0xC4 belong 4 - received SIGILL
  9380. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  9381. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  9382. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  9383. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  9384. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  9385. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  9386. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  9387. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  9388. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  9389. # Order 4: EXEC, KERNEL, FORMAT, PROC
  9390. 0x64 string HP-UX
  9391. >0 belong 0x100
  9392. >>0xC belong 0x44
  9393. >>>0x54 belong 2
  9394. >>>>0x60 belong 0x3C
  9395. >>>>>0xA0 belong 1
  9396. >>>>>>0xAC belong 4
  9397. >>>>>>>0xB0 belong 1
  9398. >>>>>>>>0xB4 belong 4 core file
  9399. >>>>>>>>>0x44 string >\0 from '%s'
  9400. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  9401. >>>>>>>>>0xC4 belong 4 - received SIGILL
  9402. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  9403. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  9404. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  9405. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  9406. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  9407. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  9408. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  9409. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  9410. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  9411. # Order 5: FORMAT, EXEC, KERNEL, PROC
  9412. 0x78 string HP-UX
  9413. >0 belong 1
  9414. >>0xC belong 4
  9415. >>>0x10 belong 1
  9416. >>>>0x14 belong 0x100
  9417. >>>>>0x20 belong 0x44
  9418. >>>>>>0x68 belong 2
  9419. >>>>>>>0x74 belong 0x3C
  9420. >>>>>>>>0xB4 belong 4 core file
  9421. >>>>>>>>>0x58 string >\0 from '%s'
  9422. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  9423. >>>>>>>>>0xC4 belong 4 - received SIGILL
  9424. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  9425. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  9426. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  9427. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  9428. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  9429. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  9430. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  9431. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  9432. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  9433. # Order 6: EXEC, FORMAT, KERNEL, PROC
  9434. >0 belong 0x100
  9435. >>0xC belong 0x44
  9436. >>>0x54 belong 1
  9437. >>>>0x60 belong 4
  9438. >>>>>0x64 belong 1
  9439. >>>>>>0x68 belong 2
  9440. >>>>>>>0x74 belong 0x2C
  9441. >>>>>>>>0xB4 belong 4 core file
  9442. >>>>>>>>>0x44 string >\0 from '%s'
  9443. >>>>>>>>>0xC4 belong 3 - received SIGQUIT
  9444. >>>>>>>>>0xC4 belong 4 - received SIGILL
  9445. >>>>>>>>>0xC4 belong 5 - received SIGTRAP
  9446. >>>>>>>>>0xC4 belong 6 - received SIGABRT
  9447. >>>>>>>>>0xC4 belong 7 - received SIGEMT
  9448. >>>>>>>>>0xC4 belong 8 - received SIGFPE
  9449. >>>>>>>>>0xC4 belong 10 - received SIGBUS
  9450. >>>>>>>>>0xC4 belong 11 - received SIGSEGV
  9451. >>>>>>>>>0xC4 belong 12 - received SIGSYS
  9452. >>>>>>>>>0xC4 belong 33 - received SIGXCPU
  9453. >>>>>>>>>0xC4 belong 34 - received SIGXFSZ
  9454. #------------------------------------------------------------------------------
  9455. # $File: human68k,v 1.5 2009/09/19 16:28:09 christos Exp $
  9456. # human68k: file(1) magic for Human68k (X680x0 DOS) binary formats
  9457. # Magic too short!
  9458. #0 string HU Human68k
  9459. #>68 string LZX LZX compressed
  9460. #>>72 string >\0 (version %s)
  9461. #>(8.L+74) string LZX LZX compressed
  9462. #>>(8.L+78) string >\0 (version %s)
  9463. #>60 belong >0 binded
  9464. #>(8.L+66) string #HUPAIR hupair
  9465. #>0 string HU X executable
  9466. #>(8.L+74) string #LIBCV1 - linked PD LIBC ver 1
  9467. #>4 belong >0 - base address 0x%x
  9468. #>28 belong >0 not stripped
  9469. #>32 belong >0 with debug information
  9470. #0 beshort 0x601a Human68k Z executable
  9471. #0 beshort 0x6000 Human68k object file
  9472. #0 belong 0xd1000000 Human68k ar binary archive
  9473. #0 belong 0xd1010000 Human68k ar ascii archive
  9474. #0 beshort 0x0068 Human68k lib archive
  9475. #4 string LZX Human68k LZX compressed
  9476. #>8 string >\0 (version %s)
  9477. #>4 string LZX R executable
  9478. #2 string #HUPAIR Human68k hupair R executable
  9479. #------------------------------------------------------------------------------
  9480. # $File: ibm370,v 1.8 2009/09/19 16:28:09 christos Exp $
  9481. # ibm370: file(1) magic for IBM 370 and compatibles.
  9482. #
  9483. # "ibm370" said that 0x15d == 0535 was "ibm 370 pure executable".
  9484. # What the heck *is* "USS/370"?
  9485. # AIX 4.1's "/etc/magic" has
  9486. #
  9487. # 0 short 0535 370 sysV executable
  9488. # >12 long >0 not stripped
  9489. # >22 short >0 - version %d
  9490. # >30 long >0 - 5.2 format
  9491. # 0 short 0530 370 sysV pure executable
  9492. # >12 long >0 not stripped
  9493. # >22 short >0 - version %d
  9494. # >30 long >0 - 5.2 format
  9495. #
  9496. # instead of the "USS/370" versions of the same magic numbers.
  9497. #
  9498. 0 beshort 0537 370 XA sysV executable
  9499. >12 belong >0 not stripped
  9500. >22 beshort >0 - version %d
  9501. >30 belong >0 - 5.2 format
  9502. 0 beshort 0532 370 XA sysV pure executable
  9503. >12 belong >0 not stripped
  9504. >22 beshort >0 - version %d
  9505. >30 belong >0 - 5.2 format
  9506. 0 beshort 054001 370 sysV pure executable
  9507. >12 belong >0 not stripped
  9508. 0 beshort 055001 370 XA sysV pure executable
  9509. >12 belong >0 not stripped
  9510. 0 beshort 056401 370 sysV executable
  9511. >12 belong >0 not stripped
  9512. 0 beshort 057401 370 XA sysV executable
  9513. >12 belong >0 not stripped
  9514. 0 beshort 0531 SVR2 executable (Amdahl-UTS)
  9515. >12 belong >0 not stripped
  9516. >24 belong >0 - version %ld
  9517. 0 beshort 0534 SVR2 pure executable (Amdahl-UTS)
  9518. >12 belong >0 not stripped
  9519. >24 belong >0 - version %ld
  9520. 0 beshort 0530 SVR2 pure executable (USS/370)
  9521. >12 belong >0 not stripped
  9522. >24 belong >0 - version %ld
  9523. 0 beshort 0535 SVR2 executable (USS/370)
  9524. >12 belong >0 not stripped
  9525. >24 belong >0 - version %ld
  9526. #------------------------------------------------------------------------------
  9527. # $File: ibm6000,v 1.12 2013/09/16 15:12:42 christos Exp $
  9528. # ibm6000: file(1) magic for RS/6000 and the RT PC.
  9529. #
  9530. 0 beshort 0x01df executable (RISC System/6000 V3.1) or obj module
  9531. >12 belong >0 not stripped
  9532. # Breaks sun4 statically linked execs.
  9533. #0 beshort 0x0103 executable (RT Version 2) or obj module
  9534. #>2 byte 0x50 pure
  9535. #>28 belong >0 not stripped
  9536. #>6 beshort >0 - version %ld
  9537. 0 beshort 0x0104 shared library
  9538. 0 beshort 0x0105 ctab data
  9539. 0 beshort 0xfe04 structured file
  9540. 0 string 0xabcdef AIX message catalog
  9541. 0 belong 0x000001f9 AIX compiled message catalog
  9542. 0 string \<aiaff> archive
  9543. 0 string \<bigaf> archive (big format)
  9544. 0 beshort 0x01f7 64-bit XCOFF executable or object module
  9545. >20 belong 0 not stripped
  9546. # GRR: this test is still too general as it catches also many FATs of DOS filesystems
  9547. 4 belong &0x0feeddb0
  9548. # real core dump could not be 32-bit and 64-bit together
  9549. >7 byte&0x03 !3 AIX core file
  9550. >>1 byte &0x01 fulldump
  9551. >>7 byte &0x01 32-bit
  9552. >>>0x6e0 string >\0 \b, %s
  9553. >>7 byte &0x02 64-bit
  9554. >>>0x524 string >\0 \b, %s
  9555. #------------------------------------------------------------------------------
  9556. # $File: icc,v 1.1 2013/01/08 01:43:18 christos Exp $
  9557. # icc: file(1) magic for International Color Consortium file formats
  9558. #
  9559. # Color profiles as per the ICC's "Image technology colour management -
  9560. # Architecture, profile format, and data structure" specification.
  9561. # See
  9562. #
  9563. # http://www.color.org/specification/ICC1v43_2010-12.pdf
  9564. #
  9565. # for Specification ICC.1:2010 (Profile version 4.3.0.0).
  9566. #
  9567. # Bytes 36 to 39 contain a generic profile file signature of "acsp";
  9568. # bytes 40 to 43 "may be used to identify the primary platform/operating
  9569. # system framework for which the profile was created".
  9570. #
  9571. # There are other fields that might be worth dumping as well.
  9572. #
  9573. # This appears to be what's used for Apple ColorSync profiles.
  9574. # Instead of adding that, Apple just changed the generic "acsp" entry
  9575. # to be for "ColorSync ICC Color Profile" rather than "Kodak Color
  9576. # Management System, ICC Profile".
  9577. # Yes, it's "APPL", not "AAPL"; see the spec.
  9578. 36 string acspAPPL ColorSync ICC Profile
  9579. !:mime application/vnd.iccprofile
  9580. # Microsoft ICM color profile
  9581. 36 string acspMSFT Microsoft ICM Color Profile
  9582. !:mime application/vnd.iccprofile
  9583. # Yes, that's a blank after "SGI".
  9584. 36 string acspSGI\ SGI ICC Profile
  9585. !:mime application/vnd.iccprofile
  9586. # XXX - is this what's used for the Sun KCMS or not? The standard file
  9587. # uses just "acsp" for that, but Apple's file uses it for "ColorSync",
  9588. # and there *is* an identified "primary platform" value of SUNW.
  9589. 36 string acspSUNW Sun KCMS ICC Profile
  9590. !:mime application/vnd.iccprofile
  9591. # Any other profile.
  9592. # XXX - should we use "acsp\0\0\0\0" for "no primary platform" profiles,
  9593. # and use "acsp" for everything else and dump the "primary platform"
  9594. # string in those cases?
  9595. 36 string acsp ICC Profile
  9596. !:mime application/vnd.iccprofile
  9597. #------------------------------------------------------------------------------
  9598. # $File: iff,v 1.13 2011/09/06 11:00:06 christos Exp $
  9599. # iff: file(1) magic for Interchange File Format (see also "audio" & "images")
  9600. #
  9601. # Daniel Quinlan (quinlan@yggdrasil.com) -- IFF was designed by Electronic
  9602. # Arts for file interchange. It has also been used by Apple, SGI, and
  9603. # especially Commodore-Amiga.
  9604. #
  9605. # IFF files begin with an 8 byte FORM header, followed by a 4 character
  9606. # FORM type, which is followed by the first chunk in the FORM.
  9607. 0 string FORM IFF data
  9608. #>4 belong x \b, FORM is %d bytes long
  9609. # audio formats
  9610. >8 string AIFF \b, AIFF audio
  9611. !:mime audio/x-aiff
  9612. >8 string AIFC \b, AIFF-C compressed audio
  9613. !:mime audio/x-aiff
  9614. >8 string 8SVX \b, 8SVX 8-bit sampled sound voice
  9615. !:mime audio/x-aiff
  9616. >8 string 16SV \b, 16SV 16-bit sampled sound voice
  9617. >8 string SAMP \b, SAMP sampled audio
  9618. >8 string MAUD \b, MAUD MacroSystem audio
  9619. >8 string SMUS \b, SMUS simple music
  9620. >8 string CMUS \b, CMUS complex music
  9621. # image formats
  9622. >8 string ILBMBMHD \b, ILBM interleaved image
  9623. >>20 beshort x \b, %d x
  9624. >>22 beshort x %d
  9625. >8 string RGBN \b, RGBN 12-bit RGB image
  9626. >8 string RGB8 \b, RGB8 24-bit RGB image
  9627. >8 string DEEP \b, DEEP TVPaint/XiPaint image
  9628. >8 string DR2D \b, DR2D 2-D object
  9629. >8 string TDDD \b, TDDD 3-D rendering
  9630. >8 string LWOB \b, LWOB 3-D object
  9631. >8 string LWO2 \b, LWO2 3-D object, v2
  9632. >8 string LWLO \b, LWLO 3-D layered object
  9633. >8 string REAL \b, REAL Real3D rendering
  9634. >8 string MC4D \b, MC4D MaxonCinema4D rendering
  9635. >8 string ANIM \b, ANIM animation
  9636. >8 string YAFA \b, YAFA animation
  9637. >8 string SSA\ \b, SSA super smooth animation
  9638. >8 string ACBM \b, ACBM continuous image
  9639. >8 string FAXX \b, FAXX fax image
  9640. # other formats
  9641. >8 string FTXT \b, FTXT formatted text
  9642. >8 string CTLG \b, CTLG message catalog
  9643. >8 string PREF \b, PREF preferences
  9644. >8 string DTYP \b, DTYP datatype description
  9645. >8 string PTCH \b, PTCH binary patch
  9646. >8 string AMFF \b, AMFF AmigaMetaFile format
  9647. >8 string WZRD \b, WZRD StormWIZARD resource
  9648. >8 string DOC\ \b, DOC desktop publishing document
  9649. >8 string WVQA \b, Westwood Studios VQA Multimedia,
  9650. >>24 leshort x %d video frames,
  9651. >>26 leshort x %d x
  9652. >>28 leshort x %d
  9653. >8 string MOVE \b, Wing Commander III Video
  9654. >>12 string _PC_ \b, PC version
  9655. >>12 string 3DO_ \b, 3DO version
  9656. # These go at the end of the iff rules
  9657. #
  9658. # I don't see why these might collide with anything else.
  9659. #
  9660. # Interactive Fiction related formats
  9661. #
  9662. >8 string IFRS \b, Blorb Interactive Fiction
  9663. >>24 string Exec with executable chunk
  9664. >8 string IFZS \b, Z-machine or Glulx saved game file (Quetzal)
  9665. #------------------------------------------------------------------------------
  9666. # $File: images,v 1.87 2013/12/11 14:14:20 christos Exp $
  9667. # images: file(1) magic for image formats (see also "iff", and "c-lang" for
  9668. # XPM bitmaps)
  9669. #
  9670. # originally from jef@helios.ee.lbl.gov (Jef Poskanzer),
  9671. # additions by janl@ifi.uio.no as well as others. Jan also suggested
  9672. # merging several one- and two-line files into here.
  9673. #
  9674. # little magic: PCX (first byte is 0x0a)
  9675. # Targa - matches `povray', `ppmtotga' and `xv' outputs
  9676. # by Philippe De Muyter <phdm@macqel.be>
  9677. # at 2, byte ImgType must be 1, 2, 3, 9, 10 or 11
  9678. # at 1, byte CoMapType must be 1 if ImgType is 1 or 9, 0 otherwise
  9679. # at 3, leshort Index is 0 for povray, ppmtotga and xv outputs
  9680. # `xv' recognizes only a subset of the following (RGB with pixelsize = 24)
  9681. # `tgatoppm' recognizes a superset (Index may be anything)
  9682. 1 belong&0xfff7ffff 0x01010000 Targa image data - Map
  9683. >2 byte&8 8 - RLE
  9684. >12 leshort >0 %hd x
  9685. >14 leshort >0 %hd
  9686. 1 belong&0xfff7ffff 0x00020000 Targa image data - RGB
  9687. >2 byte&8 8 - RLE
  9688. >12 leshort >0 %hd x
  9689. >14 leshort >0 %hd
  9690. 1 belong&0xfff7ffff 0x00030000 Targa image data - Mono
  9691. >2 byte&8 8 - RLE
  9692. >12 leshort >0 %hd x
  9693. >14 leshort >0 %hd
  9694. # PBMPLUS images
  9695. # The next byte following the magic is always whitespace.
  9696. # strength is changed to try these patterns before "x86 boot sector"
  9697. 0 search/1 P1
  9698. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PBM image text
  9699. >3 regex =[0-9]{1,50}\ \b, size = %sx
  9700. >>3 regex =\ [0-9]{1,50} \b%s
  9701. !:strength + 45
  9702. !:mime image/x-portable-bitmap
  9703. 0 search/1 P2
  9704. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PGM image text
  9705. >3 regex =[0-9]{1,50}\ \b, size = %sx
  9706. >>3 regex =\ [0-9]{1,50} \b%s
  9707. !:strength + 45
  9708. !:mime image/x-portable-greymap
  9709. 0 search/1 P3
  9710. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PPM image text
  9711. >3 regex =[0-9]{1,50}\ \b, size = %sx
  9712. >>3 regex =\ [0-9]{1,50} \b%s
  9713. !:strength + 45
  9714. !:mime image/x-portable-pixmap
  9715. 0 string P4
  9716. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PBM "rawbits" image data
  9717. >3 regex =[0-9]{1,50}\ \b, size = %sx
  9718. >>3 regex =\ [0-9]{1,50} \b%s
  9719. !:strength + 45
  9720. !:mime image/x-portable-bitmap
  9721. 0 string P5
  9722. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PGM "rawbits" image data
  9723. >3 regex =[0-9]{1,50}\ \b, size = %sx
  9724. >>3 regex =\ [0-9]{1,50} \b%s
  9725. !:strength + 45
  9726. !:mime image/x-portable-greymap
  9727. 0 string P6
  9728. >3 regex =[0-9]{0,50}\ [0-9]{0,50} Netpbm PPM "rawbits" image data
  9729. >3 regex =[0-9]{1,50}\ \b, size = %sx
  9730. >>3 regex =\ [0-9]{1,50} \b%s
  9731. !:strength + 45
  9732. !:mime image/x-portable-pixmap
  9733. 0 string P7 Netpbm PAM image file
  9734. !:mime image/x-portable-pixmap
  9735. # From: bryanh@giraffe-data.com (Bryan Henderson)
  9736. 0 string \117\072 Solitaire Image Recorder format
  9737. >4 string \013 MGI Type 11
  9738. >4 string \021 MGI Type 17
  9739. 0 string .MDA MicroDesign data
  9740. >21 byte 48 version 2
  9741. >21 byte 51 version 3
  9742. 0 string .MDP MicroDesign page data
  9743. >21 byte 48 version 2
  9744. >21 byte 51 version 3
  9745. # NIFF (Navy Interchange File Format, a modification of TIFF) images
  9746. # [GRR: this *must* go before TIFF]
  9747. 0 string IIN1 NIFF image data
  9748. !:mime image/x-niff
  9749. # Canon RAW version 1 (CRW) files are a type of Canon Image File Format
  9750. # (CIFF) file. These are apparently all little-endian.
  9751. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  9752. # URL: http://www.sno.phy.queensu.ca/~phil/exiftool/canon_raw.html
  9753. 0 string II\x1a\0\0\0HEAPCCDR Canon CIFF raw image data
  9754. !:mime image/x-canon-crw
  9755. >16 leshort x \b, version %d.
  9756. >14 leshort x \b%d
  9757. # Canon RAW version 2 (CR2) files are a kind of TIFF with an extra magic
  9758. # number. Put this above the TIFF test to make sure we detect them.
  9759. # These are apparently all little-endian.
  9760. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  9761. # URL: http://libopenraw.freedesktop.org/wiki/Canon_CR2
  9762. 0 string II\x2a\0\x10\0\0\0CR Canon CR2 raw image data
  9763. !:mime image/x-canon-cr2
  9764. >10 byte x \b, version %d.
  9765. >11 byte x \b%d
  9766. # Tag Image File Format, from Daniel Quinlan (quinlan@yggdrasil.com)
  9767. # The second word of TIFF files is the TIFF version number, 42, which has
  9768. # never changed. The TIFF specification recommends testing for it.
  9769. 0 string MM\x00\x2a TIFF image data, big-endian
  9770. !:mime image/tiff
  9771. 0 string II\x2a\x00 TIFF image data, little-endian
  9772. !:mime image/tiff
  9773. 0 string MM\x00\x2b Big TIFF image data, big-endian
  9774. !:mime image/tiff
  9775. 0 string II\x2b\x00 Big TIFF image data, little-endian
  9776. !:mime image/tiff
  9777. # PNG [Portable Network Graphics, or "PNG's Not GIF"] images
  9778. # (Greg Roelofs, newt@uchicago.edu)
  9779. # (Albert Cahalan, acahalan@cs.uml.edu)
  9780. #
  9781. # 137 P N G \r \n ^Z \n [4-byte length] H E A D [HEAD data] [HEAD crc] ...
  9782. #
  9783. 0 string \x89PNG\x0d\x0a\x1a\x0a PNG image data
  9784. !:mime image/png
  9785. >16 belong x \b, %ld x
  9786. >20 belong x %ld,
  9787. >24 byte x %d-bit
  9788. >25 byte 0 grayscale,
  9789. >25 byte 2 \b/color RGB,
  9790. >25 byte 3 colormap,
  9791. >25 byte 4 gray+alpha,
  9792. >25 byte 6 \b/color RGBA,
  9793. #>26 byte 0 deflate/32K,
  9794. >28 byte 0 non-interlaced
  9795. >28 byte 1 interlaced
  9796. # possible GIF replacements; none yet released!
  9797. # (Greg Roelofs, newt@uchicago.edu)
  9798. #
  9799. # GRR 950115: this was mine ("Zip GIF"):
  9800. 0 string GIF94z ZIF image (GIF+deflate alpha)
  9801. !:mime image/x-unknown
  9802. #
  9803. # GRR 950115: this is Jeremy Wohl's Free Graphics Format (better):
  9804. #
  9805. 0 string FGF95a FGF image (GIF+deflate beta)
  9806. !:mime image/x-unknown
  9807. #
  9808. # GRR 950115: this is Thomas Boutell's Portable Bitmap Format proposal
  9809. # (best; not yet implemented):
  9810. #
  9811. 0 string PBF PBF image (deflate compression)
  9812. !:mime image/x-unknown
  9813. # GIF
  9814. 0 string GIF8 GIF image data
  9815. !:mime image/gif
  9816. !:apple 8BIMGIFf
  9817. >4 string 7a \b, version 8%s,
  9818. >4 string 9a \b, version 8%s,
  9819. >6 leshort >0 %hd x
  9820. >8 leshort >0 %hd
  9821. #>10 byte &0x80 color mapped,
  9822. #>10 byte&0x07 =0x00 2 colors
  9823. #>10 byte&0x07 =0x01 4 colors
  9824. #>10 byte&0x07 =0x02 8 colors
  9825. #>10 byte&0x07 =0x03 16 colors
  9826. #>10 byte&0x07 =0x04 32 colors
  9827. #>10 byte&0x07 =0x05 64 colors
  9828. #>10 byte&0x07 =0x06 128 colors
  9829. #>10 byte&0x07 =0x07 256 colors
  9830. # ITC (CMU WM) raster files. It is essentially a byte-reversed Sun raster,
  9831. # 1 plane, no encoding.
  9832. 0 string \361\0\100\273 CMU window manager raster image data
  9833. >4 lelong >0 %d x
  9834. >8 lelong >0 %d,
  9835. >12 lelong >0 %d-bit
  9836. # Magick Image File Format
  9837. 0 string id=ImageMagick MIFF image data
  9838. # Artisan
  9839. 0 long 1123028772 Artisan image data
  9840. >4 long 1 \b, rectangular 24-bit
  9841. >4 long 2 \b, rectangular 8-bit with colormap
  9842. >4 long 3 \b, rectangular 32-bit (24-bit with matte)
  9843. # FIG (Facility for Interactive Generation of figures), an object-based format
  9844. 0 search/1 #FIG FIG image text
  9845. >5 string x \b, version %.3s
  9846. # PHIGS
  9847. 0 string ARF_BEGARF PHIGS clear text archive
  9848. 0 string @(#)SunPHIGS SunPHIGS
  9849. # version number follows, in the form m.n
  9850. >40 string SunBin binary
  9851. >32 string archive archive
  9852. # GKS (Graphics Kernel System)
  9853. 0 string GKSM GKS Metafile
  9854. >24 string SunGKS \b, SunGKS
  9855. # CGM image files
  9856. 0 string BEGMF clear text Computer Graphics Metafile
  9857. # MGR bitmaps (Michael Haardt, u31b3hs@pool.informatik.rwth-aachen.de)
  9858. 0 string yz MGR bitmap, modern format, 8-bit aligned
  9859. 0 string zz MGR bitmap, old format, 1-bit deep, 16-bit aligned
  9860. 0 string xz MGR bitmap, old format, 1-bit deep, 32-bit aligned
  9861. 0 string yx MGR bitmap, modern format, squeezed
  9862. # Fuzzy Bitmap (FBM) images
  9863. 0 string %bitmap\0 FBM image data
  9864. >30 long 0x31 \b, mono
  9865. >30 long 0x33 \b, color
  9866. # facsimile data
  9867. 1 string PC\ Research,\ Inc group 3 fax data
  9868. >29 byte 0 \b, normal resolution (204x98 DPI)
  9869. >29 byte 1 \b, fine resolution (204x196 DPI)
  9870. # From: Herbert Rosmanith <herp@wildsau.idv.uni.linz.at>
  9871. 0 string Sfff structured fax file
  9872. # From: Joerg Jenderek <joerg.jen.der.ek@gmx.net>
  9873. # most files with the extension .EPA and some with .BMP
  9874. 0 string \x11\x06 Award BIOS Logo, 136 x 84
  9875. !:mime image/x-award-bioslogo
  9876. 0 string \x11\x09 Award BIOS Logo, 136 x 126
  9877. !:mime image/x-award-bioslogo
  9878. #0 string \x07\x1f BIOS Logo corrupted?
  9879. # http://www.blackfiveservices.co.uk/awbmtools.shtml
  9880. # http://biosgfx.narod.ru/v3/
  9881. # http://biosgfx.narod.ru/abr-2/
  9882. 0 string AWBM
  9883. >4 leshort <1981 Award BIOS bitmap
  9884. !:mime image/x-award-bmp
  9885. # image width is a multiple of 4
  9886. >>4 leshort&0x0003 0
  9887. >>>4 leshort x \b, %d
  9888. >>>6 leshort x x %d
  9889. >>4 leshort&0x0003 >0 \b,
  9890. >>>4 leshort&0x0003 =1
  9891. >>>>4 leshort x %d+3
  9892. >>>4 leshort&0x0003 =2
  9893. >>>>4 leshort x %d+2
  9894. >>>4 leshort&0x0003 =3
  9895. >>>>4 leshort x %d+1
  9896. >>>6 leshort x x %d
  9897. # at offset 8 starts imagedata followed by "RGB " marker
  9898. # PC bitmaps (OS/2, Windows BMP files) (Greg Roelofs, newt@uchicago.edu)
  9899. # http://en.wikipedia.org/wiki/BMP_file_format#DIB_header_.\
  9900. # 28bitmap_information_header.29
  9901. 0 string BM
  9902. >14 leshort 12 PC bitmap, OS/2 1.x format
  9903. !:mime image/x-ms-bmp
  9904. >>18 leshort x \b, %d x
  9905. >>20 leshort x %d
  9906. >14 leshort 64 PC bitmap, OS/2 2.x format
  9907. !:mime image/x-ms-bmp
  9908. >>18 leshort x \b, %d x
  9909. >>20 leshort x %d
  9910. >14 leshort 40 PC bitmap, Windows 3.x format
  9911. !:mime image/x-ms-bmp
  9912. >>18 lelong x \b, %d x
  9913. >>22 lelong x %d x
  9914. >>28 leshort x %d
  9915. >14 leshort 124 PC bitmap, Windows 98/2000 and newer format
  9916. !:mime image/x-ms-bmp
  9917. >>18 lelong x \b, %d x
  9918. >>22 lelong x %d x
  9919. >>28 leshort x %d
  9920. >14 leshort 108 PC bitmap, Windows 95/NT4 and newer format
  9921. !:mime image/x-ms-bmp
  9922. >>18 lelong x \b, %d x
  9923. >>22 lelong x %d x
  9924. >>28 leshort x %d
  9925. >14 leshort 128 PC bitmap, Windows NT/2000 format
  9926. !:mime image/x-ms-bmp
  9927. >>18 lelong x \b, %d x
  9928. >>22 lelong x %d x
  9929. >>28 leshort x %d
  9930. # Too simple - MPi
  9931. #0 string IC PC icon data
  9932. #0 string PI PC pointer image data
  9933. #0 string CI PC color icon data
  9934. #0 string CP PC color pointer image data
  9935. # Conflicts with other entries [BABYL]
  9936. #0 string BA PC bitmap array data
  9937. # XPM icons (Greg Roelofs, newt@uchicago.edu)
  9938. 0 search/1 /*\ XPM\ */ X pixmap image text
  9939. !:mime image/x-xpmi
  9940. # Utah Raster Toolkit RLE images (janl@ifi.uio.no)
  9941. 0 leshort 0xcc52 RLE image data,
  9942. >6 leshort x %d x
  9943. >8 leshort x %d
  9944. >2 leshort >0 \b, lower left corner: %d
  9945. >4 leshort >0 \b, lower right corner: %d
  9946. >10 byte&0x1 =0x1 \b, clear first
  9947. >10 byte&0x2 =0x2 \b, no background
  9948. >10 byte&0x4 =0x4 \b, alpha channel
  9949. >10 byte&0x8 =0x8 \b, comment
  9950. >11 byte >0 \b, %d color channels
  9951. >12 byte >0 \b, %d bits per pixel
  9952. >13 byte >0 \b, %d color map channels
  9953. # image file format (Robert Potter, potter@cs.rochester.edu)
  9954. 0 string Imagefile\ version- iff image data
  9955. # this adds the whole header (inc. version number), informative but longish
  9956. >10 string >\0 %s
  9957. # Sun raster images, from Daniel Quinlan (quinlan@yggdrasil.com)
  9958. 0 belong 0x59a66a95 Sun raster image data
  9959. >4 belong >0 \b, %d x
  9960. >8 belong >0 %d,
  9961. >12 belong >0 %d-bit,
  9962. #>16 belong >0 %d bytes long,
  9963. >20 belong 0 old format,
  9964. #>20 belong 1 standard,
  9965. >20 belong 2 compressed,
  9966. >20 belong 3 RGB,
  9967. >20 belong 4 TIFF,
  9968. >20 belong 5 IFF,
  9969. >20 belong 0xffff reserved for testing,
  9970. >24 belong 0 no colormap
  9971. >24 belong 1 RGB colormap
  9972. >24 belong 2 raw colormap
  9973. #>28 belong >0 colormap is %d bytes long
  9974. # SGI image file format, from Daniel Quinlan (quinlan@yggdrasil.com)
  9975. #
  9976. # See
  9977. # http://reality.sgi.com/grafica/sgiimage.html
  9978. #
  9979. 0 beshort 474 SGI image data
  9980. #>2 byte 0 \b, verbatim
  9981. >2 byte 1 \b, RLE
  9982. #>3 byte 1 \b, normal precision
  9983. >3 byte 2 \b, high precision
  9984. >4 beshort x \b, %d-D
  9985. >6 beshort x \b, %d x
  9986. >8 beshort x %d
  9987. >10 beshort x \b, %d channel
  9988. >10 beshort !1 \bs
  9989. >80 string >0 \b, "%s"
  9990. 0 string IT01 FIT image data
  9991. >4 belong x \b, %d x
  9992. >8 belong x %d x
  9993. >12 belong x %d
  9994. #
  9995. 0 string IT02 FIT image data
  9996. >4 belong x \b, %d x
  9997. >8 belong x %d x
  9998. >12 belong x %d
  9999. #
  10000. 2048 string PCD_IPI Kodak Photo CD image pack file
  10001. >0xe02 byte&0x03 0x00 , landscape mode
  10002. >0xe02 byte&0x03 0x01 , portrait mode
  10003. >0xe02 byte&0x03 0x02 , landscape mode
  10004. >0xe02 byte&0x03 0x03 , portrait mode
  10005. 0 string PCD_OPA Kodak Photo CD overview pack file
  10006. # FITS format. Jeff Uphoff <juphoff@tarsier.cv.nrao.edu>
  10007. # FITS is the Flexible Image Transport System, the de facto standard for
  10008. # data and image transfer, storage, etc., for the astronomical community.
  10009. # (FITS floating point formats are big-endian.)
  10010. 0 string SIMPLE\ \ = FITS image data
  10011. >109 string 8 \b, 8-bit, character or unsigned binary integer
  10012. >108 string 16 \b, 16-bit, two's complement binary integer
  10013. >107 string \ 32 \b, 32-bit, two's complement binary integer
  10014. >107 string -32 \b, 32-bit, floating point, single precision
  10015. >107 string -64 \b, 64-bit, floating point, double precision
  10016. # other images
  10017. 0 string This\ is\ a\ BitMap\ file Lisp Machine bit-array-file
  10018. # From SunOS 5.5.1 "/etc/magic" - appeared right before Sun raster image
  10019. # stuff.
  10020. #
  10021. 0 beshort 0x1010 PEX Binary Archive
  10022. # DICOM medical imaging data
  10023. 128 string DICM DICOM medical imaging data
  10024. !:mime application/dicom
  10025. # XWD - X Window Dump file.
  10026. # As described in /usr/X11R6/include/X11/XWDFile.h
  10027. # used by the xwd program.
  10028. # Bradford Castalia, idaeim, 1/01
  10029. # updated by Adam Buchbinder, 2/09
  10030. # The following assumes version 7 of the format; the first long is the length
  10031. # of the header, which is at least 25 4-byte longs, and the one at offset 8
  10032. # is a constant which is always either 1 or 2. Offset 12 is the pixmap depth,
  10033. # which is a maximum of 32.
  10034. 0 belong >100
  10035. >8 belong <3
  10036. >>12 belong <33
  10037. >>>4 belong 7 XWD X Window Dump image data
  10038. !:mime image/x-xwindowdump
  10039. >>>>100 string >\0 \b, "%s"
  10040. >>>>16 belong x \b, %dx
  10041. >>>>20 belong x \b%dx
  10042. >>>>12 belong x \b%d
  10043. # PDS - Planetary Data System
  10044. # These files use Parameter Value Language in the header section.
  10045. # Unfortunately, there is no certain magic, but the following
  10046. # strings have been found to be most likely.
  10047. 0 string NJPL1I00 PDS (JPL) image data
  10048. 2 string NJPL1I PDS (JPL) image data
  10049. 0 string CCSD3ZF PDS (CCSD) image data
  10050. 2 string CCSD3Z PDS (CCSD) image data
  10051. 0 string PDS_ PDS image data
  10052. 0 string LBLSIZE= PDS (VICAR) image data
  10053. # pM8x: ATARI STAD compressed bitmap format
  10054. #
  10055. # from Oskar Schirmer <schirmer@scara.com> Feb 2, 2001
  10056. # p M 8 5/6 xx yy zz data...
  10057. # Atari ST STAD bitmap is always 640x400, bytewise runlength compressed.
  10058. # bytes either run horizontally (pM85) or vertically (pM86). yy is the
  10059. # most frequent byte, xx and zz are runlength escape codes, where xx is
  10060. # used for runs of yy.
  10061. #
  10062. 0 string pM85 Atari ST STAD bitmap image data (hor)
  10063. >5 byte 0x00 (white background)
  10064. >5 byte 0xFF (black background)
  10065. 0 string pM86 Atari ST STAD bitmap image data (vert)
  10066. >5 byte 0x00 (white background)
  10067. >5 byte 0xFF (black background)
  10068. # Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
  10069. # http://www.atarimax.com/jindroush.atari.org/afmtatr.html
  10070. 0 leshort 0x0296 Atari ATR image
  10071. # XXX:
  10072. # This is bad magic 0x5249 == 'RI' conflicts with RIFF and other
  10073. # magic.
  10074. # SGI RICE image file <mpruett@sgi.com>
  10075. #0 beshort 0x5249 RICE image
  10076. #>2 beshort x v%d
  10077. #>4 beshort x (%d x
  10078. #>6 beshort x %d)
  10079. #>8 beshort 0 8 bit
  10080. #>8 beshort 1 10 bit
  10081. #>8 beshort 2 12 bit
  10082. #>8 beshort 3 13 bit
  10083. #>10 beshort 0 4:2:2
  10084. #>10 beshort 1 4:2:2:4
  10085. #>10 beshort 2 4:4:4
  10086. #>10 beshort 3 4:4:4:4
  10087. #>12 beshort 1 RGB
  10088. #>12 beshort 2 CCIR601
  10089. #>12 beshort 3 RP175
  10090. #>12 beshort 4 YUV
  10091. # PCX image files
  10092. # From: Dan Fandrich <dan@coneharvesters.com>
  10093. # updated by Joerg Jenderek at Feb 2013 by http://de.wikipedia.org/wiki/PCX
  10094. # http://web.archive.org/web/20100206055706/http://www.qzx.com/pc-gpe/pcx.txt
  10095. # GRR: original test was still too general as it catches xbase examples T5.DBT,T6.DBT with 0xa000000
  10096. # 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
  10097. 0 ubelong&0xffF8fe00 0x0a000000
  10098. # for PCX bit depth > 0
  10099. >3 ubyte >0
  10100. # test for valid versions
  10101. >>1 ubyte <6
  10102. >>>1 ubyte !1 PCX
  10103. !:mime image/x-pcx
  10104. #!:mime image/pcx
  10105. >>>>1 ubyte 0 ver. 2.5 image data
  10106. >>>>1 ubyte 2 ver. 2.8 image data, with palette
  10107. >>>>1 ubyte 3 ver. 2.8 image data, without palette
  10108. >>>>1 ubyte 4 for Windows image data
  10109. >>>>1 ubyte 5 ver. 3.0 image data
  10110. >>>>4 uleshort x bounding box [%hd,
  10111. >>>>6 uleshort x %d] -
  10112. >>>>8 uleshort x [%d,
  10113. >>>>10 uleshort x %d],
  10114. >>>>65 ubyte >1 %d planes each of
  10115. >>>>3 ubyte x %d-bit
  10116. >>>>68 byte 1 colour,
  10117. >>>>68 byte 2 grayscale,
  10118. # this should not happen
  10119. >>>>68 default x image,
  10120. >>>>12 leshort >0 %d x
  10121. >>>>>14 uleshort x %d dpi,
  10122. >>>>2 byte 0 uncompressed
  10123. >>>>2 byte 1 RLE compressed
  10124. # Adobe Photoshop
  10125. # From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
  10126. 0 string 8BPS Adobe Photoshop Image
  10127. !:mime image/vnd.adobe.photoshop
  10128. >4 beshort 2 (PSB)
  10129. >18 belong x \b, %d x
  10130. >14 belong x %d,
  10131. >24 beshort 0 bitmap
  10132. >24 beshort 1 grayscale
  10133. >>12 beshort 2 with alpha
  10134. >24 beshort 2 indexed
  10135. >24 beshort 3 RGB
  10136. >>12 beshort 4 \bA
  10137. >24 beshort 4 CMYK
  10138. >>12 beshort 5 \bA
  10139. >24 beshort 7 multichannel
  10140. >24 beshort 8 duotone
  10141. >24 beshort 9 lab
  10142. >12 beshort > 1
  10143. >>12 beshort x \b, %dx
  10144. >12 beshort 1 \b,
  10145. >22 beshort x %d-bit channel
  10146. >12 beshort > 1 \bs
  10147. # XV thumbnail indicator (ThMO)
  10148. 0 string P7\ 332 XV thumbnail image data
  10149. # NITF is defined by United States MIL-STD-2500A
  10150. 0 string NITF National Imagery Transmission Format
  10151. >25 string >\0 dated %.14s
  10152. # GEM Image: Version 1, Headerlen 8 (Wolfram Kleff)
  10153. 0 belong 0x00010008 GEM Image data
  10154. >12 beshort x %d x
  10155. >14 beshort x %d,
  10156. >4 beshort x %d planes,
  10157. >8 beshort x %d x
  10158. >10 beshort x %d pixelsize
  10159. # GEM Metafile (Wolfram Kleff)
  10160. 0 lelong 0x0018FFFF GEM Metafile data
  10161. >4 leshort x version %d
  10162. #
  10163. # SMJPEG. A custom Motion JPEG format used by Loki Entertainment
  10164. # Software Torbjorn Andersson <d91tan@Update.UU.SE>.
  10165. #
  10166. 0 string \0\nSMJPEG SMJPEG
  10167. >8 belong x %d.x data
  10168. # According to the specification you could find any number of _TXT
  10169. # headers here, but I can't think of any way of handling that. None of
  10170. # the SMJPEG files I tried it on used this feature. Even if such a
  10171. # file is encountered the output should still be reasonable.
  10172. >16 string _SND \b,
  10173. >>24 beshort >0 %d Hz
  10174. >>26 byte 8 8-bit
  10175. >>26 byte 16 16-bit
  10176. >>28 string NONE uncompressed
  10177. # >>28 string APCM ADPCM compressed
  10178. >>27 byte 1 mono
  10179. >>28 byte 2 stereo
  10180. # Help! Isn't there any way to avoid writing this part twice?
  10181. >>32 string _VID \b,
  10182. # >>>48 string JFIF JPEG
  10183. >>>40 belong >0 %d frames
  10184. >>>44 beshort >0 (%d x
  10185. >>>46 beshort >0 %d)
  10186. >16 string _VID \b,
  10187. # >>32 string JFIF JPEG
  10188. >>24 belong >0 %d frames
  10189. >>28 beshort >0 (%d x
  10190. >>30 beshort >0 %d)
  10191. 0 string Paint\ Shop\ Pro\ Image\ File Paint Shop Pro Image File
  10192. # "thumbnail file" (icon)
  10193. # descended from "xv", but in use by other applications as well (Wolfram Kleff)
  10194. 0 string P7\ 332 XV "thumbnail file" (icon) data
  10195. # taken from fkiss: (<yav@mte.biglobe.ne.jp> ?)
  10196. 0 string KiSS KISS/GS
  10197. >4 byte 16 color
  10198. >>5 byte x %d bit
  10199. >>8 leshort x %d colors
  10200. >>10 leshort x %d groups
  10201. >4 byte 32 cell
  10202. >>5 byte x %d bit
  10203. >>8 leshort x %d x
  10204. >>10 leshort x %d
  10205. >>12 leshort x +%d
  10206. >>14 leshort x +%d
  10207. # Webshots (www.webshots.com), by John Harrison
  10208. 0 string C\253\221g\230\0\0\0 Webshots Desktop .wbz file
  10209. # Hercules DASD image files
  10210. # From Jan Jaeger <jj@septa.nl>
  10211. 0 string CKD_P370 Hercules CKD DASD image file
  10212. >8 long x \b, %d heads per cylinder
  10213. >12 long x \b, track size %d bytes
  10214. >16 byte x \b, device type 33%2.2X
  10215. 0 string CKD_C370 Hercules compressed CKD DASD image file
  10216. >8 long x \b, %d heads per cylinder
  10217. >12 long x \b, track size %d bytes
  10218. >16 byte x \b, device type 33%2.2X
  10219. 0 string CKD_S370 Hercules CKD DASD shadow file
  10220. >8 long x \b, %d heads per cylinder
  10221. >12 long x \b, track size %d bytes
  10222. >16 byte x \b, device type 33%2.2X
  10223. # Squeak images and programs - etoffi@softhome.net
  10224. 0 string \146\031\0\0 Squeak image data
  10225. 0 search/1 'From\040Squeak Squeak program text
  10226. # partimage: file(1) magic for PartImage files (experimental, incomplete)
  10227. # Author: Hans-Joachim Baader <hjb@pro-linux.de>
  10228. 0 string PaRtImAgE-VoLuMe PartImage
  10229. >0x0020 string 0.6.1 file version %s
  10230. >>0x0060 lelong >-1 volume %ld
  10231. #>>0x0064 8 byte identifier
  10232. #>>0x007c reserved
  10233. >>0x0200 string >\0 type %s
  10234. >>0x1400 string >\0 device %s,
  10235. >>0x1600 string >\0 original filename %s,
  10236. # Some fields omitted
  10237. >>0x2744 lelong 0 not compressed
  10238. >>0x2744 lelong 1 gzip compressed
  10239. >>0x2744 lelong 2 bzip2 compressed
  10240. >>0x2744 lelong >2 compressed with unknown algorithm
  10241. >0x0020 string >0.6.1 file version %s
  10242. >0x0020 string <0.6.1 file version %s
  10243. # DCX is multi-page PCX, using a simple header of up to 1024
  10244. # offsets for the respective PCX components.
  10245. # From: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
  10246. 0 lelong 987654321 DCX multi-page PCX image data
  10247. # Simon Walton <simonw@matteworld.com>
  10248. # Kodak Cineon format for scanned negatives
  10249. # http://www.kodak.com/US/en/motion/support/dlad/
  10250. 0 lelong 0xd75f2a80 Cineon image data
  10251. >200 belong >0 \b, %ld x
  10252. >204 belong >0 %ld
  10253. # Bio-Rad .PIC is an image format used by microscope control systems
  10254. # and related image processing software used by biologists.
  10255. # From: Vebjorn Ljosa <vebjorn@ljosa.com>
  10256. # BOOL values are two-byte integers; use them to rule out false positives.
  10257. # http://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt
  10258. # Samples: http://www.loci.wisc.edu/software/sample-data
  10259. 14 leshort <2
  10260. >62 leshort <2
  10261. >>54 leshort 12345 Bio-Rad .PIC Image File
  10262. >>>0 leshort >0 %hd x
  10263. >>>2 leshort >0 %hd,
  10264. >>>4 leshort =1 1 image in file
  10265. >>>4 leshort >1 %hd images in file
  10266. # From Jan "Yenya" Kasprzak <kas@fi.muni.cz>
  10267. # The description of *.mrw format can be found at
  10268. # http://www.dalibor.cz/minolta/raw_file_format.htm
  10269. 0 string \000MRM Minolta Dimage camera raw image data
  10270. # Summary: DjVu image / document
  10271. # Extension: .djvu
  10272. # Reference: http://djvu.org/docs/DjVu3Spec.djvu
  10273. # Submitted by: Stephane Loeuillet <stephane.loeuillet@tiscali.fr>
  10274. # Modified by (1): Abel Cheung <abelcheung@gmail.com>
  10275. 0 string AT&TFORM
  10276. >12 string DJVM DjVu multiple page document
  10277. !:mime image/vnd.djvu
  10278. >12 string DJVU DjVu image or single page document
  10279. !:mime image/vnd.djvu
  10280. >12 string DJVI DjVu shared document
  10281. !:mime image/vnd.djvu
  10282. >12 string THUM DjVu page thumbnails
  10283. !:mime image/vnd.djvu
  10284. # Originally by Marc Espie
  10285. # Modified by Robert Minsk <robertminsk at yahoo.com>
  10286. # http://www.openexr.com/openexrfilelayout.pdf
  10287. 0 lelong 20000630 OpenEXR image data,
  10288. !:mime image/x-exr
  10289. >4 lelong&0x000000ff x version %d,
  10290. >4 lelong ^0x00000200 storage: scanline
  10291. >4 lelong &0x00000200 storage: tiled
  10292. >8 search/0x1000 compression\0 \b, compression:
  10293. >>&16 byte 0 none
  10294. >>&16 byte 1 rle
  10295. >>&16 byte 2 zips
  10296. >>&16 byte 3 zip
  10297. >>&16 byte 4 piz
  10298. >>&16 byte 5 pxr24
  10299. >>&16 byte 6 b44
  10300. >>&16 byte 7 b44a
  10301. >>&16 byte >7 unknown
  10302. >8 search/0x1000 dataWindow\0 \b, dataWindow:
  10303. >>&10 lelong x (%d
  10304. >>&14 lelong x %d)-
  10305. >>&18 lelong x \b(%d
  10306. >>&22 lelong x %d)
  10307. >8 search/0x1000 displayWindow\0 \b, displayWindow:
  10308. >>&10 lelong x (%d
  10309. >>&14 lelong x %d)-
  10310. >>&18 lelong x \b(%d
  10311. >>&22 lelong x %d)
  10312. >8 search/0x1000 lineOrder\0 \b, lineOrder:
  10313. >>&14 byte 0 increasing y
  10314. >>&14 byte 1 decreasing y
  10315. >>&14 byte 2 random y
  10316. >>&14 byte >2 unknown
  10317. # SMPTE Digital Picture Exchange Format, SMPTE DPX
  10318. #
  10319. # ANSI/SMPTE 268M-1994, SMPTE Standard for File Format for Digital
  10320. # Moving-Picture Exchange (DPX), v1.0, 18 February 1994
  10321. # Robert Minsk <robertminsk at yahoo.com>
  10322. 0 string SDPX DPX image data, big-endian,
  10323. !:mime image/x-dpx
  10324. >768 beshort <4
  10325. >>772 belong x %dx
  10326. >>776 belong x \b%d,
  10327. >768 beshort >3
  10328. >>776 belong x %dx
  10329. >>772 belong x \b%d,
  10330. >768 beshort 0 left to right/top to bottom
  10331. >768 beshort 1 right to left/top to bottom
  10332. >768 beshort 2 left to right/bottom to top
  10333. >768 beshort 3 right to left/bottom to top
  10334. >768 beshort 4 top to bottom/left to right
  10335. >768 beshort 5 top to bottom/right to left
  10336. >768 leshort 6 bottom to top/left to right
  10337. >768 leshort 7 bottom to top/right to left
  10338. # From: Tom Hilinski <tom.hilinski@comcast.net>
  10339. # http://www.unidata.ucar.edu/packages/netcdf/
  10340. 0 string CDF\001 NetCDF Data Format data
  10341. #-----------------------------------------------------------------------
  10342. # Hierarchical Data Format, used to facilitate scientific data exchange
  10343. # specifications at http://hdf.ncsa.uiuc.edu/
  10344. 0 belong 0x0e031301 Hierarchical Data Format (version 4) data
  10345. !:mime application/x-hdf
  10346. 0 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) data
  10347. !:mime application/x-hdf
  10348. 512 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 512 bytes user block
  10349. !:mime application/x-hdf
  10350. 1024 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 1k user block
  10351. !:mime application/x-hdf
  10352. 2048 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 2k user block
  10353. !:mime application/x-hdf
  10354. 4096 string \211HDF\r\n\032\n Hierarchical Data Format (version 5) with 4k user block
  10355. !:mime application/x-hdf
  10356. # From: Tobias Burnus <burnus@net-b.de>
  10357. # Xara (for a while: Corel Xara) is a graphic package, see
  10358. # http://www.xara.com/ for Windows and as GPL application for Linux
  10359. 0 string XARA\243\243 Xara graphics file
  10360. # http://www.cartesianinc.com/Tech/
  10361. 0 string CPC\262 Cartesian Perceptual Compression image
  10362. !:mime image/x-cpi
  10363. # From Albert Cahalan <acahalan@gmail.com>
  10364. # puredigital used it for the CVS disposable camcorder
  10365. #8 lelong 4 ZBM bitmap image data
  10366. #>4 leshort x %u x
  10367. #>6 leshort x %u
  10368. # From Albert Cahalan <acahalan@gmail.com>
  10369. # uncompressed 5:6:5 HighColor image for OLPC XO firmware icons
  10370. 0 string C565 OLPC firmware icon image data
  10371. >4 leshort x %u x
  10372. >6 leshort x %u
  10373. # Applied Images - Image files from Cytovision
  10374. # Gustavo Junior Alves <gjalves@gjalves.com.br>
  10375. 0 string \xce\xda\xde\xfa Cytovision Metaphases file
  10376. 0 string \xed\xad\xef\xac Cytovision Karyotype file
  10377. 0 string \x0b\x00\x03\x00 Cytovision FISH Probe file
  10378. 0 string \xed\xfe\xda\xbe Cytovision FLEX file
  10379. 0 string \xed\xab\xed\xfe Cytovision FLEX file
  10380. 0 string \xad\xfd\xea\xad Cytovision RATS file
  10381. # Wavelet Scalar Quantization format used in gray-scale fingerprint images
  10382. # From Tano M Fotang <mfotang@quanteq.com>
  10383. 0 string \xff\xa0\xff\xa8\x00 Wavelet Scalar Quantization image data
  10384. # Type: PCO B16 image files
  10385. # URL: http://www.pco.de/fileadmin/user_upload/db/download/MA_CWDCOPIE_0412b.pdf
  10386. # From: Florian Philipp <florian.philipp@binarywings.net>
  10387. # Extension: .b16
  10388. # Description: Pixel image format produced by PCO Camware, typically used
  10389. # together with PCO cameras.
  10390. # Note: Different versions exist for e.g. 8 bit and 16 bit images.
  10391. # Documentation is incomplete.
  10392. 0 string/b PCO- PCO B16 image data
  10393. >12 lelong x \b, %dx
  10394. >16 lelong x \b%d
  10395. >20 lelong 0 \b, short header
  10396. >20 lelong -1 \b, extended header
  10397. >>24 lelong 0 \b, grayscale
  10398. >>>36 lelong 0 linear LUT
  10399. >>>36 lelong 1 logarithmic LUT
  10400. >>>28 lelong x [%d
  10401. >>>32 lelong x \b,%d]
  10402. >>24 lelong 1 \b, color
  10403. >>>64 lelong 0 linear LUT
  10404. >>>64 lelong 1 logarithmic LUT
  10405. >>>40 lelong x r[%d
  10406. >>>44 lelong x \b,%d]
  10407. >>>48 lelong x g[%d
  10408. >>>52 lelong x \b,%d]
  10409. >>>56 lelong x b[%d
  10410. >>>60 lelong x \b,%d]
  10411. # Polar Monitor Bitmap (.pmb) used as logo for Polar Electro watches
  10412. # From: Markus Heidelberg <markus.heidelberg at web.de>
  10413. 0 string/t [BitmapInfo2] Polar Monitor Bitmap text
  10414. !:mime image/x-polar-monitor-bitmap
  10415. # From: Rick Richardson <rick.richardson@comcast.net>
  10416. 0 string GARMIN\ BITMAP\ 01 Garmin Bitmap file
  10417. # Type: Ulead Photo Explorer5 (.pe5)
  10418. # URL: http://www.jisyo.com/cgibin/view.cgi?EXT=pe5 (Japanese)
  10419. # From: Simon Horman <horms@debian.org>
  10420. 0 string IIO2H Ulead Photo Explorer5
  10421. # Type: X11 cursor
  10422. # URL: http://webcvs.freedesktop.org/mime/shared-mime-info/freedesktop.org.xml.in?view=markup
  10423. # From: Mathias Brodala <info@noctus.net>
  10424. 0 string Xcur X11 cursor
  10425. # Type: Olympus ORF raw images.
  10426. # URL: http://libopenraw.freedesktop.org/wiki/Olympus_ORF
  10427. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  10428. 0 string MMOR Olympus ORF raw image data, big-endian
  10429. !:mime image/x-olympus-orf
  10430. 0 string IIRO Olympus ORF raw image data, little-endian
  10431. !:mime image/x-olympus-orf
  10432. 0 string IIRS Olympus ORF raw image data, little-endian
  10433. !:mime image/x-olympus-orf
  10434. # Type: files used in modern AVCHD camcoders to store clip information
  10435. # Extension: .cpi
  10436. # From: Alexander Danilov <alexander.a.danilov@gmail.com>
  10437. 0 string HDMV0100 AVCHD Clip Information
  10438. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  10439. # URL: http://local.wasp.uwa.edu.au/~pbourke/dataformats/pic/
  10440. # Radiance HDR; usually has .pic or .hdr extension.
  10441. 0 string #?RADIANCE\n Radiance HDR image data
  10442. #!mime image/vnd.radiance
  10443. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  10444. # URL: http://www.mpi-inf.mpg.de/resources/pfstools/pfs_format_spec.pdf
  10445. # Used by the pfstools packages. The regex matches for the image size could
  10446. # probably use some work. The MIME type is made up; if there's one in
  10447. # actual common use, it should replace the one below.
  10448. 0 string PFS1\x0a PFS HDR image data
  10449. #!mime image/x-pfs
  10450. >1 regex [0-9]*\ \b, %s
  10451. >>1 regex \ [0-9]{4} \bx%s
  10452. # Type: Foveon X3F
  10453. # URL: http://www.photofo.com/downloads/x3f-raw-format.pdf
  10454. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  10455. # Note that the MIME type isn't defined anywhere that I can find; if
  10456. # there's a canonical type for this format, it should replace this one.
  10457. 0 string FOVb Foveon X3F raw image data
  10458. !:mime image/x-x3f
  10459. >6 leshort x \b, version %d.
  10460. >4 leshort x \b%d
  10461. >28 lelong x \b, %dx
  10462. >32 lelong x \b%d
  10463. # Paint.NET file
  10464. # From Adam Buchbinder <adam.buchbinder@gmail.com>
  10465. 0 string PDN3 Paint.NET image data
  10466. !:mime image/x-paintnet
  10467. # Not really an image.
  10468. # From: "Tano M. Fotang" <mfotang@quanteq.com>
  10469. 0 string \x46\x4d\x52\x00 ISO/IEC 19794-2 Format Minutiae Record (FMR)
  10470. # WEBP https://developers.google.com/speed/webp/docs/riff_container
  10471. 0 string RIFF
  10472. >8 string WEBP Web/P image data
  10473. >>4 lelong x \b, %d bytes
  10474. #------------------------------------------------------------------------------
  10475. # $File: inform,v 1.5 2009/09/19 16:28:09 christos Exp $
  10476. # inform: file(1) magic for Inform interactive fiction language
  10477. # URL: http://www.inform-fiction.org/
  10478. # From: Reuben Thomas <rrt@sc3d.org>
  10479. 0 search/100/cW constant\ story Inform source text
  10480. #------------------------------------------------------------------------------
  10481. # $File: intel,v 1.11 2013/02/06 14:18:52 christos Exp $
  10482. # intel: file(1) magic for x86 Unix
  10483. #
  10484. # Various flavors of x86 UNIX executable/object (other than Xenix, which
  10485. # is in "microsoft"). DOS is in "msdos"; the ambitious soul can do
  10486. # Windows as well.
  10487. #
  10488. # Windows NT belongs elsewhere, as you need x86 and MIPS and Alpha and
  10489. # whatever comes next (HP-PA Hummingbird?). OS/2 may also go elsewhere
  10490. # as well, if, as, and when IBM makes it portable.
  10491. #
  10492. # The `versions' should be un-commented if they work for you.
  10493. # (Was the problem just one of endianness?)
  10494. #
  10495. 0 leshort 0502 basic-16 executable
  10496. >12 lelong >0 not stripped
  10497. #>22 leshort >0 - version %ld
  10498. 0 leshort 0503 basic-16 executable (TV)
  10499. >12 lelong >0 not stripped
  10500. #>22 leshort >0 - version %ld
  10501. 0 leshort 0510 x86 executable
  10502. >12 lelong >0 not stripped
  10503. 0 leshort 0511 x86 executable (TV)
  10504. >12 lelong >0 not stripped
  10505. 0 leshort =0512 iAPX 286 executable small model (COFF)
  10506. >12 lelong >0 not stripped
  10507. #>22 leshort >0 - version %ld
  10508. 0 leshort =0522 iAPX 286 executable large model (COFF)
  10509. >12 lelong >0 not stripped
  10510. #>22 leshort >0 - version %ld
  10511. # SGI labeled the next entry as "iAPX 386 executable" --Dan Quinlan
  10512. 0 leshort =0514 80386 COFF executable
  10513. >12 lelong >0 not stripped
  10514. >22 leshort >0 - version %ld
  10515. # rom: file(1) magic for BIOS ROM Extensions found in intel machines
  10516. # mapped into memory between 0xC0000 and 0xFFFFF
  10517. # From Gurkan Sengun <gurkan@linuks.mine.nu>, www.linuks.mine.nu
  10518. 0 beshort 0x55AA BIOS (ia32) ROM Ext.
  10519. >5 string USB USB
  10520. >7 string LDR UNDI image
  10521. >30 string IBM IBM comp. Video
  10522. >26 string Adaptec Adaptec
  10523. >28 string Adaptec Adaptec
  10524. >42 string PROMISE Promise
  10525. >2 byte x (%d*512)
  10526. # Flash descriptors for Intel SPI flash roms.
  10527. # From Dr. Jesus <j@hug.gs>
  10528. 0 lelong 0x0ff0a55a Intel serial flash for ICH/PCH ROM <= 5 or 3400 series A-step
  10529. 16 lelong 0x0ff0a55a Intel serial flash for PCH ROM
  10530. #------------------------------------------------------------------------------
  10531. # $File: interleaf,v 1.10 2009/09/19 16:28:10 christos Exp $
  10532. # interleaf: file(1) magic for InterLeaf TPS:
  10533. #
  10534. 0 string =\210OPS Interleaf saved data
  10535. 0 string =<!OPS Interleaf document text
  10536. >5 string ,\ Version\ = \b, version
  10537. >>17 string >\0 %.3s
  10538. #------------------------------------------------------------------------------
  10539. # $File: island,v 1.5 2009/09/19 16:28:10 christos Exp $
  10540. # island: file(1) magic for IslandWite/IslandDraw, from SunOS 5.5.1
  10541. # "/etc/magic":
  10542. # From: guy@netapp.com (Guy Harris)
  10543. #
  10544. 4 string pgscriptver IslandWrite document
  10545. 13 string DrawFile IslandDraw document
  10546. #------------------------------------------------------------------------------
  10547. # $File: ispell,v 1.8 2009/09/19 16:28:10 christos Exp $
  10548. # ispell: file(1) magic for ispell
  10549. #
  10550. # Ispell 3.0 has a magic of 0x9601 and ispell 3.1 has 0x9602. This magic
  10551. # will match 0x9600 through 0x9603 in *both* little endian and big endian.
  10552. # (No other current magic entries collide.)
  10553. #
  10554. # Updated by Daniel Quinlan (quinlan@yggdrasil.com)
  10555. #
  10556. 0 leshort&0xFFFC 0x9600 little endian ispell
  10557. >0 byte 0 hash file (?),
  10558. >0 byte 1 3.0 hash file,
  10559. >0 byte 2 3.1 hash file,
  10560. >0 byte 3 hash file (?),
  10561. >2 leshort 0x00 8-bit, no capitalization, 26 flags
  10562. >2 leshort 0x01 7-bit, no capitalization, 26 flags
  10563. >2 leshort 0x02 8-bit, capitalization, 26 flags
  10564. >2 leshort 0x03 7-bit, capitalization, 26 flags
  10565. >2 leshort 0x04 8-bit, no capitalization, 52 flags
  10566. >2 leshort 0x05 7-bit, no capitalization, 52 flags
  10567. >2 leshort 0x06 8-bit, capitalization, 52 flags
  10568. >2 leshort 0x07 7-bit, capitalization, 52 flags
  10569. >2 leshort 0x08 8-bit, no capitalization, 128 flags
  10570. >2 leshort 0x09 7-bit, no capitalization, 128 flags
  10571. >2 leshort 0x0A 8-bit, capitalization, 128 flags
  10572. >2 leshort 0x0B 7-bit, capitalization, 128 flags
  10573. >2 leshort 0x0C 8-bit, no capitalization, 256 flags
  10574. >2 leshort 0x0D 7-bit, no capitalization, 256 flags
  10575. >2 leshort 0x0E 8-bit, capitalization, 256 flags
  10576. >2 leshort 0x0F 7-bit, capitalization, 256 flags
  10577. >4 leshort >0 and %d string characters
  10578. 0 beshort&0xFFFC 0x9600 big endian ispell
  10579. >1 byte 0 hash file (?),
  10580. >1 byte 1 3.0 hash file,
  10581. >1 byte 2 3.1 hash file,
  10582. >1 byte 3 hash file (?),
  10583. >2 beshort 0x00 8-bit, no capitalization, 26 flags
  10584. >2 beshort 0x01 7-bit, no capitalization, 26 flags
  10585. >2 beshort 0x02 8-bit, capitalization, 26 flags
  10586. >2 beshort 0x03 7-bit, capitalization, 26 flags
  10587. >2 beshort 0x04 8-bit, no capitalization, 52 flags
  10588. >2 beshort 0x05 7-bit, no capitalization, 52 flags
  10589. >2 beshort 0x06 8-bit, capitalization, 52 flags
  10590. >2 beshort 0x07 7-bit, capitalization, 52 flags
  10591. >2 beshort 0x08 8-bit, no capitalization, 128 flags
  10592. >2 beshort 0x09 7-bit, no capitalization, 128 flags
  10593. >2 beshort 0x0A 8-bit, capitalization, 128 flags
  10594. >2 beshort 0x0B 7-bit, capitalization, 128 flags
  10595. >2 beshort 0x0C 8-bit, no capitalization, 256 flags
  10596. >2 beshort 0x0D 7-bit, no capitalization, 256 flags
  10597. >2 beshort 0x0E 8-bit, capitalization, 256 flags
  10598. >2 beshort 0x0F 7-bit, capitalization, 256 flags
  10599. >4 beshort >0 and %d string characters
  10600. # ispell 4.0 hash files kromJx <kromJx@crosswinds.net>
  10601. # Ispell 4.0
  10602. 0 string ISPL ispell
  10603. >4 long x hash file version %d,
  10604. >8 long x lexletters %d,
  10605. >12 long x lexsize %d,
  10606. >16 long x hashsize %d,
  10607. >20 long x stblsize %d
  10608. #------------------------------------------------------------------------------
  10609. # $File: isz,v 1.1 2010/03/27 16:17:09 christos Exp $
  10610. # ISO Zipped file format
  10611. # http://www.ezbsystems.com/isz/iszspec.txt
  10612. 0 string IsZ! ISO Zipped file
  10613. >4 byte x \b, header size %u
  10614. >5 byte x \b, version %u
  10615. >8 lelong x \b, serial %u
  10616. #12 leshort x \b, sector size %u
  10617. #>16 lelong x \b, total sectors %u
  10618. >17 byte >0 \b, password protected
  10619. #>24 lequad x \b, segment size %llu
  10620. #>32 lelong x \b, blocks %u
  10621. #>36 lelong x \b, block size %u
  10622. #------------------------------------------------------------
  10623. # $File: java,v 1.16 2013/09/24 20:22:03 christos Exp $
  10624. # Java ByteCode and Mach-O binaries (e.g., Mac OS X) use the
  10625. # same magic number, 0xcafebabe, so they are both handled
  10626. # in the entry called "cafebabe".
  10627. #------------------------------------------------------------
  10628. # Java serialization
  10629. # From Martin Pool (m.pool@pharos.com.au)
  10630. 0 beshort 0xaced Java serialization data
  10631. >2 beshort >0x0004 \b, version %d
  10632. 0 belong 0xfeedfeed Java KeyStore
  10633. !:mime application/x-java-keystore
  10634. 0 belong 0xcececece Java JCE KeyStore
  10635. !:mime application/x-java-jce-keystore
  10636. # Java source
  10637. 0 regex ^import.*;$ Java source
  10638. !:mime text/x-java
  10639. #------------------------------------------------------------------------------
  10640. # $File: javascript,v 1.1 2012/06/16 13:30:36 christos Exp $
  10641. # javascript: magic for javascript and node.js scripts.
  10642. #
  10643. 0 search/1/w #!/bin/node Node.js script text executable
  10644. !:mime application/javascript
  10645. 0 search/1/w #!/usr/bin/node Node.js script text executable
  10646. !:mime application/javascript
  10647. 0 search/1/w #!/bin/nodejs Node.js script text executable
  10648. !:mime application/javascript
  10649. 0 search/1/w #!/usr/bin/nodejs Node.js script text executable
  10650. !:mime application/javascript
  10651. 0 search/1 #!/usr/bin/env\ node Node.js script text executable
  10652. !:mime application/javascript
  10653. 0 search/1 #!/usr/bin/env\ nodejs Node.js script text executable
  10654. !:mime application/javascript
  10655. #------------------------------------------------------------------------------
  10656. # $File: jpeg,v 1.19 2013/02/04 15:50:03 christos Exp $
  10657. # JPEG images
  10658. # SunOS 5.5.1 had
  10659. #
  10660. # 0 string \377\330\377\340 JPEG file
  10661. # 0 string \377\330\377\356 JPG file
  10662. #
  10663. # both of which turn into "JPEG image data" here.
  10664. #
  10665. 0 beshort 0xffd8 JPEG image data
  10666. !:mime image/jpeg
  10667. !:apple 8BIMJPEG
  10668. !:strength +2
  10669. >6 string JFIF \b, JFIF standard
  10670. # The following added by Erik Rossen <rossen@freesurf.ch> 1999-09-06
  10671. # in a vain attempt to add image size reporting for JFIF. Note that these
  10672. # tests are not fool-proof since some perfectly valid JPEGs are currently
  10673. # impossible to specify in magic(4) format.
  10674. # First, a little JFIF version info:
  10675. >>11 byte x \b %d.
  10676. >>12 byte x \b%02d
  10677. # Next, the resolution or aspect ratio of the image:
  10678. #>>13 byte 0 \b, aspect ratio
  10679. #>>13 byte 1 \b, resolution (DPI)
  10680. #>>13 byte 2 \b, resolution (DPCM)
  10681. #>>4 beshort x \b, segment length %d
  10682. # Next, show thumbnail info, if it exists:
  10683. >>18 byte !0 \b, thumbnail %dx
  10684. >>>19 byte x \b%d
  10685. # EXIF moved down here to avoid reporting a bogus version number,
  10686. # and EXIF version number printing added.
  10687. # - Patrik R=E5dman <patrik+file-magic@iki.fi>
  10688. >6 string Exif \b, EXIF standard
  10689. # Look for EXIF IFD offset in IFD 0, and then look for EXIF version tag in EXIF IFD.
  10690. # All possible combinations of entries have to be enumerated, since no looping
  10691. # is possible. And both endians are possible...
  10692. # The combinations included below are from real-world JPEGs.
  10693. # Little-endian
  10694. >>12 string II
  10695. # IFD 0 Entry #5:
  10696. >>>70 leshort 0x8769
  10697. # EXIF IFD Entry #1:
  10698. >>>>(78.l+14) leshort 0x9000
  10699. >>>>>(78.l+23) byte x %c
  10700. >>>>>(78.l+24) byte x \b.%c
  10701. >>>>>(78.l+25) byte !0x30 \b%c
  10702. # IFD 0 Entry #9:
  10703. >>>118 leshort 0x8769
  10704. # EXIF IFD Entry #3:
  10705. >>>>(126.l+38) leshort 0x9000
  10706. >>>>>(126.l+47) byte x %c
  10707. >>>>>(126.l+48) byte x \b.%c
  10708. >>>>>(126.l+49) byte !0x30 \b%c
  10709. # IFD 0 Entry #10
  10710. >>>130 leshort 0x8769
  10711. # EXIF IFD Entry #3:
  10712. >>>>(138.l+38) leshort 0x9000
  10713. >>>>>(138.l+47) byte x %c
  10714. >>>>>(138.l+48) byte x \b.%c
  10715. >>>>>(138.l+49) byte !0x30 \b%c
  10716. # EXIF IFD Entry #4:
  10717. >>>>(138.l+50) leshort 0x9000
  10718. >>>>>(138.l+59) byte x %c
  10719. >>>>>(138.l+60) byte x \b.%c
  10720. >>>>>(138.l+61) byte !0x30 \b%c
  10721. # EXIF IFD Entry #5:
  10722. >>>>(138.l+62) leshort 0x9000
  10723. >>>>>(138.l+71) byte x %c
  10724. >>>>>(138.l+72) byte x \b.%c
  10725. >>>>>(138.l+73) byte !0x30 \b%c
  10726. # IFD 0 Entry #11
  10727. >>>142 leshort 0x8769
  10728. # EXIF IFD Entry #3:
  10729. >>>>(150.l+38) leshort 0x9000
  10730. >>>>>(150.l+47) byte x %c
  10731. >>>>>(150.l+48) byte x \b.%c
  10732. >>>>>(150.l+49) byte !0x30 \b%c
  10733. # EXIF IFD Entry #4:
  10734. >>>>(150.l+50) leshort 0x9000
  10735. >>>>>(150.l+59) byte x %c
  10736. >>>>>(150.l+60) byte x \b.%c
  10737. >>>>>(150.l+61) byte !0x30 \b%c
  10738. # EXIF IFD Entry #5:
  10739. >>>>(150.l+62) leshort 0x9000
  10740. >>>>>(150.l+71) byte x %c
  10741. >>>>>(150.l+72) byte x \b.%c
  10742. >>>>>(150.l+73) byte !0x30 \b%c
  10743. # Big-endian
  10744. >>12 string MM
  10745. # IFD 0 Entry #9:
  10746. >>>118 beshort 0x8769
  10747. # EXIF IFD Entry #1:
  10748. >>>>(126.L+14) beshort 0x9000
  10749. >>>>>(126.L+23) byte x %c
  10750. >>>>>(126.L+24) byte x \b.%c
  10751. >>>>>(126.L+25) byte !0x30 \b%c
  10752. # EXIF IFD Entry #3:
  10753. >>>>(126.L+38) beshort 0x9000
  10754. >>>>>(126.L+47) byte x %c
  10755. >>>>>(126.L+48) byte x \b.%c
  10756. >>>>>(126.L+49) byte !0x30 \b%c
  10757. # IFD 0 Entry #10
  10758. >>>130 beshort 0x8769
  10759. # EXIF IFD Entry #3:
  10760. >>>>(138.L+38) beshort 0x9000
  10761. >>>>>(138.L+47) byte x %c
  10762. >>>>>(138.L+48) byte x \b.%c
  10763. >>>>>(138.L+49) byte !0x30 \b%c
  10764. # EXIF IFD Entry #5:
  10765. >>>>(138.L+62) beshort 0x9000
  10766. >>>>>(138.L+71) byte x %c
  10767. >>>>>(138.L+72) byte x \b.%c
  10768. >>>>>(138.L+73) byte !0x30 \b%c
  10769. # IFD 0 Entry #11
  10770. >>>142 beshort 0x8769
  10771. # EXIF IFD Entry #4:
  10772. >>>>(150.L+50) beshort 0x9000
  10773. >>>>>(150.L+59) byte x %c
  10774. >>>>>(150.L+60) byte x \b.%c
  10775. >>>>>(150.L+61) byte !0x30 \b%c
  10776. # Here things get sticky. We can do ONE MORE marker segment with
  10777. # indirect addressing, and that's all. It would be great if we could
  10778. # do pointer arithemetic like in an assembler language. Christos?
  10779. # And if there was some sort of looping construct to do searches, plus a few
  10780. # named accumulators, it would be even more effective...
  10781. # At least we can show a comment if no other segments got inserted before:
  10782. >(4.S+5) byte 0xFE \b, comment:
  10783. >>(4.S+6) pstring/HJ x "%s"
  10784. # Or, we can show the encoding type (I've included only the three most common)
  10785. # and image dimensions if we are lucky and the SOFn (image segment) is here:
  10786. >(4.S+5) byte 0xC0 \b, baseline
  10787. >>(4.S+6) byte x \b, precision %d
  10788. >>(4.S+7) beshort x \b, %dx
  10789. >>(4.S+9) beshort x \b%d
  10790. >(4.S+5) byte 0xC1 \b, extended sequential
  10791. >>(4.S+6) byte x \b, precision %d
  10792. >>(4.S+7) beshort x \b, %dx
  10793. >>(4.S+9) beshort x \b%d
  10794. >(4.S+5) byte 0xC2 \b, progressive
  10795. >>(4.S+6) byte x \b, precision %d
  10796. >>(4.S+7) beshort x \b, %dx
  10797. >>(4.S+9) beshort x \b%d
  10798. # I've commented-out quantisation table reporting. I doubt anyone cares yet.
  10799. #>(4.S+5) byte 0xDB \b, quantisation table
  10800. #>>(4.S+6) beshort x \b length=%d
  10801. #>14 beshort x \b, %d x
  10802. #>16 beshort x \b %d
  10803. # HSI is Handmade Software's proprietary JPEG encoding scheme
  10804. 0 string hsi1 JPEG image data, HSI proprietary
  10805. # From: David Santinoli <david@santinoli.com>
  10806. 0 string \x00\x00\x00\x0C\x6A\x50\x20\x20\x0D\x0A\x87\x0A JPEG 2000
  10807. # From: Johan van der Knijff <johan.vanderknijff@kb.nl>
  10808. # Added sub-entries for JP2, JPX, JPM and MJ2 formats; added mimetypes
  10809. # https://github.com/bitsgalore/jp2kMagic
  10810. #
  10811. # Now read value of 'Brand' field, which yields a few possibilities:
  10812. >20 string \x6a\x70\x32\x20 Part 1 (JP2)
  10813. !:mime image/jp2
  10814. >20 string \x6a\x70\x78\x20 Part 2 (JPX)
  10815. !:mime image/jpx
  10816. >20 string \x6a\x70\x6d\x20 Part 6 (JPM)
  10817. !:mime image/jpm
  10818. >20 string \x6d\x6a\x70\x32 Part 3 (MJ2)
  10819. !:mime video/mj2
  10820. # Type: JPEG 2000 codesream
  10821. # From: Mathieu Malaterre <mathieu.malaterre@gmail.com>
  10822. 0 belong 0xff4fff51 JPEG 2000 codestream
  10823. 45 beshort 0xff52
  10824. #------------------------------------------------------------------------------
  10825. # $File: karma,v 1.6 2009/09/19 16:28:10 christos Exp $
  10826. # karma: file(1) magic for Karma data files
  10827. #
  10828. # From <rgooch@atnf.csiro.au>
  10829. 0 string KarmaRHD Version Karma Data Structure Version
  10830. >16 belong x %lu
  10831. #------------------------------------------------------------------------------
  10832. # $File: kde,v 1.5 2010/11/25 15:00:12 christos Exp $
  10833. # kde: file(1) magic for KDE
  10834. 0 string/t [KDE\ Desktop\ Entry] KDE desktop entry
  10835. !:mime application/x-kdelnk
  10836. 0 string/t #\ KDE\ Config\ File KDE config file
  10837. !:mime application/x-kdelnk
  10838. 0 string/t #\ xmcd xmcd database file for kscd
  10839. !:mime text/x-xmcd
  10840. #------------------------------------------------------------------------------
  10841. # $File: keepass,v 1.1 2012/12/24 22:14:56 christos Exp $
  10842. # keepass: file(1) magic for KeePass file
  10843. #
  10844. # Keepass Password Safe:
  10845. # * original one: http://keepass.info/
  10846. # * *nix port: http://www.keepassx.org/
  10847. # * android port: http://code.google.com/p/keepassdroid/
  10848. 0 lelong 0x9AA2D903 Keepass password database
  10849. >4 lelong 0xB54BFB65 1.x KDB
  10850. >>48 lelong >0 \b, %d groups
  10851. >>52 lelong >0 \b, %d entries
  10852. >>8 lelong&0x0f 1 \b, SHA-256
  10853. >>8 lelong&0x0f 2 \b, AES
  10854. >>8 lelong&0x0f 4 \b, RC4
  10855. >>8 lelong&0x0f 8 \b, Twofish
  10856. >>120 lelong >0 \b, %d key transformation rounds
  10857. >4 lelong 0xB54BFB67 2.x KDBX
  10858. #------------------------------------------------------------------------------
  10859. # $File: kml,v 1.3 2010/11/25 15:00:12 christos Exp $
  10860. # Type: Google KML, formerly Keyhole Markup Language
  10861. # Future development of this format has been handed
  10862. # over to the Open Geospatial Consortium.
  10863. # http://www.opengeospatial.org/standards/kml/
  10864. # From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
  10865. 0 string/t \<?xml
  10866. >20 search/400 \ xmlns=
  10867. >>&0 regex ['"]http://earth.google.com/kml Google KML document
  10868. !:mime application/vnd.google-earth.kml+xml
  10869. >>>&1 string 2.0' \b, version 2.0
  10870. >>>&1 string 2.1' \b, version 2.1
  10871. >>>&1 string 2.2' \b, version 2.2
  10872. #------------------------------------------------------------------------------
  10873. # Type: OpenGIS KML, formerly Keyhole Markup Language
  10874. # This standard is maintained by the
  10875. # Open Geospatial Consortium.
  10876. # http://www.opengeospatial.org/standards/kml/
  10877. # From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
  10878. >>&0 regex ['"]http://www.opengis.net/kml OpenGIS KML document
  10879. !:mime application/vnd.google-earth.kml+xml
  10880. >>>&1 string/t 2.2 \b, version 2.2
  10881. #------------------------------------------------------------------------------
  10882. # Type: Google KML Archive (ZIP based)
  10883. # http://code.google.com/apis/kml/documentation/kml_tut.html
  10884. # From: Asbjoern Sloth Toennesen <asbjorn@lila.io>
  10885. 0 string PK\003\004
  10886. >4 byte 0x14
  10887. >>30 string doc.kml Compressed Google KML Document, including resources.
  10888. !:mime application/vnd.google-earth.kmz
  10889. #------------------------------------------------------------------------------
  10890. # $File: lecter,v 1.4 2009/09/19 16:28:10 christos Exp $
  10891. # DEC SRC Virtual Paper: Lectern files
  10892. # Karl M. Hegbloom <karlheg@inetarena.com>
  10893. 0 string lect DEC SRC Virtual Paper Lectern file
  10894. #------------------------------------------------------------------------------
  10895. # $File: lex,v 1.6 2009/09/19 16:28:10 christos Exp $
  10896. # lex: file(1) magic for lex
  10897. #
  10898. # derived empirically, your offsets may vary!
  10899. 0 search/100 yyprevious C program text (from lex)
  10900. >3 search/1 >\0 for %s
  10901. # C program text from GNU flex, from Daniel Quinlan <quinlan@yggdrasil.com>
  10902. 0 search/100 generated\ by\ flex C program text (from flex)
  10903. # lex description file, from Daniel Quinlan <quinlan@yggdrasil.com>
  10904. 0 search/1 %{ lex description text
  10905. #------------------------------------------------------------------------------
  10906. # $File: lif,v 1.8 2009/09/19 16:28:10 christos Exp $
  10907. # lif: file(1) magic for lif
  10908. #
  10909. # (Daniel Quinlan <quinlan@yggdrasil.com>)
  10910. #
  10911. 0 beshort 0x8000 lif file
  10912. #------------------------------------------------------------------------------
  10913. # $File: linux,v 1.53 2014/01/08 22:26:12 christos Exp $
  10914. # linux: file(1) magic for Linux files
  10915. #
  10916. # Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
  10917. # The following basic Linux magic is useful for reference, but using
  10918. # "long" magic is a better practice in order to avoid collisions.
  10919. #
  10920. # 2 leshort 100 Linux/i386
  10921. # >0 leshort 0407 impure executable (OMAGIC)
  10922. # >0 leshort 0410 pure executable (NMAGIC)
  10923. # >0 leshort 0413 demand-paged executable (ZMAGIC)
  10924. # >0 leshort 0314 demand-paged executable (QMAGIC)
  10925. #
  10926. 0 lelong 0x00640107 Linux/i386 impure executable (OMAGIC)
  10927. >16 lelong 0 \b, stripped
  10928. 0 lelong 0x00640108 Linux/i386 pure executable (NMAGIC)
  10929. >16 lelong 0 \b, stripped
  10930. 0 lelong 0x0064010b Linux/i386 demand-paged executable (ZMAGIC)
  10931. >16 lelong 0 \b, stripped
  10932. 0 lelong 0x006400cc Linux/i386 demand-paged executable (QMAGIC)
  10933. >16 lelong 0 \b, stripped
  10934. #
  10935. 0 string \007\001\000 Linux/i386 object file
  10936. >20 lelong >0x1020 \b, DLL library
  10937. # Linux-8086 stuff:
  10938. 0 string \01\03\020\04 Linux-8086 impure executable
  10939. >28 long !0 not stripped
  10940. 0 string \01\03\040\04 Linux-8086 executable
  10941. >28 long !0 not stripped
  10942. #
  10943. 0 string \243\206\001\0 Linux-8086 object file
  10944. #
  10945. 0 string \01\03\020\20 Minix-386 impure executable
  10946. >28 long !0 not stripped
  10947. 0 string \01\03\040\20 Minix-386 executable
  10948. >28 long !0 not stripped
  10949. 0 string \01\03\04\20 Minix-386 NSYM/GNU executable
  10950. >28 long !0 not stripped
  10951. # core dump file, from Bill Reynolds <bill@goshawk.lanl.gov>
  10952. 216 lelong 0421 Linux/i386 core file
  10953. >220 string >\0 of '%s'
  10954. >200 lelong >0 (signal %d)
  10955. #
  10956. # LILO boot/chain loaders, from Daniel Quinlan <quinlan@yggdrasil.com>
  10957. # this can be overridden by the DOS executable (COM) entry
  10958. 2 string LILO Linux/i386 LILO boot/chain loader
  10959. #
  10960. # Linux make config build file, from Ole Aamot <oka@oka.no>
  10961. # Updated by Ken Sharp
  10962. 28 string make\ config Linux make config build file (old)
  10963. 49 search/70 Kernel\ Configuration Linux make config build file
  10964. #
  10965. # PSF fonts, from H. Peter Anvin <hpa@yggdrasil.com>
  10966. # Updated by Adam Buchbinder <adam.buchbinder@gmail.com>
  10967. # See: http://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html
  10968. 0 leshort 0x0436 Linux/i386 PC Screen Font v1 data,
  10969. >2 byte&0x01 0 256 characters,
  10970. >2 byte&0x01 !0 512 characters,
  10971. >2 byte&0x02 0 no directory,
  10972. >2 byte&0x02 !0 Unicode directory,
  10973. >3 byte >0 8x%d
  10974. 0 string \x72\xb5\x4a\x86\x00\x00 Linux/i386 PC Screen Font v2 data,
  10975. >16 lelong x %d characters,
  10976. >12 lelong&0x01 0 no directory,
  10977. >12 lelong&0x01 !0 Unicode directory,
  10978. >24 lelong x %d
  10979. >28 lelong x \bx%d
  10980. # Linux swap file, from Daniel Quinlan <quinlan@yggdrasil.com>
  10981. 4086 string SWAP-SPACE Linux/i386 swap file
  10982. # From: Jeff Bailey <jbailey@ubuntu.com>
  10983. # Linux swap file with swsusp1 image, from Jeff Bailey <jbailey@ubuntu.com>
  10984. 4076 string SWAPSPACE2S1SUSPEND Linux/i386 swap file (new style) with SWSUSP1 image
  10985. # From: James Hunt <james.hunt@ubuntu.com>
  10986. 4076 string SWAPSPACE2LINHIB0001 Linux/i386 swap file (new style) (compressed hibernate)
  10987. # according to man page of mkswap (8) March 1999
  10988. # volume label and UUID Russell Coker
  10989. # http://etbe.coker.com.au/2008/07/08/label-vs-uuid-vs-device/
  10990. 4086 string SWAPSPACE2 Linux/i386 swap file (new style),
  10991. >0x400 long x version %d (4K pages),
  10992. >0x404 long x size %d pages,
  10993. >1052 string \0 no label,
  10994. >1052 string >\0 LABEL=%s,
  10995. >0x40c belong x UUID=%08x
  10996. >0x410 beshort x \b-%04x
  10997. >0x412 beshort x \b-%04x
  10998. >0x414 beshort x \b-%04x
  10999. >0x416 belong x \b-%08x
  11000. >0x41a beshort x \b%04x
  11001. # From Daniel Novotny <dnovotny@redhat.com>
  11002. # swap file for PowerPC
  11003. 65526 string SWAPSPACE2 Linux/ppc swap file
  11004. 16374 string SWAPSPACE2 Linux/ia64 swap file
  11005. #
  11006. # Linux kernel boot images, from Albert Cahalan <acahalan@cs.uml.edu>
  11007. # and others such as Axel Kohlmeyer <akohlmey@rincewind.chemie.uni-ulm.de>
  11008. # and Nicolas Lichtmaier <nick@debian.org>
  11009. # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29
  11010. # Linux kernel boot images (i386 arch) (Wolfram Kleff)
  11011. 514 string HdrS Linux kernel
  11012. !:strength + 55
  11013. >510 leshort 0xAA55 x86 boot executable
  11014. >>518 leshort >0x1ff
  11015. >>>529 byte 0 zImage,
  11016. >>>529 byte 1 bzImage,
  11017. >>>526 lelong >0
  11018. >>>>(526.s+0x200) string >\0 version %s,
  11019. >>498 leshort 1 RO-rootFS,
  11020. >>498 leshort 0 RW-rootFS,
  11021. >>508 leshort >0 root_dev 0x%X,
  11022. >>502 leshort >0 swap_dev 0x%X,
  11023. >>504 leshort >0 RAMdisksize %u KB,
  11024. >>506 leshort 0xFFFF Normal VGA
  11025. >>506 leshort 0xFFFE Extended VGA
  11026. >>506 leshort 0xFFFD Prompt for Videomode
  11027. >>506 leshort >0 Video mode %d
  11028. # This also matches new kernels, which were caught above by "HdrS".
  11029. 0 belong 0xb8c0078e Linux kernel
  11030. >0x1e3 string Loading version 1.3.79 or older
  11031. >0x1e9 string Loading from prehistoric times
  11032. # System.map files - Nicolas Lichtmaier <nick@debian.org>
  11033. 8 search/1 \ A\ _text Linux kernel symbol map text
  11034. # LSM entries - Nicolas Lichtmaier <nick@debian.org>
  11035. 0 search/1 Begin3 Linux Software Map entry text
  11036. 0 search/1 Begin4 Linux Software Map entry text (new format)
  11037. # From Matt Zimmerman, enhanced for v3 by Matthew Palmer
  11038. 0 belong 0x4f4f4f4d User-mode Linux COW file
  11039. >4 belong <3 \b, version %d
  11040. >>8 string >\0 \b, backing file %s
  11041. >4 belong >2 \b, version %d
  11042. >>32 string >\0 \b, backing file %s
  11043. ############################################################################
  11044. # Linux kernel versions
  11045. 0 string \xb8\xc0\x07\x8e\xd8\xb8\x00\x90 Linux
  11046. >497 leshort 0 x86 boot sector
  11047. >>514 belong 0x8e of a kernel from the dawn of time!
  11048. >>514 belong 0x908ed8b4 version 0.99-1.1.42
  11049. >>514 belong 0x908ed8b8 for memtest86
  11050. >497 leshort !0 x86 kernel
  11051. >>504 leshort >0 RAMdisksize=%u KB
  11052. >>502 leshort >0 swap=0x%X
  11053. >>508 leshort >0 root=0x%X
  11054. >>>498 leshort 1 \b-ro
  11055. >>>498 leshort 0 \b-rw
  11056. >>506 leshort 0xFFFF vga=normal
  11057. >>506 leshort 0xFFFE vga=extended
  11058. >>506 leshort 0xFFFD vga=ask
  11059. >>506 leshort >0 vga=%d
  11060. >>514 belong 0x908ed881 version 1.1.43-1.1.45
  11061. >>514 belong 0x15b281cd
  11062. >>>0xa8e belong 0x55AA5a5a version 1.1.46-1.2.13,1.3.0
  11063. >>>0xa99 belong 0x55AA5a5a version 1.3.1,2
  11064. >>>0xaa3 belong 0x55AA5a5a version 1.3.3-1.3.30
  11065. >>>0xaa6 belong 0x55AA5a5a version 1.3.31-1.3.41
  11066. >>>0xb2b belong 0x55AA5a5a version 1.3.42-1.3.45
  11067. >>>0xaf7 belong 0x55AA5a5a version 1.3.46-1.3.72
  11068. >>514 string HdrS
  11069. >>>518 leshort >0x1FF
  11070. >>>>529 byte 0 \b, zImage
  11071. >>>>529 byte 1 \b, bzImage
  11072. >>>>(526.s+0x200) string >\0 \b, version %s
  11073. # Linux boot sector thefts.
  11074. 0 belong 0xb8c0078e Linux
  11075. >0x1e6 belong 0x454c4b53 ELKS Kernel
  11076. >0x1e6 belong !0x454c4b53 style boot sector
  11077. ############################################################################
  11078. # Linux S390 kernel image
  11079. # Created by: Jan Kaluza <jkaluza@redhat.com>
  11080. 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
  11081. >0x00010000 search/b/4096 \x00\x0a\x00\x00\x8b\xad\xcc\xcc
  11082. # 64bit
  11083. >>&0 string \xc1\x00\xef\xe3\xf0\x68\x00\x00 Z10 64bit kernel
  11084. >>&0 string \xc1\x00\xef\xc3\x00\x00\x00\x00 Z9-109 64bit kernel
  11085. >>&0 string \xc0\x00\x20\x00\x00\x00\x00\x00 Z990 64bit kernel
  11086. >>&0 string \x00\x00\x00\x00\x00\x00\x00\x00 Z900 64bit kernel
  11087. # 32bit
  11088. >>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z10 32bit kernel
  11089. >>&0 string \x81\x00\xc8\x80\x00\x00\x00\x00 Z9-109 32bit kernel
  11090. >>&0 string \x80\x00\x20\x00\x00\x00\x00\x00 Z990 32bit kernel
  11091. >>&0 string \x80\x00\x00\x00\x00\x00\x00\x00 Z900 32bit kernel
  11092. # Linux ARM compressed kernel image
  11093. # From: Kevin Cernekee <cernekee@gmail.com>
  11094. 36 lelong 0x016f2818 Linux kernel ARM boot executable zImage (little-endian)
  11095. 36 belong 0x016f2818 Linux kernel ARM boot executable zImage (big-endian)
  11096. ############################################################################
  11097. # Linux 8086 executable
  11098. 0 lelong&0xFF0000FF 0xC30000E9 Linux-Dev86 executable, headerless
  11099. >5 string .
  11100. >>4 string >\0 \b, libc version %s
  11101. 0 lelong&0xFF00FFFF 0x4000301 Linux-8086 executable
  11102. >2 byte&0x01 !0 \b, unmapped zero page
  11103. >2 byte&0x20 0 \b, impure
  11104. >2 byte&0x20 !0
  11105. >>2 byte&0x10 !0 \b, A_EXEC
  11106. >2 byte&0x02 !0 \b, A_PAL
  11107. >2 byte&0x04 !0 \b, A_NSYM
  11108. >2 byte&0x08 !0 \b, A_STAND
  11109. >2 byte&0x40 !0 \b, A_PURE
  11110. >2 byte&0x80 !0 \b, A_TOVLY
  11111. >28 long !0 \b, not stripped
  11112. >37 string .
  11113. >>36 string >\0 \b, libc version %s
  11114. # 0 lelong&0xFF00FFFF 0x10000301 ld86 I80386 executable
  11115. # 0 lelong&0xFF00FFFF 0xB000301 ld86 M68K executable
  11116. # 0 lelong&0xFF00FFFF 0xC000301 ld86 NS16K executable
  11117. # 0 lelong&0xFF00FFFF 0x17000301 ld86 SPARC executable
  11118. # SYSLINUX boot logo files (from 'ppmtolss16' sources)
  11119. # http://www.syslinux.org/wiki/index.php/SYSLINUX#Display_graphic_from_filename:
  11120. # file extension .lss .16
  11121. 0 lelong =0x1413f33d SYSLINUX' LSS16 image data
  11122. # syslinux-4.05/mime/image/x-lss16.xml
  11123. !:mime image/x-lss16
  11124. >4 leshort x \b, width %d
  11125. >6 leshort x \b, height %d
  11126. 0 string OOOM User-Mode-Linux's Copy-On-Write disk image
  11127. >4 belong x version %d
  11128. # SE Linux policy database
  11129. # From: Mike Frysinger <vapier@gentoo.org>
  11130. 0 lelong 0xf97cff8c SE Linux policy
  11131. >16 lelong x v%d
  11132. >20 lelong 1 MLS
  11133. >24 lelong x %d symbols
  11134. >28 lelong x %d ocons
  11135. # Linux Logical Volume Manager (LVM)
  11136. # Emmanuel VARAGNAT <emmanuel.varagnat@guzu.net>
  11137. #
  11138. # System ID, UUID and volume group name are 128 bytes long
  11139. # but they should never be full and initialized with zeros...
  11140. #
  11141. # LVM1
  11142. #
  11143. 0x0 string HM\001 LVM1 (Linux Logical Volume Manager), version 1
  11144. >0x12c string >\0 , System ID: %s
  11145. 0x0 string HM\002 LVM1 (Linux Logical Volume Manager), version 2
  11146. >0x12c string >\0 , System ID: %s
  11147. # LVM2
  11148. #
  11149. # It seems that the label header can be in one the four first sector
  11150. # of the disk... (from _find_labeller in lib/label/label.c of LVM2)
  11151. #
  11152. # 0x200 seems to be the common case
  11153. 0x218 string LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  11154. # read the offset to add to the start of the header, and the header
  11155. # start in 0x200
  11156. >&(&-12.l-0x21) byte x
  11157. # display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
  11158. >>&0x0 string >\x2f \b, UUID: %.6s
  11159. >>&0x6 string >\x2f \b-%.4s
  11160. >>&0xa string >\x2f \b-%.4s
  11161. >>&0xe string >\x2f \b-%.4s
  11162. >>&0x12 string >\x2f \b-%.4s
  11163. >>&0x16 string >\x2f \b-%.4s
  11164. >>&0x1a string >\x2f \b-%.6s
  11165. >>&0x20 lequad x \b, size: %lld
  11166. 0x018 string LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  11167. >&(&-12.l-0x21) byte x
  11168. # display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
  11169. >>&0x0 string >\x2f \b, UUID: %.6s
  11170. >>&0x6 string >\x2f \b-%.4s
  11171. >>&0xa string >\x2f \b-%.4s
  11172. >>&0xe string >\x2f \b-%.4s
  11173. >>&0x12 string >\x2f \b-%.4s
  11174. >>&0x16 string >\x2f \b-%.4s
  11175. >>&0x1a string >\x2f \b-%.6s
  11176. >>&0x20 lequad x \b, size: %lld
  11177. 0x418 string LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  11178. >&(&-12.l-0x21) byte x
  11179. # display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
  11180. >>&0x0 string >\x2f \b, UUID: %.6s
  11181. >>&0x6 string >\x2f \b-%.4s
  11182. >>&0xa string >\x2f \b-%.4s
  11183. >>&0xe string >\x2f \b-%.4s
  11184. >>&0x12 string >\x2f \b-%.4s
  11185. >>&0x16 string >\x2f \b-%.4s
  11186. >>&0x1a string >\x2f \b-%.6s
  11187. >>&0x20 lequad x \b, size: %lld
  11188. 0x618 string LVM2\ 001 LVM2 PV (Linux Logical Volume Manager)
  11189. >&(&-12.l-0x21) byte x
  11190. # display UUID in LVM format + display all 32 bytes (instead of max string length: 31)
  11191. >>&0x0 string >\x2f \b, UUID: %.6s
  11192. >>&0x6 string >\x2f \b-%.4s
  11193. >>&0xa string >\x2f \b-%.4s
  11194. >>&0xe string >\x2f \b-%.4s
  11195. >>&0x12 string >\x2f \b-%.4s
  11196. >>&0x16 string >\x2f \b-%.4s
  11197. >>&0x1a string >\x2f \b-%.6s
  11198. >>&0x20 lequad x \b, size: %lld
  11199. # LVM snapshot
  11200. # from Jason Farrel
  11201. 0 string SnAp LVM Snapshot (CopyOnWrite store)
  11202. >4 lelong !0 - valid,
  11203. >4 lelong 0 - invalid,
  11204. >8 lelong x version %d,
  11205. >12 lelong x chunk_size %d
  11206. # SE Linux policy database
  11207. 0 lelong 0xf97cff8c SE Linux policy
  11208. >16 lelong x v%d
  11209. >20 lelong 1 MLS
  11210. >24 lelong x %d symbols
  11211. >28 lelong x %d ocons
  11212. # LUKS: Linux Unified Key Setup, On-Disk Format, http://luks.endorphin.org/spec
  11213. # Anthon van der Neut (anthon@mnt.org)
  11214. 0 string LUKS\xba\xbe LUKS encrypted file,
  11215. >6 beshort x ver %d
  11216. >8 string x [%s,
  11217. >40 string x %s,
  11218. >72 string x %s]
  11219. >168 string x UUID: %s
  11220. # Summary: Xen saved domain file
  11221. # Created by: Radek Vokal <rvokal@redhat.com>
  11222. 0 string LinuxGuestRecord Xen saved domain
  11223. >20 search/256 (name
  11224. >>&1 string x (name %s)
  11225. # Type: Xen, the virtual machine monitor
  11226. # From: Radek Vokal <rvokal@redhat.com>
  11227. 0 string LinuxGuestRecord Xen saved domain
  11228. #>2 regex \(name\ [^)]*\) %s
  11229. >20 search/256 (name (name
  11230. >>&1 string x %s...)
  11231. # Systemd journald files
  11232. # See http://www.freedesktop.org/wiki/Software/systemd/journal-files/.
  11233. # From: Zbigniew Jedrzejewski-Szmek <zbyszek@in.waw.pl>
  11234. # check magic
  11235. 0 string LPKSHHRH
  11236. # check that state is one of known values
  11237. >16 ubyte&252 0
  11238. # check that each half of three unique id128s is non-zero
  11239. >>24 ubequad >0
  11240. >>>32 ubequad >0
  11241. >>>>40 ubequad >0
  11242. >>>>>48 ubequad >0
  11243. >>>>>>56 ubequad >0
  11244. >>>>>>>64 ubequad >0 Journal file
  11245. !:mime application/octet-stream
  11246. # provide more info
  11247. >>>>>>>>184 leqdate 0 empty
  11248. >>>>>>>>16 ubyte 0 \b, offline
  11249. >>>>>>>>16 ubyte 1 \b, online
  11250. >>>>>>>>16 ubyte 2 \b, archived
  11251. >>>>>>>>8 ulelong&1 1 \b, sealed
  11252. >>>>>>>>12 ulelong&1 1 \b, compressed
  11253. # BCache backing and cache devices
  11254. # From: Gabriel de Perthuis <g2p.code@gmail.com>
  11255. 0x1008 lequad 8
  11256. >0x1018 string \xc6\x85\x73\xf6\x4e\x1a\x45\xca\x82\x65\xf5\x7f\x48\xba\x6d\x81 BCache
  11257. >>0x1010 ulequad 0 cache device
  11258. >>0x1010 ulequad 1 backing device
  11259. >>0x1010 ulequad 3 cache device
  11260. >>0x1010 ulequad 4 backing device
  11261. >>0x1048 string >0 \b, label "%.32s"
  11262. >>0x1028 ubelong x \b, uuid %08x
  11263. >>0x102c ubeshort x \b-%04x
  11264. >>0x102e ubeshort x \b-%04x
  11265. >>0x1030 ubeshort x \b-%04x
  11266. >>0x1032 ubelong x \b-%08x
  11267. >>0x1036 ubeshort x \b%04x
  11268. >>0x1038 ubelong x \b, set uuid %08x
  11269. >>0x103c ubeshort x \b-%04x
  11270. >>0x103e ubeshort x \b-%04x
  11271. >>0x1040 ubeshort x \b-%04x
  11272. >>0x1042 ubelong x \b-%08x
  11273. >>0x1046 ubeshort x \b%04x
  11274. #------------------------------------------------------------------------------
  11275. # $File: lisp,v 1.23 2009/09/19 16:28:10 christos Exp $
  11276. # lisp: file(1) magic for lisp programs
  11277. #
  11278. # various lisp types, from Daniel Quinlan (quinlan@yggdrasil.com)
  11279. # updated by Joerg Jenderek
  11280. # GRR: This lot is too weak
  11281. #0 string ;;
  11282. # windows INF files often begin with semicolon and use CRLF as line end
  11283. # lisp files are mainly created on unix system with LF as line end
  11284. #>2 search/4096 !\r Lisp/Scheme program text
  11285. #>2 search/4096 \r Windows INF file
  11286. 0 search/4096 (setq\ Lisp/Scheme program text
  11287. !:mime text/x-lisp
  11288. 0 search/4096 (defvar\ Lisp/Scheme program text
  11289. !:mime text/x-lisp
  11290. 0 search/4096 (defparam\ Lisp/Scheme program text
  11291. !:mime text/x-lisp
  11292. 0 search/4096 (defun\ Lisp/Scheme program text
  11293. !:mime text/x-lisp
  11294. 0 search/4096 (autoload\ Lisp/Scheme program text
  11295. !:mime text/x-lisp
  11296. 0 search/4096 (custom-set-variables\ Lisp/Scheme program text
  11297. !:mime text/x-lisp
  11298. # Emacs 18 - this is always correct, but not very magical.
  11299. 0 string \012( Emacs v18 byte-compiled Lisp data
  11300. !:mime application/x-elc
  11301. # Emacs 19+ - ver. recognition added by Ian Springer
  11302. # Also applies to XEmacs 19+ .elc files; could tell them apart with regexs
  11303. # - Chris Chittleborough <cchittleborough@yahoo.com.au>
  11304. 0 string ;ELC
  11305. >4 byte >18
  11306. >4 byte <32 Emacs/XEmacs v%d byte-compiled Lisp data
  11307. !:mime application/x-elc
  11308. # Files produced by CLISP Common Lisp From: Bruno Haible <haible@ilog.fr>
  11309. 0 string (SYSTEM::VERSION\040' CLISP byte-compiled Lisp program (pre 2004-03-27)
  11310. 0 string (|SYSTEM|::|VERSION|\040' CLISP byte-compiled Lisp program text
  11311. 0 long 0x70768BD2 CLISP memory image data
  11312. 0 long 0xD28B7670 CLISP memory image data, other endian
  11313. #.com and .bin for MIT scheme
  11314. 0 string \372\372\372\372 MIT scheme (library?)
  11315. # From: David Allouche <david@allouche.net>
  11316. 0 search/1 \<TeXmacs| TeXmacs document text
  11317. !:mime text/texmacs
  11318. #------------------------------------------------------------------------------
  11319. # $File: llvm,v 1.8 2013/01/12 03:09:51 christos Exp $
  11320. # llvm: file(1) magic for LLVM byte-codes
  11321. # URL: http://llvm.org/docs/BitCodeFormat.html
  11322. # From: Al Stone <ahs3@fc.hp.com>
  11323. 0 string llvm LLVM byte-codes, uncompressed
  11324. 0 string llvc0 LLVM byte-codes, null compression
  11325. 0 string llvc1 LLVM byte-codes, gzip compression
  11326. 0 string llvc2 LLVM byte-codes, bzip2 compression
  11327. 0 lelong 0x0b17c0de LLVM bitcode, wrapper
  11328. # Are these Mach-O ABI values? They appear to be.
  11329. >16 lelong 0x01000007 x86_64
  11330. >16 lelong 0x00000007 i386
  11331. >16 lelong 0x00000012 ppc
  11332. >16 lelong 0x01000012 ppc64
  11333. >16 lelong 0x0000000c arm
  11334. 0 string BC\xc0\xde LLVM IR bitcode
  11335. #------------------------------------------------------------------------------
  11336. # $File: lua,v 1.6 2013/01/09 16:23:17 christos Exp $
  11337. # lua: file(1) magic for Lua scripting language
  11338. # URL: http://www.lua.org/
  11339. # From: Reuben Thomas <rrt@sc3d.org>, Seo Sanghyeon <tinuviel@sparcs.kaist.ac.kr>
  11340. # Lua scripts
  11341. 0 search/1/w #!\ /usr/bin/lua Lua script text executable
  11342. !:mime text/x-lua
  11343. 0 search/1/w #!\ /usr/local/bin/lua Lua script text executable
  11344. !:mime text/x-lua
  11345. 0 search/1 #!/usr/bin/env\ lua Lua script text executable
  11346. !:mime text/x-lua
  11347. 0 search/1 #!\ /usr/bin/env\ lua Lua script text executable
  11348. !:mime text/x-lua
  11349. # Lua bytecode
  11350. 0 string \033Lua Lua bytecode,
  11351. >4 byte 0x50 version 5.0
  11352. >4 byte 0x51 version 5.1
  11353. >4 byte 0x52 version 5.2
  11354. #------------------------------------------------------------------------------
  11355. # $File: luks,v 1.4 2009/09/19 16:28:10 christos Exp $
  11356. # luks: file(1) magic for Linux Unified Key Setup
  11357. # URL: http://luks.endorphin.org/spec
  11358. # From: Anthon van der Neut <anthon@mnt.org>
  11359. 0 string LUKS\xba\xbe LUKS encrypted file,
  11360. >6 beshort x ver %d
  11361. >8 string x [%s,
  11362. >40 string x %s,
  11363. >72 string x %s]
  11364. >168 string x UUID: %s
  11365. #------------------------------------------------------------------------------
  11366. # $File: m4,v 1.1 2011/12/08 12:12:46 rrt Exp $
  11367. # make: file(1) magic for M4 scripts
  11368. #
  11369. 0 regex \^dnl\ M4 macro processor script text
  11370. !:mime text/x-m4
  11371. #------------------------------------------------------------
  11372. # $File: mach,v 1.17 2013/03/07 02:22:52 christos Exp $
  11373. # Mach has two magic numbers, 0xcafebabe and 0xfeedface.
  11374. # Unfortunately the first, cafebabe, is shared with
  11375. # Java ByteCode, so they are both handled in the file "cafebabe".
  11376. # The "feedface" ones are handled herein.
  11377. #------------------------------------------------------------
  11378. # if set, it's for the 64-bit version of the architecture
  11379. # yes, this is separate from the low-order magic number bit
  11380. # it's also separate from the "64-bit libraries" bit in the
  11381. # upper 8 bits of the CPU subtype
  11382. 0 name mach-o-cpu
  11383. >0 belong&0x01000000 0
  11384. #
  11385. # 32-bit ABIs.
  11386. #
  11387. # 1 vax
  11388. >>0 belong&0x00ffffff 1
  11389. >>>4 belong&0x00ffffff 0 vax
  11390. >>>4 belong&0x00ffffff 1 vax11/780
  11391. >>>4 belong&0x00ffffff 2 vax11/785
  11392. >>>4 belong&0x00ffffff 3 vax11/750
  11393. >>>4 belong&0x00ffffff 4 vax11/730
  11394. >>>4 belong&0x00ffffff 5 uvaxI
  11395. >>>4 belong&0x00ffffff 6 uvaxII
  11396. >>>4 belong&0x00ffffff 7 vax8200
  11397. >>>4 belong&0x00ffffff 8 vax8500
  11398. >>>4 belong&0x00ffffff 9 vax8600
  11399. >>>4 belong&0x00ffffff 10 vax8650
  11400. >>>4 belong&0x00ffffff 11 vax8800
  11401. >>>4 belong&0x00ffffff 12 uvaxIII
  11402. >>>4 belong&0x00ffffff >12 vax subarchitecture=%ld
  11403. >>0 belong&0x00ffffff 2 romp
  11404. >>0 belong&0x00ffffff 3 architecture=3
  11405. >>0 belong&0x00ffffff 4 ns32032
  11406. >>0 belong&0x00ffffff 5 ns32332
  11407. >>0 belong&0x00ffffff 6 m68k
  11408. # 7 x86
  11409. >>0 belong&0x00ffffff 7
  11410. >>>4 belong&0x0000000f 3 i386
  11411. >>>4 belong&0x0000000f 4 i486
  11412. >>>>4 belong&0x00fffff0 0
  11413. >>>>4 belong&0x00fffff0 0x80 \bsx
  11414. >>>4 belong&0x0000000f 5 i586
  11415. >>>4 belong&0x0000000f 6
  11416. >>>>4 belong&0x00fffff0 0 p6
  11417. >>>>4 belong&0x00fffff0 0x10 pentium_pro
  11418. >>>>4 belong&0x00fffff0 0x20 pentium_2_m0x20
  11419. >>>>4 belong&0x00fffff0 0x30 pentium_2_m3
  11420. >>>>4 belong&0x00fffff0 0x40 pentium_2_m0x40
  11421. >>>>4 belong&0x00fffff0 0x50 pentium_2_m5
  11422. >>>>4 belong&0x00fffff0 >0x50 pentium_2_m0x%lx
  11423. >>>4 belong&0x0000000f 7 celeron
  11424. >>>>4 belong&0x00fffff0 0x00 \b_m0x%lx
  11425. >>>>4 belong&0x00fffff0 0x10 \b_m0x%lx
  11426. >>>>4 belong&0x00fffff0 0x20 \b_m0x%lx
  11427. >>>>4 belong&0x00fffff0 0x30 \b_m0x%lx
  11428. >>>>4 belong&0x00fffff0 0x40 \b_m0x%lx
  11429. >>>>4 belong&0x00fffff0 0x50 \b_m0x%lx
  11430. >>>>4 belong&0x00fffff0 0x60
  11431. >>>>4 belong&0x00fffff0 0x70 \b_mobile
  11432. >>>>4 belong&0x00fffff0 >0x70 \b_m0x%lx
  11433. >>>4 belong&0x0000000f 8 pentium_3
  11434. >>>>4 belong&0x00fffff0 0x00
  11435. >>>>4 belong&0x00fffff0 0x10 \b_m
  11436. >>>>4 belong&0x00fffff0 0x20 \b_xeon
  11437. >>>>4 belong&0x00fffff0 >0x20 \b_m0x%lx
  11438. >>>4 belong&0x0000000f 9 pentiumM
  11439. >>>>4 belong&0x00fffff0 0x00
  11440. >>>>4 belong&0x00fffff0 >0x00 \b_m0x%lx
  11441. >>>4 belong&0x0000000f 10 pentium_4
  11442. >>>>4 belong&0x00fffff0 0x00
  11443. >>>>4 belong&0x00fffff0 0x10 \b_m
  11444. >>>>4 belong&0x00fffff0 >0x10 \b_m0x%lx
  11445. >>>4 belong&0x0000000f 11 itanium
  11446. >>>>4 belong&0x00fffff0 0x00
  11447. >>>>4 belong&0x00fffff0 0x10 \b_2
  11448. >>>>4 belong&0x00fffff0 >0x10 \b_m0x%lx
  11449. >>>4 belong&0x0000000f 12 xeon
  11450. >>>>4 belong&0x00fffff0 0x00
  11451. >>>>4 belong&0x00fffff0 0x10 \b_mp
  11452. >>>>4 belong&0x00fffff0 >0x10 \b_m0x%lx
  11453. >>>4 belong&0x0000000f >12 ia32 family=%ld
  11454. >>>>4 belong&0x00fffff0 0x00
  11455. >>>>4 belong&0x00fffff0 >0x00 model=%lx
  11456. >>0 belong&0x00ffffff 8 mips
  11457. >>>4 belong&0x00ffffff 1 R2300
  11458. >>>4 belong&0x00ffffff 2 R2600
  11459. >>>4 belong&0x00ffffff 3 R2800
  11460. >>>4 belong&0x00ffffff 4 R2000a
  11461. >>>4 belong&0x00ffffff 5 R2000
  11462. >>>4 belong&0x00ffffff 6 R3000a
  11463. >>>4 belong&0x00ffffff 7 R3000
  11464. >>>4 belong&0x00ffffff >7 subarchitecture=%ld
  11465. >>0 belong&0x00ffffff 9 ns32532
  11466. >>0 belong&0x00ffffff 10 mc98000
  11467. >>0 belong&0x00ffffff 11 hppa
  11468. >>>4 belong&0x00ffffff 0 7100
  11469. >>>4 belong&0x00ffffff 1 7100LC
  11470. >>>4 belong&0x00ffffff >1 subarchitecture=%ld
  11471. >>0 belong&0x00ffffff 12 arm
  11472. >>>4 belong&0x00ffffff 0
  11473. >>>4 belong&0x00ffffff 1 subarchitecture=%ld
  11474. >>>4 belong&0x00ffffff 2 subarchitecture=%ld
  11475. >>>4 belong&0x00ffffff 3 subarchitecture=%ld
  11476. >>>4 belong&0x00ffffff 4 subarchitecture=%ld
  11477. >>>4 belong&0x00ffffff 5 \b_v4t
  11478. >>>4 belong&0x00ffffff 6 \b_v6
  11479. >>>4 belong&0x00ffffff 7 \b_v5tej
  11480. >>>4 belong&0x00ffffff 8 \b_xscale
  11481. >>>4 belong&0x00ffffff 9 \b_v7
  11482. >>>4 belong&0x00ffffff 10 \b_v7f
  11483. >>>4 belong&0x00ffffff 11 subarchitecture=%ld
  11484. >>>4 belong&0x00ffffff 12 \b_v7k
  11485. >>>4 belong&0x00ffffff >12 subarchitecture=%ld
  11486. # 13 m88k
  11487. >>0 belong&0x00ffffff 13
  11488. >>>4 belong&0x00ffffff 0 mc88000
  11489. >>>4 belong&0x00ffffff 1 mc88100
  11490. >>>4 belong&0x00ffffff 2 mc88110
  11491. >>>4 belong&0x00ffffff >2 mc88000 subarchitecture=%ld
  11492. >>0 belong&0x00ffffff 14 sparc
  11493. >>0 belong&0x00ffffff 15 i860g
  11494. >>0 belong&0x00ffffff 16 alpha
  11495. >>0 belong&0x00ffffff 17 rs6000
  11496. >>0 belong&0x00ffffff 18 ppc
  11497. >>>4 belong&0x00ffffff 0
  11498. >>>4 belong&0x00ffffff 1 \b_601
  11499. >>>4 belong&0x00ffffff 2 \b_602
  11500. >>>4 belong&0x00ffffff 3 \b_603
  11501. >>>4 belong&0x00ffffff 4 \b_603e
  11502. >>>4 belong&0x00ffffff 5 \b_603ev
  11503. >>>4 belong&0x00ffffff 6 \b_604
  11504. >>>4 belong&0x00ffffff 7 \b_604e
  11505. >>>4 belong&0x00ffffff 8 \b_620
  11506. >>>4 belong&0x00ffffff 9 \b_650
  11507. >>>4 belong&0x00ffffff 10 \b_7400
  11508. >>>4 belong&0x00ffffff 11 \b_7450
  11509. >>>4 belong&0x00ffffff 100 \b_970
  11510. >>>4 belong&0x00ffffff >100 subarchitecture=%ld
  11511. >>0 belong&0x00ffffff >18 architecture=%ld
  11512. >0 belong&0x01000000 0x01000000
  11513. #
  11514. # 64-bit ABIs.
  11515. #
  11516. >>0 belong&0x00ffffff 0 64-bit architecture=%ld
  11517. >>0 belong&0x00ffffff 1 64-bit architecture=%ld
  11518. >>0 belong&0x00ffffff 2 64-bit architecture=%ld
  11519. >>0 belong&0x00ffffff 3 64-bit architecture=%ld
  11520. >>0 belong&0x00ffffff 4 64-bit architecture=%ld
  11521. >>0 belong&0x00ffffff 5 64-bit architecture=%ld
  11522. >>0 belong&0x00ffffff 6 64-bit architecture=%ld
  11523. >>0 belong&0x00ffffff 7 x86_64
  11524. >>>4 belong&0x00ffffff 0 subarchitecture=%ld
  11525. >>>4 belong&0x00ffffff 1 subarchitecture=%ld
  11526. >>>4 belong&0x00ffffff 2 subarchitecture=%ld
  11527. >>>4 belong&0x00ffffff 3
  11528. >>>4 belong&0x00ffffff 4 \b_arch1
  11529. >>>4 belong&0x00ffffff >4 subarchitecture=%ld
  11530. >>0 belong&0x00ffffff 8 64-bit architecture=%ld
  11531. >>0 belong&0x00ffffff 9 64-bit architecture=%ld
  11532. >>0 belong&0x00ffffff 10 64-bit architecture=%ld
  11533. >>0 belong&0x00ffffff 11 64-bit architecture=%ld
  11534. >>0 belong&0x00ffffff 12 64-bit architecture=%ld
  11535. >>0 belong&0x00ffffff 13 64-bit architecture=%ld
  11536. >>0 belong&0x00ffffff 14 64-bit architecture=%ld
  11537. >>0 belong&0x00ffffff 15 64-bit architecture=%ld
  11538. >>0 belong&0x00ffffff 16 64-bit architecture=%ld
  11539. >>0 belong&0x00ffffff 17 64-bit architecture=%ld
  11540. >>0 belong&0x00ffffff 18 ppc64
  11541. >>>4 belong&0x00ffffff 0
  11542. >>>4 belong&0x00ffffff 1 \b_601
  11543. >>>4 belong&0x00ffffff 2 \b_602
  11544. >>>4 belong&0x00ffffff 3 \b_603
  11545. >>>4 belong&0x00ffffff 4 \b_603e
  11546. >>>4 belong&0x00ffffff 5 \b_603ev
  11547. >>>4 belong&0x00ffffff 6 \b_604
  11548. >>>4 belong&0x00ffffff 7 \b_604e
  11549. >>>4 belong&0x00ffffff 8 \b_620
  11550. >>>4 belong&0x00ffffff 9 \b_650
  11551. >>>4 belong&0x00ffffff 10 \b_7400
  11552. >>>4 belong&0x00ffffff 11 \b_7450
  11553. >>>4 belong&0x00ffffff 100 \b_970
  11554. >>>4 belong&0x00ffffff >100 subarchitecture=%ld
  11555. >>0 belong&0x00ffffff >18 64-bit architecture=%ld
  11556. 0 name mach-o-be
  11557. >0 byte 0xcf 64-bit
  11558. >4 use mach-o-cpu
  11559. >12 belong 1 object
  11560. >12 belong 2 executable
  11561. >12 belong 3 fixed virtual memory shared library
  11562. >12 belong 4 core
  11563. >12 belong 5 preload executable
  11564. >12 belong 6 dynamically linked shared library
  11565. >12 belong 7 dynamic linker
  11566. >12 belong 8 bundle
  11567. >12 belong 9 dynamically linked shared library stub
  11568. >12 belong 10 dSYM companion file
  11569. >12 belong 11 kext bundle
  11570. >12 belong >11
  11571. >>12 belong x filetype=%ld
  11572. #
  11573. 0 lelong&0xfffffffe 0xfeedface Mach-O
  11574. !:strength +1
  11575. >0 use \^mach-o-be
  11576. 0 belong&0xfffffffe 0xfeedface Mach-O
  11577. !:strength +1
  11578. >0 use mach-o-be
  11579. #------------------------------------------------------------------------------
  11580. # $File: macintosh,v 1.23 2013/11/19 18:47:58 christos Exp $
  11581. # macintosh description
  11582. #
  11583. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  11584. # Daniel Quinlan, quinlan@yggdrasil.com
  11585. 11 string must\ be\ converted\ with\ BinHex BinHex binary text
  11586. !:mime application/mac-binhex40
  11587. >41 string x \b, version %.3s
  11588. # Stuffit archives are the de facto standard of compression for Macintosh
  11589. # files obtained from most archives. (franklsm@tuns.ca)
  11590. 0 string SIT! StuffIt Archive (data)
  11591. !:mime application/x-stuffit
  11592. !:apple SIT!SIT!
  11593. >2 string x : %s
  11594. 0 string SITD StuffIt Deluxe (data)
  11595. >2 string x : %s
  11596. 0 string Seg StuffIt Deluxe Segment (data)
  11597. >2 string x : %s
  11598. # Newer StuffIt archives (grant@netbsd.org)
  11599. 0 string StuffIt StuffIt Archive
  11600. !:mime application/x-stuffit
  11601. !:apple SIT!SIT!
  11602. #>162 string >0 : %s
  11603. # Macintosh Applications and Installation binaries (franklsm@tuns.ca)
  11604. # GRR: Too weak
  11605. #0 string APPL Macintosh Application (data)
  11606. #>2 string x \b: %s
  11607. # Macintosh System files (franklsm@tuns.ca)
  11608. # GRR: Too weak
  11609. #0 string zsys Macintosh System File (data)
  11610. #0 string FNDR Macintosh Finder (data)
  11611. #0 string libr Macintosh Library (data)
  11612. #>2 string x : %s
  11613. #0 string shlb Macintosh Shared Library (data)
  11614. #>2 string x : %s
  11615. #0 string cdev Macintosh Control Panel (data)
  11616. #>2 string x : %s
  11617. #0 string INIT Macintosh Extension (data)
  11618. #>2 string x : %s
  11619. #0 string FFIL Macintosh Truetype Font (data)
  11620. #>2 string x : %s
  11621. #0 string LWFN Macintosh Postscript Font (data)
  11622. #>2 string x : %s
  11623. # Additional Macintosh Files (franklsm@tuns.ca)
  11624. # GRR: Too weak
  11625. #0 string PACT Macintosh Compact Pro Archive (data)
  11626. #>2 string x : %s
  11627. #0 string ttro Macintosh TeachText File (data)
  11628. #>2 string x : %s
  11629. #0 string TEXT Macintosh TeachText File (data)
  11630. #>2 string x : %s
  11631. #0 string PDF Macintosh PDF File (data)
  11632. #>2 string x : %s
  11633. # MacBinary format (Eric Fischer, enf@pobox.com)
  11634. #
  11635. # Unfortunately MacBinary doesn't really have a magic number prior
  11636. # to the MacBinary III format. The checksum is really the way to
  11637. # do it, but the magic file format isn't up to the challenge.
  11638. #
  11639. # 0 byte 0
  11640. # 1 byte # filename length
  11641. # 2 string # filename
  11642. # 65 string # file type
  11643. # 69 string # file creator
  11644. # 73 byte # Finder flags
  11645. # 74 byte 0
  11646. # 75 beshort # vertical posn in window
  11647. # 77 beshort # horiz posn in window
  11648. # 79 beshort # window or folder ID
  11649. # 81 byte # protected?
  11650. # 82 byte 0
  11651. # 83 belong # length of data segment
  11652. # 87 belong # length of resource segment
  11653. # 91 belong # file creation date
  11654. # 95 belong # file modification date
  11655. # 99 beshort # length of comment after resource
  11656. # 101 byte # new Finder flags
  11657. # 102 string mBIN # (only in MacBinary III)
  11658. # 106 byte # char. code of file name
  11659. # 107 byte # still more Finder flags
  11660. # 116 belong # total file length
  11661. # 120 beshort # length of add'l header
  11662. # 122 byte 129 # for MacBinary II
  11663. # 122 byte 130 # for MacBinary III
  11664. # 123 byte 129 # minimum version that can read fmt
  11665. # 124 beshort # checksum
  11666. #
  11667. # This attempts to use the version numbers as a magic number, requiring
  11668. # that the first one be 0x80, 0x81, 0x82, or 0x83, and that the second
  11669. # be 0x81. This works for the files I have, but maybe not for everyone's.
  11670. # Unfortunately, this magic is quite weak - MPi
  11671. #122 beshort&0xFCFF 0x8081 Macintosh MacBinary data
  11672. # MacBinary I doesn't have the version number field at all, but MacBinary II
  11673. # has been in use since 1987 so I hope there aren't many really old files
  11674. # floating around that this will miss. The original spec calls for using
  11675. # the nulls in 0, 74, and 82 as the magic number.
  11676. #
  11677. # Another possibility, that would also work for MacBinary I, is to use
  11678. # the assumption that 65-72 will all be ASCII (0x20-0x7F), that 73 will
  11679. # have bits 1 (changed), 2 (busy), 3 (bozo), and 6 (invisible) unset,
  11680. # and that 74 will be 0. So something like
  11681. #
  11682. # 71 belong&0x80804EFF 0x00000000 Macintosh MacBinary data
  11683. #
  11684. # >73 byte&0x01 0x01 \b, inited
  11685. # >73 byte&0x02 0x02 \b, changed
  11686. # >73 byte&0x04 0x04 \b, busy
  11687. # >73 byte&0x08 0x08 \b, bozo
  11688. # >73 byte&0x10 0x10 \b, system
  11689. # >73 byte&0x10 0x20 \b, bundle
  11690. # >73 byte&0x10 0x40 \b, invisible
  11691. # >73 byte&0x10 0x80 \b, locked
  11692. #>65 string x \b, type "%4.4s"
  11693. #>65 string 8BIM (PhotoShop)
  11694. #>65 string ALB3 (PageMaker 3)
  11695. #>65 string ALB4 (PageMaker 4)
  11696. #>65 string ALT3 (PageMaker 3)
  11697. #>65 string APPL (application)
  11698. #>65 string AWWP (AppleWorks word processor)
  11699. #>65 string CIRC (simulated circuit)
  11700. #>65 string DRWG (MacDraw)
  11701. #>65 string EPSF (Encapsulated PostScript)
  11702. #>65 string FFIL (font suitcase)
  11703. #>65 string FKEY (function key)
  11704. #>65 string FNDR (Macintosh Finder)
  11705. #>65 string GIFf (GIF image)
  11706. #>65 string Gzip (GNU gzip)
  11707. #>65 string INIT (system extension)
  11708. #>65 string LIB\ (library)
  11709. #>65 string LWFN (PostScript font)
  11710. #>65 string MSBC (Microsoft BASIC)
  11711. #>65 string PACT (Compact Pro archive)
  11712. #>65 string PDF\ (Portable Document Format)
  11713. #>65 string PICT (picture)
  11714. #>65 string PNTG (MacPaint picture)
  11715. #>65 string PREF (preferences)
  11716. #>65 string PROJ (Think C project)
  11717. #>65 string QPRJ (Think Pascal project)
  11718. #>65 string SCFL (Defender scores)
  11719. #>65 string SCRN (startup screen)
  11720. #>65 string SITD (StuffIt Deluxe)
  11721. #>65 string SPn3 (SuperPaint)
  11722. #>65 string STAK (HyperCard stack)
  11723. #>65 string Seg\ (StuffIt segment)
  11724. #>65 string TARF (Unix tar archive)
  11725. #>65 string TEXT (ASCII)
  11726. #>65 string TIFF (TIFF image)
  11727. #>65 string TOVF (Eudora table of contents)
  11728. #>65 string WDBN (Microsoft Word word processor)
  11729. #>65 string WORD (MacWrite word processor)
  11730. #>65 string XLS\ (Microsoft Excel)
  11731. #>65 string ZIVM (compress (.Z))
  11732. #>65 string ZSYS (Pre-System 7 system file)
  11733. #>65 string acf3 (Aldus FreeHand)
  11734. #>65 string cdev (control panel)
  11735. #>65 string dfil (Desk Acessory suitcase)
  11736. #>65 string libr (library)
  11737. #>65 string nX^d (WriteNow word processor)
  11738. #>65 string nX^w (WriteNow dictionary)
  11739. #>65 string rsrc (resource)
  11740. #>65 string scbk (Scrapbook)
  11741. #>65 string shlb (shared library)
  11742. #>65 string ttro (SimpleText read-only)
  11743. #>65 string zsys (system file)
  11744. #>69 string x \b, creator "%4.4s"
  11745. # Somewhere, Apple has a repository of registered Creator IDs. These are
  11746. # just the ones that I happened to have files from and was able to identify.
  11747. #>69 string 8BIM (Adobe Photoshop)
  11748. #>69 string ALD3 (PageMaker 3)
  11749. #>69 string ALD4 (PageMaker 4)
  11750. #>69 string ALFA (Alpha editor)
  11751. #>69 string APLS (Apple Scanner)
  11752. #>69 string APSC (Apple Scanner)
  11753. #>69 string BRKL (Brickles)
  11754. #>69 string BTFT (BitFont)
  11755. #>69 string CCL2 (Common Lisp 2)
  11756. #>69 string CCL\ (Common Lisp)
  11757. #>69 string CDmo (The Talking Moose)
  11758. #>69 string CPCT (Compact Pro)
  11759. #>69 string CSOm (Eudora)
  11760. #>69 string DMOV (Font/DA Mover)
  11761. #>69 string DSIM (DigSim)
  11762. #>69 string EDIT (Macintosh Edit)
  11763. #>69 string ERIK (Macintosh Finder)
  11764. #>69 string EXTR (self-extracting archive)
  11765. #>69 string Gzip (GNU gzip)
  11766. #>69 string KAHL (Think C)
  11767. #>69 string LWFU (LaserWriter Utility)
  11768. #>69 string LZIV (compress)
  11769. #>69 string MACA (MacWrite)
  11770. #>69 string MACS (Macintosh operating system)
  11771. #>69 string MAcK (MacKnowledge terminal emulator)
  11772. #>69 string MLND (Defender)
  11773. #>69 string MPNT (MacPaint)
  11774. #>69 string MSBB (Microsoft BASIC (binary))
  11775. #>69 string MSWD (Microsoft Word)
  11776. #>69 string NCSA (NCSA Telnet)
  11777. #>69 string PJMM (Think Pascal)
  11778. #>69 string PSAL (Hunt the Wumpus)
  11779. #>69 string PSI2 (Apple File Exchange)
  11780. #>69 string R*ch (BBEdit)
  11781. #>69 string RMKR (Resource Maker)
  11782. #>69 string RSED (Resource Editor)
  11783. #>69 string Rich (BBEdit)
  11784. #>69 string SIT! (StuffIt)
  11785. #>69 string SPNT (SuperPaint)
  11786. #>69 string Unix (NeXT Mac filesystem)
  11787. #>69 string VIM! (Vim editor)
  11788. #>69 string WILD (HyperCard)
  11789. #>69 string XCEL (Microsoft Excel)
  11790. #>69 string aCa2 (Fontographer)
  11791. #>69 string aca3 (Aldus FreeHand)
  11792. #>69 string dosa (Macintosh MS-DOS file system)
  11793. #>69 string movr (Font/DA Mover)
  11794. #>69 string nX^n (WriteNow)
  11795. #>69 string pdos (Apple ProDOS file system)
  11796. #>69 string scbk (Scrapbook)
  11797. #>69 string ttxt (SimpleText)
  11798. #>69 string ufox (Foreign File Access)
  11799. # Just in case...
  11800. 102 string mBIN MacBinary III data with surprising version number
  11801. # sas magic from Bruce Foster (bef@nwu.edu)
  11802. #
  11803. #0 string SAS SAS
  11804. #>8 string x %s
  11805. 0 string SAS SAS
  11806. >24 string DATA data file
  11807. >24 string CATALOG catalog
  11808. >24 string INDEX data file index
  11809. >24 string VIEW data view
  11810. # sas 7+ magic from Reinhold Koch (reinhold.koch@roche.com)
  11811. #
  11812. 0x54 string SAS SAS 7+
  11813. >0x9C string DATA data file
  11814. >0x9C string CATALOG catalog
  11815. >0x9C string INDEX data file index
  11816. >0x9C string VIEW data view
  11817. # spss magic for SPSS system and portable files,
  11818. # from Bruce Foster (bef@nwu.edu).
  11819. 0 long 0xc1e2c3c9 SPSS Portable File
  11820. >40 string x %s
  11821. 0 string $FL2 SPSS System File
  11822. >24 string x %s
  11823. 0 string $FL3 SPSS System File
  11824. >24 string x %s
  11825. # Macintosh filesystem data
  11826. # From "Tom N Harris" <telliamed@mac.com>
  11827. # Fixed HFS+ and Partition map magic: Ethan Benson <erbenson@alaska.net>
  11828. # The MacOS epoch begins on 1 Jan 1904 instead of 1 Jan 1970, so these
  11829. # entries depend on the data arithmetic added after v.35
  11830. # There's also some Pascal strings in here, ditto...
  11831. # The boot block signature, according to IM:Files, is
  11832. # "for HFS volumes, this field always contains the value 0x4C4B."
  11833. # But if this is true for MFS or HFS+ volumes, I don't know.
  11834. # Alternatively, the boot block is supposed to be zeroed if it's
  11835. # unused, so a simply >0 should suffice.
  11836. 0x400 beshort 0xD2D7 Macintosh MFS data
  11837. >0 beshort 0x4C4B (bootable)
  11838. >0x40a beshort &0x8000 (locked)
  11839. >0x402 beldate-0x7C25B080 x created: %s,
  11840. >0x406 beldate-0x7C25B080 >0 last backup: %s,
  11841. >0x414 belong x block size: %d,
  11842. >0x412 beshort x number of blocks: %d,
  11843. >0x424 pstring x volume name: %s
  11844. # "BD" gives many false positives
  11845. #0x400 beshort 0x4244 Macintosh HFS data
  11846. #>0 beshort 0x4C4B (bootable)
  11847. #>0x40a beshort &0x8000 (locked)
  11848. #>0x40a beshort ^0x0100 (mounted)
  11849. #>0x40a beshort &0x0200 (spared blocks)
  11850. #>0x40a beshort &0x0800 (unclean)
  11851. #>0x47C beshort 0x482B (Embedded HFS+ Volume)
  11852. #>0x402 beldate-0x7C25B080 x created: %s,
  11853. #>0x406 beldate-0x7C25B080 x last modified: %s,
  11854. #>0x440 beldate-0x7C25B080 >0 last backup: %s,
  11855. #>0x414 belong x block size: %d,
  11856. #>0x412 beshort x number of blocks: %d,
  11857. #>0x424 pstring x volume name: %s
  11858. 0x400 beshort 0x482B Macintosh HFS Extended
  11859. >&0 beshort x version %d data
  11860. >0 beshort 0x4C4B (bootable)
  11861. >0x404 belong ^0x00000100 (mounted)
  11862. >&2 belong &0x00000200 (spared blocks)
  11863. >&2 belong &0x00000800 (unclean)
  11864. >&2 belong &0x00008000 (locked)
  11865. >&6 string x last mounted by: '%.4s',
  11866. # really, that should be treated as a belong and we print a string
  11867. # based on the value. TN1150 only mentions '8.10' for "MacOS 8.1"
  11868. >&14 beldate-0x7C25B080 x created: %s,
  11869. # only the creation date is local time, all other timestamps in HFS+ are UTC.
  11870. >&18 bedate-0x7C25B080 x last modified: %s,
  11871. >&22 bedate-0x7C25B080 >0 last backup: %s,
  11872. >&26 bedate-0x7C25B080 >0 last checked: %s,
  11873. >&38 belong x block size: %d,
  11874. >&42 belong x number of blocks: %d,
  11875. >&46 belong x free blocks: %d
  11876. # I don't think this is really necessary since it doesn't do much and
  11877. # anything with a valid driver descriptor will also have a valid
  11878. # partition map
  11879. #0 beshort 0x4552 Apple Device Driver data
  11880. #>&24 beshort =1 \b, MacOS
  11881. # Is that the partition type a cstring or a pstring? Well, IM says "strings
  11882. # shorter than 32 bytes must be terminated with NULL" so I'll treat it as a
  11883. # cstring. Of course, partitions can contain more than four entries, but
  11884. # what're you gonna do?
  11885. # GRR: This magic is too weak, it is just "PM"
  11886. #0x200 beshort 0x504D Apple Partition data
  11887. #>0x2 beshort x (block size: %d):
  11888. #>0x230 string x first type: %s,
  11889. #>0x210 string x name: %s,
  11890. #>0x254 belong x number of blocks: %d,
  11891. #>0x400 beshort 0x504D
  11892. #>>0x430 string x second type: %s,
  11893. #>>0x410 string x name: %s,
  11894. #>>0x454 belong x number of blocks: %d,
  11895. #>>0x600 beshort 0x504D
  11896. #>>>0x630 string x third type: %s,
  11897. #>>>0x610 string x name: %s,
  11898. #>>>0x654 belong x number of blocks: %d,
  11899. #>>0x800 beshort 0x504D
  11900. #>>>0x830 string x fourth type: %s,
  11901. #>>>0x810 string x name: %s,
  11902. #>>>0x854 belong x number of blocks: %d,
  11903. #>>>0xa00 beshort 0x504D
  11904. #>>>>0xa30 string x fifth type: %s,
  11905. #>>>>0xa10 string x name: %s,
  11906. #>>>>0xa54 belong x number of blocks: %d
  11907. #>>>0xc00 beshort 0x504D
  11908. #>>>>0xc30 string x sixth type: %s,
  11909. #>>>>0xc10 string x name: %s,
  11910. #>>>>0xc54 belong x number of blocks: %d
  11911. ## AFAIK, only the signature is different
  11912. #0x200 beshort 0x5453 Apple Old Partition data
  11913. #>0x2 beshort x block size: %d,
  11914. #>0x230 string x first type: %s,
  11915. #>0x210 string x name: %s,
  11916. #>0x254 belong x number of blocks: %d,
  11917. #>0x400 beshort 0x504D
  11918. #>>0x430 string x second type: %s,
  11919. #>>0x410 string x name: %s,
  11920. #>>0x454 belong x number of blocks: %d,
  11921. #>>0x800 beshort 0x504D
  11922. #>>>0x830 string x third type: %s,
  11923. #>>>0x810 string x name: %s,
  11924. #>>>0x854 belong x number of blocks: %d,
  11925. #>>>0xa00 beshort 0x504D
  11926. #>>>>0xa30 string x fourth type: %s,
  11927. #>>>>0xa10 string x name: %s,
  11928. #>>>>0xa54 belong x number of blocks: %d
  11929. # From: Remi Mommsen <mommsen@slac.stanford.edu>
  11930. 0 string BOMStore Mac OS X bill of materials (BOM) file
  11931. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  11932. # URL: http://en.wikipedia.org/wiki/Datafork_TrueType
  11933. # Derived from the 'fondu' and 'ufond' source code (fondu.sf.net). 'sfnt' is
  11934. # TrueType; 'POST' is PostScript. 'FONT' and 'NFNT' sometimes appear, but I
  11935. # don't know what they mean.
  11936. 0 belong 0x100
  11937. >(0x4.L+24) beshort x
  11938. >>&4 belong 0x73666e74 Mac OSX datafork font, TrueType
  11939. >>&4 belong 0x464f4e54 Mac OSX datafork font, 'FONT'
  11940. >>&4 belong 0x4e464e54 Mac OSX datafork font, 'NFNT'
  11941. >>&4 belong 0x504f5354 Mac OSX datafork font, PostScript
  11942. #------------------------------------------------------------------------------
  11943. # $File: macos,v 1.1 2012/12/21 16:41:07 christos Exp $
  11944. # MacOS files
  11945. #
  11946. 0 string book\0\0\0\0mark\0\0\0\0 MacOS Alias file
  11947. #------------------------------------------------------------------------------
  11948. # $File: magic,v 1.10 2010/11/25 15:00:12 christos Exp $
  11949. # magic: file(1) magic for magic files
  11950. #
  11951. 0 string/t #\ Magic magic text file for file(1) cmd
  11952. 0 lelong 0xF11E041C magic binary file for file(1) cmd
  11953. >4 lelong x (version %d) (little endian)
  11954. 0 belong 0xF11E041C magic binary file for file(1) cmd
  11955. >4 belong x (version %d) (big endian)
  11956. #------------------------------------------------------------------------------
  11957. # $File: mail.news,v 1.22 2013/01/04 14:22:07 christos Exp $
  11958. # mail.news: file(1) magic for mail and news
  11959. #
  11960. # Unfortunately, saved netnews also has From line added in some news software.
  11961. #0 string From mail text
  11962. 0 string/t Relay-Version: old news text
  11963. !:mime message/rfc822
  11964. 0 string/t #!\ rnews batched news text
  11965. !:mime message/rfc822
  11966. 0 string/t N#!\ rnews mailed, batched news text
  11967. !:mime message/rfc822
  11968. 0 string/t Forward\ to mail forwarding text
  11969. !:mime message/rfc822
  11970. 0 string/t Pipe\ to mail piping text
  11971. !:mime message/rfc822
  11972. 0 string/tc delivered-to: SMTP mail text
  11973. !:mime message/rfc822
  11974. 0 string/tc return-path: SMTP mail text
  11975. !:mime message/rfc822
  11976. 0 string/t Path: news text
  11977. !:mime message/news
  11978. 0 string/t Xref: news text
  11979. !:mime message/news
  11980. 0 string/t From: news or mail text
  11981. !:mime message/rfc822
  11982. 0 string/t Article saved news text
  11983. !:mime message/news
  11984. 0 string/t BABYL Emacs RMAIL text
  11985. 0 string/t Received: RFC 822 mail text
  11986. !:mime message/rfc822
  11987. 0 string/t MIME-Version: MIME entity text
  11988. #0 string/t Content- MIME entity text
  11989. # TNEF files...
  11990. 0 lelong 0x223E9F78 Transport Neutral Encapsulation Format
  11991. !:mime application/vnd.ms-tnef
  11992. # From: Kevin Sullivan <ksulliva@psc.edu>
  11993. 0 string *mbx* MBX mail folder
  11994. # From: Simon Matter <simon.matter@invoca.ch>
  11995. 0 string \241\002\213\015skiplist\ file\0\0\0 Cyrus skiplist DB
  11996. # JAM(mbp) Fidonet message area databases
  11997. # JHR file
  11998. 0 string JAM\0 JAM message area header file
  11999. >12 leshort >0 (%d messages)
  12000. # Squish Fidonet message area databases
  12001. # SQD file (requires at least one message in the area)
  12002. # XXX: Weak magic
  12003. #256 leshort 0xAFAE4453 Squish message area data file
  12004. #>4 leshort >0 (%d messages)
  12005. #0 string \<!--\ MHonArc text/html; x-type=mhonarc
  12006. # Cyrus: file(1) magic for compiled Cyrus sieve scripts
  12007. # URL: http://www.cyrusimap.org/docs/cyrus-imapd/2.4.6/internal/bytecode.php
  12008. # URL: http://git.cyrusimap.org/cyrus-imapd/tree/sieve/bytecode.h?h=master
  12009. # From: Philipp Hahn <hahn@univention.de>
  12010. # Compiled Cyrus sieve script
  12011. 0 string CyrSBytecode Cyrus sieve bytecode data,
  12012. >12 belong =1 version 1, big-endian
  12013. >12 lelong =1 version 1, little-endian
  12014. >12 belong x version %d, network-endian
  12015. #------------------------------------------------------------------------------
  12016. # $File: make,v 1.1 2011/12/08 12:12:46 rrt Exp $
  12017. # make: file(1) magic for makefiles
  12018. #
  12019. 0 regex \^CFLAGS makefile script text
  12020. !:mime text/x-makefile
  12021. 0 regex \^LDFLAGS makefile script text
  12022. !:mime text/x-makefile
  12023. 0 regex \^all: makefile script text
  12024. !:mime text/x-makefile
  12025. 0 regex \^.PRECIOUS makefile script text
  12026. !:mime text/x-makefile
  12027. 0 regex \^SUBDIRS automake makefile script text
  12028. !:mime text/x-makefile
  12029. #------------------------------------------------------------------------------
  12030. # $File: maple,v 1.7 2013/01/11 16:45:23 christos Exp $
  12031. # maple: file(1) magic for maple files
  12032. # "H. Nanosecond" <aldomel@ix.netcom.com>
  12033. # Maple V release 4, a multi-purpose math program
  12034. #
  12035. # maple library .lib
  12036. 0 string \000MVR4\nI MapleVr4 library
  12037. # .ind
  12038. # no magic for these :-(
  12039. # they are compiled indexes for maple files
  12040. # .hdb
  12041. 0 string \000\004\000\000 Maple help database
  12042. # .mhp
  12043. # this has the form <PACKAGE=name>
  12044. 0 string \<PACKAGE= Maple help file
  12045. 0 string \<HELP\ NAME= Maple help file
  12046. 0 string \n\<HELP\ NAME= Maple help file with extra carriage return at start (yuck)
  12047. #0 string #\ Newton Maple help file, old style
  12048. 0 string #\ daub Maple help file, old style
  12049. #0 string #=========== Maple help file, old style
  12050. # .mws
  12051. 0 string \000\000\001\044\000\221 Maple worksheet
  12052. #this is anomalous
  12053. 0 string WriteNow\000\002\000\001\000\000\000\000\100\000\000\000\000\000 Maple worksheet, but weird
  12054. # this has the form {VERSION 2 3 "IBM INTEL NT" "2.3" }\n
  12055. # that is {VERSION major_version miunor_version computer_type version_string}
  12056. 0 string {VERSION\ Maple worksheet
  12057. >9 string >\0 version %.1s.
  12058. >>11 string >\0 %.1s
  12059. # .mps
  12060. 0 string \0\0\001$ Maple something
  12061. # from byte 4 it is either 'nul E' or 'soh R'
  12062. # I think 'nul E' means a file that was saved as a different name
  12063. # a sort of revision marking
  12064. # 'soh R' means new
  12065. >4 string \000\105 An old revision
  12066. >4 string \001\122 The latest save
  12067. # .mpl
  12068. # some of these are the same as .mps above
  12069. #0000000 000 000 001 044 000 105 same as .mps
  12070. #0000000 000 000 001 044 001 122 same as .mps
  12071. 0 string #\n##\ <SHAREFILE= Maple something
  12072. 0 string \n#\n##\ <SHAREFILE= Maple something
  12073. 0 string ##\ <SHAREFILE= Maple something
  12074. 0 string #\r##\ <SHAREFILE= Maple something
  12075. 0 string \r#\r##\ <SHAREFILE= Maple something
  12076. 0 string #\ \r##\ <DESCRIBE> Maple something anomalous.
  12077. #--------------------------------------------
  12078. # marc21: file(1) magic for MARC 21 Format
  12079. #
  12080. # Kevin Ford (kefo@loc.gov)
  12081. #
  12082. # MARC21 formats are for the representation and communication
  12083. # of bibliographic and related information in machine-readable
  12084. # form. For more info, see http://www.loc.gov/marc/
  12085. # leader position 20-21 must be 45
  12086. 20 string 45
  12087. # leader starts with 5 digits, followed by codes specific to MARC format
  12088. >0 regex/1 (^[0-9]{5})[acdnp][^bhlnqsu-z] MARC21 Bibliographic
  12089. !:mime application/marc
  12090. >0 regex/1 (^[0-9]{5})[acdnosx][z] MARC21 Authority
  12091. !:mime application/marc
  12092. >0 regex/1 (^[0-9]{5})[cdn][uvxy] MARC21 Holdings
  12093. !:mime application/marc
  12094. 0 regex/1 (^[0-9]{5})[acdn][w] MARC21 Classification
  12095. !:mime application/marc
  12096. >0 regex/1 (^[0-9]{5})[cdn][q] MARC21 Community
  12097. !:mime application/marc
  12098. # leader position 22-23, should be "00" but is it?
  12099. >0 regex/1 (^.{21})([^0]{2}) (non-conforming)
  12100. !:mime application/marc
  12101. #------------------------------------------------------------------------------
  12102. # $File: mathcad,v 1.5 2009/09/19 16:28:10 christos Exp $
  12103. # mathcad: file(1) magic for Mathcad documents
  12104. # URL: http://www.mathsoft.com/
  12105. # From: Josh Triplett <josh@freedesktop.org>
  12106. 0 string .MCAD\t Mathcad document
  12107. #------------------------------------------------------------------------------
  12108. # $File: mathematica,v 1.7 2009/09/19 16:28:10 christos Exp $
  12109. # mathematica: file(1) magic for mathematica files
  12110. # "H. Nanosecond" <aldomel@ix.netcom.com>
  12111. # Mathematica a multi-purpose math program
  12112. # versions 2.2 and 3.0
  12113. #mathematica .mb
  12114. 0 string \064\024\012\000\035\000\000\000 Mathematica version 2 notebook
  12115. 0 string \064\024\011\000\035\000\000\000 Mathematica version 2 notebook
  12116. # .ma
  12117. # multiple possibilites:
  12118. 0 string (*^\n\n::[\011frontEndVersion\ =\ Mathematica notebook
  12119. #>41 string >\0 %s
  12120. #0 string (*^\n\n::[\011palette Mathematica notebook version 2.x
  12121. #0 string (*^\n\n::[\011Information Mathematica notebook version 2.x
  12122. #>675 string >\0 %s #doesn't work well
  12123. # there may be 'cr' instread of 'nl' in some does this matter?
  12124. # generic:
  12125. 0 string (*^\r\r::[\011 Mathematica notebook version 2.x
  12126. 0 string (*^\r\n\r\n::[\011 Mathematica notebook version 2.x
  12127. 0 string (*^\015 Mathematica notebook version 2.x
  12128. 0 string (*^\n\r\n\r::[\011 Mathematica notebook version 2.x
  12129. 0 string (*^\r::[\011 Mathematica notebook version 2.x
  12130. 0 string (*^\r\n::[\011 Mathematica notebook version 2.x
  12131. 0 string (*^\n\n::[\011 Mathematica notebook version 2.x
  12132. 0 string (*^\n::[\011 Mathematica notebook version 2.x
  12133. # Mathematica .mx files
  12134. #0 string (*This\ is\ a\ Mathematica\ binary\ dump\ file.\ It\ can\ be\ loaded\ with\ Get.*) Mathematica binary file
  12135. 0 string (*This\ is\ a\ Mathematica\ binary\ Mathematica binary file
  12136. #>71 string \000\010\010\010\010\000\000\000\000\000\000\010\100\010\000\000\000
  12137. # >71... is optional
  12138. >88 string >\0 from %s
  12139. # Mathematica files PBF:
  12140. # 115 115 101 120 102 106 000 001 000 000 000 203 000 001 000
  12141. 0 string MMAPBF\000\001\000\000\000\203\000\001\000 Mathematica PBF (fonts I think)
  12142. # .ml files These are menu resources I think
  12143. # these start with "[0-9][0-9][0-9]\ A~[0-9][0-9][0-9]\
  12144. # how to put that into a magic rule?
  12145. 4 string \ A~ MAthematica .ml file
  12146. # .nb files
  12147. #too long 0 string (***********************************************************************\n\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Mathematica-Compatible Notebook Mathematica 3.0 notebook
  12148. 0 string (*********************** Mathematica 3.0 notebook
  12149. # other (* matches it is a comment start in these langs
  12150. # GRR: Too weak; also matches other languages e.g. ML
  12151. #0 string (* Mathematica, or Pascal, Modula-2 or 3 code text
  12152. #########################
  12153. # MatLab v5
  12154. 0 string MATLAB Matlab v5 mat-file
  12155. >126 short 0x494d (big endian)
  12156. >>124 beshort x version 0x%04x
  12157. >126 short 0x4d49 (little endian)
  12158. >>124 leshort x version 0x%04x
  12159. #------------------------------------------------------------------------------
  12160. # $File: matroska,v 1.8 2013/02/08 17:25:16 christos Exp $
  12161. # matroska: file(1) magic for Matroska files
  12162. #
  12163. # See http://www.matroska.org/
  12164. #
  12165. # EBML id:
  12166. 0 belong 0x1a45dfa3
  12167. # DocType id:
  12168. >4 search/4096 \x42\x82
  12169. # DocType contents:
  12170. >>&1 string webm WebM
  12171. !:mime video/webm
  12172. >>&1 string matroska Matroska data
  12173. !:mime video/x-matroska
  12174. #------------------------------------------------------------------------------
  12175. # $File: mcrypt,v 1.5 2009/09/19 16:28:10 christos Exp $
  12176. # Mavroyanopoulos Nikos <nmav@hellug.gr>
  12177. # mcrypt: file(1) magic for mcrypt 2.2.x;
  12178. 0 string \0m\3 mcrypt 2.5 encrypted data,
  12179. >4 string >\0 algorithm: %s,
  12180. >>&1 leshort >0 keysize: %d bytes,
  12181. >>>&0 string >\0 mode: %s,
  12182. 0 string \0m\2 mcrypt 2.2 encrypted data,
  12183. >3 byte 0 algorithm: blowfish-448,
  12184. >3 byte 1 algorithm: DES,
  12185. >3 byte 2 algorithm: 3DES,
  12186. >3 byte 3 algorithm: 3-WAY,
  12187. >3 byte 4 algorithm: GOST,
  12188. >3 byte 6 algorithm: SAFER-SK64,
  12189. >3 byte 7 algorithm: SAFER-SK128,
  12190. >3 byte 8 algorithm: CAST-128,
  12191. >3 byte 9 algorithm: xTEA,
  12192. >3 byte 10 algorithm: TWOFISH-128,
  12193. >3 byte 11 algorithm: RC2,
  12194. >3 byte 12 algorithm: TWOFISH-192,
  12195. >3 byte 13 algorithm: TWOFISH-256,
  12196. >3 byte 14 algorithm: blowfish-128,
  12197. >3 byte 15 algorithm: blowfish-192,
  12198. >3 byte 16 algorithm: blowfish-256,
  12199. >3 byte 100 algorithm: RC6,
  12200. >3 byte 101 algorithm: IDEA,
  12201. >4 byte 0 mode: CBC,
  12202. >4 byte 1 mode: ECB,
  12203. >4 byte 2 mode: CFB,
  12204. >4 byte 3 mode: OFB,
  12205. >4 byte 4 mode: nOFB,
  12206. >5 byte 0 keymode: 8bit
  12207. >5 byte 1 keymode: 4bit
  12208. >5 byte 2 keymode: SHA-1 hash
  12209. >5 byte 3 keymode: MD5 hash
  12210. #------------------------------------------------------------------------------
  12211. # $File: mercurial,v 1.4 2009/09/19 16:28:10 christos Exp $
  12212. # mercurial: file(1) magic for Mercurial changeset bundles
  12213. # http://www.selenic.com/mercurial/wiki/
  12214. #
  12215. # Jesse Glick (jesse.glick@sun.com)
  12216. #
  12217. 0 string HG10 Mercurial changeset bundle
  12218. >4 string UN (uncompressed)
  12219. >4 string GZ (gzip compressed)
  12220. >4 string BZ (bzip2 compressed)
  12221. #------------------------------------------------------------------------------
  12222. # $File: metastore,v 1.1 2011/04/06 12:37:44 christos Exp $
  12223. # metastore: file(1) magic for metastore files
  12224. # From: Thomas Wissen
  12225. # see http://david.hardeman.nu/software.php#metastore
  12226. 0 string MeTaSt00r3 Metastore data file,
  12227. >10 bequad x version %0llx
  12228. #------------------------------------------------------------------------------
  12229. # $File: mime,v 1.6 2010/11/25 15:00:12 christos Exp $
  12230. # mime: file(1) magic for MIME encoded files
  12231. #
  12232. 0 string/t Content-Type:\
  12233. >14 string >\0 %s
  12234. 0 string/t Content-Type:
  12235. >13 string >\0 %s
  12236. #------------------------------------------------------------------------------
  12237. # $File: mips,v 1.9 2013/01/12 03:09:51 christos Exp $
  12238. # mips: file(1) magic for MIPS ECOFF and Ucode, as used in SGI IRIX
  12239. # and DEC Ultrix
  12240. #
  12241. 0 beshort 0x0160 MIPSEB ECOFF executable
  12242. >20 beshort 0407 (impure)
  12243. >20 beshort 0410 (swapped)
  12244. >20 beshort 0413 (paged)
  12245. >8 belong >0 not stripped
  12246. >8 belong 0 stripped
  12247. >22 byte x - version %ld
  12248. >23 byte x \b.%ld
  12249. #
  12250. 0 beshort 0x0162 MIPSEL-BE ECOFF executable
  12251. >20 beshort 0407 (impure)
  12252. >20 beshort 0410 (swapped)
  12253. >20 beshort 0413 (paged)
  12254. >8 belong >0 not stripped
  12255. >8 belong 0 stripped
  12256. >23 byte x - version %d
  12257. >22 byte x \b.%ld
  12258. #
  12259. 0 beshort 0x6001 MIPSEB-LE ECOFF executable
  12260. >20 beshort 03401 (impure)
  12261. >20 beshort 04001 (swapped)
  12262. >20 beshort 05401 (paged)
  12263. >8 belong >0 not stripped
  12264. >8 belong 0 stripped
  12265. >23 byte x - version %d
  12266. >22 byte x \b.%ld
  12267. #
  12268. 0 beshort 0x6201 MIPSEL ECOFF executable
  12269. >20 beshort 03401 (impure)
  12270. >20 beshort 04001 (swapped)
  12271. >20 beshort 05401 (paged)
  12272. >8 belong >0 not stripped
  12273. >8 belong 0 stripped
  12274. >23 byte x - version %ld
  12275. >22 byte x \b.%ld
  12276. #
  12277. # MIPS 2 additions
  12278. #
  12279. 0 beshort 0x0163 MIPSEB MIPS-II ECOFF executable
  12280. >20 beshort 0407 (impure)
  12281. >20 beshort 0410 (swapped)
  12282. >20 beshort 0413 (paged)
  12283. >8 belong >0 not stripped
  12284. >8 belong 0 stripped
  12285. >22 byte x - version %ld
  12286. >23 byte x \b.%ld
  12287. #
  12288. 0 beshort 0x0166 MIPSEL-BE MIPS-II ECOFF executable
  12289. >20 beshort 0407 (impure)
  12290. >20 beshort 0410 (swapped)
  12291. >20 beshort 0413 (paged)
  12292. >8 belong >0 not stripped
  12293. >8 belong 0 stripped
  12294. >22 byte x - version %ld
  12295. >23 byte x \b.%ld
  12296. #
  12297. 0 beshort 0x6301 MIPSEB-LE MIPS-II ECOFF executable
  12298. >20 beshort 03401 (impure)
  12299. >20 beshort 04001 (swapped)
  12300. >20 beshort 05401 (paged)
  12301. >8 belong >0 not stripped
  12302. >8 belong 0 stripped
  12303. >23 byte x - version %ld
  12304. >22 byte x \b.%ld
  12305. #
  12306. 0 beshort 0x6601 MIPSEL MIPS-II ECOFF executable
  12307. >20 beshort 03401 (impure)
  12308. >20 beshort 04001 (swapped)
  12309. >20 beshort 05401 (paged)
  12310. >8 belong >0 not stripped
  12311. >8 belong 0 stripped
  12312. >23 byte x - version %ld
  12313. >22 byte x \b.%ld
  12314. #
  12315. # MIPS 3 additions
  12316. #
  12317. 0 beshort 0x0140 MIPSEB MIPS-III ECOFF executable
  12318. >20 beshort 0407 (impure)
  12319. >20 beshort 0410 (swapped)
  12320. >20 beshort 0413 (paged)
  12321. >8 belong >0 not stripped
  12322. >8 belong 0 stripped
  12323. >22 byte x - version %ld
  12324. >23 byte x \b.%ld
  12325. #
  12326. 0 beshort 0x0142 MIPSEL-BE MIPS-III ECOFF executable
  12327. >20 beshort 0407 (impure)
  12328. >20 beshort 0410 (swapped)
  12329. >20 beshort 0413 (paged)
  12330. >8 belong >0 not stripped
  12331. >8 belong 0 stripped
  12332. >22 byte x - version %ld
  12333. >23 byte x \b.%ld
  12334. #
  12335. 0 beshort 0x4001 MIPSEB-LE MIPS-III ECOFF executable
  12336. >20 beshort 03401 (impure)
  12337. >20 beshort 04001 (swapped)
  12338. >20 beshort 05401 (paged)
  12339. >8 belong >0 not stripped
  12340. >8 belong 0 stripped
  12341. >23 byte x - version %ld
  12342. >22 byte x \b.%ld
  12343. #
  12344. 0 beshort 0x4201 MIPSEL MIPS-III ECOFF executable
  12345. >20 beshort 03401 (impure)
  12346. >20 beshort 04001 (swapped)
  12347. >20 beshort 05401 (paged)
  12348. >8 belong >0 not stripped
  12349. >8 belong 0 stripped
  12350. >23 byte x - version %ld
  12351. >22 byte x \b.%ld
  12352. #
  12353. 0 beshort 0x180 MIPSEB Ucode
  12354. 0 beshort 0x182 MIPSEL-BE Ucode
  12355. #------------------------------------------------------------------------------
  12356. # $File: mirage,v 1.7 2009/09/19 16:28:10 christos Exp $
  12357. # mirage: file(1) magic for Mirage executables
  12358. #
  12359. # XXX - byte order?
  12360. #
  12361. 0 long 31415 Mirage Assembler m.out executable
  12362. #-----------------------------------------------------------------------------
  12363. # $File: misctools,v 1.13 2013/01/16 13:53:10 christos Exp $
  12364. # misctools: file(1) magic for miscellaneous UNIX tools.
  12365. #
  12366. 0 search/1 %%!! X-Post-It-Note text
  12367. 0 string/c BEGIN:VCALENDAR vCalendar calendar file
  12368. !:mime text/calendar
  12369. 0 string/c BEGIN:VCARD vCard visiting card
  12370. !:mime text/x-vcard
  12371. # Summary: Libtool library file
  12372. # Extension: .la
  12373. # Submitted by: Tomasz Trojanowski <tomek@uninet.com.pl>
  12374. 0 search/80 .la\ -\ a\ libtool\ library\ file libtool library file
  12375. # Summary: Libtool object file
  12376. # Extension: .lo
  12377. # Submitted by: Abel Cheung <abelcheung@gmail.com>
  12378. 0 search/80 .lo\ -\ a\ libtool\ object\ file libtool object file
  12379. # From: Daniel Novotny <dnovotny@redhat.com>
  12380. 0 string MDMP\x93\xA7 MDMP crash report data
  12381. #------------------------------------------------------------------------------
  12382. # $File: mkid,v 1.6 2009/09/19 16:28:10 christos Exp $
  12383. # mkid: file(1) magic for mkid(1) databases
  12384. #
  12385. # ID is the binary tags database produced by mkid(1).
  12386. #
  12387. # XXX - byte order?
  12388. #
  12389. 0 string \311\304 ID tags data
  12390. >2 short >0 version %d
  12391. #------------------------------------------------------------------------------
  12392. # $File: mlssa,v 1.4 2009/09/19 16:28:10 christos Exp $
  12393. # mlssa: file(1) magic for MLSSA datafiles
  12394. #
  12395. 0 lelong 0xffffabcd MLSSA datafile,
  12396. >4 leshort x algorithm %d,
  12397. >10 lelong x %d samples
  12398. #------------------------------------------------------------------------------
  12399. # $File: mmdf,v 1.6 2009/09/19 16:28:10 christos Exp $
  12400. # mmdf: file(1) magic for MMDF mail files
  12401. #
  12402. 0 string \001\001\001\001 MMDF mailbox
  12403. #------------------------------------------------------------------------------
  12404. # $File: modem,v 1.5 2010/09/20 18:55:20 rrt Exp $
  12405. # modem: file(1) magic for modem programs
  12406. #
  12407. # From: Florian La Roche <florian@knorke.saar.de>
  12408. 1 string PC\ Research,\ Inc Digifax-G3-File
  12409. >29 byte 1 \b, fine resolution
  12410. >29 byte 0 \b, normal resolution
  12411. 0 short 0x0100 raw G3 data, byte-padded
  12412. 0 short 0x1400 raw G3 data
  12413. #
  12414. # Magic data for vgetty voice formats
  12415. # (Martin Seine & Marc Eberhard)
  12416. #
  12417. # raw modem data version 1
  12418. #
  12419. 0 string RMD1 raw modem data
  12420. >4 string >\0 (%s /
  12421. >20 short >0 compression type 0x%04x)
  12422. #
  12423. # portable voice format 1
  12424. #
  12425. 0 string PVF1\n portable voice format
  12426. >5 string >\0 (binary %s)
  12427. #
  12428. # portable voice format 2
  12429. #
  12430. 0 string PVF2\n portable voice format
  12431. >5 string >\0 (ascii %s)
  12432. #------------------------------------------------------------------------------
  12433. # $File: motorola,v 1.10 2009/09/19 16:28:11 christos Exp $
  12434. # motorola: file(1) magic for Motorola 68K and 88K binaries
  12435. #
  12436. # 68K
  12437. #
  12438. 0 beshort 0520 mc68k COFF
  12439. >18 beshort ^00000020 object
  12440. >18 beshort &00000020 executable
  12441. >12 belong >0 not stripped
  12442. >168 string .lowmem Apple toolbox
  12443. >20 beshort 0407 (impure)
  12444. >20 beshort 0410 (pure)
  12445. >20 beshort 0413 (demand paged)
  12446. >20 beshort 0421 (standalone)
  12447. 0 beshort 0521 mc68k executable (shared)
  12448. >12 belong >0 not stripped
  12449. 0 beshort 0522 mc68k executable (shared demand paged)
  12450. >12 belong >0 not stripped
  12451. #
  12452. # Motorola/UniSoft 68K Binary Compatibility Standard (BCS)
  12453. #
  12454. 0 beshort 0554 68K BCS executable
  12455. #
  12456. # 88K
  12457. #
  12458. # Motorola/88Open BCS
  12459. #
  12460. 0 beshort 0555 88K BCS executable
  12461. #
  12462. # Motorola S-Records, from Gerd Truschinski <gt@freebsd.first.gmd.de>
  12463. 0 string S0 Motorola S-Record; binary data in text format
  12464. # ATARI ST relocatable PRG
  12465. #
  12466. # from Oskar Schirmer <schirmer@scara.com> Feb 3, 2001
  12467. # (according to Roland Waldi, Oct 21, 1987)
  12468. # besides the magic 0x601a, the text segment size is checked to be
  12469. # not larger than 1 MB (which is a lot on ST).
  12470. # The additional 0x601b distinction I took from Doug Lee's magic.
  12471. 0 belong&0xFFFFFFF0 0x601A0000 Atari ST M68K contiguous executable
  12472. >2 belong x (txt=%ld,
  12473. >6 belong x dat=%ld,
  12474. >10 belong x bss=%ld,
  12475. >14 belong x sym=%ld)
  12476. 0 belong&0xFFFFFFF0 0x601B0000 Atari ST M68K non-contig executable
  12477. >2 belong x (txt=%ld,
  12478. >6 belong x dat=%ld,
  12479. >10 belong x bss=%ld,
  12480. >14 belong x sym=%ld)
  12481. # Atari ST/TT... program format (sent by Wolfram Kleff <kleff@cs.uni-bonn.de>)
  12482. 0 beshort 0x601A Atari 68xxx executable,
  12483. >2 belong x text len %lu,
  12484. >6 belong x data len %lu,
  12485. >10 belong x BSS len %lu,
  12486. >14 belong x symboltab len %lu,
  12487. >18 belong 0
  12488. >22 belong &0x01 fastload flag,
  12489. >22 belong &0x02 may be loaded to alternate RAM,
  12490. >22 belong &0x04 malloc may be from alternate RAM,
  12491. >22 belong x flags: 0x%lX,
  12492. >26 beshort 0 no relocation tab
  12493. >26 beshort !0 + relocation tab
  12494. >30 string SFX [Self-Extracting LZH SFX archive]
  12495. >38 string SFX [Self-Extracting LZH SFX archive]
  12496. >44 string ZIP! [Self-Extracting ZIP SFX archive]
  12497. 0 beshort 0x0064 Atari 68xxx CPX file
  12498. >8 beshort x (version %04lx)
  12499. #------------------------------------------------------------------------------
  12500. # $File: mozilla,v 1.4 2009/09/19 16:28:11 christos Exp $
  12501. # mozilla: file(1) magic for Mozilla XUL fastload files
  12502. # (XUL.mfasl and XPC.mfasl)
  12503. # URL: http://www.mozilla.org/
  12504. # From: Josh Triplett <josh@freedesktop.org>
  12505. 0 string XPCOM\nMozFASL\r\n\x1A Mozilla XUL fastload data
  12506. #------------------------------------------------------------------------------
  12507. # $File: msdos,v 1.86 2014/01/08 22:10:18 christos Exp $
  12508. # msdos: file(1) magic for MS-DOS files
  12509. #
  12510. # .BAT files (Daniel Quinlan, quinlan@yggdrasil.com)
  12511. # updated by Joerg Jenderek at Oct 2008,Apr 2011
  12512. 0 string/t @
  12513. >1 string/cW \ echo\ off DOS batch file text
  12514. !:mime text/x-msdos-batch
  12515. >1 string/cW echo\ off DOS batch file text
  12516. !:mime text/x-msdos-batch
  12517. >1 string/cW rem DOS batch file text
  12518. !:mime text/x-msdos-batch
  12519. >1 string/cW set\ DOS batch file text
  12520. !:mime text/x-msdos-batch
  12521. # OS/2 batch files are REXX. the second regex is a bit generic, oh well
  12522. # the matched commands seem to be common in REXX and uncommon elsewhere
  12523. 100 search/0xffff rxfuncadd
  12524. >100 regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text
  12525. 100 search/0xffff say
  12526. >100 regex/c =^[\ \t]{0,10}say\ ['"] OS/2 REXX batch file text
  12527. 0 leshort 0x14c MS Windows COFF Intel 80386 object file
  12528. #>4 ledate x stamp %s
  12529. 0 leshort 0x166 MS Windows COFF MIPS R4000 object file
  12530. #>4 ledate x stamp %s
  12531. 0 leshort 0x184 MS Windows COFF Alpha object file
  12532. #>4 ledate x stamp %s
  12533. 0 leshort 0x268 MS Windows COFF Motorola 68000 object file
  12534. #>4 ledate x stamp %s
  12535. 0 leshort 0x1f0 MS Windows COFF PowerPC object file
  12536. #>4 ledate x stamp %s
  12537. 0 leshort 0x290 MS Windows COFF PA-RISC object file
  12538. #>4 ledate x stamp %s
  12539. # Tests for various EXE types.
  12540. #
  12541. # Many of the compressed formats were extraced from IDARC 1.23 source code.
  12542. #
  12543. 0 string/b MZ
  12544. !:mime application/x-dosexec
  12545. # All non-DOS EXE extensions have the relocation table more than 0x40 bytes into the file.
  12546. >0x18 leshort <0x40 MS-DOS executable
  12547. # These traditional tests usually work but not always. When test quality support is
  12548. # implemented these can be turned on.
  12549. #>>0x18 leshort 0x1c (Borland compiler)
  12550. #>>0x18 leshort 0x1e (MS compiler)
  12551. # If the relocation table is 0x40 or more bytes into the file, it's definitely
  12552. # not a DOS EXE.
  12553. >0x18 leshort >0x3f
  12554. # Maybe it's a PE?
  12555. >>(0x3c.l) string PE\0\0 PE
  12556. >>>(0x3c.l+24) leshort 0x010b \b32 executable
  12557. >>>(0x3c.l+24) leshort 0x020b \b32+ executable
  12558. >>>(0x3c.l+24) leshort 0x0107 ROM image
  12559. >>>(0x3c.l+24) default x Unknown PE signature
  12560. >>>>&0 leshort x 0x%x
  12561. >>>(0x3c.l+22) leshort&0x2000 >0 (DLL)
  12562. >>>(0x3c.l+92) leshort 1 (native)
  12563. >>>(0x3c.l+92) leshort 2 (GUI)
  12564. >>>(0x3c.l+92) leshort 3 (console)
  12565. >>>(0x3c.l+92) leshort 7 (POSIX)
  12566. >>>(0x3c.l+92) leshort 9 (Windows CE)
  12567. >>>(0x3c.l+92) leshort 10 (EFI application)
  12568. >>>(0x3c.l+92) leshort 11 (EFI boot service driver)
  12569. >>>(0x3c.l+92) leshort 12 (EFI runtime driver)
  12570. >>>(0x3c.l+92) leshort 13 (EFI ROM)
  12571. >>>(0x3c.l+92) leshort 14 (XBOX)
  12572. >>>(0x3c.l+92) leshort 15 (Windows boot application)
  12573. >>>(0x3c.l+92) default x (Unknown subsystem
  12574. >>>>&0 leshort x 0x%x)
  12575. >>>(0x3c.l+4) leshort 0x14c Intel 80386
  12576. >>>(0x3c.l+4) leshort 0x166 MIPS R4000
  12577. >>>(0x3c.l+4) leshort 0x168 MIPS R10000
  12578. >>>(0x3c.l+4) leshort 0x184 Alpha
  12579. >>>(0x3c.l+4) leshort 0x1a2 Hitachi SH3
  12580. >>>(0x3c.l+4) leshort 0x1a6 Hitachi SH4
  12581. >>>(0x3c.l+4) leshort 0x1c0 ARM
  12582. >>>(0x3c.l+4) leshort 0x1c2 ARM Thumb
  12583. >>>(0x3c.l+4) leshort 0x1c4 ARMv7 Thumb
  12584. >>>(0x3c.l+4) leshort 0x1f0 PowerPC
  12585. >>>(0x3c.l+4) leshort 0x200 Intel Itanium
  12586. >>>(0x3c.l+4) leshort 0x266 MIPS16
  12587. >>>(0x3c.l+4) leshort 0x268 Motorola 68000
  12588. >>>(0x3c.l+4) leshort 0x290 PA-RISC
  12589. >>>(0x3c.l+4) leshort 0x366 MIPSIV
  12590. >>>(0x3c.l+4) leshort 0x466 MIPS16 with FPU
  12591. >>>(0x3c.l+4) leshort 0xebc EFI byte code
  12592. >>>(0x3c.l+4) leshort 0x8664 x86-64
  12593. >>>(0x3c.l+4) leshort 0xc0ee MSIL
  12594. >>>(0x3c.l+4) default x Unknown processor type
  12595. >>>>&0 leshort x 0x%x
  12596. >>>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB)
  12597. >>>(0x3c.l+22) leshort&0x1000 >0 system file
  12598. >>>(0x3c.l+24) leshort 0x010b
  12599. >>>>(0x3c.l+232) lelong >0 Mono/.Net assembly
  12600. >>>(0x3c.l+24) leshort 0x020b
  12601. >>>>(0x3c.l+248) lelong >0 Mono/.Net assembly
  12602. # hooray, there's a DOS extender using the PE format, with a valid PE
  12603. # executable inside (which just prints a message and exits if run in win)
  12604. >>>(8.s*16) string 32STUB \b, 32rtm DOS extender
  12605. >>>(8.s*16) string !32STUB \b, for MS Windows
  12606. >>>(0x3c.l+0xf8) string UPX0 \b, UPX compressed
  12607. >>>(0x3c.l+0xf8) search/0x140 PEC2 \b, PECompact2 compressed
  12608. >>>(0x3c.l+0xf8) search/0x140 UPX2
  12609. >>>>(&0x10.l+(-4)) string PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
  12610. >>>(0x3c.l+0xf8) search/0x140 .idata
  12611. >>>>(&0xe.l+(-4)) string PK\3\4 \b, ZIP self-extracting archive (Info-Zip)
  12612. >>>>(&0xe.l+(-4)) string ZZ0 \b, ZZip self-extracting archive
  12613. >>>>(&0xe.l+(-4)) string ZZ1 \b, ZZip self-extracting archive
  12614. >>>(0x3c.l+0xf8) search/0x140 .rsrc
  12615. >>>>(&0x0f.l+(-4)) string a\\\4\5 \b, WinHKI self-extracting archive
  12616. >>>>(&0x0f.l+(-4)) string Rar! \b, RAR self-extracting archive
  12617. >>>>(&0x0f.l+(-4)) search/0x3000 MSCF \b, InstallShield self-extracting archive
  12618. >>>>(&0x0f.l+(-4)) search/32 Nullsoft \b, Nullsoft Installer self-extracting archive
  12619. >>>(0x3c.l+0xf8) search/0x140 .data
  12620. >>>>(&0x0f.l) string WEXTRACT \b, MS CAB-Installer self-extracting archive
  12621. >>>(0x3c.l+0xf8) search/0x140 .petite\0 \b, Petite compressed
  12622. >>>>(0x3c.l+0xf7) byte x
  12623. >>>>>(&0x104.l+(-4)) string =!sfx! \b, ACE self-extracting archive
  12624. >>>(0x3c.l+0xf8) search/0x140 .WISE \b, WISE installer self-extracting archive
  12625. >>>(0x3c.l+0xf8) search/0x140 .dz\0\0\0 \b, Dzip self-extracting archive
  12626. >>>&(0x3c.l+0xf8) search/0x100 _winzip_ \b, ZIP self-extracting archive (WinZip)
  12627. >>>&(0x3c.l+0xf8) search/0x100 SharedD \b, Microsoft Installer self-extracting archive
  12628. >>>0x30 string Inno \b, InnoSetup self-extracting archive
  12629. # Hmm, not a PE but the relocation table is too high for a traditional DOS exe,
  12630. # must be one of the unusual subformats.
  12631. >>(0x3c.l) string !PE\0\0 MS-DOS executable
  12632. >>(0x3c.l) string NE \b, NE
  12633. >>>(0x3c.l+0x36) byte 1 for OS/2 1.x
  12634. >>>(0x3c.l+0x36) byte 2 for MS Windows 3.x
  12635. >>>(0x3c.l+0x36) byte 3 for MS-DOS
  12636. >>>(0x3c.l+0x36) byte 4 for Windows 386
  12637. >>>(0x3c.l+0x36) byte 5 for Borland Operating System Services
  12638. >>>(0x3c.l+0x36) default x
  12639. >>>>(0x3c.l+0x36) byte x (unknown OS %x)
  12640. >>>(0x3c.l+0x36) byte 0x81 for MS-DOS, Phar Lap DOS extender
  12641. >>>(0x3c.l+0x0c) leshort&0x8003 0x8002 (DLL)
  12642. >>>(0x3c.l+0x0c) leshort&0x8003 0x8001 (driver)
  12643. >>>&(&0x24.s-1) string ARJSFX \b, ARJ self-extracting archive
  12644. >>>(0x3c.l+0x70) search/0x80 WinZip(R)\ Self-Extractor \b, ZIP self-extracting archive (WinZip)
  12645. >>(0x3c.l) string LX\0\0 \b, LX
  12646. >>>(0x3c.l+0x0a) leshort <1 (unknown OS)
  12647. >>>(0x3c.l+0x0a) leshort 1 for OS/2
  12648. >>>(0x3c.l+0x0a) leshort 2 for MS Windows
  12649. >>>(0x3c.l+0x0a) leshort 3 for DOS
  12650. >>>(0x3c.l+0x0a) leshort >3 (unknown OS)
  12651. >>>(0x3c.l+0x10) lelong&0x28000 =0x8000 (DLL)
  12652. >>>(0x3c.l+0x10) lelong&0x20000 >0 (device driver)
  12653. >>>(0x3c.l+0x10) lelong&0x300 0x300 (GUI)
  12654. >>>(0x3c.l+0x10) lelong&0x28300 <0x300 (console)
  12655. >>>(0x3c.l+0x08) leshort 1 i80286
  12656. >>>(0x3c.l+0x08) leshort 2 i80386
  12657. >>>(0x3c.l+0x08) leshort 3 i80486
  12658. >>>(8.s*16) string emx \b, emx
  12659. >>>>&1 string x %s
  12660. >>>&(&0x54.l-3) string arjsfx \b, ARJ self-extracting archive
  12661. # MS Windows system file, supposedly a collection of LE executables
  12662. >>(0x3c.l) string W3 \b, W3 for MS Windows
  12663. >>(0x3c.l) string LE\0\0 \b, LE executable
  12664. >>>(0x3c.l+0x0a) leshort 1
  12665. # some DOS extenders use LE files with OS/2 header
  12666. >>>>0x240 search/0x100 DOS/4G for MS-DOS, DOS4GW DOS extender
  12667. >>>>0x240 search/0x200 WATCOM\ C/C++ for MS-DOS, DOS4GW DOS extender
  12668. >>>>0x440 search/0x100 CauseWay\ DOS\ Extender for MS-DOS, CauseWay DOS extender
  12669. >>>>0x40 search/0x40 PMODE/W for MS-DOS, PMODE/W DOS extender
  12670. >>>>0x40 search/0x40 STUB/32A for MS-DOS, DOS/32A DOS extender (stub)
  12671. >>>>0x40 search/0x80 STUB/32C for MS-DOS, DOS/32A DOS extender (configurable stub)
  12672. >>>>0x40 search/0x80 DOS/32A for MS-DOS, DOS/32A DOS extender (embedded)
  12673. # this is a wild guess; hopefully it is a specific signature
  12674. >>>>&0x24 lelong <0x50
  12675. >>>>>(&0x4c.l) string \xfc\xb8WATCOM
  12676. >>>>>>&0 search/8 3\xdbf\xb9 \b, 32Lite compressed
  12677. # another wild guess: if real OS/2 LE executables exist, they probably have higher start EIP
  12678. #>>>>(0x3c.l+0x1c) lelong >0x10000 for OS/2
  12679. # fails with DOS-Extenders.
  12680. >>>(0x3c.l+0x0a) leshort 2 for MS Windows
  12681. >>>(0x3c.l+0x0a) leshort 3 for DOS
  12682. >>>(0x3c.l+0x0a) leshort 4 for MS Windows (VxD)
  12683. >>>(&0x7c.l+0x26) string UPX \b, UPX compressed
  12684. >>>&(&0x54.l-3) string UNACE \b, ACE self-extracting archive
  12685. # looks like ASCII, probably some embedded copyright message.
  12686. # and definitely not NE/LE/LX/PE
  12687. >>0x3c lelong >0x20000000
  12688. >>>(4.s*512) leshort !0x014c \b, MZ for MS-DOS
  12689. # header data too small for extended executable
  12690. >2 long !0
  12691. >>0x18 leshort <0x40
  12692. >>>(4.s*512) leshort !0x014c
  12693. >>>>&(2.s-514) string !LE
  12694. >>>>>&-2 string !BW \b, MZ for MS-DOS
  12695. >>>>&(2.s-514) string LE \b, LE
  12696. >>>>>0x240 search/0x100 DOS/4G for MS-DOS, DOS4GW DOS extender
  12697. # educated guess since indirection is still not capable enough for complex offset
  12698. # calculations (next embedded executable would be at &(&2*512+&0-2)
  12699. # I suspect there are only LE executables in these multi-exe files
  12700. >>>>&(2.s-514) string BW
  12701. >>>>>0x240 search/0x100 DOS/4G ,\b LE for MS-DOS, DOS4GW DOS extender (embedded)
  12702. >>>>>0x240 search/0x100 !DOS/4G ,\b BW collection for MS-DOS
  12703. # This sequence skips to the first COFF segment, usually .text
  12704. >(4.s*512) leshort 0x014c \b, COFF
  12705. >>(8.s*16) string go32stub for MS-DOS, DJGPP go32 DOS extender
  12706. >>(8.s*16) string emx
  12707. >>>&1 string x for DOS, Win or OS/2, emx %s
  12708. >>&(&0x42.l-3) byte x
  12709. >>>&0x26 string UPX \b, UPX compressed
  12710. # and yet another guess: small .text, and after large .data is unusal, could be 32lite
  12711. >>&0x2c search/0xa0 .text
  12712. >>>&0x0b lelong <0x2000
  12713. >>>>&0 lelong >0x6000 \b, 32lite compressed
  12714. >(8.s*16) string $WdX \b, WDos/X DOS extender
  12715. # By now an executable type should have been printed out. The executable
  12716. # may be a self-uncompressing archive, so look for evidence of that and
  12717. # print it out.
  12718. #
  12719. # Some signatures below from Greg Roelofs, newt@uchicago.edu.
  12720. #
  12721. >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
  12722. >0xe7 string LH/2\ Self-Extract \b, %s
  12723. >0x1c string UC2X \b, UCEXE compressed
  12724. >0x1c string WWP\ \b, WWPACK compressed
  12725. >0x1c string RJSX \b, ARJ self-extracting archive
  12726. >0x1c string diet \b, diet compressed
  12727. >0x1c string LZ09 \b, LZEXE v0.90 compressed
  12728. >0x1c string LZ91 \b, LZEXE v0.91 compressed
  12729. >0x1c string tz \b, TinyProg compressed
  12730. >0x1e string Copyright\ 1989-1990\ PKWARE\ Inc. Self-extracting PKZIP archive
  12731. !:mime application/zip
  12732. # Yes, this really is "Copr", not "Corp."
  12733. >0x1e string PKLITE\ Copr. Self-extracting PKZIP archive
  12734. !:mime application/zip
  12735. # winarj stores a message in the stub instead of the sig in the MZ header
  12736. >0x20 search/0xe0 aRJsfX \b, ARJ self-extracting archive
  12737. >0x20 string AIN
  12738. >>0x23 string 2 \b, AIN 2.x compressed
  12739. >>0x23 string <2 \b, AIN 1.x compressed
  12740. >>0x23 string >2 \b, AIN 1.x compressed
  12741. >0x24 string LHa's\ SFX \b, LHa self-extracting archive
  12742. !:mime application/x-lha
  12743. >0x24 string LHA's\ SFX \b, LHa self-extracting archive
  12744. !:mime application/x-lha
  12745. >0x24 string \ $ARX \b, ARX self-extracting archive
  12746. >0x24 string \ $LHarc \b, LHarc self-extracting archive
  12747. >0x20 string SFX\ by\ LARC \b, LARC self-extracting archive
  12748. >0x40 string aPKG \b, aPackage self-extracting archive
  12749. >0x64 string W\ Collis\0\0 \b, Compack compressed
  12750. >0x7a string Windows\ self-extracting\ ZIP \b, ZIP self-extracting archive
  12751. >>&0xf4 search/0x140 \x0\x40\x1\x0
  12752. >>>(&0.l+(4)) string MSCF \b, WinHKI CAB self-extracting archive
  12753. >1638 string -lh5- \b, LHa self-extracting archive v2.13S
  12754. >0x17888 string Rar! \b, RAR self-extracting archive
  12755. # Skip to the end of the EXE. This will usually work fine in the PE case
  12756. # because the MZ image is hardcoded into the toolchain and almost certainly
  12757. # won't match any of these signatures.
  12758. >(4.s*512) long x
  12759. >>&(2.s-517) byte x
  12760. >>>&0 string PK\3\4 \b, ZIP self-extracting archive
  12761. >>>&0 string Rar! \b, RAR self-extracting archive
  12762. >>>&0 string =!\x11 \b, AIN 2.x self-extracting archive
  12763. >>>&0 string =!\x12 \b, AIN 2.x self-extracting archive
  12764. >>>&0 string =!\x17 \b, AIN 1.x self-extracting archive
  12765. >>>&0 string =!\x18 \b, AIN 1.x self-extracting archive
  12766. >>>&7 search/400 **ACE** \b, ACE self-extracting archive
  12767. >>>&0 search/0x480 UC2SFX\ Header \b, UC2 self-extracting archive
  12768. # a few unknown ZIP sfxes, no idea if they are needed or if they are
  12769. # already captured by the generic patterns above
  12770. >(8.s*16) search/0x20 PKSFX \b, ZIP self-extracting archive (PKZIP)
  12771. # TODO: how to add this? >FileSize-34 string Windows\ Self-Installing\ Executable \b, ZIP self-extracting archive
  12772. #
  12773. # TELVOX Teleinformatica CODEC self-extractor for OS/2:
  12774. >49801 string \x79\xff\x80\xff\x76\xff \b, CODEC archive v3.21
  12775. >>49824 leshort =1 \b, 1 file
  12776. >>49824 leshort >1 \b, %u files
  12777. # added by Joerg Jenderek of http://www.freedos.org/software/?prog=kc
  12778. # and http://www.freedos.org/software/?prog=kpdos
  12779. # for FreeDOS files like KEYBOARD.SYS, KEYBRD2.SYS, KEYBRD3.SYS, *.KBD
  12780. 0 string/b KCF FreeDOS KEYBoard Layout collection
  12781. # only version=0x100 found
  12782. >3 uleshort x \b, version 0x%x
  12783. # length of string containing author,info and special characters
  12784. >6 ubyte >0
  12785. #>>6 pstring x \b, name=%s
  12786. >>7 string >\0 \b, author=%-.14s
  12787. >>7 search/254 \xff \b, info=
  12788. #>>>&0 string x \b%-s
  12789. >>>&0 string x \b%-.15s
  12790. # for FreeDOS *.KL files
  12791. 0 string/b KLF FreeDOS KEYBoard Layout file
  12792. # only version=0x100 or 0x101 found
  12793. >3 uleshort x \b, version 0x%x
  12794. # stringlength
  12795. >5 ubyte >0
  12796. >>8 string x \b, name=%-.2s
  12797. 0 string \xffKEYB\ \ \ \0\0\0\0
  12798. >12 string \0\0\0\0`\004\360 MS-DOS KEYBoard Layout file
  12799. # .COM formats (Daniel Quinlan, quinlan@yggdrasil.com)
  12800. # Uncommenting only the first two lines will cover about 2/3 of COM files,
  12801. # but it isn't feasible to match all COM files since there must be at least
  12802. # two dozen different one-byte "magics".
  12803. # test too generic ?
  12804. 0 byte 0xe9 DOS executable (COM)
  12805. >0x1FE leshort 0xAA55 \b, boot code
  12806. >6 string SFX\ of\ LHarc (%s)
  12807. # DOS device driver updated by Joerg Jenderek at May 2011
  12808. # http://maben.homeip.net/static/S100/IBM/software/DOS/DOS%20techref/CHAPTER.009
  12809. 0 ulequad&0x07a0ffffffff 0xffffffff DOS executable (
  12810. >40 search/7 UPX! \bUPX compressed
  12811. # DOS device driver attributes
  12812. >4 uleshort&0x8000 0x0000 \bblock device driver
  12813. # character device
  12814. >4 uleshort&0x8000 0x8000 \b
  12815. >>4 uleshort&0x0008 0x0008 \bclock
  12816. # fast video output by int 29h
  12817. >>4 uleshort&0x0010 0x0010 \bfast
  12818. # standard input/output device
  12819. >>4 uleshort&0x0003 >0 \bstandard
  12820. >>>4 uleshort&0x0001 0x0001 \binput
  12821. >>>4 uleshort&0x0003 0x0003 \b/
  12822. >>>4 uleshort&0x0002 0x0002 \boutput
  12823. >>4 uleshort&0x8000 0x8000 \bcharacter device driver
  12824. >0 ubyte x
  12825. # upx compressed device driver has garbage instead of real in name field of header
  12826. >>40 search/7 UPX!
  12827. >>40 default x
  12828. # leading/trailing nulls, zeros or non ASCII characters in 8-byte name field at offset 10 are skipped
  12829. >>>12 ubyte >0x27 \b
  12830. >>>>10 ubyte >0x20
  12831. >>>>>10 ubyte !0x2E
  12832. >>>>>>10 ubyte !0x2A \b%c
  12833. >>>>11 ubyte >0x20
  12834. >>>>>11 ubyte !0x2E \b%c
  12835. >>>>12 ubyte >0x20
  12836. >>>>>12 ubyte !0x39
  12837. >>>>>>12 ubyte !0x2E \b%c
  12838. >>>13 ubyte >0x20
  12839. >>>>13 ubyte !0x2E \b%c
  12840. >>>>14 ubyte >0x20
  12841. >>>>>14 ubyte !0x2E \b%c
  12842. >>>>15 ubyte >0x20
  12843. >>>>>15 ubyte !0x2E \b%c
  12844. >>>>16 ubyte >0x20
  12845. >>>>>16 ubyte !0x2E
  12846. >>>>>>16 ubyte <0xCB \b%c
  12847. >>>>17 ubyte >0x20
  12848. >>>>>17 ubyte !0x2E
  12849. >>>>>>17 ubyte <0x90 \b%c
  12850. # some character device drivers like ASPICD.SYS, btcdrom.sys and Cr_atapi.sys contain only spaces or points in name field
  12851. >>>4 uleshort&0x8000 0x8000
  12852. >>>>12 ubyte <0x2F
  12853. # they have their real name at offset 22
  12854. >>>>>22 string >\0 \b%-.5s
  12855. >4 uleshort&0x8000 0x0000
  12856. # 32 bit sector adressing ( > 32 MB) for block devices
  12857. >>4 uleshort&0x0002 0x0002 \b,32-bit sector-
  12858. # support by driver functions 13h, 17h, 18h
  12859. >4 uleshort&0x0040 0x0040 \b,IOCTL-
  12860. # open, close, removable media support by driver functions 0Dh, 0Eh, 0Fh
  12861. >4 uleshort&0x0800 0x0800 \b,close media-
  12862. # output until busy support by int 10h for character device driver
  12863. >4 uleshort&0x8000 0x8000
  12864. >>4 uleshort&0x2000 0x2000 \b,until busy-
  12865. # direct read/write support by driver functions 03h,0Ch
  12866. >4 uleshort&0x4000 0x4000 \b,control strings-
  12867. >4 uleshort&0x8000 0x8000
  12868. >>4 uleshort&0x6840 >0 \bsupport
  12869. >4 uleshort&0x8000 0x0000
  12870. >>4 uleshort&0x4842 >0 \bsupport
  12871. >0 ubyte x \b)
  12872. # DOS driver cmd640x.sys has 0x12 instead of 0xffffffff for pointer field to next device header
  12873. # Too weak, matches files that only contain 0's
  12874. #0 ulequad&0x000007a0ffffffed 0x0000000000000000 DOS-executable (
  12875. #>4 uleshort&0x8000 0x8000 \bcharacter device driver
  12876. #>>10 string x %-.8s
  12877. #>4 uleshort&0x4000 0x4000 \b,control strings-support)
  12878. # test too generic ?
  12879. 0 byte 0x8c DOS executable (COM)
  12880. # updated by Joerg Jenderek at Oct 2008
  12881. 0 ulelong 0xffff10eb DR-DOS executable (COM)
  12882. # byte 0xeb conflicts with "sequent" magic leshort 0xn2eb
  12883. 0 ubeshort&0xeb8d >0xeb00
  12884. # DR-DOS STACKER.COM SCREATE.SYS missed
  12885. >0 byte 0xeb
  12886. >>0x1FE leshort 0xAA55 DOS executable (COM), boot code
  12887. >>85 string UPX DOS executable (COM), UPX compressed
  12888. >>4 string \ $ARX DOS executable (COM), ARX self-extracting archive
  12889. >>4 string \ $LHarc DOS executable (COM), LHarc self-extracting archive
  12890. >>0x20e string SFX\ by\ LARC DOS executable (COM), LARC self-extracting archive
  12891. # updated by Joerg Jenderek at Oct 2008
  12892. #0 byte 0xb8 COM executable
  12893. 0 uleshort&0x80ff 0x00b8
  12894. # modified by Joerg Jenderek
  12895. >1 lelong !0x21cd4cff COM executable for DOS
  12896. # http://syslinux.zytor.com/comboot.php
  12897. # (32-bit COMBOOT) programs *.C32 contain 32-bit code and run in flat-memory 32-bit protected mode
  12898. # start with assembler instructions mov eax,21cd4cffh
  12899. 0 uleshort&0xc0ff 0xc0b8
  12900. >1 lelong 0x21cd4cff COM executable (32-bit COMBOOT)
  12901. # syslinux:doc/comboot.txt
  12902. # A COM32R program must start with the byte sequence B8 FE 4C CD 21 (mov
  12903. # eax,21cd4cfeh) as a magic number.
  12904. 0 string/b \xb8\xfe\x4c\xcd\x21 COM executable (COM32R)
  12905. # start with assembler instructions mov eax,21cd4cfeh
  12906. 0 uleshort&0xc0ff 0xc0b8
  12907. >1 lelong 0x21cd4cfe COM executable (32-bit COMBOOT, relocatable)
  12908. 0 string/b \x81\xfc
  12909. >4 string \x77\x02\xcd\x20\xb9
  12910. >>36 string UPX! FREE-DOS executable (COM), UPX compressed
  12911. 252 string Must\ have\ DOS\ version DR-DOS executable (COM)
  12912. # added by Joerg Jenderek at Oct 2008
  12913. # GRR search is not working
  12914. #34 search/2 UPX! FREE-DOS executable (COM), UPX compressed
  12915. 34 string UPX! FREE-DOS executable (COM), UPX compressed
  12916. 35 string UPX! FREE-DOS executable (COM), UPX compressed
  12917. # GRR search is not working
  12918. #2 search/28 \xcd\x21 COM executable for MS-DOS
  12919. #WHICHFAT.cOM
  12920. 2 string \xcd\x21 COM executable for DOS
  12921. #DELTREE.cOM DELTREE2.cOM
  12922. 4 string \xcd\x21 COM executable for DOS
  12923. #IFMEMDSK.cOM ASSIGN.cOM COMP.cOM
  12924. 5 string \xcd\x21 COM executable for DOS
  12925. #DELTMP.COm HASFAT32.cOM
  12926. 7 string \xcd\x21
  12927. >0 byte !0xb8 COM executable for DOS
  12928. #COMP.cOM MORE.COm
  12929. 10 string \xcd\x21
  12930. >5 string !\xcd\x21 COM executable for DOS
  12931. #comecho.com
  12932. 13 string \xcd\x21 COM executable for DOS
  12933. #HELP.COm EDIT.coM
  12934. 18 string \xcd\x21 COM executable for MS-DOS
  12935. #NWRPLTRM.COm
  12936. 23 string \xcd\x21 COM executable for MS-DOS
  12937. #LOADFIX.cOm LOADFIX.cOm
  12938. 30 string \xcd\x21 COM executable for MS-DOS
  12939. #syslinux.com 3.11
  12940. 70 string \xcd\x21 COM executable for DOS
  12941. # many compressed/converted COMs start with a copy loop instead of a jump
  12942. 0x6 search/0xa \xfc\x57\xf3\xa5\xc3 COM executable for MS-DOS
  12943. 0x6 search/0xa \xfc\x57\xf3\xa4\xc3 COM executable for DOS
  12944. >0x18 search/0x10 \x50\xa4\xff\xd5\x73 \b, aPack compressed
  12945. 0x3c string W\ Collis\0\0 COM executable for MS-DOS, Compack compressed
  12946. # FIXME: missing diet .com compression
  12947. # miscellaneous formats
  12948. 0 string/b LZ MS-DOS executable (built-in)
  12949. #0 byte 0xf0 MS-DOS program library data
  12950. #
  12951. # AAF files:
  12952. # <stuartc@rd.bbc.co.uk> Stuart Cunningham
  12953. 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
  12954. >30 byte 9 (512B sectors)
  12955. >30 byte 12 (4kB sectors)
  12956. 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
  12957. >30 byte 9 (512B sectors)
  12958. >30 byte 12 (4kB sectors)
  12959. # Popular applications
  12960. 2080 string Microsoft\ Word\ 6.0\ Document %s
  12961. !:mime application/msword
  12962. 2080 string Documento\ Microsoft\ Word\ 6 Spanish Microsoft Word 6 document data
  12963. !:mime application/msword
  12964. # Pawel Wiecek <coven@i17linuxb.ists.pwr.wroc.pl> (for polish Word)
  12965. 2112 string MSWordDoc Microsoft Word document data
  12966. !:mime application/msword
  12967. #
  12968. 0 belong 0x31be0000 Microsoft Word Document
  12969. !:mime application/msword
  12970. #
  12971. 0 string/b PO^Q` Microsoft Word 6.0 Document
  12972. !:mime application/msword
  12973. #
  12974. 0 string/b \376\067\0\043 Microsoft Office Document
  12975. !:mime application/msword
  12976. 0 string/b \333\245-\0\0\0 Microsoft Office Document
  12977. !:mime application/msword
  12978. 512 string/b \354\245\301 Microsoft Word Document
  12979. !:mime application/msword
  12980. #
  12981. 0 string/b \xDB\xA5\x2D\x00 Microsoft WinWord 2.0 Document
  12982. !:mime application/msword
  12983. #
  12984. 2080 string Microsoft\ Excel\ 5.0\ Worksheet %s
  12985. !:mime application/vnd.ms-excel
  12986. #
  12987. 0 string/b \xDB\xA5\x2D\x00 Microsoft WinWord 2.0 Document
  12988. !:mime application/msword
  12989. 2080 string Foglio\ di\ lavoro\ Microsoft\ Exce %s
  12990. !:mime application/vnd.ms-excel
  12991. #
  12992. # Pawel Wiecek <coven@i17linuxb.ists.pwr.wroc.pl> (for polish Excel)
  12993. 2114 string Biff5 Microsoft Excel 5.0 Worksheet
  12994. !:mime application/vnd.ms-excel
  12995. # Italian MS-Excel
  12996. 2121 string Biff5 Microsoft Excel 5.0 Worksheet
  12997. !:mime application/vnd.ms-excel
  12998. 0 string/b \x09\x04\x06\x00\x00\x00\x10\x00 Microsoft Excel Worksheet
  12999. !:mime application/vnd.ms-excel
  13000. #
  13001. 0 belong 0x00001a00 Lotus 1-2-3
  13002. !:mime application/x-123
  13003. >4 belong 0x00100400 wk3 document data
  13004. >4 belong 0x02100400 wk4 document data
  13005. >4 belong 0x07800100 fm3 or fmb document data
  13006. >4 belong 0x07800000 fm3 or fmb document data
  13007. #
  13008. 0 belong 0x00000200 Lotus 1-2-3
  13009. !:mime application/x-123
  13010. >4 belong 0x06040600 wk1 document data
  13011. >4 belong 0x06800200 fmt document data
  13012. 0 string/b WordPro\0 Lotus WordPro
  13013. !:mime application/vnd.lotus-wordpro
  13014. 0 string/b WordPro\r\373 Lotus WordPro
  13015. !:mime application/vnd.lotus-wordpro
  13016. # Summary: Script used by InstallScield to uninstall applications
  13017. # Extension: .isu
  13018. # Submitted by: unknown
  13019. # Modified by (1): Abel Cheung <abelcheung@gmail.com> (replace useless entry)
  13020. 0 string \x71\xa8\x00\x00\x01\x02
  13021. >12 string Stirling\ Technologies, InstallShield Uninstall Script
  13022. # Winamp .avs
  13023. #0 string Nullsoft\ AVS\ Preset\ \060\056\061\032 A plug in for Winamp ms-windows Freeware media player
  13024. 0 string/b Nullsoft\ AVS\ Preset\ Winamp plug in
  13025. # Windows Metafont .WMF
  13026. 0 string/b \327\315\306\232 ms-windows metafont .wmf
  13027. 0 string/b \002\000\011\000 ms-windows metafont .wmf
  13028. 0 string/b \001\000\011\000 ms-windows metafont .wmf
  13029. #tz3 files whatever that is (MS Works files)
  13030. 0 string/b \003\001\001\004\070\001\000\000 tz3 ms-works file
  13031. 0 string/b \003\002\001\004\070\001\000\000 tz3 ms-works file
  13032. 0 string/b \003\003\001\004\070\001\000\000 tz3 ms-works file
  13033. # PGP sig files .sig
  13034. #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
  13035. 0 string \211\000\077\003\005\000\063\237\127\065\027\266\151\064\005\045\101\233\021\002 PGP sig
  13036. 0 string \211\000\077\003\005\000\063\237\127\066\027\266\151\064\005\045\101\233\021\002 PGP sig
  13037. 0 string \211\000\077\003\005\000\063\237\127\067\027\266\151\064\005\045\101\233\021\002 PGP sig
  13038. 0 string \211\000\077\003\005\000\063\237\127\070\027\266\151\064\005\045\101\233\021\002 PGP sig
  13039. 0 string \211\000\077\003\005\000\063\237\127\071\027\266\151\064\005\045\101\233\021\002 PGP sig
  13040. 0 string \211\000\225\003\005\000\062\122\207\304\100\345\042 PGP sig
  13041. # windows zips files .dmf
  13042. 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
  13043. #ico files
  13044. 0 string/b \102\101\050\000\000\000\056\000\000\000\000\000\000\000 Icon for MS Windows
  13045. # Windows icons (Ian Springer <ips@fpk.hp.com>)
  13046. 0 string/b \000\000\001\000 MS Windows icon resource
  13047. !:mime image/x-icon
  13048. >4 byte 1 - 1 icon
  13049. >4 byte >1 - %d icons
  13050. >>6 byte >0 \b, %dx
  13051. >>>7 byte >0 \b%d
  13052. >>8 byte 0 \b, 256-colors
  13053. >>8 byte >0 \b, %d-colors
  13054. # .chr files
  13055. 0 string/b PK\010\010BGI Borland font
  13056. >4 string >\0 %s
  13057. # then there is a copyright notice
  13058. # .bgi files
  13059. 0 string/b pk\010\010BGI Borland device
  13060. >4 string >\0 %s
  13061. # then there is a copyright notice
  13062. # Windows Recycle Bin record file (named INFO2)
  13063. # By Abel Cheung (abelcheung AT gmail dot com)
  13064. # Version 4 always has 280 bytes (0x118) per record, version 5 has 800 bytes
  13065. # Since Vista uses another structure, INFO2 structure probably won't change
  13066. # anymore. Detailed analysis in:
  13067. # http://www.cybersecurityinstitute.biz/downloads/INFO2.pdf
  13068. 0 lelong 0x00000004
  13069. >12 lelong 0x00000118 Windows Recycle Bin INFO2 file (Win98 or below)
  13070. 0 lelong 0x00000005
  13071. >12 lelong 0x00000320 Windows Recycle Bin INFO2 file (Win2k - WinXP)
  13072. ##### put in Either Magic/font or Magic/news
  13073. # Acroread or something files wrongly identified as G3 .pfm
  13074. # these have the form \000 \001 any? \002 \000 \000
  13075. # or \000 \001 any? \022 \000 \000
  13076. 0 belong&0xffff00ff 0x00010012 PFM data
  13077. >4 string \000\000
  13078. >6 string >\060 - %s
  13079. 0 belong&0xffff00ff 0x00010002 PFM data
  13080. >4 string \000\000
  13081. >6 string >\060 - %s
  13082. #0 string \000\001 pfm?
  13083. #>3 string \022\000\000Copyright\ yes
  13084. #>3 string \002\000\000Copyright\ yes
  13085. #>3 string >\0 oops, not a font file. Cancel that.
  13086. #it clashes with ttf files so put it lower down.
  13087. # From Doug Lee via a FreeBSD pr
  13088. 9 string GERBILDOC First Choice document
  13089. 9 string GERBILDB First Choice database
  13090. 9 string GERBILCLIP First Choice database
  13091. 0 string GERBIL First Choice device file
  13092. 9 string RABBITGRAPH RabbitGraph file
  13093. 0 string DCU1 Borland Delphi .DCU file
  13094. 0 string =!<spell> MKS Spell hash list (old format)
  13095. 0 string =!<spell2> MKS Spell hash list
  13096. # Too simple - MPi
  13097. #0 string AH Halo(TM) bitmapped font file
  13098. 0 lelong 0x08086b70 TurboC BGI file
  13099. 0 lelong 0x08084b50 TurboC Font file
  13100. # tests for DBase files moved, updated and merged to database
  13101. 0 string PMCC Windows 3.x .GRP file
  13102. 1 string RDC-meg MegaDots
  13103. >8 byte >0x2F version %c
  13104. >9 byte >0x2F \b.%c file
  13105. 0 lelong 0x4C
  13106. >4 lelong 0x00021401 Windows shortcut file
  13107. # .PIF files added by Joerg Jenderek from http://smsoft.ru/en/pifdoc.htm
  13108. # only for windows versions equal or greater 3.0
  13109. 0x171 string MICROSOFT\ PIFEX\0 Windows Program Information File
  13110. !:mime application/x-dosexec
  13111. #>2 string >\0 \b, Title:%.30s
  13112. >0x24 string >\0 \b for %.63s
  13113. >0x65 string >\0 \b, directory=%.64s
  13114. >0xA5 string >\0 \b, parameters=%.64s
  13115. #>0x181 leshort x \b, offset %x
  13116. #>0x183 leshort x \b, offsetdata %x
  13117. #>0x185 leshort x \b, section length %x
  13118. >0x187 search/0xB55 WINDOWS\ VMM\ 4.0\0
  13119. >>&0x5e ubyte >0
  13120. >>>&-1 string <PIFMGR.DLL \b, icon=%s
  13121. #>>>&-1 string PIFMGR.DLL \b, icon=%s
  13122. >>>&-1 string >PIFMGR.DLL \b, icon=%s
  13123. >>&0xF0 ubyte >0
  13124. >>>&-1 string <Terminal \b, font=%.32s
  13125. #>>>&-1 string =Terminal \b, font=%.32s
  13126. >>>&-1 string >Terminal \b, font=%.32s
  13127. >>&0x110 ubyte >0
  13128. >>>&-1 string <Lucida\ Console \b, TrueTypeFont=%.32s
  13129. #>>>&-1 string =Lucida\ Console \b, TrueTypeFont=%.32s
  13130. >>>&-1 string >Lucida\ Console \b, TrueTypeFont=%.32s
  13131. #>0x187 search/0xB55 WINDOWS\ 286\ 3.0\0 \b, Windows 3.X standard mode-style
  13132. #>0x187 search/0xB55 WINDOWS\ 386\ 3.0\0 \b, Windows 3.X enhanced mode-style
  13133. >0x187 search/0xB55 WINDOWS\ NT\ \ 3.1\0 \b, Windows NT-style
  13134. #>0x187 search/0xB55 WINDOWS\ NT\ \ 4.0\0 \b, Windows NT-style
  13135. >0x187 search/0xB55 CONFIG\ \ SYS\ 4.0\0 \b +CONFIG.SYS
  13136. #>>&06 string x \b:%s
  13137. >0x187 search/0xB55 AUTOEXECBAT\ 4.0\0 \b +AUTOEXEC.BAT
  13138. #>>&06 string x \b:%s
  13139. # DOS EPS Binary File Header
  13140. # From: Ed Sznyter <ews@Black.Market.NET>
  13141. 0 belong 0xC5D0D3C6 DOS EPS Binary File
  13142. >4 long >0 Postscript starts at byte %d
  13143. >>8 long >0 length %d
  13144. >>>12 long >0 Metafile starts at byte %d
  13145. >>>>16 long >0 length %d
  13146. >>>20 long >0 TIFF starts at byte %d
  13147. >>>>24 long >0 length %d
  13148. # TNEF magic From "Joomy" <joomy@se-ed.net>
  13149. # Microsoft Outlook's Transport Neutral Encapsulation Format (TNEF)
  13150. 0 leshort 0x223e9f78 TNEF
  13151. !:mime application/vnd.ms-tnef
  13152. # 4DOS help (.HLP) files added by Joerg Jenderek from source TPHELP.PAS
  13153. # of http://www.4dos.info/
  13154. # pointer,HelpID[8]=4DHnnnmm
  13155. 0 ulelong 0x48443408 4DOS help file
  13156. >4 string x \b, version %-4.4s
  13157. # old binary Microsoft (.HLP) files added by Joerg Jenderek from http://file-extension.net/seeker/file_extension_hlp
  13158. 0 ulequad 0x3a000000024e4c MS Advisor help file
  13159. # HtmlHelp files (.chm)
  13160. 0 string/b ITSF\003\000\000\000\x60\000\000\000\001\000\000\000 MS Windows HtmlHelp Data
  13161. # GFA-BASIC (Wolfram Kleff)
  13162. 2 string/b GFA-BASIC3 GFA-BASIC 3 data
  13163. #------------------------------------------------------------------------------
  13164. # From Stuart Caie <kyzer@4u.net> (developer of cabextract)
  13165. # Microsoft Cabinet files
  13166. 0 string/b MSCF\0\0\0\0 Microsoft Cabinet archive data
  13167. !:mime application/vnd.ms-cab-compressed
  13168. >8 lelong x \b, %u bytes
  13169. >28 leshort 1 \b, 1 file
  13170. >28 leshort >1 \b, %u files
  13171. # InstallShield Cabinet files
  13172. 0 string/b ISc( InstallShield Cabinet archive data
  13173. >5 byte&0xf0 =0x60 version 6,
  13174. >5 byte&0xf0 !0x60 version 4/5,
  13175. >(12.l+40) lelong x %u files
  13176. # Windows CE package files
  13177. 0 string/b MSCE\0\0\0\0 Microsoft WinCE install header
  13178. >20 lelong 0 \b, architecture-independent
  13179. >20 lelong 103 \b, Hitachi SH3
  13180. >20 lelong 104 \b, Hitachi SH4
  13181. >20 lelong 0xA11 \b, StrongARM
  13182. >20 lelong 4000 \b, MIPS R4000
  13183. >20 lelong 10003 \b, Hitachi SH3
  13184. >20 lelong 10004 \b, Hitachi SH3E
  13185. >20 lelong 10005 \b, Hitachi SH4
  13186. >20 lelong 70001 \b, ARM 7TDMI
  13187. >52 leshort 1 \b, 1 file
  13188. >52 leshort >1 \b, %u files
  13189. >56 leshort 1 \b, 1 registry entry
  13190. >56 leshort >1 \b, %u registry entries
  13191. # Windows Enhanced Metafile (EMF)
  13192. # See msdn.microsoft.com/archive/en-us/dnargdi/html/msdn_enhmeta.asp
  13193. # for further information.
  13194. 0 ulelong 1
  13195. >40 string \ EMF Windows Enhanced Metafile (EMF) image data
  13196. >>44 ulelong x version 0x%x
  13197. # From: Alex Beregszaszi <alex@fsn.hu>
  13198. 0 string/b COWD VMWare3
  13199. >4 byte 3 disk image
  13200. >>32 lelong x (%d/
  13201. >>36 lelong x \b%d/
  13202. >>40 lelong x \b%d)
  13203. >4 byte 2 undoable disk image
  13204. >>32 string >\0 (%s)
  13205. 0 string/b VMDK VMware4 disk image
  13206. 0 string/b KDMV VMware4 disk image
  13207. #--------------------------------------------------------------------
  13208. # Qemu Emulator Images
  13209. # Lines written by Friedrich Schwittay (f.schwittay@yousable.de)
  13210. # Updated by Adam Buchbinder (adam.buchbinder@gmail.com)
  13211. # Made by reading sources, reading documentation, and doing trial and error
  13212. # on existing QCOW files
  13213. 0 string/b QFI\xFB QEMU QCOW Image
  13214. # Uncomment the following line to display Magic (only used for debugging
  13215. # this magic number)
  13216. #>0 string/b x , Magic: %s
  13217. # There are currently 2 Versions: "1" and "2".
  13218. # http://www.gnome.org/~markmc/qcow-image-format-version-1.html
  13219. >4 belong 1 (v1)
  13220. # Using the existence of the Backing File Offset to determine whether
  13221. # to read Backing File Information
  13222. >>12 belong >0 \b, has backing file (
  13223. # Note that this isn't a null-terminated string; the length is actually
  13224. # (16.L). Assuming a null-terminated string happens to work usually, but it
  13225. # may spew junk until it reaches a \0 in some cases.
  13226. >>>(12.L) string >\0 \bpath %s
  13227. # Modification time of the Backing File
  13228. # Really useful if you want to know if your backing
  13229. # file is still usable together with this image
  13230. >>>>20 bedate >0 \b, mtime %s)
  13231. >>>>20 default x \b)
  13232. # Size is stored in bytes in a big-endian u64.
  13233. >>24 bequad x \b, %lld bytes
  13234. # 1 for AES encryption, 0 for none.
  13235. >>36 belong 1 \b, AES-encrypted
  13236. # http://www.gnome.org/~markmc/qcow-image-format.html
  13237. >4 belong 2 (v2)
  13238. # Using the existence of the Backing File Offset to determine whether
  13239. # to read Backing File Information
  13240. >>8 bequad >0 \b, has backing file
  13241. # Note that this isn't a null-terminated string; the length is actually
  13242. # (16.L). Assuming a null-terminated string happens to work usually, but it
  13243. # may spew junk until it reaches a \0 in some cases. Also, since there's no
  13244. # .Q modifier, we just use the bottom four bytes as an offset. Note that if
  13245. # the file is over 4G, and the backing file path is stored after the first 4G,
  13246. # the wrong filename will be printed. (This should be (8.Q), when that syntax
  13247. # is introduced.)
  13248. >>>(12.L) string >\0 (path %s)
  13249. >>24 bequad x \b, %lld bytes
  13250. >>32 belong 1 \b, AES-encrypted
  13251. >4 belong 3 (v3)
  13252. # Using the existence of the Backing File Offset to determine whether
  13253. # to read Backing File Information
  13254. >>8 bequad >0 \b, has backing file
  13255. # Note that this isn't a null-terminated string; the length is actually
  13256. # (16.L). Assuming a null-terminated string happens to work usually, but it
  13257. # may spew junk until it reaches a \0 in some cases. Also, since there's no
  13258. # .Q modifier, we just use the bottom four bytes as an offset. Note that if
  13259. # the file is over 4G, and the backing file path is stored after the first 4G,
  13260. # the wrong filename will be printed. (This should be (8.Q), when that syntax
  13261. # is introduced.)
  13262. >>>(12.L) string >\0 (path %s)
  13263. >>24 bequad x \b, %lld bytes
  13264. >>32 belong 1 \b, AES-encrypted
  13265. >4 default x (unknown version)
  13266. 0 string/b QEVM QEMU suspend to disk image
  13267. # QEMU QED Image
  13268. # http://wiki.qemu.org/Features/QED/Specification
  13269. 0 string/b QED\0 QEMU QED Image
  13270. # VDI Image
  13271. 64 string/b \x7f\x10\xda\xbe VDI Image
  13272. >68 string/b \x01\x00\x01\x00 version 1.1
  13273. >0 string >\0 (%s)
  13274. >368 lequad x \b, %lld bytes
  13275. 0 string/b Bochs\ Virtual\ HD\ Image Bochs disk image,
  13276. >32 string x type %s,
  13277. >48 string x subtype %s
  13278. 0 lelong 0x02468ace Bochs Sparse disk image
  13279. # from http://filext.com by Derek M Jones <derek@knosof.co.uk>
  13280. # False positive with PPT (also currently this string is too long)
  13281. #0 string/b \xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF\x09\x00\x06 Microsoft Installer
  13282. 0 string/b \320\317\021\340\241\261\032\341 Microsoft Office Document
  13283. #>48 byte 0x1B Excel Document
  13284. #!:mime application/vnd.ms-excel
  13285. >546 string bjbj Microsoft Word Document
  13286. !:mime application/msword
  13287. >546 string jbjb Microsoft Word Document
  13288. !:mime application/msword
  13289. 0 string/b \224\246\056 Microsoft Word Document
  13290. !:mime application/msword
  13291. 512 string R\0o\0o\0t\0\ \0E\0n\0t\0r\0y Microsoft Word Document
  13292. !:mime application/msword
  13293. # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
  13294. # Magic type for Dell's BIOS .hdr files
  13295. # Dell's .hdr
  13296. 0 string/b $RBU
  13297. >23 string Dell %s system BIOS
  13298. >5 byte 2
  13299. >>48 byte x version %d.
  13300. >>49 byte x \b%d.
  13301. >>50 byte x \b%d
  13302. >5 byte <2
  13303. >>48 string x version %.3s
  13304. # Type: Microsoft DirectDraw Surface
  13305. # URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/directx/graphics/reference/DDSFileReference/ddsfileformat.asp
  13306. # From: Morten Hustveit <morten@debian.org>
  13307. 0 string/b DDS\040\174\000\000\000 Microsoft DirectDraw Surface (DDS),
  13308. >16 lelong >0 %hd x
  13309. >12 lelong >0 %hd,
  13310. >84 string x %.4s
  13311. # Type: Microsoft Document Imaging Format (.mdi)
  13312. # URL: http://en.wikipedia.org/wiki/Microsoft_Document_Imaging_Format
  13313. # From: Daniele Sempione <scrows@oziosi.org>
  13314. 0 short 0x5045 Microsoft Document Imaging Format
  13315. # MS eBook format (.lit)
  13316. 0 string/b ITOLITLS Microsoft Reader eBook Data
  13317. >8 lelong x \b, version %u
  13318. !:mime application/x-ms-reader
  13319. # Windows CE Binary Image Data Format
  13320. # From: Dr. Jesus <j@hug.gs>
  13321. 0 string/b B000FF\n Windows Embedded CE binary image
  13322. # Windows Imaging (WIM) Image
  13323. 0 string/b MSWIM\000\000\000 Windows imaging (WIM) image
  13324. # The second byte of these signatures is a file version; I don't know what,
  13325. # if anything, produced files with version numbers 0-2.
  13326. # From: John Elliott <johne@seasip.demon.co.uk>
  13327. 0 string \xfc\x03\x00 Mallard BASIC program data (v1.11)
  13328. 0 string \xfc\x04\x00 Mallard BASIC program data (v1.29+)
  13329. 0 string \xfc\x03\x01 Mallard BASIC protected program data (v1.11)
  13330. 0 string \xfc\x04\x01 Mallard BASIC protected program data (v1.29+)
  13331. 0 string MIOPEN Mallard BASIC Jetsam data
  13332. 0 string Jetsam0 Mallard BASIC Jetsam index data
  13333. #------------------------------------------------------------------------------
  13334. # $File: msooxml,v 1.4 2014/01/06 18:16:24 rrt Exp $
  13335. # msooxml: file(1) magic for Microsoft Office XML
  13336. # From: Ralf Brown <ralf.brown@gmail.com>
  13337. # .docx, .pptx, and .xlsx are XML plus other files inside a ZIP
  13338. # archive. The first member file is normally "[Content_Types].xml".
  13339. # but some libreoffice generated files put this later. Perhaps skip
  13340. # the "[Content_Types].xml" test?
  13341. # Since MSOOXML doesn't have anything like the uncompressed "mimetype"
  13342. # file of ePub or OpenDocument, we'll have to scan for a filename
  13343. # which can distinguish between the three types
  13344. # start by checking for ZIP local file header signature
  13345. 0 string PK\003\004
  13346. !:strength +10
  13347. # make sure the first file is correct
  13348. >0x1E regex \[Content_Types\]\.xml|_rels/\.rels
  13349. # skip to the second local file header
  13350. # since some documents include a 520-byte extra field following the file
  13351. # header, we need to scan for the next header
  13352. >>(18.l+49) search/2000 PK\003\004
  13353. # now skip to the *third* local file header; again, we need to scan due to a
  13354. # 520-byte extra field following the file header
  13355. >>>&26 search/1000 PK\003\004
  13356. # and check the subdirectory name to determine which type of OOXML
  13357. # file we have. Correct the mimetype with the registered ones:
  13358. # http://technet.microsoft.com/en-us/library/cc179224.aspx
  13359. >>>>&26 string word/ Microsoft Word 2007+
  13360. !:mime application/vnd.openxmlformats-officedocument.wordprocessingml.document
  13361. >>>>&26 string ppt/ Microsoft PowerPoint 2007+
  13362. !:mime application/vnd.openxmlformats-officedocument.presentationml.presentation
  13363. >>>>&26 string xl/ Microsoft Excel 2007+
  13364. !:mime application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  13365. >>>>&26 default x Microsoft OOXML
  13366. #------------------------------------------------------------------------------
  13367. # $File: msvc,v 1.5 2009/09/19 16:28:11 christos Exp $
  13368. # msvc: file(1) magic for msvc
  13369. # "H. Nanosecond" <aldomel@ix.netcom.com>
  13370. # Microsoft visual C
  13371. #
  13372. # I have version 1.0
  13373. # .aps
  13374. 0 string HWB\000\377\001\000\000\000 Microsoft Visual C .APS file
  13375. # .ide
  13376. #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
  13377. 0 string \102\157\162\154\141\156\144\040\103\053\053\040\120\162\157 MSVC .ide
  13378. # .res
  13379. 0 string \000\000\000\000\040\000\000\000\377 MSVC .res
  13380. 0 string \377\003\000\377\001\000\020\020\350 MSVC .res
  13381. 0 string \377\003\000\377\001\000\060\020\350 MSVC .res
  13382. #.lib
  13383. 0 string \360\015\000\000 Microsoft Visual C library
  13384. 0 string \360\075\000\000 Microsoft Visual C library
  13385. 0 string \360\175\000\000 Microsoft Visual C library
  13386. #.pch
  13387. 0 string DTJPCH0\000\022\103\006\200 Microsoft Visual C .pch
  13388. # .pdb
  13389. # too long 0 string Microsoft\ C/C++\ program\ database\
  13390. 0 string Microsoft\ C/C++\ MSVC program database
  13391. >18 string program\ database\
  13392. >33 string >\0 ver %s
  13393. #.sbr
  13394. 0 string \000\002\000\007\000 MSVC .sbr
  13395. >5 string >\0 %s
  13396. #.bsc
  13397. 0 string \002\000\002\001 MSVC .bsc
  13398. #.wsp
  13399. 0 string 1.00\ .0000.0000\000\003 MSVC .wsp version 1.0000.0000
  13400. # these seem to start with the version and contain menus
  13401. #------------------------------------------------------------------------------
  13402. # msx: file(1) magic for the MSX Home Computer
  13403. # v1.1
  13404. # Fábio R. Schmidlin <sd-snatcher@users.sourceforge.net>
  13405. ############## MSX Music file formats ##############
  13406. # Gigamix MGSDRV music file
  13407. 0 string MGS MSX Gigamix MGSDRV3 music file,
  13408. >6 ubeshort 0x0D0A
  13409. >>3 byte x \bv%c
  13410. >>4 byte x \b.%c
  13411. >>5 byte x \b%c
  13412. >>8 string >\0 \b, title: %s
  13413. 1 string mgs2\ MSX Gigamix MGSDRV2 music file
  13414. >6 uleshort 0x80
  13415. >>0x2E uleshort 0
  13416. >>>0x30 string >\0 \b, title: %s
  13417. # KSS music file
  13418. 0 string KSCC KSS music file v1.03
  13419. >0xE byte 0
  13420. >>0xF byte&0x02 0 \b, soundchips: AY-3-8910, SCC(+)
  13421. >>0xF byte&0x02 2 \b, soundchip(s): SN76489
  13422. >>>0xF byte&0x04 4 stereo
  13423. >>0xF byte&0x01 1 \b, YM2413
  13424. >>0xF byte&0x08 8 \b, Y8950
  13425. 0 string KSSX KSS music file v1.20
  13426. >0xE byte&0xEF 0
  13427. >>0xF byte&0x40 0x00 \b, 60Hz
  13428. >>0xF byte&0x40 0x40 \b, 50Hz
  13429. >>0xF byte&0x02 0 \b, soundchips: AY-3-8910, SCC(+)
  13430. >>0xF byte&0x02 0x02 \b, soundchips: SN76489
  13431. >>>0xF byte&0x04 0x04 stereo
  13432. >>0xF byte&0x01 0x01 \b,
  13433. >>>0xF byte&0x18 0x00 \bYM2413
  13434. >>>0xF byte&0x18 0x08 \bYM2413, Y8950
  13435. >>>0xF byte&0x18 0x18 \bYM2413+Y8950 pseudostereo
  13436. >>0xF byte&0x18 0x10 \b, Majyutsushi DAC
  13437. # Moonblaster for Moonsound
  13438. 0 string MBMS
  13439. >4 byte 0x10 MSX Moonblaster for MoonSound music
  13440. # Music Player K-kaz
  13441. 0 string MPK MSX Music Player K-kaz song
  13442. >6 ubeshort 0x0D0A
  13443. >>3 byte x v%c
  13444. >>4 byte x \b.%c
  13445. >>5 byte x \b%c
  13446. # I don't know why these don't work
  13447. #0 search/0xFFFF \r\n.FM9
  13448. #>0 search/0xFFFF \r\n#FORMAT MSX Music Player K-kaz source MML file
  13449. #0 search/0xFFFF \r\nFM1\ \=
  13450. #>0 search/0xFFFF \r\nPSG1\=
  13451. #>>0 search/0xFFFF \r\nSCC1\= MSX MuSiCa MML source file
  13452. # OPX Music file
  13453. 0x35 beshort 0x0d0a
  13454. >0x7B beshort 0x0d0a
  13455. >>0x7D byte 0x1a
  13456. >>>0x87 uleshort 0 MSX OPX Music file
  13457. >>>>0x86 byte 0 v1.5
  13458. >>>>>0 string >\32 \b, title: %s
  13459. >>>>0x86 byte 1 v2.4
  13460. >>>>>0 string >\32 \b, title: %s
  13461. # SCMD music file
  13462. 0x8B string SCMD
  13463. >0xCE uleshort 0 MSX SCMD Music file
  13464. #>>-2 uleshort 0x6a71 ; The file must end with this value. How to code this here?
  13465. >>0x8F string >\0 \b, title: %s
  13466. 0 search/0xFFFF \r\n@title
  13467. >&0 search/0xFFFF \r\n@m=[ MSX SCMD source MML file
  13468. ############## MSX image file formats ##############
  13469. # MSX raw VRAM dump
  13470. 0 ubyte 0xFE
  13471. >1 uleshort 0
  13472. >>5 uleshort 0
  13473. >>>3 uleshort 0x37FF MSX SC2/GRP raw image
  13474. >>>3 uleshort 0x6A00 MSX Graph Saurus SR5 raw image
  13475. >>>3 uleshort >0x769E
  13476. >>>>3 uleshort <0x8000 MSX GE5/GE6 raw image
  13477. >>>>>3 uleshort 0x7FFF \b, with sprite patterns
  13478. >>>3 uleshort 0xD3FF MSX screen 7-12 raw image
  13479. >>>3 uleshort 0xD400 MSX Graph Saurus SR7/SR8/SRS raw image
  13480. # Graph Saurus compressed images
  13481. 0 ubyte 0xFD
  13482. >1 uleshort 0
  13483. >>5 uleshort 0
  13484. >>>3 uleshort >0x013D MSX Graph Saurus compressed image
  13485. # Maki-chan Graphic format
  13486. 0 string MAKI02\ \ Maki-chan image,
  13487. >8 byte x system ID: %c
  13488. >9 byte x \b%c
  13489. >10 byte x \b%c
  13490. >11 byte x \b%c,
  13491. >13 search/0x200 \x1A
  13492. # >>&3 ubyte 0 , video mode: PC-98 400 lines, 16 analog colors
  13493. # >>&3 ubyte 1 , video mode: MSX SC7, 16 analog colors
  13494. # >>&3 ubyte 2 , video mode: VM-98 400 lines, 8 analog colors
  13495. # >>&3 ubyte 3 , video mode: PC-88 analog, 200 lines, 8 analog colors
  13496. # >>&3 ubyte 4 , video mode: 400 lines, 16 digital colors
  13497. # >>&3 ubyte 5 , video mode: 200 lines, 16 digital colors
  13498. # >>&3 ubyte 6 , video mode: old PC-98 digital 400 lines, 8 colors
  13499. # >>&3 ubyte 7 , video mode: PC-88 400 lines, 8 digital colors
  13500. >>&8 uleshort+1 x %dx
  13501. >>&10 uleshort+1 x \b%d,
  13502. >>&3 ubyte&0x82 0x80 256 colors
  13503. >>&3 ubyte&0x82 0x00 16 colors
  13504. >>&3 ubyte&0x82 0x01 8 colors
  13505. >>&3 ubyte&0x04 4 digital
  13506. >>&3 ubyte&0x04 0 analog
  13507. >>&3 ubyte&0x01 1 \b, 2:1 dot aspect ratio
  13508. # Japanese PIC file
  13509. 0 string PIC\x1A
  13510. >4 lelong 0 Japanese PIC image file
  13511. # MSX G9B image file
  13512. 0 string G9B
  13513. >1 uleshort 11
  13514. >>3 uleshort >10
  13515. >>>5 ubyte >0 MSX G9B image, depth=%d
  13516. >>>>8 uleshort x \b, %dx
  13517. >>>>10 uleshort x \b%d
  13518. >>>>5 ubyte <9
  13519. >>>>>6 ubyte 0
  13520. >>>>>>7 ubyte x \b, codec=%d RGB color palettes
  13521. >>>>>6 ubyte 64 \b, codec=RGB fixed color
  13522. >>>>>6 ubyte 128 \b, codec=YJK
  13523. >>>>>6 ubyte 192 \b, codec=YUV
  13524. >>>>5 ubyte >8 codec=RGB fixed color
  13525. >>>>12 ubyte 0 \b, raw
  13526. >>>>12 ubyte 1 \b, bitbuster compression
  13527. ############## Other MSX file formats ##############
  13528. # MSX ROMs
  13529. 0 string AB
  13530. >2 uleshort 0x0010 MSX ROM
  13531. >>2 uleshort x \b, init=0x%4x
  13532. >>4 uleshort >0 \b, stat=0x%4x
  13533. >>6 uleshort >0 \b, dev=0x%4x
  13534. >>8 uleshort >0 \b, bas=0x%4x
  13535. >2 uleshort 0x4010 MSX ROM
  13536. >>2 uleshort x \b, init=0x%04x
  13537. >>4 uleshort >0 \b, stat=0x%04x
  13538. >>6 uleshort >0 \b, dev=0x%04x
  13539. >>8 uleshort >0 \b, bas=0x%04x
  13540. >2 uleshort 0x8010 MSX ROM
  13541. >>2 uleshort x \b, init=0x%04x
  13542. >>4 uleshort >0 \b, stat=0x%04x
  13543. >>6 uleshort >0 \b, dev=0x%04x
  13544. >>8 uleshort >0 \b, bas=0x%04x
  13545. 0 string AB
  13546. #>2 string 5JSuperLAYDOCK MSX Super Laydock ROM
  13547. #>3 string @HYDLIDE3MSX MSX Hydlide-3 ROM
  13548. #>3 string @3\x80IA862 Golvellius MSX1 ROM
  13549. >2 uleshort >10
  13550. >>10 string \0\0\0\0\0\0 MSX ROM
  13551. >>>0x10 string YZ\0\0\0\0 Konami Game Master 2 MSX ROM
  13552. >>>0x10 string CD \b, Konami RC-
  13553. >>>>0x12 ubyte x \b%d
  13554. >>>>0x13 ubyte/16 x \b%d
  13555. >>>>0x13 ubyte&0xF x \b%d
  13556. >>>0x10 string EF \b, Konami RC-
  13557. >>>>0x12 ubyte x \b%d
  13558. >>>>0x13 ubyte/16 x \b%d
  13559. >>>>0x13 ubyte&0xF x \b%d
  13560. >>>2 uleshort x \b, init=0x%04x
  13561. >>>4 uleshort >0 \b, stat=0x%04x
  13562. >>>6 uleshort >0 \b, dev=0x%04x
  13563. >>>8 uleshort >0 \b, bas=0x%04x
  13564. >2 uleshort 0
  13565. >>4 uleshort 0
  13566. >>>6 uleshort 0
  13567. >>>>8 uleshort >0 MSX BASIC program in ROM, bas=0x%04x
  13568. 0x4000 string AB
  13569. >0x4002 uleshort >0x4010
  13570. >>0x400A string \0\0\0\0\0\0 MSX MegaROM with nonstandard page order
  13571. >>0x4002 uleshort x \b, init=0x%04x
  13572. >>0x4004 uleshort >0 \b, stat=0x%04x
  13573. >>0x4006 uleshort >0 \b, dev=0x%04x
  13574. >>0x4008 uleshort >0 \b, bas=0x%04x
  13575. 0x8000 string AB
  13576. >0x8002 uleshort >0x4010
  13577. >>0x800A string \0\0\0\0\0\0 MSX MegaROM with nonstandard page order
  13578. >>0x8002 uleshort x \b, init=0x%04x
  13579. >>0x8004 uleshort >0 \b, stat=0x%04x
  13580. >>0x8006 uleshort >0 \b, dev=0x%04x
  13581. >>0x8008 uleshort >0 \b, bas=0x%04x
  13582. 0x3C000 string AB
  13583. >0x3C008 string \0\0\0\0\0\0\0\0 MSX MegaROM with nonstandard page order
  13584. >>0x3C002 uleshort x \b, init=0x%04x
  13585. >>0x3C004 uleshort >0 \b, stat=0x%04x
  13586. >>0x3C006 uleshort >0 \b, dev=0x%04x
  13587. >>0x3C008 uleshort >0 \b, bas=0x%04x
  13588. # MSX BIN file
  13589. #0 byte 0xFE
  13590. #>1 uleshort >0x8000
  13591. #>>3 uleshort >0x8004
  13592. #>>>5 uleshort >0x8000 MSX BIN file
  13593. # MSX-BASIC file
  13594. 0 byte 0xFF
  13595. >3 uleshort 0x000A
  13596. >>1 uleshort >0x8000 MSX-BASIC program
  13597. # MSX .CAS file
  13598. 0 string \x1F\xA6\xDE\xBA\xCC\x13\x7D\x74 MSX cassette archive
  13599. # Mega-Assembler file
  13600. 0 byte 0xFE
  13601. >1 uleshort 0x0001
  13602. >>5 uleshort 0xffff
  13603. >>>6 byte 0x0A MSX Mega-Assembler source
  13604. # Execrom Patchfile
  13605. 0 string ExecROM\ patchfile\x1A MSX ExecROM patchfile
  13606. >0x12 ubyte/16 x v%d
  13607. >0x12 ubyte&0xF x \b.%d
  13608. >0x13 ubyte x \b, contains %d patches
  13609. # Konami's King's Valley-2 custom stage (ELG file)
  13610. 4 uleshort 0x0900
  13611. >0xF byte 1
  13612. >>0x14 byte 0
  13613. >>>0x1E string \ \ \
  13614. >>>>0x23 byte 1
  13615. >>>>>0x25 byte 0
  13616. >>>>>>0x15 string >\x30
  13617. >>>>>>>0x15 string <\x5A Konami King's Valley-2 custom stage, title: "%-8.8s"
  13618. >>>>>>>>0x1D byte <32 \b, theme: %d
  13619. # Metal Gear 1 savegame
  13620. #0x4F string \x00\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF
  13621. #>>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
  13622. #>>>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
  13623. # ------------------------------------------------------------------------
  13624. # $File: mup,v 1.4 2009/09/19 16:28:11 christos Exp $
  13625. # mup: file(1) magic for Mup (Music Publisher) input file.
  13626. #
  13627. # From: Abel Cheung <abel (@) oaka.org>
  13628. #
  13629. # NOTE: This header is mainly proposed in the Arkkra mailing list,
  13630. # and is not a mandatory header because of old mup input file
  13631. # compatibility. Noteedit also use mup format, but is not forcing
  13632. # user to use any header as well.
  13633. #
  13634. 0 search/1 //!Mup Mup music publication program input text
  13635. >6 string -Arkkra (Arkkra)
  13636. >>13 string -
  13637. >>>16 string .
  13638. >>>>14 string x \b, need V%.4s
  13639. >>>15 string .
  13640. >>>>14 string x \b, need V%.3s
  13641. >6 string -
  13642. >>9 string .
  13643. >>>7 string x \b, need V%.4s
  13644. >>8 string .
  13645. >>>7 string x \b, need V%.3s
  13646. #------------------------------------------------------------------------------
  13647. # $File: music,v 1.1 2011/11/25 03:28:17 christos Exp $
  13648. # music: file (1) magic for music formats
  13649. # BWW format used by Bagpipe Music Writer Gold by Robert MacNeil Musicworks
  13650. # and Bagpipe Writer by Doug Wickstrom
  13651. #
  13652. 0 string Bagpipe Bagpipe
  13653. >8 string Reader Reader
  13654. >>15 string >\0 (version %.3s)
  13655. >8 string Music\ Writer Music Writer
  13656. >>20 string :
  13657. >>>21 string >\0 (version %.3s)
  13658. >>21 string Gold Gold
  13659. >>>25 string :
  13660. >>>>26 string >\0 (version %.3s)
  13661. #-----------------------------------------------------------------------------
  13662. # $File: natinst,v 1.5 2013/02/06 14:18:52 christos Exp $
  13663. # natinst: file(1) magic for National Instruments Code Files
  13664. #
  13665. # From <egamez@fcfm.buap.mx> Enrique Gamez-Flores
  13666. # version 1
  13667. # Many formats still missing, we use, for the moment LabVIEW
  13668. # We guess VXI format file. VISA, LabWindowsCVI, BridgeVIEW, etc, are missing
  13669. #
  13670. 0 string RSRC National Instruments,
  13671. # Check if it's a LabVIEW File
  13672. >8 string LV LabVIEW File,
  13673. # Check wich kind of file is
  13674. >>10 string SB Code Resource File, data
  13675. >>10 string IN Virtual Instrument Program, data
  13676. >>10 string AR VI Library, data
  13677. # This is for Menu Libraries
  13678. >8 string LMNULBVW Portable File Names, data
  13679. # This is for General Resources
  13680. >8 string rsc Resources File, data
  13681. # This is for VXI Package
  13682. 0 string VMAP National Instruments, VXI File, data
  13683. #------------------------------------------------------------------------------
  13684. # $File: ncr,v 1.7 2009/09/19 16:28:11 christos Exp $
  13685. # ncr: file(1) magic for NCR Tower objects
  13686. #
  13687. # contributed by
  13688. # Michael R. Wayne *** TMC & Associates *** INTERNET: wayne@ford-vax.arpa
  13689. # uucp: {philabs | pyramid} !fmsrl7!wayne OR wayne@fmsrl7.UUCP
  13690. #
  13691. 0 beshort 000610 Tower/XP rel 2 object
  13692. >12 belong >0 not stripped
  13693. >20 beshort 0407 executable
  13694. >20 beshort 0410 pure executable
  13695. >22 beshort >0 - version %ld
  13696. 0 beshort 000615 Tower/XP rel 2 object
  13697. >12 belong >0 not stripped
  13698. >20 beshort 0407 executable
  13699. >20 beshort 0410 pure executable
  13700. >22 beshort >0 - version %ld
  13701. 0 beshort 000620 Tower/XP rel 3 object
  13702. >12 belong >0 not stripped
  13703. >20 beshort 0407 executable
  13704. >20 beshort 0410 pure executable
  13705. >22 beshort >0 - version %ld
  13706. 0 beshort 000625 Tower/XP rel 3 object
  13707. >12 belong >0 not stripped
  13708. >20 beshort 0407 executable
  13709. >20 beshort 0410 pure executable
  13710. >22 beshort >0 - version %ld
  13711. 0 beshort 000630 Tower32/600/400 68020 object
  13712. >12 belong >0 not stripped
  13713. >20 beshort 0407 executable
  13714. >20 beshort 0410 pure executable
  13715. >22 beshort >0 - version %ld
  13716. 0 beshort 000640 Tower32/800 68020
  13717. >18 beshort &020000 w/68881 object
  13718. >18 beshort &040000 compatible object
  13719. >18 beshort &060000 object
  13720. >20 beshort 0407 executable
  13721. >20 beshort 0413 pure executable
  13722. >12 belong >0 not stripped
  13723. >22 beshort >0 - version %ld
  13724. 0 beshort 000645 Tower32/800 68010
  13725. >18 beshort &040000 compatible object
  13726. >18 beshort &060000 object
  13727. >20 beshort 0407 executable
  13728. >20 beshort 0413 pure executable
  13729. >12 belong >0 not stripped
  13730. >22 beshort >0 - version %ld
  13731. #------------------------------------------------------------------------------
  13732. # $File: netbsd,v 1.20 2013/01/09 22:37:24 christos Exp $
  13733. # netbsd: file(1) magic for NetBSD objects
  13734. #
  13735. # All new-style magic numbers are in network byte order.
  13736. # The old-style magic numbers are indistinguishable from the same magic
  13737. # numbers used in other systems, and are handled, for all those systems,
  13738. # in aout.
  13739. #
  13740. 0 belong&0377777777 041400413 a.out NetBSD/i386 demand paged
  13741. >0 byte &0x80
  13742. >>20 lelong <4096 shared library
  13743. >>20 lelong =4096 dynamically linked executable
  13744. >>20 lelong >4096 dynamically linked executable
  13745. >0 byte ^0x80 executable
  13746. >16 lelong >0 not stripped
  13747. 0 belong&0377777777 041400410 a.out NetBSD/i386 pure
  13748. >0 byte &0x80 dynamically linked executable
  13749. >0 byte ^0x80 executable
  13750. >16 lelong >0 not stripped
  13751. 0 belong&0377777777 041400407 a.out NetBSD/i386
  13752. >0 byte &0x80 dynamically linked executable
  13753. >0 byte ^0x80
  13754. >>0 byte &0x40 position independent
  13755. >>20 lelong !0 executable
  13756. >>20 lelong =0 object file
  13757. >16 lelong >0 not stripped
  13758. 0 belong&0377777777 041400507 a.out NetBSD/i386 core
  13759. >12 string >\0 from '%s'
  13760. >32 lelong !0 (signal %d)
  13761. 0 belong&0377777777 041600413 a.out NetBSD/m68k demand paged
  13762. >0 byte &0x80
  13763. >>20 belong <8192 shared library
  13764. >>20 belong =8192 dynamically linked executable
  13765. >>20 belong >8192 dynamically linked executable
  13766. >0 byte ^0x80 executable
  13767. >16 belong >0 not stripped
  13768. 0 belong&0377777777 041600410 a.out NetBSD/m68k pure
  13769. >0 byte &0x80 dynamically linked executable
  13770. >0 byte ^0x80 executable
  13771. >16 belong >0 not stripped
  13772. 0 belong&0377777777 041600407 a.out NetBSD/m68k
  13773. >0 byte &0x80 dynamically linked executable
  13774. >0 byte ^0x80
  13775. >>0 byte &0x40 position independent
  13776. >>20 belong !0 executable
  13777. >>20 belong =0 object file
  13778. >16 belong >0 not stripped
  13779. 0 belong&0377777777 041600507 a.out NetBSD/m68k core
  13780. >12 string >\0 from '%s'
  13781. >32 belong !0 (signal %d)
  13782. 0 belong&0377777777 042000413 a.out NetBSD/m68k4k demand paged
  13783. >0 byte &0x80
  13784. >>20 belong <4096 shared library
  13785. >>20 belong =4096 dynamically linked executable
  13786. >>20 belong >4096 dynamically linked executable
  13787. >0 byte ^0x80 executable
  13788. >16 belong >0 not stripped
  13789. 0 belong&0377777777 042000410 a.out NetBSD/m68k4k pure
  13790. >0 byte &0x80 dynamically linked executable
  13791. >0 byte ^0x80 executable
  13792. >16 belong >0 not stripped
  13793. 0 belong&0377777777 042000407 a.out NetBSD/m68k4k
  13794. >0 byte &0x80 dynamically linked executable
  13795. >0 byte ^0x80
  13796. >>0 byte &0x40 position independent
  13797. >>20 belong !0 executable
  13798. >>20 belong =0 object file
  13799. >16 belong >0 not stripped
  13800. 0 belong&0377777777 042000507 a.out NetBSD/m68k4k core
  13801. >12 string >\0 from '%s'
  13802. >32 belong !0 (signal %d)
  13803. 0 belong&0377777777 042200413 a.out NetBSD/ns32532 demand paged
  13804. >0 byte &0x80
  13805. >>20 lelong <4096 shared library
  13806. >>20 lelong =4096 dynamically linked executable
  13807. >>20 lelong >4096 dynamically linked executable
  13808. >0 byte ^0x80 executable
  13809. >16 lelong >0 not stripped
  13810. 0 belong&0377777777 042200410 a.out NetBSD/ns32532 pure
  13811. >0 byte &0x80 dynamically linked executable
  13812. >0 byte ^0x80 executable
  13813. >16 lelong >0 not stripped
  13814. 0 belong&0377777777 042200407 a.out NetBSD/ns32532
  13815. >0 byte &0x80 dynamically linked executable
  13816. >0 byte ^0x80
  13817. >>0 byte &0x40 position independent
  13818. >>20 lelong !0 executable
  13819. >>20 lelong =0 object file
  13820. >16 lelong >0 not stripped
  13821. 0 belong&0377777777 042200507 a.out NetBSD/ns32532 core
  13822. >12 string >\0 from '%s'
  13823. >32 lelong !0 (signal %d)
  13824. 0 belong&0377777777 045200507 a.out NetBSD/powerpc core
  13825. >12 string >\0 from '%s'
  13826. 0 belong&0377777777 042400413 a.out NetBSD/sparc demand paged
  13827. >0 byte &0x80
  13828. >>20 belong <8192 shared library
  13829. >>20 belong =8192 dynamically linked executable
  13830. >>20 belong >8192 dynamically linked executable
  13831. >0 byte ^0x80 executable
  13832. >16 belong >0 not stripped
  13833. 0 belong&0377777777 042400410 a.out NetBSD/sparc pure
  13834. >0 byte &0x80 dynamically linked executable
  13835. >0 byte ^0x80 executable
  13836. >16 belong >0 not stripped
  13837. 0 belong&0377777777 042400407 a.out NetBSD/sparc
  13838. >0 byte &0x80 dynamically linked executable
  13839. >0 byte ^0x80
  13840. >>0 byte &0x40 position independent
  13841. >>20 belong !0 executable
  13842. >>20 belong =0 object file
  13843. >16 belong >0 not stripped
  13844. 0 belong&0377777777 042400507 a.out NetBSD/sparc core
  13845. >12 string >\0 from '%s'
  13846. >32 belong !0 (signal %d)
  13847. 0 belong&0377777777 042600413 a.out NetBSD/pmax demand paged
  13848. >0 byte &0x80
  13849. >>20 lelong <4096 shared library
  13850. >>20 lelong =4096 dynamically linked executable
  13851. >>20 lelong >4096 dynamically linked executable
  13852. >0 byte ^0x80 executable
  13853. >16 lelong >0 not stripped
  13854. 0 belong&0377777777 042600410 a.out NetBSD/pmax pure
  13855. >0 byte &0x80 dynamically linked executable
  13856. >0 byte ^0x80 executable
  13857. >16 lelong >0 not stripped
  13858. 0 belong&0377777777 042600407 a.out NetBSD/pmax
  13859. >0 byte &0x80 dynamically linked executable
  13860. >0 byte ^0x80
  13861. >>0 byte &0x40 position independent
  13862. >>20 lelong !0 executable
  13863. >>20 lelong =0 object file
  13864. >16 lelong >0 not stripped
  13865. 0 belong&0377777777 042600507 a.out NetBSD/pmax core
  13866. >12 string >\0 from '%s'
  13867. >32 lelong !0 (signal %d)
  13868. 0 belong&0377777777 043000413 a.out NetBSD/vax 1k demand paged
  13869. >0 byte &0x80
  13870. >>20 lelong <4096 shared library
  13871. >>20 lelong =4096 dynamically linked executable
  13872. >>20 lelong >4096 dynamically linked executable
  13873. >0 byte ^0x80 executable
  13874. >16 lelong >0 not stripped
  13875. 0 belong&0377777777 043000410 a.out NetBSD/vax 1k pure
  13876. >0 byte &0x80 dynamically linked executable
  13877. >0 byte ^0x80 executable
  13878. >16 lelong >0 not stripped
  13879. 0 belong&0377777777 043000407 a.out NetBSD/vax 1k
  13880. >0 byte &0x80 dynamically linked executable
  13881. >0 byte ^0x80
  13882. >>0 byte &0x40 position independent
  13883. >>20 lelong !0 executable
  13884. >>20 lelong =0 object file
  13885. >16 lelong >0 not stripped
  13886. 0 belong&0377777777 043000507 a.out NetBSD/vax 1k core
  13887. >12 string >\0 from '%s'
  13888. >32 lelong !0 (signal %d)
  13889. 0 belong&0377777777 045400413 a.out NetBSD/vax 4k demand paged
  13890. >0 byte &0x80
  13891. >>20 lelong <4096 shared library
  13892. >>20 lelong =4096 dynamically linked executable
  13893. >>20 lelong >4096 dynamically linked executable
  13894. >0 byte ^0x80 executable
  13895. >16 lelong >0 not stripped
  13896. 0 belong&0377777777 045400410 a.out NetBSD/vax 4k pure
  13897. >0 byte &0x80 dynamically linked executable
  13898. >0 byte ^0x80 executable
  13899. >16 lelong >0 not stripped
  13900. 0 belong&0377777777 045400407 a.out NetBSD/vax 4k
  13901. >0 byte &0x80 dynamically linked executable
  13902. >0 byte ^0x80
  13903. >>0 byte &0x40 position independent
  13904. >>20 lelong !0 executable
  13905. >>20 lelong =0 object file
  13906. >16 lelong >0 not stripped
  13907. 0 belong&0377777777 045400507 a.out NetBSD/vax 4k core
  13908. >12 string >\0 from '%s'
  13909. >32 lelong !0 (signal %d)
  13910. # NetBSD/alpha does not support (and has never supported) a.out objects,
  13911. # so no rules are provided for them. NetBSD/alpha ELF objects are
  13912. # dealt with in "elf".
  13913. 0 lelong 0x00070185 ECOFF NetBSD/alpha binary
  13914. >10 leshort 0x0001 not stripped
  13915. >10 leshort 0x0000 stripped
  13916. 0 belong&0377777777 043200507 a.out NetBSD/alpha core
  13917. >12 string >\0 from '%s'
  13918. >32 lelong !0 (signal %d)
  13919. 0 belong&0377777777 043400413 a.out NetBSD/mips demand paged
  13920. >0 byte &0x80
  13921. >>20 belong <8192 shared library
  13922. >>20 belong =8192 dynamically linked executable
  13923. >>20 belong >8192 dynamically linked executable
  13924. >0 byte ^0x80 executable
  13925. >16 belong >0 not stripped
  13926. 0 belong&0377777777 043400410 a.out NetBSD/mips pure
  13927. >0 byte &0x80 dynamically linked executable
  13928. >0 byte ^0x80 executable
  13929. >16 belong >0 not stripped
  13930. 0 belong&0377777777 043400407 a.out NetBSD/mips
  13931. >0 byte &0x80 dynamically linked executable
  13932. >0 byte ^0x80
  13933. >>0 byte &0x40 position independent
  13934. >>20 belong !0 executable
  13935. >>20 belong =0 object file
  13936. >16 belong >0 not stripped
  13937. 0 belong&0377777777 043400507 a.out NetBSD/mips core
  13938. >12 string >\0 from '%s'
  13939. >32 belong !0 (signal %d)
  13940. 0 belong&0377777777 043600413 a.out NetBSD/arm32 demand paged
  13941. >0 byte &0x80
  13942. >>20 lelong <4096 shared library
  13943. >>20 lelong =4096 dynamically linked executable
  13944. >>20 lelong >4096 dynamically linked executable
  13945. >0 byte ^0x80 executable
  13946. >16 lelong >0 not stripped
  13947. 0 belong&0377777777 043600410 a.out NetBSD/arm32 pure
  13948. >0 byte &0x80 dynamically linked executable
  13949. >0 byte ^0x80 executable
  13950. >16 lelong >0 not stripped
  13951. 0 belong&0377777777 043600407 a.out NetBSD/arm32
  13952. >0 byte &0x80 dynamically linked executable
  13953. >0 byte ^0x80
  13954. >>0 byte &0x40 position independent
  13955. >>20 lelong !0 executable
  13956. >>20 lelong =0 object file
  13957. >16 lelong >0 not stripped
  13958. # NetBSD/arm26 has always used ELF objects, but it shares a core file
  13959. # format with NetBSD/arm32.
  13960. 0 belong&0377777777 043600507 a.out NetBSD/arm core
  13961. >12 string >\0 from '%s'
  13962. >32 lelong !0 (signal %d)
  13963. # Kernel core dump format
  13964. 0 belong&0x0000ffff 0x00008fca NetBSD kernel core file
  13965. >0 belong&0x03ff0000 0x00000000 \b, Unknown
  13966. >0 belong&0x03ff0000 0x00001000 \b, sun 68010/68020
  13967. >0 belong&0x03ff0000 0x00020000 \b, sun 68020
  13968. >0 belong&0x03ff0000 0x00640000 \b, 386 PC
  13969. >0 belong&0x03ff0000 0x00860000 \b, i386 BSD
  13970. >0 belong&0x03ff0000 0x00870000 \b, m68k BSD (8K pages)
  13971. >0 belong&0x03ff0000 0x00880000 \b, m68k BSD (4K pages)
  13972. >0 belong&0x03ff0000 0x00890000 \b, ns32532 BSD
  13973. >0 belong&0x03ff0000 0x008a0000 \b, sparc/32 BSD
  13974. >0 belong&0x03ff0000 0x008b0000 \b, pmax BSD
  13975. >0 belong&0x03ff0000 0x008c0000 \b, vax BSD (1K pages)
  13976. >0 belong&0x03ff0000 0x008d0000 \b, alpha BSD
  13977. >0 belong&0x03ff0000 0x008e0000 \b, mips BSD (Big Endian)
  13978. >0 belong&0x03ff0000 0x008f0000 \b, arm6 BSD
  13979. >0 belong&0x03ff0000 0x00900000 \b, m68k BSD (2K pages)
  13980. >0 belong&0x03ff0000 0x00910000 \b, sh3 BSD
  13981. >0 belong&0x03ff0000 0x00920000 \b, ppc BSD (Big Endian)
  13982. >0 belong&0x03ff0000 0x00930000 \b, vax BSD (4K pages)
  13983. >0 belong&0x03ff0000 0x00940000 \b, mips1 BSD
  13984. >0 belong&0x03ff0000 0x00950000 \b, mips2 BSD
  13985. >0 belong&0x03ff0000 0x00960000 \b, parisc BSD
  13986. >0 belong&0x03ff0000 0x00970000 \b, sh5/64 BSD
  13987. >0 belong&0x03ff0000 0x00980000 \b, sparc/64 BSD
  13988. >0 belong&0x03ff0000 0x00990000 \b, amd64 BSD
  13989. >0 belong&0x03ff0000 0x009a0000 \b, hp200 (68010) BSD
  13990. >0 belong&0x03ff0000 0x009b0000 \b, hp300 (68020+68881) BSD
  13991. >0 belong&0x03ff0000 0x009b0000 \b, hp300 (68020+68881) BSD
  13992. >0 belong&0x03ff0000 0x00c80000 \b, hp200
  13993. >0 belong&0x03ff0000 0x020b0000 \b, hp300 (68020+68881) HP-UX
  13994. >0 belong&0x03ff0000 0x020c0000 \b, hp300 (68020+68881) HP-UX
  13995. >0 belong&0xfc000000 0x04000000 \b, CPU
  13996. >0 belong&0xfc000000 0x08000000 \b, DATA
  13997. >0 belong&0xfc000000 0x10000000 \b, STACK
  13998. >4 leshort x \b, (headersize = %d
  13999. >6 leshort x \b, segmentsize = %d
  14000. >6 lelong x \b, segments = %d)
  14001. #------------------------------------------------------------------------------
  14002. # $File: netscape,v 1.6 2009/09/19 16:28:11 christos Exp $
  14003. # netscape: file(1) magic for Netscape files
  14004. # "H. Nanosecond" <aldomel@ix.netcom.com>
  14005. # version 3 and 4 I think
  14006. #
  14007. # Netscape Address book .nab
  14008. 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
  14009. # Netscape Communicator address book
  14010. 0 string \000\017\102\111 Netscape Communicator address book
  14011. # .snm Caches
  14012. 0 string #\ Netscape\ folder\ cache Netscape folder cache
  14013. 0 string \000\036\204\220\000 Netscape folder cache
  14014. # .n2p
  14015. # Net 2 Phone
  14016. #0 string 123\130\071\066\061\071\071\071\060\070\061\060\061\063\060
  14017. 0 string SX961999 Net2phone
  14018. #
  14019. #This is files ending in .art, FIXME add more rules
  14020. 0 string JG\004\016\0\0\0\0 ART
  14021. #------------------------------------------------------------------------------
  14022. # $File: netware,v 1.4 2009/09/19 16:28:11 christos Exp $
  14023. # netware: file(1) magic for NetWare Loadable Modules (NLMs)
  14024. # From: Mads Martin Joergensen <mmj@suse.de>
  14025. 0 string NetWare\ Loadable\ Module NetWare Loadable Module
  14026. #------------------------------------------------------------------------------
  14027. # $File: news,v 1.6 2009/09/19 16:28:11 christos Exp $
  14028. # news: file(1) magic for SunOS NeWS fonts (not "news" as in "netnews")
  14029. #
  14030. 0 string StartFontMetrics ASCII font metrics
  14031. 0 string StartFont ASCII font bits
  14032. 0 belong 0x137A2944 NeWS bitmap font
  14033. 0 belong 0x137A2947 NeWS font family
  14034. 0 belong 0x137A2950 scalable OpenFont binary
  14035. 0 belong 0x137A2951 encrypted scalable OpenFont binary
  14036. 8 belong 0x137A2B45 X11/NeWS bitmap font
  14037. 8 belong 0x137A2B48 X11/NeWS font family
  14038. #------------------------------------------------------------------------------
  14039. # $File: nitpicker,v 1.4 2009/09/19 16:28:11 christos Exp $
  14040. # nitpicker: file(1) magic for Flowfiles.
  14041. # From: Christian Jachmann <C.Jachmann@gmx.net> http://www.nitpicker.de
  14042. 0 string NPFF NItpicker Flow File
  14043. >4 byte x V%d.
  14044. >5 byte x %d
  14045. >6 bedate x started: %s
  14046. >10 bedate x stopped: %s
  14047. >14 belong x Bytes: %u
  14048. >18 belong x Bytes1: %u
  14049. >22 belong x Flows: %u
  14050. >26 belong x Pkts: %u
  14051. #------------------------------------------------------------------------------
  14052. # $File: oasis,v 1.1 2011/03/15 02:09:38 christos Exp $
  14053. # OASIS
  14054. # Summary: OASIS stream file
  14055. # Long description: Open Artwork System Interchange Standard
  14056. # File extension: .oas
  14057. # Full name: Ben Cowley (bcowley@broadcom.com)
  14058. # Philip Dixon (pdixon@broadcom.com)
  14059. # Reference: http://www.wrcad.com/oasis/oasis-3626-042303-draft.pdf
  14060. # (see page 3)
  14061. 0 string %SEMI-OASIS\r\n OASIS Stream file
  14062. #------------------------------------------------------------------------------
  14063. # $File: ocaml,v 1.5 2010/09/20 18:55:20 rrt Exp $
  14064. # ocaml: file(1) magic for Objective Caml files.
  14065. 0 string Caml1999 OCaml
  14066. >8 string X exec file
  14067. >8 string I interface file (.cmi)
  14068. >8 string O object file (.cmo)
  14069. >8 string A library file (.cma)
  14070. >8 string Y native object file (.cmx)
  14071. >8 string Z native library file (.cmxa)
  14072. >8 string M abstract syntax tree implementation file
  14073. >8 string N abstract syntax tree interface file
  14074. >9 string >\0 (Version %3.3s)
  14075. #------------------------------------------------------------------------------
  14076. # $File: octave,v 1.4 2009/09/19 16:28:11 christos Exp $
  14077. # octave binary data file(1) magic, from Dirk Eddelbuettel <edd@debian.org>
  14078. 0 string Octave-1-L Octave binary data (little endian)
  14079. 0 string Octave-1-B Octave binary data (big endian)
  14080. #------------------------------------------------------------------------------
  14081. # $File: ole2compounddocs,v 1.4 2009/09/19 16:28:11 christos Exp $
  14082. # Microsoft OLE 2 Compound Documents : file(1) magic for Microsoft Structured
  14083. # storage (http://en.wikipedia.org/wiki/Structured_Storage)
  14084. # Additional tests for OLE 2 Compound Documents should be under this recipe.
  14085. 0 string \320\317\021\340\241\261\032\341 OLE 2 Compound Document
  14086. # - Microstation V8 DGN files (www.bentley.com)
  14087. # Last update on 10/23/2006 by Lester Hightower
  14088. > 0x480 string D\000g\000n\000~\000H : Microstation V8 DGN
  14089. # - Visio documents
  14090. # Last update on 10/23/2006 by Lester Hightower
  14091. > 0x480 string V\000i\000s\000i\000o\000D\000o\000c : Visio Document
  14092. #------------------------------------------------------------------------------
  14093. # $File: olf,v 1.4 2009/09/19 16:28:11 christos Exp $
  14094. # olf: file(1) magic for OLF executables
  14095. #
  14096. # We have to check the byte order flag to see what byte order all the
  14097. # other stuff in the header is in.
  14098. #
  14099. # MIPS R3000 may also be for MIPS R2000.
  14100. # What're the correct byte orders for the nCUBE and the Fujitsu VPP500?
  14101. #
  14102. # Created by Erik Theisen <etheisen@openbsd.org>
  14103. # Based on elf from Daniel Quinlan <quinlan@yggdrasil.com>
  14104. 0 string \177OLF OLF
  14105. >4 byte 0 invalid class
  14106. >4 byte 1 32-bit
  14107. >4 byte 2 64-bit
  14108. >7 byte 0 invalid os
  14109. >7 byte 1 OpenBSD
  14110. >7 byte 2 NetBSD
  14111. >7 byte 3 FreeBSD
  14112. >7 byte 4 4.4BSD
  14113. >7 byte 5 Linux
  14114. >7 byte 6 SVR4
  14115. >7 byte 7 esix
  14116. >7 byte 8 Solaris
  14117. >7 byte 9 Irix
  14118. >7 byte 10 SCO
  14119. >7 byte 11 Dell
  14120. >7 byte 12 NCR
  14121. >5 byte 0 invalid byte order
  14122. >5 byte 1 LSB
  14123. >>16 leshort 0 no file type,
  14124. >>16 leshort 1 relocatable,
  14125. >>16 leshort 2 executable,
  14126. >>16 leshort 3 shared object,
  14127. # Core handling from Peter Tobias <tobias@server.et-inf.fho-emden.de>
  14128. # corrections by Christian 'Dr. Disk' Hechelmann <drdisk@ds9.au.s.shuttle.de>
  14129. >>16 leshort 4 core file
  14130. >>>(0x38+0xcc) string >\0 of '%s'
  14131. >>>(0x38+0x10) lelong >0 (signal %d),
  14132. >>16 leshort &0xff00 processor-specific,
  14133. >>18 leshort 0 no machine,
  14134. >>18 leshort 1 AT&T WE32100 - invalid byte order,
  14135. >>18 leshort 2 SPARC - invalid byte order,
  14136. >>18 leshort 3 Intel 80386,
  14137. >>18 leshort 4 Motorola 68000 - invalid byte order,
  14138. >>18 leshort 5 Motorola 88000 - invalid byte order,
  14139. >>18 leshort 6 Intel 80486,
  14140. >>18 leshort 7 Intel 80860,
  14141. >>18 leshort 8 MIPS R3000_BE - invalid byte order,
  14142. >>18 leshort 9 Amdahl - invalid byte order,
  14143. >>18 leshort 10 MIPS R3000_LE,
  14144. >>18 leshort 11 RS6000 - invalid byte order,
  14145. >>18 leshort 15 PA-RISC - invalid byte order,
  14146. >>18 leshort 16 nCUBE,
  14147. >>18 leshort 17 VPP500,
  14148. >>18 leshort 18 SPARC32PLUS,
  14149. >>18 leshort 20 PowerPC,
  14150. >>18 leshort 0x9026 Alpha,
  14151. >>20 lelong 0 invalid version
  14152. >>20 lelong 1 version 1
  14153. >>36 lelong 1 MathCoPro/FPU/MAU Required
  14154. >8 string >\0 (%s)
  14155. >5 byte 2 MSB
  14156. >>16 beshort 0 no file type,
  14157. >>16 beshort 1 relocatable,
  14158. >>16 beshort 2 executable,
  14159. >>16 beshort 3 shared object,
  14160. >>16 beshort 4 core file,
  14161. >>>(0x38+0xcc) string >\0 of '%s'
  14162. >>>(0x38+0x10) belong >0 (signal %d),
  14163. >>16 beshort &0xff00 processor-specific,
  14164. >>18 beshort 0 no machine,
  14165. >>18 beshort 1 AT&T WE32100,
  14166. >>18 beshort 2 SPARC,
  14167. >>18 beshort 3 Intel 80386 - invalid byte order,
  14168. >>18 beshort 4 Motorola 68000,
  14169. >>18 beshort 5 Motorola 88000,
  14170. >>18 beshort 6 Intel 80486 - invalid byte order,
  14171. >>18 beshort 7 Intel 80860,
  14172. >>18 beshort 8 MIPS R3000_BE,
  14173. >>18 beshort 9 Amdahl,
  14174. >>18 beshort 10 MIPS R3000_LE - invalid byte order,
  14175. >>18 beshort 11 RS6000,
  14176. >>18 beshort 15 PA-RISC,
  14177. >>18 beshort 16 nCUBE,
  14178. >>18 beshort 17 VPP500,
  14179. >>18 beshort 18 SPARC32PLUS,
  14180. >>18 beshort 20 PowerPC or cisco 4500,
  14181. >>18 beshort 21 cisco 7500,
  14182. >>18 beshort 24 cisco SVIP,
  14183. >>18 beshort 25 cisco 7200,
  14184. >>18 beshort 36 cisco 12000,
  14185. >>18 beshort 0x9026 Alpha,
  14186. >>20 belong 0 invalid version
  14187. >>20 belong 1 version 1
  14188. >>36 belong 1 MathCoPro/FPU/MAU Required
  14189. #------------------------------------------------------------------------------
  14190. # $File: os2,v 1.7 2009/09/19 16:28:11 christos Exp $
  14191. # os2: file(1) magic for OS/2 files
  14192. #
  14193. # Provided 1998/08/22 by
  14194. # David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
  14195. 1 search/1 InternetShortcut MS Windows 95 Internet shortcut text
  14196. >24 search/1 >\ (URL=<%s>)
  14197. # OS/2 URL objects
  14198. # Provided 1998/08/22 by
  14199. # David Mediavilla <davidme.news@REMOVEIFNOTSPAMusa.net>
  14200. #0 string http: OS/2 URL object text
  14201. #>5 string >\ (WWW) <http:%s>
  14202. #0 string mailto: OS/2 URL object text
  14203. #>7 string >\ (email) <%s>
  14204. #0 string news: OS/2 URL object text
  14205. #>5 string >\ (Usenet) <%s>
  14206. #0 string ftp: OS/2 URL object text
  14207. #>4 string >\ (FTP) <ftp:%s>
  14208. #0 string file: OS/2 URL object text
  14209. #>5 string >\ (Local file) <%s>
  14210. # >>>>> OS/2 INF/HLP <<<<< (source: Daniel Dissett ddissett@netcom.com)
  14211. # Carl Hauser (chauser.parc@xerox.com) and
  14212. # Marcus Groeber (marcusg@ph-cip.uni-koeln.de)
  14213. # list the following header format in inf02a.doc:
  14214. #
  14215. # int16 ID; // ID magic word (5348h = "HS")
  14216. # int8 unknown1; // unknown purpose, could be third letter of ID
  14217. # int8 flags; // probably a flag word...
  14218. # // bit 0: set if INF style file
  14219. # // bit 4: set if HLP style file
  14220. # // patching this byte allows reading HLP files
  14221. # // using the VIEW command, while help files
  14222. # // seem to work with INF settings here as well.
  14223. # int16 hdrsize; // total size of header
  14224. # int16 unknown2; // unknown purpose
  14225. #
  14226. 0 string HSP\x01\x9b\x00 OS/2 INF
  14227. >107 string >0 (%s)
  14228. 0 string HSP\x10\x9b\x00 OS/2 HLP
  14229. >107 string >0 (%s)
  14230. # OS/2 INI (this is a guess)
  14231. 0 string \xff\xff\xff\xff\x14\0\0\0 OS/2 INI
  14232. #------------------------------------------------------------------------------
  14233. # $File: os400,v 1.5 2009/09/19 16:28:11 christos Exp $
  14234. # os400: file(1) magic for IBM OS/400 files
  14235. #
  14236. # IBM OS/400 (i5/OS) Save file (SAVF) - gerardo.cacciari@gmail.com
  14237. # In spite of its quite variable format (due to internal memory page
  14238. # length differences between CISC and RISC versions of the OS) the
  14239. # SAVF structure hasn't suitable offsets to identify the catalog
  14240. # header in the first descriptor where there are some useful infos,
  14241. # so we must search in a somewhat large area for a particular string
  14242. # that represents the EBCDIC encoding of 'QSRDSSPC' (save/restore
  14243. # descriptor space) preceded by a two byte constant.
  14244. #
  14245. 1090 search/7393 \x19\xDB\xD8\xE2\xD9\xC4\xE2\xE2\xD7\xC3 IBM OS/400 save file data
  14246. >&212 byte 0x01 \b, created with SAVOBJ
  14247. >&212 byte 0x02 \b, created with SAVLIB
  14248. >&212 byte 0x07 \b, created with SAVCFG
  14249. >&212 byte 0x08 \b, created with SAVSECDTA
  14250. >&212 byte 0x0A \b, created with SAVSECDTA
  14251. >&212 byte 0x0B \b, created with SAVDLO
  14252. >&212 byte 0x0D \b, created with SAVLICPGM
  14253. >&212 byte 0x11 \b, created with SAVCHGOBJ
  14254. >&213 byte 0x44 \b, at least V5R4 to open
  14255. >&213 byte 0x43 \b, at least V5R3 to open
  14256. >&213 byte 0x42 \b, at least V5R2 to open
  14257. >&213 byte 0x41 \b, at least V5R1 to open
  14258. >&213 byte 0x40 \b, at least V4R5 to open
  14259. >&213 byte 0x3F \b, at least V4R4 to open
  14260. >&213 byte 0x3E \b, at least V4R3 to open
  14261. >&213 byte 0x3C \b, at least V4R2 to open
  14262. >&213 byte 0x3D \b, at least V4R1M4 to open
  14263. >&213 byte 0x3B \b, at least V4R1 to open
  14264. >&213 byte 0x3A \b, at least V3R7 to open
  14265. >&213 byte 0x35 \b, at least V3R6 to open
  14266. >&213 byte 0x36 \b, at least V3R2 to open
  14267. >&213 byte 0x34 \b, at least V3R1 to open
  14268. >&213 byte 0x31 \b, at least V3R0M5 to open
  14269. >&213 byte 0x30 \b, at least V2R3 to open
  14270. #------------------------------------------------------------------------------
  14271. # $File: os9,v 1.7 2011/05/13 22:15:54 christos Exp $
  14272. #
  14273. # Copyright (c) 1996 Ignatios Souvatzis. All rights reserved.
  14274. #
  14275. # Redistribution and use in source and binary forms, with or without
  14276. # modification, are permitted provided that the following conditions
  14277. # are met:
  14278. # 1. Redistributions of source code must retain the above copyright
  14279. # notice, this list of conditions and the following disclaimer.
  14280. # 2. Redistributions in binary form must reproduce the above copyright
  14281. # notice, this list of conditions and the following disclaimer in the
  14282. # documentation and/or other materials provided with the distribution.
  14283. #
  14284. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  14285. # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  14286. # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14287. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  14288. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  14289. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  14290. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  14291. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  14292. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  14293. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14294. #
  14295. #
  14296. #
  14297. # OS9/6809 module descriptions:
  14298. #
  14299. 0 beshort 0x87CD OS9/6809 module:
  14300. #
  14301. >6 byte&0x0f 0x00 non-executable
  14302. >6 byte&0x0f 0x01 machine language
  14303. >6 byte&0x0f 0x02 BASIC I-code
  14304. >6 byte&0x0f 0x03 Pascal P-code
  14305. >6 byte&0x0f 0x04 C I-code
  14306. >6 byte&0x0f 0x05 COBOL I-code
  14307. >6 byte&0x0f 0x06 Fortran I-code
  14308. #
  14309. >6 byte&0xf0 0x10 program executable
  14310. >6 byte&0xf0 0x20 subroutine
  14311. >6 byte&0xf0 0x30 multi-module
  14312. >6 byte&0xf0 0x40 data module
  14313. #
  14314. >6 byte&0xf0 0xC0 system module
  14315. >6 byte&0xf0 0xD0 file manager
  14316. >6 byte&0xf0 0xE0 device driver
  14317. >6 byte&0xf0 0xF0 device descriptor
  14318. #
  14319. # OS9/m68k stuff (to be continued)
  14320. #
  14321. 0 beshort 0x4AFC OS9/68K module:
  14322. #
  14323. # attr
  14324. >0x14 byte&0x80 0x80 re-entrant
  14325. >0x14 byte&0x40 0x40 ghost
  14326. >0x14 byte&0x20 0x20 system-state
  14327. #
  14328. # lang:
  14329. #
  14330. >0x13 byte 1 machine language
  14331. >0x13 byte 2 BASIC I-code
  14332. >0x13 byte 3 Pascal P-code
  14333. >0x13 byte 4 C I-code
  14334. >0x13 byte 5 COBOL I-code
  14335. >0x13 byte 6 Fortran I-code
  14336. #
  14337. #
  14338. # type:
  14339. #
  14340. >0x12 byte 1 program executable
  14341. >0x12 byte 2 subroutine
  14342. >0x12 byte 3 multi-module
  14343. >0x12 byte 4 data module
  14344. >0x12 byte 11 trap library
  14345. >0x12 byte 12 system module
  14346. >0x12 byte 13 file manager
  14347. >0x12 byte 14 device driver
  14348. >0x12 byte 15 device descriptor
  14349. #------------------------------------------------------------------------------
  14350. # $File: osf1,v 1.7 2009/09/19 16:28:11 christos Exp $
  14351. #
  14352. # Mach magic number info
  14353. #
  14354. 0 long 0xefbe OSF/Rose object
  14355. # I386 magic number info
  14356. #
  14357. 0 short 0565 i386 COFF object
  14358. #------------------------------------------------------------------------------
  14359. # $File: palm,v 1.11 2013/12/31 19:18:02 christos Exp $
  14360. # palm: file(1) magic for PalmOS {.prc,.pdb}: applications, docfiles, and hacks
  14361. #
  14362. # Brian Lalor <blalor@hcirisc.cs.binghamton.edu>
  14363. # These are weak, byte 59 is not guaranteed to be 0 and there are
  14364. # 8 character identifiers at byte 60, one I found for appl is BIGb.
  14365. # What are the possibilities and where is this documented?
  14366. # The common header format for PalmOS .pdb/.prc files is
  14367. # {
  14368. # char name[ 32 ];
  14369. # Word attributes;
  14370. # Word version;
  14371. # DWord creationDate;
  14372. # DWord modificationDate;
  14373. # DWord lastBackupDate;
  14374. # DWord modificationNumber;
  14375. # DWord appInfoID;
  14376. # DWord sortInfoID;
  14377. # char type[4];
  14378. # char creator[4];
  14379. # DWord uniqueIDSeed;
  14380. # RecordListType recordList;
  14381. # };
  14382. #
  14383. # Datestamps are unsigned seconds since the MacOS epoch (Jan 1, 1904),
  14384. # or Unix/POSIX time + 2082844800.
  14385. 0 name aportisdoc
  14386. # date is supposed to be big-endian seconds since 1 Jan 1904, but many
  14387. # files contain the timestamp in little-endian or a completely
  14388. # nonsensical value...
  14389. #>36 bedate-2082844800 >0 \b, created %s
  14390. # compression: 1=uncomp, 2=orig, 0x4448=HuffDic
  14391. >(78.L) beshort =1 \b, uncompressed
  14392. # compressed
  14393. >(78.L) beshort >1
  14394. >>(78.L+4) belong x \b, %d bytes uncompressed
  14395. # appl
  14396. #60 string appl PalmOS application
  14397. #>0 string >\0 "%s"
  14398. # HACK
  14399. #60 string HACK HackMaster hack
  14400. #>0 string >\0 "%s"
  14401. # iSiloX e-book
  14402. 60 string SDocSilX iSiloX E-book
  14403. >0 string >\0 "%s"
  14404. # Mobipocket (www.mobipocket.com), donated by Carl Witty
  14405. # expanded by Ralf Brown
  14406. 60 string BOOKMOBI Mobipocket E-book
  14407. # MobiPocket stores a full title, pointed at by the belong at offset
  14408. # 0x54 in its header at (78.L), with length given by the belong at
  14409. # offset 0x58.
  14410. # there's no guarantee that the title string is null-terminated, but
  14411. # we currently can't specify a variable-length string where the length
  14412. # field is not at the start of the string; in practice, the data
  14413. # following the string always seems to start with a zero byte
  14414. >(78.L) belong x
  14415. >>&(&0x50.L-4) string >\0 "%s"
  14416. >0 use aportisdoc
  14417. >>(78.L+0x68) belong >0 \b, version %d
  14418. >>(78.L+0x1C) belong !0 \b, codepage %d
  14419. >>(78.L+0x0C) beshort >0 \b, encrypted (type %d)
  14420. # AportisDoc/PalmDOC
  14421. 60 string TEXtREAd AportisDoc/PalmDOC E-book
  14422. >0 string >\0 "%s"
  14423. >0 use aportisdoc
  14424. # Variety of PalmOS document types
  14425. # Michael-John Turner <mj@debian.org>
  14426. # Thanks to Hasan Umit Ezerce <humit@tr-net.net.tr> for his DocType
  14427. 60 string BVokBDIC BDicty PalmOS document
  14428. >0 string >\0 "%s"
  14429. 60 string DB99DBOS DB PalmOS document
  14430. >0 string >\0 "%s"
  14431. 60 string vIMGView FireViewer/ImageViewer PalmOS document
  14432. >0 string >\0 "%s"
  14433. 60 string PmDBPmDB HanDBase PalmOS document
  14434. >0 string >\0 "%s"
  14435. 60 string InfoINDB InfoView PalmOS document
  14436. >0 string >\0 "%s"
  14437. 60 string ToGoToGo iSilo PalmOS document
  14438. >0 string >\0 "%s"
  14439. 60 string JfDbJBas JFile PalmOS document
  14440. >0 string >\0 "%s"
  14441. 60 string JfDbJFil JFile Pro PalmOS document
  14442. >0 string >\0 "%s"
  14443. 60 string DATALSdb List PalmOS document
  14444. >0 string >\0 "%s"
  14445. 60 string Mdb1Mdb1 MobileDB PalmOS document
  14446. >0 string >\0 "%s"
  14447. 60 string PNRdPPrs PeanutPress PalmOS document
  14448. >0 string >\0 "%s"
  14449. 60 string DataPlkr Plucker PalmOS document
  14450. >0 string >\0 "%s"
  14451. 60 string DataSprd QuickSheet PalmOS document
  14452. >0 string >\0 "%s"
  14453. 60 string SM01SMem SuperMemo PalmOS document
  14454. >0 string >\0 "%s"
  14455. 60 string TEXtTlDc TealDoc PalmOS document
  14456. >0 string >\0 "%s"
  14457. 60 string InfoTlIf TealInfo PalmOS document
  14458. >0 string >\0 "%s"
  14459. 60 string DataTlMl TealMeal PalmOS document
  14460. >0 string >\0 "%s"
  14461. 60 string DataTlPt TealPaint PalmOS document
  14462. >0 string >\0 "%s"
  14463. 60 string dataTDBP ThinkDB PalmOS document
  14464. >0 string >\0 "%s"
  14465. 60 string TdatTide Tides PalmOS document
  14466. >0 string >\0 "%s"
  14467. 60 string ToRaTRPW TomeRaider PalmOS document
  14468. >0 string >\0 "%s"
  14469. # A GutenPalm zTXT etext for use on Palm Pilots (http://gutenpalm.sf.net)
  14470. # For version 1.xx zTXTs, outputs version and numbers of bookmarks and
  14471. # annotations.
  14472. # For other versions, just outputs version.
  14473. #
  14474. 60 string zTXT A GutenPalm zTXT e-book
  14475. >0 string >\0 "%s"
  14476. >(0x4E.L) byte 0
  14477. >>(0x4E.L+1) byte x (v0.%02d)
  14478. >(0x4E.L) byte 1
  14479. >>(0x4E.L+1) byte x (v1.%02d)
  14480. >>>(0x4E.L+10) beshort >0
  14481. >>>>(0x4E.L+10) beshort <2 - 1 bookmark
  14482. >>>>(0x4E.L+10) beshort >1 - %d bookmarks
  14483. >>>(0x4E.L+14) beshort >0
  14484. >>>>(0x4E.L+14) beshort <2 - 1 annotation
  14485. >>>>(0x4E.L+14) beshort >1 - %d annotations
  14486. >(0x4E.L) byte >1 (v%d.
  14487. >>(0x4E.L+1) byte x %02d)
  14488. # Palm OS .prc file types
  14489. 60 string libr Palm OS dynamic library data
  14490. >0 string >\0 "%s"
  14491. 60 string ptch Palm OS operating system patch data
  14492. >0 string >\0 "%s"
  14493. # Mobipocket (www.mobipocket.com), donated by Carl Witty
  14494. 60 string BOOKMOBI Mobipocket E-book
  14495. >0 string >\0 "%s"
  14496. #------------------------------------------------------------------------------
  14497. # $File: parix,v 1.4 2009/09/19 16:28:11 christos Exp $
  14498. #
  14499. # Parix COFF executables
  14500. # From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
  14501. #
  14502. 0 beshort&0xfff 0xACE PARIX
  14503. >0 byte&0xf0 0x80 T800
  14504. >0 byte&0xf0 0x90 T9000
  14505. >19 byte&0x02 0x02 executable
  14506. >19 byte&0x02 0x00 object
  14507. >19 byte&0x0c 0x00 not stripped
  14508. #------------------------------------------------------------------------------
  14509. # $File: parrot,v 1.1 2010/07/08 20:18:40 christos Exp $
  14510. # parrot: file(1) magic for Parrot Virtual Machine
  14511. # URL: http://www.lua.org/
  14512. # From: Lubomir Rintel <lkundrak@v3.sk>
  14513. # Compiled Parrot byte code
  14514. 0 string \376PBC\r\n\032\n Parrot bytecode
  14515. >64 byte x %d.
  14516. >72 byte x \b%d,
  14517. >8 byte >0 %d byte words,
  14518. >16 byte 0 little-endian,
  14519. >16 byte 1 big-endian,
  14520. >32 byte 0 IEEE-754 8 byte double floats,
  14521. >32 byte 1 x86 12 byte long double floats,
  14522. >32 byte 2 IEEE-754 16 byte long double floats,
  14523. >32 byte 3 MIPS 16 byte long double floats,
  14524. >32 byte 4 AIX 16 byte long double floats,
  14525. >32 byte 5 4-byte floats,
  14526. >40 byte x Parrot %d.
  14527. >48 byte x \b%d.
  14528. >56 byte x \b%d
  14529. #------------------------------------------------------------------------------
  14530. # $File: pascal,v 1.1 2011/12/08 12:12:46 rrt Exp $
  14531. # pascal: file(1) magic for Pascal source
  14532. #
  14533. 0 search/8192 (input, Pascal source text
  14534. !:mime text/x-pascal
  14535. 0 regex \^program Pascal source text
  14536. !:mime text/x-pascal
  14537. 0 regex \^record Pascal source text
  14538. !:mime text/x-pascal
  14539. #------------------------------------------------------------------------------
  14540. # $File: pbf,v 1.1 2013/12/21 14:27:24 christos Exp $
  14541. # file(1) magic(5) data for OpenStreetMap
  14542. # OpenStreetMap Protocolbuffer Binary Format (.osm.pbf)
  14543. # http://wiki.openstreetmap.org/wiki/PBF_Format
  14544. # From: Markus Heidelberg <markus.heidelberg@web.de>
  14545. 0 belong 0x0000000D
  14546. >4 beshort 0x0A09
  14547. >>6 string OSMHeader OpenStreetMap Protocolbuffer Binary Format
  14548. #------------------------------------------------------------------------------
  14549. # $File: pbm,v 1.6 2009/09/19 16:28:11 christos Exp $
  14550. # pbm: file(1) magic for Portable Bitmap files
  14551. #
  14552. # XXX - byte order?
  14553. #
  14554. 0 short 0x2a17 "compact bitmap" format (Poskanzer)
  14555. #------------------------------------------------------------------------------
  14556. # $File: pdf,v 1.7 2013/08/22 07:47:26 christos Exp $
  14557. # pdf: file(1) magic for Portable Document Format
  14558. #
  14559. 0 string %PDF- PDF document
  14560. !:mime application/pdf
  14561. >5 byte x \b, version %c
  14562. >7 byte x \b.%c
  14563. # From: Nick Schmalenberger <nick@schmalenberger.us>
  14564. # Forms Data Format
  14565. 0 string %FDF- FDF document
  14566. !:mime application/vnd.fdf
  14567. >5 byte x \b, version %c
  14568. >7 byte x \b.%c
  14569. #------------------------------------------------------------------------------
  14570. # $File: pdp,v 1.9 2013/04/19 20:11:43 christos Exp $
  14571. # pdp: file(1) magic for PDP-11 executable/object and APL workspace
  14572. #
  14573. 0 lelong 0101555 PDP-11 single precision APL workspace
  14574. 0 lelong 0101554 PDP-11 double precision APL workspace
  14575. #
  14576. # PDP-11 a.out
  14577. #
  14578. 0 leshort 0407 PDP-11 executable
  14579. >8 leshort >0 not stripped
  14580. >15 byte >0 - version %ld
  14581. # updated by Joerg Jenderek at Mar 2013
  14582. # GRR: line below too general as it catches also Windows precompiled setup information *.PNF
  14583. 0 leshort 0401
  14584. # skip *.PNF with WinDirPathOffset 58h
  14585. >68 ulelong !0x00000058 PDP-11 UNIX/RT ldp
  14586. # skip *.PNF with high byte of InfVersionDatumCount zero
  14587. #>>15 byte !0 PDP-11 UNIX/RT ldp
  14588. 0 leshort 0405 PDP-11 old overlay
  14589. 0 leshort 0410 PDP-11 pure executable
  14590. >8 leshort >0 not stripped
  14591. >15 byte >0 - version %ld
  14592. 0 leshort 0411 PDP-11 separate I&D executable
  14593. >8 leshort >0 not stripped
  14594. >15 byte >0 - version %ld
  14595. 0 leshort 0437 PDP-11 kernel overlay
  14596. # These last three are derived from 2.11BSD file(1)
  14597. 0 leshort 0413 PDP-11 demand-paged pure executable
  14598. >8 leshort >0 not stripped
  14599. 0 leshort 0430 PDP-11 overlaid pure executable
  14600. >8 leshort >0 not stripped
  14601. 0 leshort 0431 PDP-11 overlaid separate executable
  14602. >8 leshort >0 not stripped
  14603. #------------------------------------------------------------------------------
  14604. # $File: perl,v 1.21 2013/12/08 23:33:18 christos Exp $
  14605. # perl: file(1) magic for Larry Wall's perl language.
  14606. #
  14607. # The `eval' lines recognizes an outrageously clever hack.
  14608. # Keith Waclena <keith@cerberus.uchicago.edu>
  14609. # Send additions to <perl5-porters@perl.org>
  14610. 0 search/1 eval\ "exec\ /bin/perl Perl script text
  14611. !:mime text/x-perl
  14612. 0 search/1 eval\ "exec\ /usr/bin/perl Perl script text
  14613. !:mime text/x-perl
  14614. 0 search/1 eval\ "exec\ /usr/local/bin/perl Perl script text
  14615. !:mime text/x-perl
  14616. 0 search/1 eval\ '(exit\ $?0)'\ &&\ eval\ 'exec Perl script text
  14617. !:mime text/x-perl
  14618. 0 search/1 #!/usr/bin/env\ perl Perl script text executable
  14619. !:mime text/x-perl
  14620. 0 search/1 #!\ /usr/bin/env\ perl Perl script text executable
  14621. !:mime text/x-perl
  14622. 0 search/1 #!
  14623. >0 regex \^#!.*/bin/perl$ Perl script text executable
  14624. !:mime text/x-perl
  14625. # by Dmitry V. Levin and Alexey Tourbin
  14626. # check the first line
  14627. 0 search/1 package
  14628. >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *; Perl5 module source text
  14629. !:strength + 10
  14630. # not 'p', check other lines
  14631. 0 search/1 !p
  14632. >0 regex \^package[\ \t]+[0-9A-Za-z_:]+\ *;
  14633. >>0 regex \^1\ *;|\^(use|sub|my)\ .*[(;{=] Perl5 module source text
  14634. !:strength + 10
  14635. # Perl POD documents
  14636. # From: Tom Hukins <tom@eborcom.com>
  14637. 0 search/1/W \=pod\n Perl POD document text
  14638. 0 search/1/W \n\=pod\n Perl POD document text
  14639. 0 search/1/W \=head1\ Perl POD document text
  14640. 0 search/1/W \n\=head1\ Perl POD document text
  14641. 0 search/1/W \=head2\ Perl POD document text
  14642. 0 search/1/W \n\=head2\ Perl POD document text
  14643. 0 search/1/W \=encoding\ Perl POD document text
  14644. 0 search/1/W \n\=encoding\ Perl POD document text
  14645. # Perl Storable data files.
  14646. 0 string perl-store perl Storable (v0.6) data
  14647. >4 byte >0 (net-order %d)
  14648. >>4 byte &01 (network-ordered)
  14649. >>4 byte =3 (major 1)
  14650. >>4 byte =2 (major 1)
  14651. 0 string pst0 perl Storable (v0.7) data
  14652. >4 byte >0
  14653. >>4 byte &01 (network-ordered)
  14654. >>4 byte =5 (major 2)
  14655. >>4 byte =4 (major 2)
  14656. >>5 byte >0 (minor %d)
  14657. #------------------------------------------------------------------------------
  14658. # $File: pgp,v 1.9 2009/09/19 16:28:11 christos Exp $
  14659. # pgp: file(1) magic for Pretty Good Privacy
  14660. # see http://lists.gnupg.org/pipermail/gnupg-devel/1999-September/016052.html
  14661. #
  14662. 0 beshort 0x9900 PGP key public ring
  14663. !:mime application/x-pgp-keyring
  14664. 0 beshort 0x9501 PGP key security ring
  14665. !:mime application/x-pgp-keyring
  14666. 0 beshort 0x9500 PGP key security ring
  14667. !:mime application/x-pgp-keyring
  14668. 0 beshort 0xa600 PGP encrypted data
  14669. #!:mime application/pgp-encrypted
  14670. #0 string -----BEGIN\040PGP text/PGP armored data
  14671. !:mime text/PGP # encoding: armored data
  14672. #>15 string PUBLIC\040KEY\040BLOCK- public key block
  14673. #>15 string MESSAGE- message
  14674. #>15 string SIGNED\040MESSAGE- signed message
  14675. #>15 string PGP\040SIGNATURE- signature
  14676. 2 string ---BEGIN\ PGP\ PUBLIC\ KEY\ BLOCK- PGP public key block
  14677. !:mime application/pgp-keys
  14678. 0 string -----BEGIN\040PGP\40MESSAGE- PGP message
  14679. !:mime application/pgp
  14680. 0 string -----BEGIN\040PGP\40SIGNATURE- PGP signature
  14681. !:mime application/pgp-signature
  14682. #------------------------------------------------------------------------------
  14683. # $File: pkgadd,v 1.6 2009/09/19 16:28:11 christos Exp $
  14684. # pkgadd: file(1) magic for SysV R4 PKG Datastreams
  14685. #
  14686. 0 string #\ PaCkAgE\ DaTaStReAm pkg Datastream (SVR4)
  14687. !:mime application/x-svr4-package
  14688. #------------------------------------------------------------------------------
  14689. # $File: plan9,v 1.5 2009/09/19 16:28:11 christos Exp $
  14690. # plan9: file(1) magic for AT&T Bell Labs' Plan 9 executables
  14691. # From: "Stefan A. Haubenthal" <polluks@web.de>
  14692. #
  14693. 0 belong 0x00000107 Plan 9 executable, Motorola 68k
  14694. 0 belong 0x000001EB Plan 9 executable, Intel 386
  14695. 0 belong 0x00000247 Plan 9 executable, Intel 960
  14696. 0 belong 0x000002AB Plan 9 executable, SPARC
  14697. 0 belong 0x00000407 Plan 9 executable, MIPS R3000
  14698. 0 belong 0x0000048B Plan 9 executable, AT&T DSP 3210
  14699. 0 belong 0x00000517 Plan 9 executable, MIPS R4000 BE
  14700. 0 belong 0x000005AB Plan 9 executable, AMD 29000
  14701. 0 belong 0x00000647 Plan 9 executable, ARM 7-something
  14702. 0 belong 0x000006EB Plan 9 executable, PowerPC
  14703. 0 belong 0x00000797 Plan 9 executable, MIPS R4000 LE
  14704. 0 belong 0x0000084B Plan 9 executable, DEC Alpha
  14705. #------------------------------------------------------------------------------
  14706. # $File: plus5,v 1.6 2009/09/19 16:28:11 christos Exp $
  14707. # plus5: file(1) magic for Plus Five's UNIX MUMPS
  14708. #
  14709. # XXX - byte order? Paging Hokey....
  14710. #
  14711. 0 short 0x259 mumps avl global
  14712. >2 byte >0 (V%d)
  14713. >6 byte >0 with %d byte name
  14714. >7 byte >0 and %d byte data cells
  14715. 0 short 0x25a mumps blt global
  14716. >2 byte >0 (V%d)
  14717. >8 short >0 - %d byte blocks
  14718. >15 byte 0x00 - P/D format
  14719. >15 byte 0x01 - P/K/D format
  14720. >15 byte 0x02 - K/D format
  14721. >15 byte >0x02 - Bad Flags
  14722. #------------------------------------------------------------------------------
  14723. # $File: printer,v 1.25 2011/05/20 23:31:46 christos Exp $
  14724. # printer: file(1) magic for printer-formatted files
  14725. #
  14726. # PostScript, updated by Daniel Quinlan (quinlan@yggdrasil.com)
  14727. 0 string %! PostScript document text
  14728. !:mime application/postscript
  14729. !:apple ASPSTEXT
  14730. >2 string PS-Adobe- conforming
  14731. >>11 string >\0 DSC level %.3s
  14732. >>>15 string EPS \b, type %s
  14733. >>>15 string Query \b, type %s
  14734. >>>15 string ExitServer \b, type %s
  14735. >>>15 search/1000 %%LanguageLevel:\
  14736. >>>>&0 string >\0 \b, Level %s
  14737. # Some PCs have the annoying habit of adding a ^D as a document separator
  14738. 0 string \004%! PostScript document text
  14739. !:mime application/postscript
  14740. !:apple ASPSTEXT
  14741. >3 string PS-Adobe- conforming
  14742. >>12 string >\0 DSC level %.3s
  14743. >>>16 string EPS \b, type %s
  14744. >>>16 string Query \b, type %s
  14745. >>>16 string ExitServer \b, type %s
  14746. >>>16 search/1000 %%LanguageLevel:\
  14747. >>>>&0 string >\0 \b, Level %s
  14748. 0 string \033%-12345X%!PS PostScript document
  14749. # DOS EPS Binary File Header
  14750. # From: Ed Sznyter <ews@Black.Market.NET>
  14751. 0 belong 0xC5D0D3C6 DOS EPS Binary File
  14752. >4 long >0 Postscript starts at byte %d
  14753. >>8 long >0 length %d
  14754. >>>12 long >0 Metafile starts at byte %d
  14755. >>>>16 long >0 length %d
  14756. >>>20 long >0 TIFF starts at byte %d
  14757. >>>>24 long >0 length %d
  14758. # Summary: Adobe's PostScript Printer Description File
  14759. # Extension: .ppd
  14760. # Reference: http://partners.adobe.com/public/developer/en/ps/5003.PPD_Spec_v4.3.pdf, Section 3.8
  14761. # Submitted by: Yves Arrouye <arrouye@marin.fdn.fr>
  14762. #
  14763. 0 string *PPD-Adobe:\x20 PPD file
  14764. >&0 string x \b, version %s
  14765. # HP Printer Job Language
  14766. 0 string \033%-12345X@PJL HP Printer Job Language data
  14767. # HP Printer Job Language
  14768. # The header found on Win95 HP plot files is the "Silliest Thing possible"
  14769. # (TM)
  14770. # Every driver puts the language at some random position, with random case
  14771. # (LANGUAGE and Language)
  14772. # For example the LaserJet 5L driver puts the "PJL ENTER LANGUAGE" in line 10
  14773. # From: Uwe Bonnes <bon@elektron.ikp.physik.th-darmstadt.de>
  14774. #
  14775. 0 string \033%-12345X@PJL HP Printer Job Language data
  14776. >&0 string >\0 %s
  14777. >>&0 string >\0 %s
  14778. >>>&0 string >\0 %s
  14779. >>>>&0 string >\0 %s
  14780. #>15 string \ ENTER\ LANGUAGE\ =
  14781. #>31 string PostScript PostScript
  14782. # From: Stefan Thurner <thurners@nicsys.de>
  14783. 0 string \033%-12345X@PJL
  14784. >&0 search/10000 %! PJL encapsulated PostScript document text
  14785. # HP Printer Control Language, Daniel Quinlan (quinlan@yggdrasil.com)
  14786. 0 string \033E\033 HP PCL printer data
  14787. >3 string \&l0A - default page size
  14788. >3 string \&l1A - US executive page size
  14789. >3 string \&l2A - US letter page size
  14790. >3 string \&l3A - US legal page size
  14791. >3 string \&l26A - A4 page size
  14792. >3 string \&l80A - Monarch envelope size
  14793. >3 string \&l81A - No. 10 envelope size
  14794. >3 string \&l90A - Intl. DL envelope size
  14795. >3 string \&l91A - Intl. C5 envelope size
  14796. >3 string \&l100A - Intl. B5 envelope size
  14797. >3 string \&l-81A - No. 10 envelope size (landscape)
  14798. >3 string \&l-90A - Intl. DL envelope size (landscape)
  14799. # IMAGEN printer-ready files:
  14800. 0 string @document( Imagen printer
  14801. # this only works if "language xxx" is first item in Imagen header.
  14802. >10 string language\ impress (imPRESS data)
  14803. >10 string language\ daisy (daisywheel text)
  14804. >10 string language\ diablo (daisywheel text)
  14805. >10 string language\ printer (line printer emulation)
  14806. >10 string language\ tektronix (Tektronix 4014 emulation)
  14807. # Add any other languages that your Imagen uses - remember
  14808. # to keep the word `text' if the file is human-readable.
  14809. # [GRR 950115: missing "postscript" or "ultrascript" (whatever it was called)]
  14810. #
  14811. # Now magic for IMAGEN font files...
  14812. 0 string Rast RST-format raster font data
  14813. >45 string >0 face %s
  14814. # From Jukka Ukkonen
  14815. 0 string \033[K\002\0\0\017\033(a\001\0\001\033(g Canon Bubble Jet BJC formatted data
  14816. # From <mike@flyn.org>
  14817. # These are the /etc/magic entries to decode data sent to an Epson printer.
  14818. 0 string \x1B\x40\x1B\x28\x52\x08\x00\x00REMOTE1P Epson Stylus Color 460 data
  14819. #------------------------------------------------------------------------------
  14820. # zenographics: file(1) magic for Zenographics ZjStream printer data
  14821. # Rick Richardson rickr@mn.rr.com
  14822. 0 string JZJZ
  14823. >0x12 string ZZ Zenographics ZjStream printer data (big-endian)
  14824. 0 string ZJZJ
  14825. >0x12 string ZZ Zenographics ZjStream printer data (little-endian)
  14826. #------------------------------------------------------------------------------
  14827. # Oak Technologies printer stream
  14828. # Rick Richardson <rickr@mn.rr.com>
  14829. 0 string OAK
  14830. >0x07 byte 0
  14831. >0x0b byte 0 Oak Technologies printer stream
  14832. # This would otherwise be recognized as PostScript - nick@debian.org
  14833. 0 string %!VMF SunClock's Vector Map Format data
  14834. #------------------------------------------------------------------------------
  14835. # HP LaserJet 1000 series downloadable firmware file
  14836. 0 string \xbe\xefABCDEFGH HP LaserJet 1000 series downloadable firmware
  14837. # From: Paolo <oopla@users.sf.net>
  14838. # Epson ESC/Page, ESC/PageColor
  14839. 0 string \x1b\x01@EJL Epson ESC/Page language printer data
  14840. #------------------------------------------------------------------------------
  14841. # $File: project,v 1.4 2009/09/19 16:28:11 christos Exp $
  14842. # project: file(1) magic for Project management
  14843. #
  14844. # Magic strings for ftnchek project files. Alexander Mai
  14845. 0 string FTNCHEK_\ P project file for ftnchek
  14846. >10 string 1 version 2.7
  14847. >10 string 2 version 2.8 to 2.10
  14848. >10 string 3 version 2.11 or later
  14849. #------------------------------------------------------------------------------
  14850. # $File: psdbms,v 1.6 2009/09/19 16:28:11 christos Exp $
  14851. # psdbms: file(1) magic for psdatabase
  14852. #
  14853. 0 belong&0xff00ffff 0x56000000 ps database
  14854. >1 string >\0 version %s
  14855. >4 string >\0 from kernel %s
  14856. #------------------------------------------------------------------------------
  14857. # $File: pulsar,v 1.5 2009/09/19 16:28:12 christos Exp $
  14858. # pulsar: file(1) magic for Pulsar POP3 daemon binary files
  14859. #
  14860. # http://pulsar.sourceforge.net
  14861. # mailto:rok.papez@lugos.si
  14862. #
  14863. 0 belong 0x1ee7f11e Pulsar POP3 daemon mailbox cache file.
  14864. >4 ubelong x Version: %d.
  14865. >8 ubelong x \b%d
  14866. #------------------------------------------------------------------------------
  14867. # $File: pwsafe,v 1.1 2012/10/25 00:12:19 christos Exp $
  14868. # pwsafe: file(1) magic for passwordsafe file
  14869. #
  14870. # Password Safe
  14871. # http://passwordsafe.sourceforge.net/
  14872. # file format specs
  14873. # http://passwordsafe.svn.sourceforge.net/viewvc/passwordsafe/trunk/pwsafe/pwsafe/docs/formatV3.txt
  14874. # V2 http://passwordsafe.svn.sourceforge.net/viewvc/passwordsafe/trunk/pwsafe/pwsafe/docs/formatV2.txt
  14875. # V1 http://passwordsafe.svn.sourceforge.net/viewvc/passwordsafe/trunk/pwsafe/pwsafe/docs/notes.txt
  14876. # V2 and V1 have no easy identifier that I can find
  14877. # .psafe3
  14878. 0 string PWS3 Password Safe V3 database
  14879. #------------------------------------------------------------------------------
  14880. # $File: pyramid,v 1.7 2009/09/19 16:28:12 christos Exp $
  14881. # pyramid: file(1) magic for Pyramids
  14882. #
  14883. # XXX - byte order?
  14884. #
  14885. 0 long 0x50900107 Pyramid 90x family executable
  14886. 0 long 0x50900108 Pyramid 90x family pure executable
  14887. >16 long >0 not stripped
  14888. 0 long 0x5090010b Pyramid 90x family demand paged pure executable
  14889. >16 long >0 not stripped
  14890. #------------------------------------------------------------------------------
  14891. # $File: python,v 1.23 2013/12/11 14:14:20 christos Exp $
  14892. # python: file(1) magic for python
  14893. #
  14894. # Outlook puts """ too for urgent messages
  14895. # From: David Necas <yeti@physics.muni.cz>
  14896. # often the module starts with a multiline string
  14897. 0 string/t """ Python script text executable
  14898. # MAGIC as specified in Python/import.c (1.5 to 2.7a0 and 3.1a0, assuming
  14899. # that Py_UnicodeFlag is off for Python 2)
  14900. # 20121 ( YEAR - 1995 ) + MONTH + DAY (little endian followed by "\r\n"
  14901. 0 belong 0x994e0d0a python 1.5/1.6 byte-compiled
  14902. 0 belong 0x87c60d0a python 2.0 byte-compiled
  14903. 0 belong 0x2aeb0d0a python 2.1 byte-compiled
  14904. 0 belong 0x2ded0d0a python 2.2 byte-compiled
  14905. 0 belong 0x3bf20d0a python 2.3 byte-compiled
  14906. 0 belong 0x6df20d0a python 2.4 byte-compiled
  14907. 0 belong 0xb3f20d0a python 2.5 byte-compiled
  14908. 0 belong 0xd1f20d0a python 2.6 byte-compiled
  14909. 0 belong 0x03f30d0a python 2.7 byte-compiled
  14910. 0 belong 0x3b0c0d0a python 3.0 byte-compiled
  14911. 0 belong 0x4f0c0d0a python 3.1 byte-compiled
  14912. 0 belong 0x6c0c0d0a python 3.2 byte-compiled
  14913. 0 belong 0x9e0c0d0a python 3.3 byte-compiled
  14914. 0 search/1/w #!\ /usr/bin/python Python script text executable
  14915. !:mime text/x-python
  14916. 0 search/1/w #!\ /usr/local/bin/python Python script text executable
  14917. !:mime text/x-python
  14918. 0 search/1 #!/usr/bin/env\ python Python script text executable
  14919. !:mime text/x-python
  14920. 0 search/1 #!\ /usr/bin/env\ python Python script text executable
  14921. !:mime text/x-python
  14922. # from module.submodule import func1, func2
  14923. 0 regex \^from\\s+(\\w|\\.)+\\s+import.*$ Python script text executable
  14924. !:mime text/x-python
  14925. # def __init__ (self, ...):
  14926. 0 search/4096 def\ __init__
  14927. >&0 search/64 self Python script text executable
  14928. !:mime text/x-python
  14929. # comments
  14930. 0 search/4096 '''
  14931. >&0 regex .*'''$ Python script text executable
  14932. !:mime text/x-python
  14933. 0 search/4096 """
  14934. >&0 regex .*"""$ Python script text executable
  14935. !:mime text/x-python
  14936. # try:
  14937. # except: or finally:
  14938. # block
  14939. 0 search/4096 try:
  14940. >&0 regex \^\\s*except.*: Python script text executable
  14941. !:mime text/x-python
  14942. >&0 search/4096 finally: Python script text executable
  14943. !:mime text/x-python
  14944. # def name(args, args):
  14945. 0 regex \^(\ |\\t){0,50}def\ {1,50}[a-zA-Z]{1,100}
  14946. >&0 regex \ {0,50}\\(([a-zA-Z]|,|\ ){1,500}\\):$ Python script text executable
  14947. !:mime text/x-python
  14948. #------------------------------------------------------------------------------
  14949. # $File: revision,v 1.9 2013/02/06 14:18:52 christos Exp $
  14950. # file(1) magic for revision control files
  14951. # From Hendrik Scholz <hendrik@scholz.net>
  14952. 0 string/t /1\ :pserver: cvs password text file
  14953. # Conary changesets
  14954. # From: Jonathan Smith <smithj@rpath.com>
  14955. 0 belong 0xea3f81bb Conary changeset data
  14956. # Type: Git bundles (git-bundle)
  14957. # From: Josh Triplett <josh@freedesktop.org>
  14958. 0 string #\ v2\ git\ bundle\n Git bundle
  14959. # Type: Git pack
  14960. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  14961. # The actual magic is 'PACK', but that clashes with Doom/Quake packs. However,
  14962. # those have a little-endian offset immediately following the magic 'PACK',
  14963. # the first byte of which is never 0, while the first byte of the Git pack
  14964. # version, since it's a tiny number stored in big-endian format, is always 0.
  14965. 0 string PACK\0 Git pack
  14966. >4 belong >0 \b, version %d
  14967. >>8 belong >0 \b, %d objects
  14968. # Type: Git pack index
  14969. # From: Adam Buchbinder <adam.buchbinder@gmail.com>
  14970. 0 string \377tOc Git pack index
  14971. >4 belong =2 \b, version 2
  14972. # Type: Git index file
  14973. # From: Frederic Briare <fbriere@fbriere.net>
  14974. 0 string DIRC Git index
  14975. >4 belong >0 \b, version %d
  14976. >>8 belong >0 \b, %d entries
  14977. # Type: Mercurial bundles
  14978. # From: Seo Sanghyeon <tinuviel@sparcs.kaist.ac.kr>
  14979. 0 string HG10 Mercurial bundle,
  14980. >4 string UN uncompressed
  14981. >4 string BZ bzip2 compressed
  14982. # Type: Subversion (SVN) dumps
  14983. # From: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
  14984. 0 string SVN-fs-dump-format-version: Subversion dumpfile
  14985. >28 string >\0 (version: %s)
  14986. # Type: Bazaar revision bundles and merge requests
  14987. # URL: http://www.bazaar-vcs.org/
  14988. # From: Jelmer Vernooij <jelmer@samba.org>
  14989. 0 string #\ Bazaar\ revision\ bundle\ v Bazaar Bundle
  14990. 0 string #\ Bazaar\ merge\ directive\ format Bazaar merge directive
  14991. #------------------------------------------------------------------------------
  14992. # $File: riff,v 1.24 2013/11/19 23:58:17 christos Exp $
  14993. # riff: file(1) magic for RIFF format
  14994. # See
  14995. #
  14996. # http://www.seanet.com/users/matts/riffmci/riffmci.htm
  14997. #
  14998. # AVI section extended by Patrik Radman <patrik+file-magic@iki.fi>
  14999. #
  15000. 0 string RIFF RIFF (little-endian) data
  15001. # RIFF Palette format
  15002. >8 string PAL \b, palette
  15003. >>16 leshort x \b, version %d
  15004. >>18 leshort x \b, %d entries
  15005. # RIFF Device Independent Bitmap format
  15006. >8 string RDIB \b, device-independent bitmap
  15007. >>16 string BM
  15008. >>>30 leshort 12 \b, OS/2 1.x format
  15009. >>>>34 leshort x \b, %d x
  15010. >>>>36 leshort x %d
  15011. >>>30 leshort 64 \b, OS/2 2.x format
  15012. >>>>34 leshort x \b, %d x
  15013. >>>>36 leshort x %d
  15014. >>>30 leshort 40 \b, Windows 3.x format
  15015. >>>>34 lelong x \b, %d x
  15016. >>>>38 lelong x %d x
  15017. >>>>44 leshort x %d
  15018. # RIFF MIDI format
  15019. >8 string RMID \b, MIDI
  15020. # RIFF Multimedia Movie File format
  15021. >8 string RMMP \b, multimedia movie
  15022. # RIFF wrapper for MP3
  15023. >8 string RMP3 \b, MPEG Layer 3 audio
  15024. # Microsoft WAVE format (*.wav)
  15025. >8 string WAVE \b, WAVE audio
  15026. !:mime audio/x-wav
  15027. >>20 leshort 1 \b, Microsoft PCM
  15028. >>>34 leshort >0 \b, %d bit
  15029. >>20 leshort 2 \b, Microsoft ADPCM
  15030. >>20 leshort 6 \b, ITU G.711 A-law
  15031. >>20 leshort 7 \b, ITU G.711 mu-law
  15032. >>20 leshort 8 \b, Microsoft DTS
  15033. >>20 leshort 17 \b, IMA ADPCM
  15034. >>20 leshort 20 \b, ITU G.723 ADPCM (Yamaha)
  15035. >>20 leshort 49 \b, GSM 6.10
  15036. >>20 leshort 64 \b, ITU G.721 ADPCM
  15037. >>20 leshort 80 \b, MPEG
  15038. >>20 leshort 85 \b, MPEG Layer 3
  15039. >>20 leshort 0x2001 \b, DTS
  15040. >>22 leshort =1 \b, mono
  15041. >>22 leshort =2 \b, stereo
  15042. >>22 leshort >2 \b, %d channels
  15043. >>24 lelong >0 %d Hz
  15044. # Corel Draw Picture
  15045. >8 string CDRA \b, Corel Draw Picture
  15046. !:mime image/x-coreldraw
  15047. >8 string CDR6 \b, Corel Draw Picture, version 6
  15048. !:mime image/x-coreldraw
  15049. # AVI == Audio Video Interleave
  15050. >8 string AVI\040 \b, AVI
  15051. !:mime video/x-msvideo
  15052. >>12 string LIST
  15053. >>>20 string hdrlavih
  15054. >>>>&36 lelong x \b, %lu x
  15055. >>>>&40 lelong x %lu,
  15056. >>>>&4 lelong >1000000 <1 fps,
  15057. >>>>&4 lelong 1000000 1.00 fps,
  15058. >>>>&4 lelong 500000 2.00 fps,
  15059. >>>>&4 lelong 333333 3.00 fps,
  15060. >>>>&4 lelong 250000 4.00 fps,
  15061. >>>>&4 lelong 200000 5.00 fps,
  15062. >>>>&4 lelong 166667 6.00 fps,
  15063. >>>>&4 lelong 142857 7.00 fps,
  15064. >>>>&4 lelong 125000 8.00 fps,
  15065. >>>>&4 lelong 111111 9.00 fps,
  15066. >>>>&4 lelong 100000 10.00 fps,
  15067. # ]9.9,10.1[
  15068. >>>>&4 lelong <101010
  15069. >>>>>&-4 lelong >99010
  15070. >>>>>>&-4 lelong !100000 ~10 fps,
  15071. >>>>&4 lelong 83333 12.00 fps,
  15072. # ]11.9,12.1[
  15073. >>>>&4 lelong <84034
  15074. >>>>>&-4 lelong >82645
  15075. >>>>>>&-4 lelong !83333 ~12 fps,
  15076. >>>>&4 lelong 66667 15.00 fps,
  15077. # ]14.9,15.1[
  15078. >>>>&4 lelong <67114
  15079. >>>>>&-4 lelong >66225
  15080. >>>>>>&-4 lelong !66667 ~15 fps,
  15081. >>>>&4 lelong 50000 20.00 fps,
  15082. >>>>&4 lelong 41708 23.98 fps,
  15083. >>>>&4 lelong 41667 24.00 fps,
  15084. # ]23.9,24.1[
  15085. >>>>&4 lelong <41841
  15086. >>>>>&-4 lelong >41494
  15087. >>>>>>&-4 lelong !41708
  15088. >>>>>>>&-4 lelong !41667 ~24 fps,
  15089. >>>>&4 lelong 40000 25.00 fps,
  15090. # ]24.9,25.1[
  15091. >>>>&4 lelong <40161
  15092. >>>>>&-4 lelong >39841
  15093. >>>>>>&-4 lelong !40000 ~25 fps,
  15094. >>>>&4 lelong 33367 29.97 fps,
  15095. >>>>&4 lelong 33333 30.00 fps,
  15096. # ]29.9,30.1[
  15097. >>>>&4 lelong <33445
  15098. >>>>>&-4 lelong >33223
  15099. >>>>>>&-4 lelong !33367
  15100. >>>>>>>&-4 lelong !33333 ~30 fps,
  15101. >>>>&4 lelong <32224 >30 fps,
  15102. ##>>>>&4 lelong x (%lu)
  15103. ##>>>>&20 lelong x %lu frames,
  15104. # Note: The tests below assume that the AVI has 1 or 2 streams,
  15105. # "vids" optionally followed by "auds".
  15106. # (Should cover 99.9% of all AVIs.)
  15107. # assuming avih length = 56
  15108. >>>88 string LIST
  15109. >>>>96 string strlstrh
  15110. >>>>>108 string vids video:
  15111. >>>>>>&0 lelong 0 uncompressed
  15112. # skip past vids strh
  15113. >>>>>>(104.l+108) string strf
  15114. >>>>>>>(104.l+132) lelong 1 RLE 8bpp
  15115. >>>>>>>(104.l+132) string/c cvid Cinepak
  15116. >>>>>>>(104.l+132) string/c i263 Intel I.263
  15117. >>>>>>>(104.l+132) string/c iv32 Indeo 3.2
  15118. >>>>>>>(104.l+132) string/c iv41 Indeo 4.1
  15119. >>>>>>>(104.l+132) string/c iv50 Indeo 5.0
  15120. >>>>>>>(104.l+132) string/c mp42 Microsoft MPEG-4 v2
  15121. >>>>>>>(104.l+132) string/c mp43 Microsoft MPEG-4 v3
  15122. >>>>>>>(104.l+132) string/c fmp4 FFMpeg MPEG-4
  15123. >>>>>>>(104.l+132) string/c mjpg Motion JPEG
  15124. >>>>>>>(104.l+132) string/c div3 DivX 3
  15125. >>>>>>>>112 string/c div3 Low-Motion
  15126. >>>>>>>>112 string/c div4 Fast-Motion
  15127. >>>>>>>(104.l+132) string/c divx DivX 4
  15128. >>>>>>>(104.l+132) string/c dx50 DivX 5
  15129. >>>>>>>(104.l+132) string/c xvid XviD
  15130. >>>>>>>(104.l+132) string/c h264 H.264
  15131. >>>>>>>(104.l+132) string/c wmv3 Windows Media Video 9
  15132. >>>>>>>(104.l+132) string/c h264 X.264 or H.264
  15133. >>>>>>>(104.l+132) lelong 0
  15134. ##>>>>>>>(104.l+132) string x (%.4s)
  15135. # skip past first (video) LIST
  15136. >>>>(92.l+96) string LIST
  15137. >>>>>(92.l+104) string strlstrh
  15138. >>>>>>(92.l+116) string auds \b, audio:
  15139. # auds strh length = 56:
  15140. >>>>>>>(92.l+172) string strf
  15141. >>>>>>>>(92.l+180) leshort 0x0001 uncompressed PCM
  15142. >>>>>>>>(92.l+180) leshort 0x0002 ADPCM
  15143. >>>>>>>>(92.l+180) leshort 0x0006 aLaw
  15144. >>>>>>>>(92.l+180) leshort 0x0007 uLaw
  15145. >>>>>>>>(92.l+180) leshort 0x0050 MPEG-1 Layer 1 or 2
  15146. >>>>>>>>(92.l+180) leshort 0x0055 MPEG-1 Layer 3
  15147. >>>>>>>>(92.l+180) leshort 0x2000 Dolby AC3
  15148. >>>>>>>>(92.l+180) leshort 0x0161 DivX
  15149. ##>>>>>>>>(92.l+180) leshort x (0x%.4x)
  15150. >>>>>>>>(92.l+182) leshort 1 (mono,
  15151. >>>>>>>>(92.l+182) leshort 2 (stereo,
  15152. >>>>>>>>(92.l+182) leshort >2 (%d channels,
  15153. >>>>>>>>(92.l+184) lelong x %d Hz)
  15154. # auds strh length = 64:
  15155. >>>>>>>(92.l+180) string strf
  15156. >>>>>>>>(92.l+188) leshort 0x0001 uncompressed PCM
  15157. >>>>>>>>(92.l+188) leshort 0x0002 ADPCM
  15158. >>>>>>>>(92.l+188) leshort 0x0055 MPEG-1 Layer 3
  15159. >>>>>>>>(92.l+188) leshort 0x2000 Dolby AC3
  15160. >>>>>>>>(92.l+188) leshort 0x0161 DivX
  15161. ##>>>>>>>>(92.l+188) leshort x (0x%.4x)
  15162. >>>>>>>>(92.l+190) leshort 1 (mono,
  15163. >>>>>>>>(92.l+190) leshort 2 (stereo,
  15164. >>>>>>>>(92.l+190) leshort >2 (%d channels,
  15165. >>>>>>>>(92.l+192) lelong x %d Hz)
  15166. # Animated Cursor format
  15167. >8 string ACON \b, animated cursor
  15168. # SoundFont 2 <mpruett@sgi.com>
  15169. >8 string sfbk SoundFont/Bank
  15170. # MPEG-1 wrapped in a RIFF, apparently
  15171. >8 string CDXA \b, wrapped MPEG-1 (CDXA)
  15172. >8 string 4XMV \b, 4X Movie file
  15173. # AMV-type AVI file: http://wiki.multimedia.cx/index.php?title=AMV
  15174. >8 string AMV\040 \b, AMV
  15175. #
  15176. # XXX - some of the below may only appear in little-endian form.
  15177. #
  15178. # Also "MV93" appears to be for one form of Macromedia Director
  15179. # files, and "GDMF" appears to be another multimedia format.
  15180. #
  15181. 0 string RIFX RIFF (big-endian) data
  15182. # RIFF Palette format
  15183. >8 string PAL \b, palette
  15184. >>16 beshort x \b, version %d
  15185. >>18 beshort x \b, %d entries
  15186. # RIFF Device Independent Bitmap format
  15187. >8 string RDIB \b, device-independent bitmap
  15188. >>16 string BM
  15189. >>>30 beshort 12 \b, OS/2 1.x format
  15190. >>>>34 beshort x \b, %d x
  15191. >>>>36 beshort x %d
  15192. >>>30 beshort 64 \b, OS/2 2.x format
  15193. >>>>34 beshort x \b, %d x
  15194. >>>>36 beshort x %d
  15195. >>>30 beshort 40 \b, Windows 3.x format
  15196. >>>>34 belong x \b, %d x
  15197. >>>>38 belong x %d x
  15198. >>>>44 beshort x %d
  15199. # RIFF MIDI format
  15200. >8 string RMID \b, MIDI
  15201. # RIFF Multimedia Movie File format
  15202. >8 string RMMP \b, multimedia movie
  15203. # Microsoft WAVE format (*.wav)
  15204. >8 string WAVE \b, WAVE audio
  15205. >>20 leshort 1 \b, Microsoft PCM
  15206. >>>34 leshort >0 \b, %d bit
  15207. >>22 beshort =1 \b, mono
  15208. >>22 beshort =2 \b, stereo
  15209. >>22 beshort >2 \b, %d channels
  15210. >>24 belong >0 %d Hz
  15211. # Corel Draw Picture
  15212. >8 string CDRA \b, Corel Draw Picture
  15213. >8 string CDR6 \b, Corel Draw Picture, version 6
  15214. # AVI == Audio Video Interleave
  15215. >8 string AVI\040 \b, AVI
  15216. # Animated Cursor format
  15217. >8 string ACON \b, animated cursor
  15218. # Notation Interchange File Format (big-endian only)
  15219. >8 string NIFF \b, Notation Interchange File Format
  15220. # SoundFont 2 <mpruett@sgi.com>
  15221. >8 string sfbk SoundFont/Bank
  15222. #------------------------------------------------------------------------------
  15223. # Sony Wave64
  15224. # see http://www.vcs.de/fileadmin/user_upload/MBS/PDF/Whitepaper/Informations_about_Sony_Wave64.pdf
  15225. # 128 bit RIFF-GUID { 66666972-912E-11CF-A5D6-28DB04C10000 } in little-endian
  15226. 0 string riff\x2E\x91\xCF\x11\xA5\xD6\x28\xDB\x04\xC1\x00\x00 Sony Wave64 RIFF data
  15227. # 128 bit + total file size (64 bits) so 24 bytes
  15228. # then WAVE-GUID { 65766177-ACF3-11D3-8CD1-00C04F8EDB8A }
  15229. >24 string wave\xF3\xAC\xD3\x11\x8C\xD1\x00\xC0\x4F\x8E\xDB\x8A \b, WAVE 64 audio
  15230. !:mime audio/x-w64
  15231. # FMT-GUID { 20746D66-ACF3-11D3-8CD1-00C04F8EDB8A }
  15232. >>40 search/256 fmt\x20\xF3\xAC\xD3\x11\x8C\xD1\x00\xC0\x4F\x8E\xDB\x8A \b
  15233. >>>&10 leshort =1 \b, mono
  15234. >>>&10 leshort =2 \b, stereo
  15235. >>>&10 leshort >2 \b, %d channels
  15236. >>>&12 lelong >0 %d Hz
  15237. #------------------------------------------------------------------------------
  15238. # MBWF/RF64
  15239. # see EBU TECH 3306 http://tech.ebu.ch/docs/tech/tech3306-2009.pdf
  15240. 0 string RF64\xff\xff\xff\xffWAVEds64 MBWF/RF64 audio
  15241. !:mime audio/x-wav
  15242. >40 search/256 fmt\x20 \b
  15243. >>&6 leshort =1 \b, mono
  15244. >>&6 leshort =2 \b, stereo
  15245. >>&6 leshort >2 \b, %d channels
  15246. >>&8 lelong >0 %d Hz
  15247. #------------------------------------------------------------------------------
  15248. # $File: rinex,v 1.4 2011/05/03 01:44:17 christos Exp $
  15249. # rinex: file(1) magic for RINEX files
  15250. # http://igscb.jpl.nasa.gov/igscb/data/format/rinex210.txt
  15251. # ftp://cddis.gsfc.nasa.gov/pub/reports/formats/rinex300.pdf
  15252. # data for testing: ftp://cddis.gsfc.nasa.gov/pub/gps/data
  15253. 60 string RINEX
  15254. >80 search/256 XXRINEXB RINEX Data, GEO SBAS Broadcast
  15255. >>&32 string x \b, date %15.15s
  15256. >>5 string x \b, version %6.6s
  15257. !:mime rinex/broadcast
  15258. >80 search/256 XXRINEXD RINEX Data, Observation (Hatanaka comp)
  15259. >>&32 string x \b, date %15.15s
  15260. >>5 string x \b, version %6.6s
  15261. !:mime rinex/observation
  15262. >80 search/256 XXRINEXC RINEX Data, Clock
  15263. >>&32 string x \b, date %15.15s
  15264. >>5 string x \b, version %6.6s
  15265. !:mime rinex/clock
  15266. >80 search/256 XXRINEXH RINEX Data, GEO SBAS Navigation
  15267. >>&32 string x \b, date %15.15s
  15268. >>5 string x \b, version %6.6s
  15269. !:mime rinex/navigation
  15270. >80 search/256 XXRINEXG RINEX Data, GLONASS Navigation
  15271. >>&32 string x \b, date %15.15s
  15272. >>5 string x \b, version %6.6s
  15273. !:mime rinex/navigation
  15274. >80 search/256 XXRINEXL RINEX Data, Galileo Navigation
  15275. >>&32 string x \b, date %15.15s
  15276. >>5 string x \b, version %6.6s
  15277. !:mime rinex/navigation
  15278. >80 search/256 XXRINEXM RINEX Data, Meteorological
  15279. >>&32 string x \b, date %15.15s
  15280. >>5 string x \b, version %6.6s
  15281. !:mime rinex/meteorological
  15282. >80 search/256 XXRINEXN RINEX Data, Navigation
  15283. >>&32 string x \b, date %15.15s
  15284. >>5 string x \b, version %6.6s
  15285. !:mime rinex/navigation
  15286. >80 search/256 XXRINEXO RINEX Data, Observation
  15287. >>&32 string x \b, date %15.15s
  15288. >>5 string x \b, version %6.6s
  15289. !:mime rinex/observation
  15290. #------------------------------------------------------------------------------
  15291. # $File: rpm,v 1.12 2013/01/11 16:45:23 christos Exp $
  15292. #
  15293. # RPM: file(1) magic for Red Hat Packages Erik Troan (ewt@redhat.com)
  15294. #
  15295. 0 belong 0xedabeedb RPM
  15296. !:mime application/x-rpm
  15297. >4 byte x v%d
  15298. >5 byte x \b.%d
  15299. >6 beshort 1 src
  15300. >6 beshort 0 bin
  15301. >>8 beshort 1 i386/x86_64
  15302. >>8 beshort 2 Alpha/Sparc64
  15303. >>8 beshort 3 Sparc
  15304. >>8 beshort 4 MIPS
  15305. >>8 beshort 5 PowerPC
  15306. >>8 beshort 6 68000
  15307. >>8 beshort 7 SGI
  15308. >>8 beshort 8 RS6000
  15309. >>8 beshort 9 IA64
  15310. >>8 beshort 10 Sparc64
  15311. >>8 beshort 11 MIPSel
  15312. >>8 beshort 12 ARM
  15313. >>8 beshort 13 MiNT
  15314. >>8 beshort 14 S/390
  15315. >>8 beshort 15 S/390x
  15316. >>8 beshort 16 PowerPC64
  15317. >>8 beshort 17 SuperH
  15318. >>8 beshort 18 Xtensa
  15319. >>8 beshort 255 noarch
  15320. #delta RPM Daniel Novotny (dnovotny@redhat.com)
  15321. 0 string drpm Delta RPM
  15322. !:mime application/x-rpm
  15323. >12 string x %s
  15324. >>8 beshort 11 MIPSel
  15325. >>8 beshort 12 ARM
  15326. >>8 beshort 13 MiNT
  15327. >>8 beshort 14 S/390
  15328. >>8 beshort 15 S/390x
  15329. >>8 beshort 16 PowerPC64
  15330. >>8 beshort 17 SuperH
  15331. >>8 beshort 18 Xtensa
  15332. >>10 string x %s
  15333. #------------------------------------------------------------------------------
  15334. # $File: rtf,v 1.7 2009/09/19 16:28:12 christos Exp $
  15335. # rtf: file(1) magic for Rich Text Format (RTF)
  15336. #
  15337. # Duncan P. Simpson, D.P.Simpson@dcs.warwick.ac.uk
  15338. #
  15339. 0 string {\\rtf Rich Text Format data,
  15340. !:mime text/rtf
  15341. >5 string 1 version 1,
  15342. >>6 string \\ansi ANSI
  15343. >>6 string \\mac Apple Macintosh
  15344. >>6 string \\pc IBM PC, code page 437
  15345. >>6 string \\pca IBM PS/2, code page 850
  15346. >>6 default x unknown character set
  15347. >5 default x unknown version
  15348. #------------------------------------------------------------------------------
  15349. # $File: ruby,v 1.5 2010/07/21 16:47:17 christos Exp $
  15350. # ruby: file(1) magic for Ruby scripting language
  15351. # URL: http://www.ruby-lang.org/
  15352. # From: Reuben Thomas <rrt@sc3d.org>
  15353. # Ruby scripts
  15354. 0 search/1/w #!\ /usr/bin/ruby Ruby script text executable
  15355. !:mime text/x-ruby
  15356. 0 search/1/w #!\ /usr/local/bin/ruby Ruby script text executable
  15357. !:mime text/x-ruby
  15358. 0 search/1 #!/usr/bin/env\ ruby Ruby script text executable
  15359. !:mime text/x-ruby
  15360. 0 search/1 #!\ /usr/bin/env\ ruby Ruby script text executable
  15361. !:mime text/x-ruby
  15362. # What looks like ruby, but does not have a shebang
  15363. # (modules and such)
  15364. # From: Lubomir Rintel <lkundrak@v3.sk>
  15365. 0 regex \^[\ \t]*require[\ \t]'[A-Za-z_/]+'
  15366. >0 regex include\ [A-Z]|def\ [a-z]|\ do$
  15367. >>0 regex \^[\ \t]*end([\ \t]*[;#].*)?$ Ruby script text
  15368. !:mime text/x-ruby
  15369. 0 regex \^[\ \t]*(class|module)[\ \t][A-Z]
  15370. >0 regex (modul|includ)e\ [A-Z]|def\ [a-z]
  15371. >>0 regex \^[\ \t]*end([\ \t]*[;#].*)?$ Ruby module source text
  15372. !:mime text/x-ruby
  15373. #------------------------------------------------------------------------------
  15374. # $File: sc,v 1.6 2009/09/19 16:28:12 christos Exp $
  15375. # sc: file(1) magic for "sc" spreadsheet
  15376. #
  15377. 38 string Spreadsheet sc spreadsheet file
  15378. !:mime application/x-sc
  15379. #------------------------------------------------------------------------------
  15380. # $File: sccs,v 1.6 2009/09/19 16:28:12 christos Exp $
  15381. # sccs: file(1) magic for SCCS archives
  15382. #
  15383. # SCCS archive structure:
  15384. # \001h01207
  15385. # \001s 00276/00000/00000
  15386. # \001d D 1.1 87/09/23 08:09:20 ian 1 0
  15387. # \001c date and time created 87/09/23 08:09:20 by ian
  15388. # \001e
  15389. # \001u
  15390. # \001U
  15391. # ... etc.
  15392. # Now '\001h' happens to be the same as the 3B20's a.out magic number (0550).
  15393. # *Sigh*. And these both came from various parts of the USG.
  15394. # Maybe we should just switch everybody from SCCS to RCS!
  15395. # Further, you can't just say '\001h0', because the five-digit number
  15396. # is a checksum that could (presumably) have any leading digit,
  15397. # and we don't have regular expression matching yet.
  15398. # Hence the following official kludge:
  15399. 8 string \001s\ SCCS archive data
  15400. #------------------------------------------------------------------------------
  15401. # $File: scientific,v 1.8 2014/01/06 17:46:23 rrt Exp $
  15402. # scientific: file(1) magic for scientific formats
  15403. #
  15404. # From: Joe Krahn <krahn@niehs.nih.gov>
  15405. ########################################################
  15406. # CCP4 data and plot files:
  15407. 0 string MTZ\040 MTZ reflection file
  15408. 92 string PLOT%%84 Plot84 plotting file
  15409. >52 byte 1 , Little-endian
  15410. >55 byte 1 , Big-endian
  15411. ########################################################
  15412. # Electron density MAP/MASK formats
  15413. 0 string EZD_MAP NEWEZD Electron Density Map
  15414. 109 string MAP\040( Old EZD Electron Density Map
  15415. 0 string/c :-)\040Origin BRIX Electron Density Map
  15416. >170 string >0 , Sigma:%.12s
  15417. #>4 string >0 %.178s
  15418. #>4 addr x %.178s
  15419. 7 string 18\040!NTITLE XPLOR ASCII Electron Density Map
  15420. 9 string \040!NTITLE\012\040REMARK CNS ASCII electron density map
  15421. 208 string MAP\040 CCP4 Electron Density Map
  15422. # Assumes same stamp for float and double (normal case)
  15423. >212 byte 17 \b, Big-endian
  15424. >212 byte 34 \b, VAX format
  15425. >212 byte 68 \b, Little-endian
  15426. >212 byte 85 \b, Convex native
  15427. ############################################################
  15428. # X-Ray Area Detector images
  15429. 0 string R-AXIS4\ \ \ R-Axis Area Detector Image:
  15430. >796 lelong <20 Little-endian, IP #%d,
  15431. >>768 lelong >0 Size=%dx
  15432. >>772 lelong >0 \b%d
  15433. >796 belong <20 Big-endian, IP #%d,
  15434. >>768 belong >0 Size=%dx
  15435. >>772 belong >0 \b%d
  15436. 0 string RAXIS\ \ \ \ \ R-Axis Area Detector Image, Win32:
  15437. >796 lelong <20 Little-endian, IP #%d,
  15438. >>768 lelong >0 Size=%dx
  15439. >>772 lelong >0 \b%d
  15440. >796 belong <20 Big-endian, IP #%d,
  15441. >>768 belong >0 Size=%dx
  15442. >>772 belong >0 \b%d
  15443. 1028 string MMX\000\000\000\000\000\000\000\000\000\000\000\000\000 MAR Area Detector Image,
  15444. >1072 ulong >1 Compressed(%d),
  15445. >1100 ulong >1 %d headers,
  15446. >1104 ulong >0 %d x
  15447. >1108 ulong >0 %d,
  15448. >1120 ulong >0 %d bits/pixel
  15449. # Type: GEDCOM genealogical (family history) data
  15450. # From: Giuseppe Bilotta
  15451. 0 search/1/c 0\ HEAD GEDCOM genealogy text
  15452. >&0 search 1\ GEDC
  15453. >>&0 search 2\ VERS version
  15454. >>>&1 string >\0 %s
  15455. # From: Phil Endecott <phil05@chezphil.org>
  15456. 0 string \000\060\000\040\000\110\000\105\000\101\000\104 GEDCOM data
  15457. 0 string \060\000\040\000\110\000\105\000\101\000\104\000 GEDCOM data
  15458. 0 string \376\377\000\060\000\040\000\110\000\105\000\101\000\104 GEDCOM data
  15459. 0 string \377\376\060\000\040\000\110\000\105\000\101\000\104\000 GEDCOM data
  15460. # PDB: Protein Data Bank files
  15461. # Adam Buchbinder <adam.buchbinder@gmail.com>
  15462. #
  15463. # http://www.wwpdb.org/documentation/format32/sect2.html
  15464. # http://www.ch.ic.ac.uk/chemime/
  15465. #
  15466. # The PDB file format is fixed-field, 80 columns. From the spec:
  15467. #
  15468. # COLS DATA
  15469. # 1 - 6 "HEADER"
  15470. # 11 - 50 String(40)
  15471. # 51 - 59 Date
  15472. # 63 - 66 IDcode
  15473. #
  15474. # Thus, positions 7-10, 60-62 and 67-80 are spaces. The Date must be in the
  15475. # format DD-MMM-YY, e.g., 01-JAN-70, and the IDcode consists of numbers and
  15476. # uppercase letters. However, examples have been seen without the date string,
  15477. # e.g., the example on the chemime site.
  15478. 0 string HEADER\ \ \ \
  15479. >&0 regex/1 \^.{40}
  15480. >>&0 regex/1 [0-9]{2}-[A-Z]{3}-[0-9]{2}\ {3}
  15481. >>>&0 regex/1s [A-Z0-9]{4}.{14}$
  15482. >>>>&0 regex/1 [A-Z0-9]{4} Protein Data Bank data, ID Code %s
  15483. !:mime chemical/x-pdb
  15484. >>>>0 regex/1 [0-9]{2}-[A-Z]{3}-[0-9]{2} \b, %s
  15485. # Type: GDSII Stream file
  15486. 0 belong 0x00060002 GDSII Stream file
  15487. >4 byte 0x00
  15488. >>5 byte x version %d.0
  15489. >4 byte >0x00 version %d
  15490. >>5 byte x \b.%d
  15491. #------------------------------------------------------------------------------
  15492. # $File: securitycerts,v 1.4 2009/09/19 16:28:12 christos Exp $
  15493. 0 search/1 -----BEGIN\ CERTIFICATE------ RFC1421 Security Certificate text
  15494. 0 search/1 -----BEGIN\ NEW\ CERTIFICATE RFC1421 Security Certificate Signing Request text
  15495. 0 belong 0xedfeedfe Sun 'jks' Java Keystore File data
  15496. # Type: SE Linux policy modules *.pp reference policy
  15497. # for Fedora 5 to 9, RHEL5, and Debian Etch and Lenny.
  15498. # URL: http://doc.coker.com.au/computers/selinux-magic
  15499. # From: Russell Coker <russell@coker.com.au>
  15500. 0 lelong 0xf97cff8f SE Linux modular policy
  15501. >4 lelong x version %d,
  15502. >8 lelong x %d sections,
  15503. >>(12.l) lelong 0xf97cff8d
  15504. >>>(12.l+27) lelong x mod version %d,
  15505. >>>(12.l+31) lelong 0 Not MLS,
  15506. >>>(12.l+31) lelong 1 MLS,
  15507. >>>(12.l+23) lelong 2
  15508. >>>>(12.l+47) string >\0 module name %s
  15509. >>>(12.l+23) lelong 1 base
  15510. 1 string policy_module( SE Linux policy module source
  15511. 2 string policy_module( SE Linux policy module source
  15512. 0 string ##\ <summary> SE Linux policy interface source
  15513. #0 search gen_context( SE Linux policy file contexts
  15514. #0 search gen_sens( SE Linux policy MLS constraints source
  15515. #------------------------------------------------------------------------------
  15516. # $File: sendmail,v 1.7 2009/09/19 16:28:12 christos Exp $
  15517. # sendmail: file(1) magic for sendmail config files
  15518. #
  15519. # XXX - byte order?
  15520. #
  15521. 0 byte 046 Sendmail frozen configuration
  15522. >16 string >\0 - version %s
  15523. 0 short 0x271c Sendmail frozen configuration
  15524. >16 string >\0 - version %s
  15525. #------------------------------------------------------------------------------
  15526. # sendmail: file(1) magic for sendmail m4(1) files
  15527. #
  15528. # From Hendrik Scholz <hendrik@scholz.net>
  15529. # i.e. files in /usr/share/sendmail/cf/
  15530. #
  15531. 0 string divert(-1)\n sendmail m4 text file
  15532. #------------------------------------------------------------------------------
  15533. # $File: sequent,v 1.8 2009/09/19 16:28:12 christos Exp $
  15534. # sequent: file(1) magic for Sequent machines
  15535. #
  15536. # Sequent information updated by Don Dwiggins <atsun!dwiggins>.
  15537. # For Sequent's multiprocessor systems (incomplete).
  15538. 0 lelong 0x00ea BALANCE NS32000 .o
  15539. >16 lelong >0 not stripped
  15540. >124 lelong >0 version %ld
  15541. 0 lelong 0x10ea BALANCE NS32000 executable (0 @ 0)
  15542. >16 lelong >0 not stripped
  15543. >124 lelong >0 version %ld
  15544. 0 lelong 0x20ea BALANCE NS32000 executable (invalid @ 0)
  15545. >16 lelong >0 not stripped
  15546. >124 lelong >0 version %ld
  15547. 0 lelong 0x30ea BALANCE NS32000 standalone executable
  15548. >16 lelong >0 not stripped
  15549. >124 lelong >0 version %ld
  15550. #
  15551. # Symmetry information added by Jason Merrill <jason@jarthur.claremont.edu>.
  15552. # Symmetry magic nums will not be reached if DOS COM comes before them;
  15553. # byte 0xeb is matched before these get a chance.
  15554. 0 leshort 0x12eb SYMMETRY i386 .o
  15555. >16 lelong >0 not stripped
  15556. >124 lelong >0 version %ld
  15557. 0 leshort 0x22eb SYMMETRY i386 executable (0 @ 0)
  15558. >16 lelong >0 not stripped
  15559. >124 lelong >0 version %ld
  15560. 0 leshort 0x32eb SYMMETRY i386 executable (invalid @ 0)
  15561. >16 lelong >0 not stripped
  15562. >124 lelong >0 version %ld
  15563. 0 leshort 0x42eb SYMMETRY i386 standalone executable
  15564. >16 lelong >0 not stripped
  15565. >124 lelong >0 version %ld
  15566. #------------------------------------------------------------------------------
  15567. # $File: sgi,v 1.19 2013/01/12 03:09:51 christos Exp $
  15568. # sgi: file(1) magic for Silicon Graphics operating systems and applications
  15569. #
  15570. # Executable images are handled either in aout (for old-style a.out
  15571. # files for 68K; they are indistinguishable from other big-endian 32-bit
  15572. # a.out files) or in mips (for MIPS ECOFF and Ucode files)
  15573. #
  15574. # kbd file definitions
  15575. 0 string kbd!map kbd map file
  15576. >8 byte >0 Ver %d:
  15577. >10 short >0 with %d table(s)
  15578. 0 beshort 0x8765 disk quotas file
  15579. 0 beshort 0x0506 IRIS Showcase file
  15580. >2 byte 0x49 -
  15581. >3 byte x - version %ld
  15582. 0 beshort 0x0226 IRIS Showcase template
  15583. >2 byte 0x63 -
  15584. >3 byte x - version %ld
  15585. 0 belong 0x5343464d IRIS Showcase file
  15586. >4 byte x - version %ld
  15587. 0 belong 0x5443464d IRIS Showcase template
  15588. >4 byte x - version %ld
  15589. 0 belong 0xdeadbabe IRIX Parallel Arena
  15590. >8 belong >0 - version %ld
  15591. # core files
  15592. #
  15593. # 32bit core file
  15594. 0 belong 0xdeadadb0 IRIX core dump
  15595. >4 belong 1 of
  15596. >16 string >\0 '%s'
  15597. # 64bit core file
  15598. 0 belong 0xdeadad40 IRIX 64-bit core dump
  15599. >4 belong 1 of
  15600. >16 string >\0 '%s'
  15601. # N32bit core file
  15602. 0 belong 0xbabec0bb IRIX N32 core dump
  15603. >4 belong 1 of
  15604. >16 string >\0 '%s'
  15605. # New style crash dump file
  15606. 0 string \x43\x72\x73\x68\x44\x75\x6d\x70 IRIX vmcore dump of
  15607. >36 string >\0 '%s'
  15608. # Trusted IRIX info
  15609. 0 string SGIAUDIT SGI Audit file
  15610. >8 byte x - version %d
  15611. >9 byte x \b.%ld
  15612. #
  15613. 0 string WNGZWZSC Wingz compiled script
  15614. 0 string WNGZWZSS Wingz spreadsheet
  15615. 0 string WNGZWZHP Wingz help file
  15616. #
  15617. 0 string #Inventor V IRIS Inventor 1.0 file
  15618. 0 string #Inventor V2 Open Inventor 2.0 file
  15619. # GLF is OpenGL stream encoding
  15620. 0 string glfHeadMagic(); GLF_TEXT
  15621. 4 belong 0x7d000000 GLF_BINARY_LSB_FIRST
  15622. !:strength -30
  15623. 4 belong 0x0000007d GLF_BINARY_MSB_FIRST
  15624. !:strength -30
  15625. # GLS is OpenGL stream encoding; GLS is the successor of GLF
  15626. 0 string glsBeginGLS( GLS_TEXT
  15627. 4 belong 0x10000000 GLS_BINARY_LSB_FIRST
  15628. !:strength -30
  15629. 4 belong 0x00000010 GLS_BINARY_MSB_FIRST
  15630. !:strength -30
  15631. #
  15632. #
  15633. # Performance Co-Pilot file types
  15634. 0 string PmNs PCP compiled namespace (V.0)
  15635. 0 string PmN PCP compiled namespace
  15636. >3 string >\0 (V.%1.1s)
  15637. #3 lelong 0x84500526 PCP archive
  15638. 3 belong 0x84500526 PCP archive
  15639. >7 byte x (V.%d)
  15640. #>20 lelong -2 temporal index
  15641. #>20 lelong -1 metadata
  15642. #>20 lelong 0 log volume #0
  15643. #>20 lelong >0 log volume #%ld
  15644. >20 belong -2 temporal index
  15645. >20 belong -1 metadata
  15646. >20 belong 0 log volume #0
  15647. >20 belong >0 log volume #%ld
  15648. >24 string >\0 host: %s
  15649. 0 string PCPFolio PCP
  15650. >9 string Version: Archive Folio
  15651. >18 string >\0 (V.%s)
  15652. 0 string #pmchart PCP pmchart view
  15653. >9 string Version
  15654. >17 string >\0 (V%-3.3s)
  15655. 0 string #kmchart PCP kmchart view
  15656. >9 string Version
  15657. >17 string >\0 (V.%s)
  15658. 0 string pmview PCP pmview config
  15659. >7 string Version
  15660. >15 string >\0 (V%-3.3s)
  15661. 0 string #pmlogger PCP pmlogger config
  15662. >10 string Version
  15663. >18 string >\0 (V%1.1s)
  15664. 0 string #pmdahotproc PCP pmdahotproc config
  15665. >13 string Version
  15666. >21 string >\0 (V%-3.3s)
  15667. 0 string PcPh PCP Help
  15668. >4 string 1 Index
  15669. >4 string 2 Text
  15670. >5 string >\0 (V.%1.1s)
  15671. 0 string #pmieconf-rules PCP pmieconf rules
  15672. >16 string >\0 (V.%1.1s)
  15673. 3 string pmieconf-pmie PCP pmie config
  15674. >17 string >\0 (V.%1.1s)
  15675. # SpeedShop data files
  15676. 0 lelong 0x13130303 SpeedShop data file
  15677. # mdbm files
  15678. 0 lelong 0x01023962 mdbm file, version 0 (obsolete)
  15679. 0 string mdbm mdbm file,
  15680. >5 byte x version %d,
  15681. >6 byte x 2^%d pages,
  15682. >7 byte x pagesize 2^%d,
  15683. >17 byte x hash %d,
  15684. >11 byte x dataformat %d
  15685. # Alias Maya files
  15686. 0 string/t //Maya ASCII Alias Maya Ascii File,
  15687. >13 string >\0 version %s
  15688. 8 string MAYAFOR4 Alias Maya Binary File,
  15689. >32 string >\0 version %s scene
  15690. 8 string MayaFOR4 Alias Maya Binary File,
  15691. >32 string >\0 version %s scene
  15692. 8 string CIMG Alias Maya Image File
  15693. 8 string DEEP Alias Maya Image File
  15694. #------------------------------------------------------------------------------
  15695. # $File: sgml,v 1.30 2013/12/21 14:27:24 christos Exp $
  15696. # Type: SVG Vectorial Graphics
  15697. # From: Noel Torres <tecnico@ejerciciosresueltos.com>
  15698. 0 string \<?xml\ version="
  15699. >15 string >\0
  15700. >>19 search/4096 \<svg SVG Scalable Vector Graphics image
  15701. !:mime image/svg+xml
  15702. >>19 search/4096 \<gnc-v2 GnuCash file
  15703. !:mime application/x-gnucash
  15704. # Sitemap file
  15705. 0 string/t \<?xml\ version="
  15706. >15 string >\0
  15707. >>19 search/4096 \<urlset XML Sitemap document text
  15708. !:mime application/xml-sitemap
  15709. # OpenStreetMap XML (.osm)
  15710. # http://wiki.openstreetmap.org/wiki/OSM_XML
  15711. # From: Markus Heidelberg <markus.heidelberg@web.de>
  15712. 0 string \<?xml\ version="
  15713. >15 string >\0
  15714. >>19 search/4096 \<osm OpenStreetMap XML data
  15715. # xhtml
  15716. 0 string/t \<?xml\ version="
  15717. >15 string >\0
  15718. >>19 search/4096/cWbt \<!doctype\ html XHTML document text
  15719. !:mime text/html
  15720. 0 string/t \<?xml\ version='
  15721. >15 string >\0
  15722. >>19 search/4096/cWbt \<!doctype\ html XHTML document text
  15723. !:mime text/html
  15724. 0 string/t \<?xml\ version="
  15725. >15 string >\0
  15726. >>19 search/4096/cWbt \<html broken XHTML document text
  15727. !:mime text/html
  15728. #------------------------------------------------------------------------------
  15729. # sgml: file(1) magic for Standard Generalized Markup Language
  15730. # HyperText Markup Language (HTML) is an SGML document type,
  15731. # from Daniel Quinlan (quinlan@yggdrasil.com)
  15732. # adapted to string extenstions by Anthon van der Neut <anthon@mnt.org)
  15733. 0 search/4096/cWt \<!doctype\ html HTML document text
  15734. !:mime text/html
  15735. !:strength + 5
  15736. 0 search/4096/cwt \<head HTML document text
  15737. !:mime text/html
  15738. !:strength + 5
  15739. 0 search/4096/cwt \<title HTML document text
  15740. !:mime text/html
  15741. !:strength + 5
  15742. 0 search/4096/cwt \<html HTML document text
  15743. !:mime text/html
  15744. !:strength + 5
  15745. 0 search/4096/cwt \<script HTML document text
  15746. !:mime text/html
  15747. !:strength + 5
  15748. 0 search/4096/cwt \<style HTML document text
  15749. !:mime text/html
  15750. !:strength + 5
  15751. 0 search/4096/cwt \<table HTML document text
  15752. !:mime text/html
  15753. !:strength + 5
  15754. 0 search/4096/cwt \<a\ href= HTML document text
  15755. !:mime text/html
  15756. !:strength + 5
  15757. # Extensible markup language (XML), a subset of SGML
  15758. # from Marc Prud'hommeaux (marc@apocalypse.org)
  15759. 0 search/1/cwt \<?xml XML document text
  15760. !:mime application/xml
  15761. !:strength + 5
  15762. 0 string/t \<?xml\ version\ " XML
  15763. !:mime application/xml
  15764. !:strength + 5
  15765. 0 string/t \<?xml\ version=" XML
  15766. !:mime application/xml
  15767. !:strength + 5
  15768. >15 string/t >\0 %.3s document text
  15769. >>23 search/1 \<xsl:stylesheet (XSL stylesheet)
  15770. >>24 search/1 \<xsl:stylesheet (XSL stylesheet)
  15771. 0 string \<?xml\ version=' XML
  15772. !:mime application/xml
  15773. !:strength + 5
  15774. >15 string/t >\0 %.3s document text
  15775. >>23 search/1 \<xsl:stylesheet (XSL stylesheet)
  15776. >>24 search/1 \<xsl:stylesheet (XSL stylesheet)
  15777. 0 search/1/wbt \<?xml XML document text
  15778. !:mime application/xml
  15779. !:strength - 10
  15780. 0 search/1/wt \<?XML broken XML document text
  15781. !:mime application/xml
  15782. !:strength - 10
  15783. # SGML, mostly from rph@sq
  15784. 0 search/4096/cwt \<!doctype exported SGML document text
  15785. 0 search/4096/cwt \<!subdoc exported SGML subdocument text
  15786. 0 search/4096/cwt \<!-- exported SGML document text
  15787. !:strength - 10
  15788. # Web browser cookie files
  15789. # (Mozilla, Galeon, Netscape 4, Konqueror..)
  15790. # Ulf Harnhammar <ulfh@update.uu.se>
  15791. 0 search/1 #\ HTTP\ Cookie\ File Web browser cookie text
  15792. 0 search/1 #\ Netscape\ HTTP\ Cookie\ File Netscape cookie text
  15793. 0 search/1 #\ KDE\ Cookie\ File Konqueror cookie text
  15794. #------------------------------------------------------------------------
  15795. # $File: sharc,v 1.6 2009/09/19 16:28:12 christos Exp $
  15796. # file(1) magic for sharc files
  15797. #
  15798. # SHARC DSP, MIDI SysEx and RiscOS filetype definitions added by
  15799. # FutureGroove Music (dsp@futuregroove.de)
  15800. #------------------------------------------------------------------------
  15801. #0 string Draw RiscOS Drawfile
  15802. #0 string PACK RiscOS PackdDir archive
  15803. #------------------------------------------------------------------------
  15804. # SHARC DSP stuff (based on the FGM SHARC DSP SDK)
  15805. #0 string =! Assembler source
  15806. #0 string Analog ADi asm listing file
  15807. 0 string .SYSTEM SHARC architecture file
  15808. 0 string .system SHARC architecture file
  15809. 0 leshort 0x521C SHARC COFF binary
  15810. >2 leshort >1 , %hd sections
  15811. >>12 lelong >0 , not stripped
  15812. #------------------------------------------------------------------------------
  15813. # $File: sinclair,v 1.5 2009/09/19 16:28:12 christos Exp $
  15814. # sinclair: file(1) sinclair QL
  15815. # additions to /etc/magic by Thomas M. Ott (ThMO)
  15816. # Sinclair QL floppy disk formats (ThMO)
  15817. 0 string =QL5 QL disk dump data,
  15818. >3 string =A 720 KB,
  15819. >3 string =B 1.44 MB,
  15820. >3 string =C 3.2 MB,
  15821. >4 string >\0 label:%.10s
  15822. # Sinclair QL OS dump (ThMO)
  15823. # (NOTE: if `file' would be able to use indirect references in a endian format
  15824. # differing from the natural host format, this could be written more
  15825. # reliably and faster...)
  15826. #
  15827. # we *can't* lookup QL OS code dumps, because `file' is UNABLE to read more
  15828. # than the first 8K of a file... #-(
  15829. #
  15830. #0 belong =0x30000
  15831. #>49124 belong <47104
  15832. #>>49128 belong <47104
  15833. #>>>49132 belong <47104
  15834. #>>>>49136 belong <47104 QL OS dump data,
  15835. #>>>>>49148 string >\0 type %.3s,
  15836. #>>>>>49142 string >\0 version %.4s
  15837. # Sinclair QL firmware executables (ThMO)
  15838. 0 string NqNqNq`\004 QL firmware executable (BCPL)
  15839. # Sinclair QL libraries (was ThMO)
  15840. 0 beshort 0xFB01 QDOS object
  15841. >2 pstring x '%s'
  15842. # Sinclair QL executables (was ThMO)
  15843. 4 belong 0x4AFB QDOS executable
  15844. >9 pstring x '%s'
  15845. # Sinclair QL ROM (ThMO)
  15846. 0 belong =0x4AFB0001 QL plugin-ROM data,
  15847. >9 pstring =\0 un-named
  15848. >9 pstring >\0 named: %s
  15849. # Type: SiSU Markup Language
  15850. # URL: http://www.sisudoc.org/
  15851. # From: Ralph Amissah <ralph.amissah@gmail.com>
  15852. 0 regex \^%?[\ \t]*SiSU[\ \t]+insert SiSU text insert
  15853. >5 regex [0-9.]+ %s
  15854. 0 regex \^%[\ \t]+SiSU[\ \t]+master SiSU text master
  15855. >5 regex [0-9.]+ %s
  15856. 0 regex \^%?[\ \t]*SiSU[\ \t]+text SiSU text
  15857. >5 regex [0-9.]+ %s
  15858. 0 regex \^%?[\ \t]*SiSU[\ \t][0-9.]+ SiSU text
  15859. >5 regex [0-9.]+ %s
  15860. 0 regex \^%*[\ \t]*sisu-[0-9.]+ SiSU text
  15861. >5 regex [0-9.]+ %s
  15862. #------------------------------------------------------------------------------
  15863. # $File: sketch,v 1.4 2009/09/19 16:28:12 christos Exp $
  15864. # Sketch Drawings: http://sketch.sourceforge.net/
  15865. # From: Edwin Mons <e@ik.nu>
  15866. 0 search/1 ##Sketch Sketch document text
  15867. #-----------------------------------------------
  15868. # $File: smalltalk,v 1.5 2009/09/19 16:28:12 christos Exp $
  15869. # GNU Smalltalk image, starting at version 1.6.2
  15870. # From: catull_us@yahoo.com
  15871. #
  15872. 0 string GSTIm\0\0 GNU SmallTalk
  15873. # little-endian
  15874. >7 byte&1 =0 LE image version
  15875. >>10 byte x %d.
  15876. >>9 byte x \b%d.
  15877. >>8 byte x \b%d
  15878. #>>12 lelong x , data: %ld
  15879. #>>16 lelong x , table: %ld
  15880. #>>20 lelong x , memory: %ld
  15881. # big-endian
  15882. >7 byte&1 =1 BE image version
  15883. >>8 byte x %d.
  15884. >>9 byte x \b%d.
  15885. >>10 byte x \b%d
  15886. #>>12 belong x , data: %ld
  15887. #>>16 belong x , table: %ld
  15888. #>>20 belong x , memory: %ld
  15889. #------------------------------------------------------------------------------
  15890. # $File: smile,v 1.1 2011/08/17 17:37:18 christos Exp $
  15891. # smile: file(1) magic for Smile serialization
  15892. #
  15893. # The Smile serialization format uses a 4-byte header:
  15894. #
  15895. # Constant byte #0: 0x3A (ASCII ':')
  15896. # Constant byte #1: 0x29 (ASCII ')')
  15897. # Constant byte #2: 0x0A (ASCII linefeed, '\n')
  15898. # Variable byte #3, consisting of bits:
  15899. # Bits 4-7 (4 MSB): 4-bit version number
  15900. # Bits 3: Reserved
  15901. # Bit 2 (mask 0x04): Whether raw binary (unescaped 8-bit) values may be present in content
  15902. # Bit 1 (mask 0x02): Whether shared String value checking was enabled during encoding, default false
  15903. # Bit 0 (mask 0x01): Whether shared property name checking was enabled during encoding, default true
  15904. #
  15905. # Reference: http://wiki.fasterxml.com/SmileFormatSpec
  15906. # Created by: Pierre-Alexandre Meyer <pierre@mouraf.org>
  15907. # Detection
  15908. 0 string :)\n Smile binary data
  15909. # Versioning
  15910. >3 byte&0xF0 x version %d:
  15911. # Properties
  15912. >3 byte&0x04 0x04 binary raw,
  15913. >3 byte&0x04 0x00 binary encoded,
  15914. >3 byte&0x02 0x02 shared String values enabled,
  15915. >3 byte&0x02 0x00 shared String values disabled,
  15916. >3 byte&0x01 0x01 shared field names enabled
  15917. >3 byte&0x01 0x00 shared field names disabled
  15918. #------------------------------------------------------------------------------
  15919. # $File: sniffer,v 1.19 2013/01/06 01:11:04 christos Exp $
  15920. # sniffer: file(1) magic for packet capture files
  15921. #
  15922. # From: guy@alum.mit.edu (Guy Harris)
  15923. #
  15924. #
  15925. # Microsoft Network Monitor 1.x capture files.
  15926. #
  15927. 0 string RTSS NetMon capture file
  15928. >5 byte x - version %d
  15929. >4 byte x \b.%d
  15930. >6 leshort 0 (Unknown)
  15931. >6 leshort 1 (Ethernet)
  15932. >6 leshort 2 (Token Ring)
  15933. >6 leshort 3 (FDDI)
  15934. >6 leshort 4 (ATM)
  15935. >6 leshort >4 (type %d)
  15936. #
  15937. # Microsoft Network Monitor 2.x capture files.
  15938. #
  15939. 0 string GMBU NetMon capture file
  15940. >5 byte x - version %d
  15941. >4 byte x \b.%d
  15942. >6 leshort 0 (Unknown)
  15943. >6 leshort 1 (Ethernet)
  15944. >6 leshort 2 (Token Ring)
  15945. >6 leshort 3 (FDDI)
  15946. >6 leshort 4 (ATM)
  15947. >6 leshort 5 (IP-over-IEEE 1394)
  15948. >6 leshort 6 (802.11)
  15949. >6 leshort 7 (Raw IP)
  15950. >6 leshort 8 (Raw IP)
  15951. >6 leshort 9 (Raw IP)
  15952. >6 leshort >9 (type %d)
  15953. #
  15954. # Network General Sniffer capture files.
  15955. # Sorry, make that "Network Associates Sniffer capture files."
  15956. # Sorry, make that "Network General old DOS Sniffer capture files."
  15957. #
  15958. 0 string TRSNIFF\ data\ \ \ \ \032 Sniffer capture file
  15959. >33 byte 2 (compressed)
  15960. >23 leshort x - version %d
  15961. >25 leshort x \b.%d
  15962. >32 byte 0 (Token Ring)
  15963. >32 byte 1 (Ethernet)
  15964. >32 byte 2 (ARCNET)
  15965. >32 byte 3 (StarLAN)
  15966. >32 byte 4 (PC Network broadband)
  15967. >32 byte 5 (LocalTalk)
  15968. >32 byte 6 (Znet)
  15969. >32 byte 7 (Internetwork Analyzer)
  15970. >32 byte 9 (FDDI)
  15971. >32 byte 10 (ATM)
  15972. #
  15973. # Cinco Networks NetXRay capture files.
  15974. # Sorry, make that "Network General Sniffer Basic capture files."
  15975. # Sorry, make that "Network Associates Sniffer Basic capture files."
  15976. # Sorry, make that "Network Associates Sniffer Basic, and Windows
  15977. # Sniffer Pro", capture files."
  15978. # Sorry, make that "Network General Sniffer capture files."
  15979. # Sorry, make that "NetScout Sniffer capture files."
  15980. #
  15981. 0 string XCP\0 NetXRay capture file
  15982. >4 string >\0 - version %s
  15983. >44 leshort 0 (Ethernet)
  15984. >44 leshort 1 (Token Ring)
  15985. >44 leshort 2 (FDDI)
  15986. >44 leshort 3 (WAN)
  15987. >44 leshort 8 (ATM)
  15988. >44 leshort 9 (802.11)
  15989. #
  15990. # "libpcap" capture files.
  15991. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  15992. # the main program that uses that format, but there are other programs
  15993. # that use "libpcap", or that use the same capture file format.)
  15994. #
  15995. 0 name pcap-be
  15996. >4 beshort x - version %d
  15997. >6 beshort x \b.%d
  15998. >20 belong 0 (No link-layer encapsulation
  15999. >20 belong 1 (Ethernet
  16000. >20 belong 2 (3Mb Ethernet
  16001. >20 belong 3 (AX.25
  16002. >20 belong 4 (ProNET
  16003. >20 belong 5 (CHAOS
  16004. >20 belong 6 (Token Ring
  16005. >20 belong 7 (BSD ARCNET
  16006. >20 belong 8 (SLIP
  16007. >20 belong 9 (PPP
  16008. >20 belong 10 (FDDI
  16009. >20 belong 11 (RFC 1483 ATM
  16010. >20 belong 12 (raw IP
  16011. >20 belong 13 (BSD/OS SLIP
  16012. >20 belong 14 (BSD/OS PPP
  16013. >20 belong 19 (Linux ATM Classical IP
  16014. >20 belong 50 (PPP or Cisco HDLC
  16015. >20 belong 51 (PPP-over-Ethernet
  16016. >20 belong 99 (Symantec Enterprise Firewall
  16017. >20 belong 100 (RFC 1483 ATM
  16018. >20 belong 101 (raw IP
  16019. >20 belong 102 (BSD/OS SLIP
  16020. >20 belong 103 (BSD/OS PPP
  16021. >20 belong 104 (BSD/OS Cisco HDLC
  16022. >20 belong 105 (802.11
  16023. >20 belong 106 (Linux Classical IP over ATM
  16024. >20 belong 107 (Frame Relay
  16025. >20 belong 108 (OpenBSD loopback
  16026. >20 belong 109 (OpenBSD IPsec encrypted
  16027. >20 belong 112 (Cisco HDLC
  16028. >20 belong 113 (Linux "cooked"
  16029. >20 belong 114 (LocalTalk
  16030. >20 belong 117 (OpenBSD PFLOG
  16031. >20 belong 119 (802.11 with Prism header
  16032. >20 belong 122 (RFC 2625 IP over Fibre Channel
  16033. >20 belong 123 (SunATM
  16034. >20 belong 127 (802.11 with radiotap header
  16035. >20 belong 129 (Linux ARCNET
  16036. >20 belong 138 (Apple IP over IEEE 1394
  16037. >20 belong 139 (MTP2 with pseudo-header
  16038. >20 belong 140 (MTP2
  16039. >20 belong 141 (MTP3
  16040. >20 belong 142 (SCCP
  16041. >20 belong 143 (DOCSIS
  16042. >20 belong 144 (IrDA
  16043. >20 belong 147 (Private use 0
  16044. >20 belong 148 (Private use 1
  16045. >20 belong 149 (Private use 2
  16046. >20 belong 150 (Private use 3
  16047. >20 belong 151 (Private use 4
  16048. >20 belong 152 (Private use 5
  16049. >20 belong 153 (Private use 6
  16050. >20 belong 154 (Private use 7
  16051. >20 belong 155 (Private use 8
  16052. >20 belong 156 (Private use 9
  16053. >20 belong 157 (Private use 10
  16054. >20 belong 158 (Private use 11
  16055. >20 belong 159 (Private use 12
  16056. >20 belong 160 (Private use 13
  16057. >20 belong 161 (Private use 14
  16058. >20 belong 162 (Private use 15
  16059. >20 belong 163 (802.11 with AVS header
  16060. >20 belong 165 (BACnet MS/TP
  16061. >20 belong 166 (PPPD
  16062. >20 belong 169 (GPRS LLC
  16063. >20 belong 177 (Linux LAPD
  16064. >20 belong 187 (Bluetooth HCI H4
  16065. >20 belong 189 (Linux USB
  16066. >20 belong 192 (PPI
  16067. >20 belong 195 (802.15.4
  16068. >20 belong 196 (SITA
  16069. >20 belong 197 (Endace ERF
  16070. >20 belong 201 (Bluetooth HCI H4 with pseudo-header
  16071. >20 belong 202 (AX.25 with KISS header
  16072. >20 belong 203 (LAPD
  16073. >20 belong 204 (PPP with direction pseudo-header
  16074. >20 belong 205 (Cisco HDLC with direction pseudo-header
  16075. >20 belong 206 (Frame Relay with direction pseudo-header
  16076. >20 belong 209 (Linux IPMB
  16077. >20 belong 215 (802.15.4 with non-ASK PHY header
  16078. >20 belong 220 (Memory-mapped Linux USB
  16079. >20 belong 224 (Fibre Channel FC-2
  16080. >20 belong 225 (Fibre Channel FC-2 with frame delimiters
  16081. >20 belong 226 (Solaris IPNET
  16082. >20 belong 227 (SocketCAN
  16083. >20 belong 228 (Raw IPv4
  16084. >20 belong 229 (Raw IPv6
  16085. >20 belong 230 (802.15.4 without FCS
  16086. >20 belong 231 (D-Bus messages
  16087. >20 belong 235 (DVB-CI
  16088. >20 belong 236 (MUX27010
  16089. >20 belong 237 (STANAG 5066 D_PDUs
  16090. >20 belong 239 (Linux netlink NFLOG messages
  16091. >20 belong 240 (Hilscher netAnalyzer
  16092. >20 belong 241 (Hilscher netAnalyzer with delimiters
  16093. >20 belong 242 (IP-over-Infiniband
  16094. >20 belong 243 (MPEG-2 Transport Stream packets
  16095. >20 belong 244 (ng4t ng40
  16096. >20 belong 245 (NFC LLCP
  16097. >20 belong 247 (Infiniband
  16098. >20 belong 248 (SCTP
  16099. >16 belong x \b, capture length %d)
  16100. 0 ubelong 0xa1b2c3d4 tcpdump capture file (big-endian)
  16101. !:mime application/vnd.tcpdump.pcap
  16102. >0 use pcap-be
  16103. 0 ulelong 0xa1b2c3d4 tcpdump capture file (little-endian)
  16104. !:mime application/vnd.tcpdump.pcap
  16105. >0 use \^pcap-be
  16106. #
  16107. # "libpcap"-with-Alexey-Kuznetsov's-patches capture files.
  16108. # (We call them "tcpdump capture file(s)" for now, as "tcpdump" is
  16109. # the main program that uses that format, but there are other programs
  16110. # that use "libpcap", or that use the same capture file format.)
  16111. #
  16112. 0 ubelong 0xa1b2cd34 extended tcpdump capture file (big-endian)
  16113. >0 use pcap-be
  16114. 0 ulelong 0xa1b2cd34 extended tcpdump capture file (little-endian)
  16115. >0 use \^pcap-be
  16116. #
  16117. # "pcap-ng" capture files.
  16118. # http://www.winpcap.org/ntar/draft/PCAP-DumpFileFormat.html
  16119. # Pcap-ng files can contain multiple sections. Printing the endianness,
  16120. # snaplen, or other information from the first SHB may be misleading.
  16121. #
  16122. 0 ubelong 0x0a0d0d0a
  16123. >8 ubelong 0x1a2b3c4d pcap-ng capture file
  16124. >>12 beshort x - version %d
  16125. >>14 beshort x \b.%d
  16126. 0 ulelong 0x0a0d0d0a
  16127. >8 ulelong 0x1a2b3c4d pcap-ng capture file
  16128. >>12 leshort x - version %d
  16129. >>14 leshort x \b.%d
  16130. #
  16131. # AIX "iptrace" capture files.
  16132. #
  16133. 0 string iptrace\ 1.0 "iptrace" capture file
  16134. 0 string iptrace\ 2.0 "iptrace" capture file
  16135. #
  16136. # Novell LANalyzer capture files.
  16137. #
  16138. 0 leshort 0x1001 LANalyzer capture file
  16139. 0 leshort 0x1007 LANalyzer capture file
  16140. #
  16141. # HP-UX "nettl" capture files.
  16142. #
  16143. 0 string \x54\x52\x00\x64\x00 "nettl" capture file
  16144. #
  16145. # RADCOM WAN/LAN Analyzer capture files.
  16146. #
  16147. 0 string \x42\xd2\x00\x34\x12\x66\x22\x88 RADCOM WAN/LAN Analyzer capture file
  16148. #
  16149. # NetStumbler log files. Not really packets, per se, but about as
  16150. # close as you can get. These are log files from NetStumbler, a
  16151. # Windows program, that scans for 802.11b networks.
  16152. #
  16153. 0 string NetS NetStumbler log file
  16154. >8 lelong x \b, %d stations found
  16155. #
  16156. # *Peek tagged capture files.
  16157. #
  16158. 0 string \177ver EtherPeek/AiroPeek/OmniPeek capture file
  16159. #
  16160. # Visual Networks traffic capture files.
  16161. #
  16162. 0 string \x05VNF Visual Networks traffic capture file
  16163. #
  16164. # Network Instruments Observer capture files.
  16165. #
  16166. 0 string ObserverPktBuffe Network Instruments Observer capture file
  16167. #
  16168. # Files from Accellent Group's 5View products.
  16169. #
  16170. 0 string \xaa\xaa\xaa\xaa 5View capture file
  16171. #------------------------------------------------------------------------------
  16172. # $File: softquad,v 1.13 2009/09/19 16:28:12 christos Exp $
  16173. # softquad: file(1) magic for SoftQuad Publishing Software
  16174. #
  16175. # Author/Editor and RulesBuilder
  16176. #
  16177. # XXX - byte order?
  16178. #
  16179. 0 string \<!SQ\ DTD> Compiled SGML rules file
  16180. >9 string >\0 Type %s
  16181. 0 string \<!SQ\ A/E> A/E SGML Document binary
  16182. >9 string >\0 Type %s
  16183. 0 string \<!SQ\ STS> A/E SGML binary styles file
  16184. >9 string >\0 Type %s
  16185. 0 short 0xc0de Compiled PSI (v1) data
  16186. 0 short 0xc0da Compiled PSI (v2) data
  16187. >3 string >\0 (%s)
  16188. # Binary sqtroff font/desc files...
  16189. 0 short 0125252 SoftQuad DESC or font file binary
  16190. >2 short >0 - version %d
  16191. # Bitmaps...
  16192. 0 search/1 SQ\ BITMAP1 SoftQuad Raster Format text
  16193. #0 string SQ\ BITMAP2 SoftQuad Raster Format data
  16194. # sqtroff intermediate language (replacement for ditroff int. lang.)
  16195. 0 string X\ SoftQuad troff Context intermediate
  16196. >2 string 495 for AT&T 495 laser printer
  16197. >2 string hp for Hewlett-Packard LaserJet
  16198. >2 string impr for IMAGEN imPRESS
  16199. >2 string ps for PostScript
  16200. # From: Michael Piefel <piefel@debian.org>
  16201. # sqtroff intermediate language (replacement for ditroff int. lang.)
  16202. 0 string X\ 495 SoftQuad troff Context intermediate for AT&T 495 laser printer
  16203. 0 string X\ hp SoftQuad troff Context intermediate for HP LaserJet
  16204. 0 string X\ impr SoftQuad troff Context intermediate for IMAGEN imPRESS
  16205. 0 string X\ ps SoftQuad troff Context intermediate for PostScript
  16206. #------------------------------------------------------------------------------
  16207. # $File: spec,v 1.4 2009/09/19 16:28:12 christos Exp $
  16208. # spec: file(1) magic for SPEC raw results (*.raw, *.rsf)
  16209. #
  16210. # Cloyce D. Spradling <cloyce@headgear.org>
  16211. 0 string spec SPEC
  16212. >4 string .cpu CPU
  16213. >>8 string <: \b%.4s
  16214. >>12 string . raw result text
  16215. 17 string version=SPECjbb SPECjbb
  16216. >32 string <: \b%.4s
  16217. >>37 string <: v%.4s raw result text
  16218. 0 string BEGIN\040SPECWEB SPECweb
  16219. >13 string <: \b%.2s
  16220. >>15 string _SSL \b_SSL
  16221. >>>20 string <: v%.4s raw result text
  16222. >>16 string <: v%.4s raw result text
  16223. #------------------------------------------------------------------------------
  16224. # $File: spectrum,v 1.7 2010/09/20 18:55:20 rrt Exp $
  16225. # spectrum: file(1) magic for Spectrum emulator files.
  16226. #
  16227. # John Elliott <jce@seasip.demon.co.uk>
  16228. #
  16229. # Spectrum +3DOS header
  16230. #
  16231. 0 string PLUS3DOS\032 Spectrum +3 data
  16232. >15 byte 0 - BASIC program
  16233. >15 byte 1 - number array
  16234. >15 byte 2 - character array
  16235. >15 byte 3 - memory block
  16236. >>16 belong 0x001B0040 (screen)
  16237. >15 byte 4 - Tasword document
  16238. >15 string TAPEFILE - ZXT tapefile
  16239. #
  16240. # Tape file. This assumes the .TAP starts with a Spectrum-format header,
  16241. # which nearly all will.
  16242. #
  16243. # Update: Sanity-check string contents to be printable.
  16244. # -Adam Buchbinder <adam.buchbinder@gmail.com>
  16245. #
  16246. 0 string \023\000\000
  16247. >4 string >\0
  16248. >>4 string <\177 Spectrum .TAP data "%-10.10s"
  16249. >>>3 byte 0 - BASIC program
  16250. >>>3 byte 1 - number array
  16251. >>>3 byte 2 - character array
  16252. >>>3 byte 3 - memory block
  16253. >>>>14 belong 0x001B0040 (screen)
  16254. # The following three blocks are from pak21-spectrum@srcf.ucam.org
  16255. # TZX tape images
  16256. 0 string ZXTape!\x1a Spectrum .TZX data
  16257. >8 byte x version %d
  16258. >9 byte x \b.%d
  16259. # RZX input recording files
  16260. 0 string RZX! Spectrum .RZX data
  16261. >4 byte x version %d
  16262. >5 byte x \b.%d
  16263. # Floppy disk images
  16264. 0 string MV\ -\ CPCEMU\ Disk-Fil Amstrad/Spectrum .DSK data
  16265. 0 string MV\ -\ CPC\ format\ Dis Amstrad/Spectrum DU54 .DSK data
  16266. 0 string EXTENDED\ CPC\ DSK\ Fil Amstrad/Spectrum Extended .DSK data
  16267. 0 string SINCLAIR Spectrum .SCL Betadisk image
  16268. # Hard disk images
  16269. 0 string RS-IDE\x1a Spectrum .HDF hard disk image
  16270. >7 byte x \b, version 0x%02x
  16271. #------------------------------------------------------------------------------
  16272. # $File: sql,v 1.13 2013/08/27 04:02:33 christos Exp $
  16273. # sql: file(1) magic for SQL files
  16274. #
  16275. # From: "Marty Leisner" <mleisner@eng.mc.xerox.com>
  16276. # Recognize some MySQL files.
  16277. # Elan Ruusamae <glen@delfi.ee>, added MariaDB signatures
  16278. # from https://bazaar.launchpad.net/~maria-captains/maria/5.5/view/head:/support-files/magic
  16279. #
  16280. 0 beshort 0xfe01 MySQL table definition file
  16281. >2 byte x Version %d
  16282. 0 belong&0xffffff00 0xfefe0700 MySQL MyISAM index file
  16283. >3 byte x Version %d
  16284. 0 belong&0xffffff00 0xfefe0800 MySQL MyISAM compressed data file
  16285. >3 byte x Version %d
  16286. 0 belong&0xffffff00 0xfefe0900 MySQL Maria index file
  16287. >3 byte x Version %d
  16288. 0 belong&0xffffff00 0xfefe0A00 MySQL Maria compressed data file
  16289. >3 byte x Version %d
  16290. 0 belong&0xffffff00 0xfefe0500 MySQL ISAM index file
  16291. >3 byte x Version %d
  16292. 0 belong&0xffffff00 0xfefe0600 MySQL ISAM compressed data file
  16293. >3 byte x Version %d
  16294. 0 string \376bin MySQL replication log
  16295. 0 belong&0xffffff00 0xfefe0b00
  16296. >4 string MARIALOG MySQL Maria transaction log file
  16297. >>3 byte x Version %d
  16298. 0 belong&0xffffff00 0xfefe0c00
  16299. >4 string MACF MySQL Maria control file
  16300. >>3 byte x Version %d
  16301. #------------------------------------------------------------------------------
  16302. # iRiver H Series database file
  16303. # From Ken Guest <ken@linux.ie>
  16304. # As observed from iRivNavi.iDB and unencoded firmware
  16305. #
  16306. 0 string iRivDB iRiver Database file
  16307. >11 string >\0 Version %s
  16308. >39 string iHP-100 [H Series]
  16309. #------------------------------------------------------------------------------
  16310. # SQLite database files
  16311. # Ken Guest <ken@linux.ie>, Ty Sarna, Zack Weinberg
  16312. #
  16313. # Version 1 used GDBM internally; its files cannot be distinguished
  16314. # from other GDBM files.
  16315. #
  16316. # Version 2 used this format:
  16317. 0 string **\ This\ file\ contains\ an\ SQLite SQLite 2.x database
  16318. # Version 3 of SQLite allows applications to embed their own "user version"
  16319. # number in the database at offset 60. Later, SQLite added an "application id"
  16320. # at offset 68 that is preferred over "user version" for indicating the
  16321. # associated application.
  16322. #
  16323. 0 string SQLite\ format\ 3
  16324. >60 belong =0x5f4d544e Monotone source repository - SQLite3 database
  16325. >68 belong =0x0f055112 Fossil checkout - SQLite3 database
  16326. >68 belong =0x0f055113 Fossil global configuration - SQLite3 database
  16327. >68 belong =0x0f055111 Fossil repository - SQLite3 database
  16328. >68 belong =0x42654462 Bentley Systems BeSQLite Database - SQLite3 database
  16329. >68 belong =0x42654c6e Bentley Systems Localization File - SQLite3 database
  16330. >68 belong =0x47504b47 OGC GeoPackage file - SQLite3 database
  16331. >68 default x SQLite 3.x database
  16332. >>68 belong !0 \b, application id %u
  16333. >>60 belong !0 \b, user version %d
  16334. # SQLite Write-Ahead Log from SQLite version >= 3.7.0
  16335. # http://www.sqlite.org/fileformat.html#walformat
  16336. 0 belong&0xfffffffe 0x377f0682 SQLite Write-Ahead Log,
  16337. >4 belong x version %ld
  16338. # SQLite Rollback Journal
  16339. # http://www.sqlite.org/fileformat.html#rollbackjournal
  16340. 0 string \xd9\xd5\x05\xf9\x20\xa1\x63\xd7 SQLite Rollback Journal
  16341. # Panasonic channel list database svl.bin or svl.db added by Joerg Jenderek
  16342. # http://www.ullrich.es/job/service-menue/panasonic/panasonic-sendersortierung-sat-am-pc/
  16343. # pceditor_V2003.jar
  16344. 0 string PSDB\0 Panasonic channel list database
  16345. >126 string SQLite\ format\ 3
  16346. >>&-15 indirect x \b; contains
  16347. # Type: OpenSSH key files
  16348. # From: Nicolas Collignon <tsointsoin@gmail.com>
  16349. 0 string SSH\ PRIVATE\ KEY OpenSSH RSA1 private key,
  16350. >28 string >\0 version %s
  16351. 0 string ssh-dss\ OpenSSH DSA public key
  16352. 0 string ssh-rsa\ OpenSSH RSA public key
  16353. 0 string ecdsa-sha2-nistp256 OpenSSH ECDSA public key
  16354. 0 string ecdsa-sha2-nistp384 OpenSSH ECDSA public key
  16355. 0 string ecdsa-sha2-nistp521 OpenSSH ECDSA public key
  16356. # Type: OpenSSL certificates/key files
  16357. # From: Nicolas Collignon <tsointsoin@gmail.com>
  16358. 0 string -----BEGIN\ CERTIFICATE----- PEM certificate
  16359. 0 string -----BEGIN\ CERTIFICATE\ REQ PEM certificate request
  16360. 0 string -----BEGIN\ RSA\ PRIVATE PEM RSA private key
  16361. 0 string -----BEGIN\ DSA\ PRIVATE PEM DSA private key
  16362. 0 string -----BEGIN\ EC\ PRIVATE PEM EC private key
  16363. #------------------------------------------------------------------------------
  16364. # $File: sun,v 1.25 2013/01/09 22:37:24 christos Exp $
  16365. # sun: file(1) magic for Sun machines
  16366. #
  16367. # Values for big-endian Sun (MC680x0, SPARC) binaries on pre-5.x
  16368. # releases. (5.x uses ELF.) Entries for executables without an
  16369. # architecture type, used before the 68020-based Sun-3's came out,
  16370. # are in aout, as they're indistinguishable from other big-endian
  16371. # 32-bit a.out files.
  16372. #
  16373. 0 belong&077777777 0600413 a.out SunOS sparc demand paged
  16374. >0 byte &0x80
  16375. >>20 belong <4096 shared library
  16376. >>20 belong =4096 dynamically linked executable
  16377. >>20 belong >4096 dynamically linked executable
  16378. >0 byte ^0x80 executable
  16379. >16 belong >0 not stripped
  16380. 0 belong&077777777 0600410 a.out SunOS sparc pure
  16381. >0 byte &0x80 dynamically linked executable
  16382. >0 byte ^0x80 executable
  16383. >16 belong >0 not stripped
  16384. 0 belong&077777777 0600407 a.out SunOS sparc
  16385. >0 byte &0x80 dynamically linked executable
  16386. >0 byte ^0x80 executable
  16387. >16 belong >0 not stripped
  16388. 0 belong&077777777 0400413 a.out SunOS mc68020 demand paged
  16389. >0 byte &0x80
  16390. >>20 belong <4096 shared library
  16391. >>20 belong =4096 dynamically linked executable
  16392. >>20 belong >4096 dynamically linked executable
  16393. >0 byte ^0x80 executable
  16394. >16 belong >0 not stripped
  16395. 0 belong&077777777 0400410 a.out SunOS mc68020 pure
  16396. >0 byte &0x80 dynamically linked executable
  16397. >0 byte ^0x80 executable
  16398. >16 belong >0 not stripped
  16399. 0 belong&077777777 0400407 a.out SunOS mc68020
  16400. >0 byte &0x80 dynamically linked executable
  16401. >0 byte ^0x80 executable
  16402. >16 belong >0 not stripped
  16403. 0 belong&077777777 0200413 a.out SunOS mc68010 demand paged
  16404. >0 byte &0x80
  16405. >>20 belong <4096 shared library
  16406. >>20 belong =4096 dynamically linked executable
  16407. >>20 belong >4096 dynamically linked executable
  16408. >0 byte ^0x80 executable
  16409. >16 belong >0 not stripped
  16410. 0 belong&077777777 0200410 a.out SunOS mc68010 pure
  16411. >0 byte &0x80 dynamically linked executable
  16412. >0 byte ^0x80 executable
  16413. >16 belong >0 not stripped
  16414. 0 belong&077777777 0200407 a.out SunOS mc68010
  16415. >0 byte &0x80 dynamically linked executable
  16416. >0 byte ^0x80 executable
  16417. >16 belong >0 not stripped
  16418. #
  16419. # Core files. "SPARC 4.x BCP" means "core file from a SunOS 4.x SPARC
  16420. # binary executed in compatibility mode under SunOS 5.x".
  16421. #
  16422. 0 belong 0x080456 SunOS core file
  16423. >4 belong 432 (SPARC)
  16424. >>132 string >\0 from '%s'
  16425. >>116 belong =3 (quit)
  16426. >>116 belong =4 (illegal instruction)
  16427. >>116 belong =5 (trace trap)
  16428. >>116 belong =6 (abort)
  16429. >>116 belong =7 (emulator trap)
  16430. >>116 belong =8 (arithmetic exception)
  16431. >>116 belong =9 (kill)
  16432. >>116 belong =10 (bus error)
  16433. >>116 belong =11 (segmentation violation)
  16434. >>116 belong =12 (bad argument to system call)
  16435. >>116 belong =29 (resource lost)
  16436. >>120 belong x (T=%dK,
  16437. >>124 belong x D=%dK,
  16438. >>128 belong x S=%dK)
  16439. >4 belong 826 (68K)
  16440. >>128 string >\0 from '%s'
  16441. >4 belong 456 (SPARC 4.x BCP)
  16442. >>152 string >\0 from '%s'
  16443. # Sun SunPC
  16444. 0 long 0xfa33c08e SunPC 4.0 Hard Disk
  16445. 0 string #SUNPC_CONFIG SunPC 4.0 Properties Values
  16446. # Sun snoop (see RFC 1761, which describes the capture file format,
  16447. # RFC 3827, which describes some additional datalink types, and
  16448. # http://www.iana.org/assignments/snoop-datalink-types/snoop-datalink-types.xml,
  16449. # which is the IANA registry of Snoop datalink types)
  16450. #
  16451. 0 string snoop Snoop capture file
  16452. >8 belong >0 - version %ld
  16453. >12 belong 0 (IEEE 802.3)
  16454. >12 belong 1 (IEEE 802.4)
  16455. >12 belong 2 (IEEE 802.5)
  16456. >12 belong 3 (IEEE 802.6)
  16457. >12 belong 4 (Ethernet)
  16458. >12 belong 5 (HDLC)
  16459. >12 belong 6 (Character synchronous)
  16460. >12 belong 7 (IBM channel-to-channel adapter)
  16461. >12 belong 8 (FDDI)
  16462. >12 belong 9 (Other)
  16463. >12 belong 10 (type %ld)
  16464. >12 belong 11 (type %ld)
  16465. >12 belong 12 (type %ld)
  16466. >12 belong 13 (type %ld)
  16467. >12 belong 14 (type %ld)
  16468. >12 belong 15 (type %ld)
  16469. >12 belong 16 (Fibre Channel)
  16470. >12 belong 17 (ATM)
  16471. >12 belong 18 (ATM Classical IP)
  16472. >12 belong 19 (type %ld)
  16473. >12 belong 20 (type %ld)
  16474. >12 belong 21 (type %ld)
  16475. >12 belong 22 (type %ld)
  16476. >12 belong 23 (type %ld)
  16477. >12 belong 24 (type %ld)
  16478. >12 belong 25 (type %ld)
  16479. >12 belong 26 (IP over Infiniband)
  16480. >12 belong >26 (type %ld)
  16481. #---------------------------------------------------------------------------
  16482. # The following entries have been tested by Duncan Laurie <duncan@sun.com> (a
  16483. # lead Sun/Cobalt developer) who agrees that they are good and worthy of
  16484. # inclusion.
  16485. # Boot ROM images for Sun/Cobalt Linux server appliances
  16486. 0 string Cobalt\ Networks\ Inc.\nFirmware\ v Paged COBALT boot rom
  16487. >38 string x V%.4s
  16488. # New format for Sun/Cobalt boot ROMs is annoying, it stores the version code
  16489. # at the very end where file(1) can't get it.
  16490. 0 string CRfs COBALT boot rom data (Flat boot rom or file system)
  16491. #------------------------------------------------------------------------------
  16492. # msx: file(1) magic for the SymbOS operating system
  16493. # http://www.symbos.de
  16494. # Fábio R. Schmidlin <frs@pop.com.br>
  16495. # SymbOS EXE file
  16496. 0x30 string SymExe SymbOS executable
  16497. >0x36 ubyte x v%c
  16498. >0x37 ubyte x \b.%c
  16499. >0xF string x \b, name: %s
  16500. # SymbOS DOX document
  16501. 0 string INFOq\0 SymbOS DOX document
  16502. # Symbos driver
  16503. 0 string SMD1 SymbOS driver
  16504. >19 byte x \b, name: %c
  16505. >20 byte x \b%c
  16506. >21 byte x \b%c
  16507. >22 byte x \b%c
  16508. >23 byte x \b%c
  16509. >24 byte x \b%c
  16510. >25 byte x \b%c
  16511. >26 byte x \b%c
  16512. >27 byte x \b%c
  16513. >28 byte x \b%c
  16514. >29 byte x \b%c
  16515. >30 byte x \b%c
  16516. >31 byte x \b%c
  16517. # Symbos video
  16518. 0 string SymVid SymbOS video
  16519. >6 ubyte x v%c
  16520. >7 ubyte x \b.%c
  16521. # Soundtrakker 128 ST2 music
  16522. 0 byte 0
  16523. >0xC string \x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x40\x00 Soundtrakker 128 ST2 music,
  16524. >>1 string x name: %s
  16525. #------------------------------------------------------------------------
  16526. # $File: sysex,v 1.7 2013/09/16 15:12:42 christos Exp $
  16527. # sysex: file(1) magic for MIDI sysex files
  16528. #
  16529. # GRR: orginal 1 byte test at offset was too general as it catches also many FATs of DOS filesystems
  16530. # where real SYStem EXclusive messages at offset 1 are limited to seven bits
  16531. # http://en.wikipedia.org/wiki/MIDI
  16532. 0 ubeshort&0xFF80 0xF000 SysEx File -
  16533. # North American Group
  16534. >1 byte 0x01 Sequential
  16535. >1 byte 0x02 IDP
  16536. >1 byte 0x03 OctavePlateau
  16537. >1 byte 0x04 Moog
  16538. >1 byte 0x05 Passport
  16539. >1 byte 0x06 Lexicon
  16540. >1 byte 0x07 Kurzweil/Future Retro
  16541. >>3 byte 0x77 777
  16542. >>4 byte 0x00 Bank
  16543. >>4 byte 0x01 Song
  16544. >>5 byte 0x0f 16
  16545. >>5 byte 0x0e 15
  16546. >>5 byte 0x0d 14
  16547. >>5 byte 0x0c 13
  16548. >>5 byte 0x0b 12
  16549. >>5 byte 0x0a 11
  16550. >>5 byte 0x09 10
  16551. >>5 byte 0x08 9
  16552. >>5 byte 0x07 8
  16553. >>5 byte 0x06 7
  16554. >>5 byte 0x05 6
  16555. >>5 byte 0x04 5
  16556. >>5 byte 0x03 4
  16557. >>5 byte 0x02 3
  16558. >>5 byte 0x01 2
  16559. >>5 byte 0x00 1
  16560. >>5 byte 0x10 (ALL)
  16561. >>2 byte x \b, Channel %d
  16562. >1 byte 0x08 Fender
  16563. >1 byte 0x09 Gulbransen
  16564. >1 byte 0x0a AKG
  16565. >1 byte 0x0b Voyce
  16566. >1 byte 0x0c Waveframe
  16567. >1 byte 0x0d ADA
  16568. >1 byte 0x0e Garfield
  16569. >1 byte 0x0f Ensoniq
  16570. >1 byte 0x10 Oberheim
  16571. >>2 byte 0x06 Matrix 6 series
  16572. >>3 byte 0x0A Dump (All)
  16573. >>3 byte 0x01 Dump (Bank)
  16574. >>4 belong 0x0002040E Matrix 1000
  16575. >>>11 byte <2 User bank %d
  16576. >>>11 byte >1 Preset bank %d
  16577. >1 byte 0x11 Apple
  16578. >1 byte 0x12 GreyMatter
  16579. >1 byte 0x14 PalmTree
  16580. >1 byte 0x15 JLCooper
  16581. >1 byte 0x16 Lowrey
  16582. >1 byte 0x17 AdamsSmith
  16583. >1 byte 0x18 E-mu
  16584. >1 byte 0x19 Harmony
  16585. >1 byte 0x1a ART
  16586. >1 byte 0x1b Baldwin
  16587. >1 byte 0x1c Eventide
  16588. >1 byte 0x1d Inventronics
  16589. >1 byte 0x1f Clarity
  16590. # European Group
  16591. >1 byte 0x21 SIEL
  16592. >1 byte 0x22 Synthaxe
  16593. >1 byte 0x24 Hohner
  16594. >1 byte 0x25 Twister
  16595. >1 byte 0x26 Solton
  16596. >1 byte 0x27 Jellinghaus
  16597. >1 byte 0x28 Southworth
  16598. >1 byte 0x29 PPG
  16599. >1 byte 0x2a JEN
  16600. >1 byte 0x2b SSL
  16601. >1 byte 0x2c AudioVertrieb
  16602. >1 byte 0x2f ELKA
  16603. >>3 byte 0x09 EK-44
  16604. >1 byte 0x30 Dynacord
  16605. >1 byte 0x31 Jomox
  16606. >1 byte 0x33 Clavia
  16607. >1 byte 0x39 Soundcraft
  16608. # Some Waldorf info from http://Stromeko.Synth.net/Downloads#WaldorfDocs
  16609. >1 byte 0x3e Waldorf
  16610. >>2 byte 0x00 microWave
  16611. >>2 byte 0x0E microwave2 / XT
  16612. >>2 byte 0x0F Q / Q+
  16613. >>3 byte =0 (default id)
  16614. >>3 byte >0 (
  16615. >>>3 byte <0x7F \bdevice %d)
  16616. >>>3 byte =0x7F \bbroadcast id)
  16617. >>3 byte 0x7f Microwave I
  16618. >>>4 byte 0x00 SNDR (Sound Request)
  16619. >>>4 byte 0x10 SNDD (Sound Dump)
  16620. >>>4 byte 0x20 SNDP (Sound Parameter Change)
  16621. >>>4 byte 0x30 SNDQ (Sound Parameter Inquiry)
  16622. >>>4 byte 0x70 BOOT (Sound Reserved)
  16623. >>>4 byte 0x01 MULR (Multi Request)
  16624. >>>4 byte 0x11 MULD (Multi Dump)
  16625. >>>4 byte 0x21 MULP (Multi Parameter Change)
  16626. >>>4 byte 0x31 MULQ (Multi Parameter Inquiry)
  16627. >>>4 byte 0x71 OS (Multi Reserved)
  16628. >>>4 byte 0x02 DRMR (Drum Map Request)
  16629. >>>4 byte 0x12 DRMD (Drum Map Dump)
  16630. >>>4 byte 0x22 DRMP (Drum Map Parameter Change)
  16631. >>>4 byte 0x32 DRMQ (Drum Map Parameter Inquiry)
  16632. >>>4 byte 0x72 BIN (Drum Map Reserved)
  16633. >>>4 byte 0x03 PATR (Sequencer Pattern Request)
  16634. >>>4 byte 0x13 PATD (Sequencer Pattern Dump)
  16635. >>>4 byte 0x23 PATP (Sequencer Pattern Parameter Change)
  16636. >>>4 byte 0x33 PATQ (Sequencer Pattern Parameter Inquiry)
  16637. >>>4 byte 0x73 AFM (Sequencer Pattern Reserved)
  16638. >>>4 byte 0x04 GLBR (Global Parameter Request)
  16639. >>>4 byte 0x14 GLBD (Global Parameter Dump)
  16640. >>>4 byte 0x24 GLBP (Global Parameter Parameter Change)
  16641. >>>4 byte 0x34 GLBQ (Global Parameter Parameter Inquiry)
  16642. >>>4 byte 0x07 MODR (Mode Parameter Request)
  16643. >>>4 byte 0x17 MODD (Mode Parameter Dump)
  16644. >>>4 byte 0x27 MODP (Mode Parameter Parameter Change)
  16645. >>>4 byte 0x37 MODQ (Mode Parameter Parameter Inquiry)
  16646. >>2 byte 0x10 microQ
  16647. >>>4 byte 0x00 SNDR (Sound Request)
  16648. >>>4 byte 0x10 SNDD (Sound Dump)
  16649. >>>4 byte 0x20 SNDP (Sound Parameter Change)
  16650. >>>4 byte 0x30 SNDQ (Sound Parameter Inquiry)
  16651. >>>4 byte 0x70 (Sound Reserved)
  16652. >>>4 byte 0x01 MULR (Multi Request)
  16653. >>>4 byte 0x11 MULD (Multi Dump)
  16654. >>>4 byte 0x21 MULP (Multi Parameter Change)
  16655. >>>4 byte 0x31 MULQ (Multi Parameter Inquiry)
  16656. >>>4 byte 0x71 OS (Multi Reserved)
  16657. >>>4 byte 0x02 DRMR (Drum Map Request)
  16658. >>>4 byte 0x12 DRMD (Drum Map Dump)
  16659. >>>4 byte 0x22 DRMP (Drum Map Parameter Change)
  16660. >>>4 byte 0x32 DRMQ (Drum Map Parameter Inquiry)
  16661. >>>4 byte 0x72 BIN (Drum Map Reserved)
  16662. >>>4 byte 0x04 GLBR (Global Parameter Request)
  16663. >>>4 byte 0x14 GLBD (Global Parameter Dump)
  16664. >>>4 byte 0x24 GLBP (Global Parameter Parameter Change)
  16665. >>>4 byte 0x34 GLBQ (Global Parameter Parameter Inquiry)
  16666. >>2 byte 0x11 rackAttack
  16667. >>>4 byte 0x00 SNDR (Sound Parameter Request)
  16668. >>>4 byte 0x10 SNDD (Sound Parameter Dump)
  16669. >>>4 byte 0x20 SNDP (Sound Parameter Parameter Change)
  16670. >>>4 byte 0x30 SNDQ (Sound Parameter Parameter Inquiry)
  16671. >>>4 byte 0x01 PRGR (Program Parameter Request)
  16672. >>>4 byte 0x11 PRGD (Program Parameter Dump)
  16673. >>>4 byte 0x21 PRGP (Program Parameter Parameter Change)
  16674. >>>4 byte 0x31 PRGQ (Program Parameter Parameter Inquiry)
  16675. >>>4 byte 0x71 OS (Program Parameter Reserved)
  16676. >>>4 byte 0x03 PATR (Pattern Parameter Request)
  16677. >>>4 byte 0x13 PATD (Pattern Parameter Dump)
  16678. >>>4 byte 0x23 PATP (Pattern Parameter Parameter Change)
  16679. >>>4 byte 0x33 PATQ (Pattern Parameter Parameter Inquiry)
  16680. >>>4 byte 0x04 GLBR (Global Parameter Request)
  16681. >>>4 byte 0x14 GLBD (Global Parameter Dump)
  16682. >>>4 byte 0x24 GLBP (Global Parameter Parameter Change)
  16683. >>>4 byte 0x34 GLBQ (Global Parameter Parameter Inquiry)
  16684. >>>4 byte 0x05 EFXR (FX Parameter Request)
  16685. >>>4 byte 0x15 EFXD (FX Parameter Dump)
  16686. >>>4 byte 0x25 EFXP (FX Parameter Parameter Change)
  16687. >>>4 byte 0x35 EFXQ (FX Parameter Parameter Inquiry)
  16688. >>>4 byte 0x07 MODR (Mode Command Request)
  16689. >>>4 byte 0x17 MODD (Mode Command Dump)
  16690. >>>4 byte 0x27 MODP (Mode Command Parameter Change)
  16691. >>>4 byte 0x37 MODQ (Mode Command Parameter Inquiry)
  16692. >>2 byte 0x03 Wave
  16693. >>>4 byte 0x00 SBPR (Soundprogram)
  16694. >>>4 byte 0x01 SAPR (Performance)
  16695. >>>4 byte 0x02 SWAVE (Wave)
  16696. >>>4 byte 0x03 SWTBL (Wave control table)
  16697. >>>4 byte 0x04 SVT (Velocity Curve)
  16698. >>>4 byte 0x05 STT (Tuning Table)
  16699. >>>4 byte 0x06 SGLB (Global Parameters)
  16700. >>>4 byte 0x07 SARRMAP (Performance Program Change Map)
  16701. >>>4 byte 0x08 SBPRMAP (Sound Program Change Map)
  16702. >>>4 byte 0x09 SBPRPAR (Sound Parameter)
  16703. >>>4 byte 0x0A SARRPAR (Performance Parameter)
  16704. >>>4 byte 0x0B SINSPAR (Instrument/External Parameter)
  16705. >>>4 byte 0x0F SBULK (Bulk Switch on/off)
  16706. # Japanese Group
  16707. >1 byte 0x40 Kawai
  16708. >>3 byte 0x20 K1
  16709. >>3 byte 0x22 K4
  16710. >1 byte 0x41 Roland
  16711. >>3 byte 0x14 D-50
  16712. >>3 byte 0x2b U-220
  16713. >>3 byte 0x02 TR-707
  16714. >1 byte 0x42 Korg
  16715. >>3 byte 0x19 M1
  16716. >1 byte 0x43 Yamaha
  16717. >1 byte 0x44 Casio
  16718. >1 byte 0x46 Kamiya
  16719. >1 byte 0x47 Akai
  16720. >1 byte 0x48 Victor
  16721. >1 byte 0x49 Mesosha
  16722. >1 byte 0x4b Fujitsu
  16723. >1 byte 0x4c Sony
  16724. >1 byte 0x4e Teac
  16725. >1 byte 0x50 Matsushita
  16726. >1 byte 0x51 Fostex
  16727. >1 byte 0x52 Zoom
  16728. >1 byte 0x54 Matsushita
  16729. >1 byte 0x57 Acoustic tech. lab.
  16730. # http://www.midi.org/techspecs/manid.php
  16731. >1 belong&0xffffff00 0x00007400 Ta Horng
  16732. >1 belong&0xffffff00 0x00007500 e-Tek
  16733. >1 belong&0xffffff00 0x00007600 E-Voice
  16734. >1 belong&0xffffff00 0x00007700 Midisoft
  16735. >1 belong&0xffffff00 0x00007800 Q-Sound
  16736. >1 belong&0xffffff00 0x00007900 Westrex
  16737. >1 belong&0xffffff00 0x00007a00 Nvidia*
  16738. >1 belong&0xffffff00 0x00007b00 ESS
  16739. >1 belong&0xffffff00 0x00007c00 Mediatrix
  16740. >1 belong&0xffffff00 0x00007d00 Brooktree
  16741. >1 belong&0xffffff00 0x00007e00 Otari
  16742. >1 belong&0xffffff00 0x00007f00 Key Electronics
  16743. >1 belong&0xffffff00 0x00010000 Shure
  16744. >1 belong&0xffffff00 0x00010100 AuraSound
  16745. >1 belong&0xffffff00 0x00010200 Crystal
  16746. >1 belong&0xffffff00 0x00010300 Rockwell
  16747. >1 belong&0xffffff00 0x00010400 Silicon Graphics
  16748. >1 belong&0xffffff00 0x00010500 Midiman
  16749. >1 belong&0xffffff00 0x00010600 PreSonus
  16750. >1 belong&0xffffff00 0x00010800 Topaz
  16751. >1 belong&0xffffff00 0x00010900 Cast Lightning
  16752. >1 belong&0xffffff00 0x00010a00 Microsoft
  16753. >1 belong&0xffffff00 0x00010b00 Sonic Foundry
  16754. >1 belong&0xffffff00 0x00010c00 Line 6
  16755. >1 belong&0xffffff00 0x00010d00 Beatnik Inc.
  16756. >1 belong&0xffffff00 0x00010e00 Van Koerving
  16757. >1 belong&0xffffff00 0x00010f00 Altech Systems
  16758. >1 belong&0xffffff00 0x00011000 S & S Research
  16759. >1 belong&0xffffff00 0x00011100 VLSI Technology
  16760. >1 belong&0xffffff00 0x00011200 Chromatic
  16761. >1 belong&0xffffff00 0x00011300 Sapphire
  16762. >1 belong&0xffffff00 0x00011400 IDRC
  16763. >1 belong&0xffffff00 0x00011500 Justonic Tuning
  16764. >1 belong&0xffffff00 0x00011600 TorComp
  16765. >1 belong&0xffffff00 0x00011700 Newtek Inc.
  16766. >1 belong&0xffffff00 0x00011800 Sound Sculpture
  16767. >1 belong&0xffffff00 0x00011900 Walker Technical
  16768. >1 belong&0xffffff00 0x00011a00 Digital Harmony
  16769. >1 belong&0xffffff00 0x00011b00 InVision
  16770. >1 belong&0xffffff00 0x00011c00 T-Square
  16771. >1 belong&0xffffff00 0x00011d00 Nemesys
  16772. >1 belong&0xffffff00 0x00011e00 DBX
  16773. >1 belong&0xffffff00 0x00011f00 Syndyne
  16774. >1 belong&0xffffff00 0x00012000 Bitheadz
  16775. >1 belong&0xffffff00 0x00012100 Cakewalk
  16776. >1 belong&0xffffff00 0x00012200 Staccato
  16777. >1 belong&0xffffff00 0x00012300 National Semicon.
  16778. >1 belong&0xffffff00 0x00012400 Boom Theory
  16779. >1 belong&0xffffff00 0x00012500 Virtual DSP Corp
  16780. >1 belong&0xffffff00 0x00012600 Antares
  16781. >1 belong&0xffffff00 0x00012700 Angel Software
  16782. >1 belong&0xffffff00 0x00012800 St Louis Music
  16783. >1 belong&0xffffff00 0x00012900 Lyrrus dba G-VOX
  16784. >1 belong&0xffffff00 0x00012a00 Ashley Audio
  16785. >1 belong&0xffffff00 0x00012b00 Vari-Lite
  16786. >1 belong&0xffffff00 0x00012c00 Summit Audio
  16787. >1 belong&0xffffff00 0x00012d00 Aureal Semicon.
  16788. >1 belong&0xffffff00 0x00012e00 SeaSound
  16789. >1 belong&0xffffff00 0x00012f00 U.S. Robotics
  16790. >1 belong&0xffffff00 0x00013000 Aurisis
  16791. >1 belong&0xffffff00 0x00013100 Nearfield Multimedia
  16792. >1 belong&0xffffff00 0x00013200 FM7 Inc.
  16793. >1 belong&0xffffff00 0x00013300 Swivel Systems
  16794. >1 belong&0xffffff00 0x00013400 Hyperactive
  16795. >1 belong&0xffffff00 0x00013500 MidiLite
  16796. >1 belong&0xffffff00 0x00013600 Radical
  16797. >1 belong&0xffffff00 0x00013700 Roger Linn
  16798. >1 belong&0xffffff00 0x00013800 Helicon
  16799. >1 belong&0xffffff00 0x00013900 Event
  16800. >1 belong&0xffffff00 0x00013a00 Sonic Network
  16801. >1 belong&0xffffff00 0x00013b00 Realtime Music
  16802. >1 belong&0xffffff00 0x00013c00 Apogee Digital
  16803. >1 belong&0xffffff00 0x00202b00 Medeli Electronics
  16804. >1 belong&0xffffff00 0x00202c00 Charlie Lab
  16805. >1 belong&0xffffff00 0x00202d00 Blue Chip Music
  16806. >1 belong&0xffffff00 0x00202e00 BEE OH Corp
  16807. >1 belong&0xffffff00 0x00202f00 LG Semicon America
  16808. >1 belong&0xffffff00 0x00203000 TESI
  16809. >1 belong&0xffffff00 0x00203100 EMAGIC
  16810. >1 belong&0xffffff00 0x00203200 Behringer
  16811. >1 belong&0xffffff00 0x00203300 Access Music
  16812. >1 belong&0xffffff00 0x00203400 Synoptic
  16813. >1 belong&0xffffff00 0x00203500 Hanmesoft Corp
  16814. >1 belong&0xffffff00 0x00203600 Terratec
  16815. >1 belong&0xffffff00 0x00203700 Proel SpA
  16816. >1 belong&0xffffff00 0x00203800 IBK MIDI
  16817. >1 belong&0xffffff00 0x00203900 IRCAM
  16818. >1 belong&0xffffff00 0x00203a00 Propellerhead Software
  16819. >1 belong&0xffffff00 0x00203b00 Red Sound Systems
  16820. >1 belong&0xffffff00 0x00203c00 Electron ESI AB
  16821. >1 belong&0xffffff00 0x00203d00 Sintefex Audio
  16822. >1 belong&0xffffff00 0x00203e00 Music and More
  16823. >1 belong&0xffffff00 0x00203f00 Amsaro
  16824. >1 belong&0xffffff00 0x00204000 CDS Advanced Technology
  16825. >1 belong&0xffffff00 0x00204100 Touched by Sound
  16826. >1 belong&0xffffff00 0x00204200 DSP Arts
  16827. >1 belong&0xffffff00 0x00204300 Phil Rees Music
  16828. >1 belong&0xffffff00 0x00204400 Stamer Musikanlagen GmbH
  16829. >1 belong&0xffffff00 0x00204500 Soundart
  16830. >1 belong&0xffffff00 0x00204600 C-Mexx Software
  16831. >1 belong&0xffffff00 0x00204700 Klavis Tech.
  16832. >1 belong&0xffffff00 0x00204800 Noteheads AB
  16833. 0 string T707 Roland TR-707 Data
  16834. #------------------------------------------------------------------------------
  16835. # file: file(1) magic for Tcl scripting language
  16836. # URL: http://www.tcl.tk/
  16837. # From: gustaf neumann
  16838. # Tcl scripts
  16839. 0 search/1/w #!\ /usr/bin/tcl Tcl script text executable
  16840. !:mime text/x-tcl
  16841. 0 search/1/w #!\ /usr/local/bin/tcl Tcl script text executable
  16842. !:mime text/x-tcl
  16843. 0 search/1 #!/usr/bin/env\ tcl Tcl script text executable
  16844. !:mime text/x-tcl
  16845. 0 search/1 #!\ /usr/bin/env\ tcl Tcl script text executable
  16846. !:mime text/x-tcl
  16847. 0 search/1/w #!\ /usr/bin/wish Tcl/Tk script text executable
  16848. !:mime text/x-tcl
  16849. 0 search/1/w #!\ /usr/local/bin/wish Tcl/Tk script text executable
  16850. !:mime text/x-tcl
  16851. 0 search/1 #!/usr/bin/env\ wish Tcl/Tk script text executable
  16852. !:mime text/x-tcl
  16853. 0 search/1 #!\ /usr/bin/env\ wish Tcl/Tk script text executable
  16854. !:mime text/x-tcl
  16855. # check the first line
  16856. 0 search/1 package\ req
  16857. >0 regex \^package[\ \t]+req Tcl script
  16858. # not 'p', check other lines
  16859. 0 search/1 !p
  16860. >0 regex \^package[\ \t]+req Tcl script
  16861. #------------------------------------------------------------------------------
  16862. # $File: teapot,v 1.4 2009/09/19 16:28:12 christos Exp $
  16863. # teapot: file(1) magic for "teapot" spreadsheet
  16864. #
  16865. 0 string #!teapot\012xdr teapot work sheet (XDR format)
  16866. #------------------------------------------------------------------------------
  16867. # $File: terminfo,v 1.6 2009/09/19 16:28:12 christos Exp $
  16868. # terminfo: file(1) magic for terminfo
  16869. #
  16870. # XXX - byte order for screen images?
  16871. #
  16872. 0 string \032\001 Compiled terminfo entry
  16873. 0 short 0433 Curses screen image
  16874. 0 short 0434 Curses screen image
  16875. #------------------------------------------------------------------------------
  16876. # $File: tex,v 1.19 2013/09/17 17:39:16 christos Exp $
  16877. # tex: file(1) magic for TeX files
  16878. #
  16879. # XXX - needs byte-endian stuff (big-endian and little-endian DVI?)
  16880. #
  16881. # From <conklin@talisman.kaleida.com>
  16882. # Although we may know the offset of certain text fields in TeX DVI
  16883. # and font files, we can't use them reliably because they are not
  16884. # zero terminated. [but we do anyway, christos]
  16885. 0 string \367\002 TeX DVI file
  16886. !:mime application/x-dvi
  16887. >16 string >\0 (%s)
  16888. 0 string \367\203 TeX generic font data
  16889. 0 string \367\131 TeX packed font data
  16890. >3 string >\0 (%s)
  16891. 0 string \367\312 TeX virtual font data
  16892. 0 search/1 This\ is\ TeX, TeX transcript text
  16893. 0 search/1 This\ is\ METAFONT, METAFONT transcript text
  16894. # There is no way to detect TeX Font Metric (*.tfm) files without
  16895. # breaking them apart and reading the data. The following patterns
  16896. # match most *.tfm files generated by METAFONT or afm2tfm.
  16897. 2 string \000\021 TeX font metric data
  16898. !:mime application/x-tex-tfm
  16899. >33 string >\0 (%s)
  16900. 2 string \000\022 TeX font metric data
  16901. !:mime application/x-tex-tfm
  16902. >33 string >\0 (%s)
  16903. # Texinfo and GNU Info, from Daniel Quinlan (quinlan@yggdrasil.com)
  16904. 0 search/1 \\input\ texinfo Texinfo source text
  16905. !:mime text/x-texinfo
  16906. 0 search/1 This\ is\ Info\ file GNU Info text
  16907. !:mime text/x-info
  16908. # TeX documents, from Daniel Quinlan (quinlan@yggdrasil.com)
  16909. 0 search/4096 \\input TeX document text
  16910. !:mime text/x-tex
  16911. !:strength + 15
  16912. 0 search/4096 \\begin LaTeX document text
  16913. !:mime text/x-tex
  16914. !:strength + 15
  16915. 0 search/4096 \\section LaTeX document text
  16916. !:mime text/x-tex
  16917. !:strength + 18
  16918. 0 search/4096 \\setlength LaTeX document text
  16919. !:mime text/x-tex
  16920. !:strength + 15
  16921. 0 search/4096 \\documentstyle LaTeX document text
  16922. !:mime text/x-tex
  16923. !:strength + 18
  16924. 0 search/4096 \\chapter LaTeX document text
  16925. !:mime text/x-tex
  16926. !:strength + 18
  16927. 0 search/4096 \\documentclass LaTeX 2e document text
  16928. !:mime text/x-tex
  16929. !:strength + 15
  16930. 0 search/4096 \\relax LaTeX auxiliary file
  16931. !:mime text/x-tex
  16932. !:strength + 15
  16933. 0 search/4096 \\contentsline LaTeX table of contents
  16934. !:mime text/x-tex
  16935. !:strength + 15
  16936. 0 search/4096 %\ -*-latex-*- LaTeX document text
  16937. !:mime text/x-tex
  16938. # Tex document, from Hendrik Scholz <hendrik@scholz.net>
  16939. 0 search/1 \\ifx TeX document text
  16940. # Index and glossary files
  16941. 0 search/4096 \\indexentry LaTeX raw index file
  16942. 0 search/4096 \\begin{theindex} LaTeX sorted index
  16943. 0 search/4096 \\glossaryentry LaTeX raw glossary
  16944. 0 search/4096 \\begin{theglossary} LaTeX sorted glossary
  16945. 0 search/4096 This\ is\ makeindex Makeindex log file
  16946. # End of TeX
  16947. #------------------------------------------------------------------------------
  16948. # file(1) magic for BibTex text files
  16949. # From Hendrik Scholz <hendrik@scholz.net>
  16950. 0 search/1/c @article{ BibTeX text file
  16951. 0 search/1/c @book{ BibTeX text file
  16952. 0 search/1/c @inbook{ BibTeX text file
  16953. 0 search/1/c @incollection{ BibTeX text file
  16954. 0 search/1/c @inproceedings{ BibTeX text file
  16955. 0 search/1/c @manual{ BibTeX text file
  16956. 0 search/1/c @misc{ BibTeX text file
  16957. 0 search/1/c @preamble{ BibTeX text file
  16958. 0 search/1/c @phdthesis{ BibTeX text file
  16959. 0 search/1/c @techreport{ BibTeX text file
  16960. 0 search/1/c @unpublished{ BibTeX text file
  16961. 73 search/1 %%%\ \ BibTeX-file{ BibTex text file (with full header)
  16962. 73 search/1 %%%\ \ @BibTeX-style-file{ BibTeX style text file (with full header)
  16963. 0 search/1 %\ BibTeX\ standard\ bibliography\ BibTeX standard bibliography style text file
  16964. 0 search/1 %\ BibTeX\ ` BibTeX custom bibliography style text file
  16965. 0 search/1 @c\ @mapfile{ TeX font aliases text file
  16966. 0 string #LyX LyX document text
  16967. #------------------------------------------------------------------------------
  16968. # $File: tgif,v 1.7 2010/09/20 19:03:46 rrt Exp $
  16969. # file(1) magic for tgif(1) files
  16970. # From Hendrik Scholz <hendrik@scholz.net>
  16971. 0 string %TGIF\ Tgif file version
  16972. >6 string x %s
  16973. #------------------------------------------------------------------------------
  16974. # $File: ti-8x,v 1.6 2009/09/19 16:28:12 christos Exp $
  16975. # ti-8x: file(1) magic for the TI-8x and TI-9x Graphing Calculators.
  16976. #
  16977. # From: Ryan McGuire (rmcguire@freenet.columbus.oh.us).
  16978. #
  16979. # Update: Romain Lievin (roms@lpg.ticalc.org).
  16980. #
  16981. # NOTE: This list is not complete.
  16982. # Files for the TI-80 and TI-81 are pretty rare. I'm not going to put the
  16983. # program/group magic numbers in here because I cannot find any.
  16984. 0 string **TI80** TI-80 Graphing Calculator File.
  16985. 0 string **TI81** TI-81 Graphing Calculator File.
  16986. #
  16987. # Magic Numbers for the TI-73
  16988. #
  16989. 0 string **TI73** TI-73 Graphing Calculator
  16990. >0x00003B byte 0x00 (real number)
  16991. >0x00003B byte 0x01 (list)
  16992. >0x00003B byte 0x02 (matrix)
  16993. >0x00003B byte 0x03 (equation)
  16994. >0x00003B byte 0x04 (string)
  16995. >0x00003B byte 0x05 (program)
  16996. >0x00003B byte 0x06 (assembly program)
  16997. >0x00003B byte 0x07 (picture)
  16998. >0x00003B byte 0x08 (gdb)
  16999. >0x00003B byte 0x0C (complex number)
  17000. >0x00003B byte 0x0F (window settings)
  17001. >0x00003B byte 0x10 (zoom)
  17002. >0x00003B byte 0x11 (table setup)
  17003. >0x00003B byte 0x13 (backup)
  17004. # Magic Numbers for the TI-82
  17005. #
  17006. 0 string **TI82** TI-82 Graphing Calculator
  17007. >0x00003B byte 0x00 (real)
  17008. >0x00003B byte 0x01 (list)
  17009. >0x00003B byte 0x02 (matrix)
  17010. >0x00003B byte 0x03 (Y-variable)
  17011. >0x00003B byte 0x05 (program)
  17012. >0x00003B byte 0x06 (protected prgm)
  17013. >0x00003B byte 0x07 (picture)
  17014. >0x00003B byte 0x08 (gdb)
  17015. >0x00003B byte 0x0B (window settings)
  17016. >0x00003B byte 0x0C (window settings)
  17017. >0x00003B byte 0x0D (table setup)
  17018. >0x00003B byte 0x0E (screenshot)
  17019. >0x00003B byte 0x0F (backup)
  17020. #
  17021. # Magic Numbers for the TI-83
  17022. #
  17023. 0 string **TI83** TI-83 Graphing Calculator
  17024. >0x00003B byte 0x00 (real)
  17025. >0x00003B byte 0x01 (list)
  17026. >0x00003B byte 0x02 (matrix)
  17027. >0x00003B byte 0x03 (Y-variable)
  17028. >0x00003B byte 0x04 (string)
  17029. >0x00003B byte 0x05 (program)
  17030. >0x00003B byte 0x06 (protected prgm)
  17031. >0x00003B byte 0x07 (picture)
  17032. >0x00003B byte 0x08 (gdb)
  17033. >0x00003B byte 0x0B (window settings)
  17034. >0x00003B byte 0x0C (window settings)
  17035. >0x00003B byte 0x0D (table setup)
  17036. >0x00003B byte 0x0E (screenshot)
  17037. >0x00003B byte 0x13 (backup)
  17038. #
  17039. # Magic Numbers for the TI-83+
  17040. #
  17041. 0 string **TI83F* TI-83+ Graphing Calculator
  17042. >0x00003B byte 0x00 (real number)
  17043. >0x00003B byte 0x01 (list)
  17044. >0x00003B byte 0x02 (matrix)
  17045. >0x00003B byte 0x03 (equation)
  17046. >0x00003B byte 0x04 (string)
  17047. >0x00003B byte 0x05 (program)
  17048. >0x00003B byte 0x06 (assembly program)
  17049. >0x00003B byte 0x07 (picture)
  17050. >0x00003B byte 0x08 (gdb)
  17051. >0x00003B byte 0x0C (complex number)
  17052. >0x00003B byte 0x0F (window settings)
  17053. >0x00003B byte 0x10 (zoom)
  17054. >0x00003B byte 0x11 (table setup)
  17055. >0x00003B byte 0x13 (backup)
  17056. >0x00003B byte 0x15 (application variable)
  17057. >0x00003B byte 0x17 (group of variable)
  17058. #
  17059. # Magic Numbers for the TI-85
  17060. #
  17061. 0 string **TI85** TI-85 Graphing Calculator
  17062. >0x00003B byte 0x00 (real number)
  17063. >0x00003B byte 0x01 (complex number)
  17064. >0x00003B byte 0x02 (real vector)
  17065. >0x00003B byte 0x03 (complex vector)
  17066. >0x00003B byte 0x04 (real list)
  17067. >0x00003B byte 0x05 (complex list)
  17068. >0x00003B byte 0x06 (real matrix)
  17069. >0x00003B byte 0x07 (complex matrix)
  17070. >0x00003B byte 0x08 (real constant)
  17071. >0x00003B byte 0x09 (complex constant)
  17072. >0x00003B byte 0x0A (equation)
  17073. >0x00003B byte 0x0C (string)
  17074. >0x00003B byte 0x0D (function GDB)
  17075. >0x00003B byte 0x0E (polar GDB)
  17076. >0x00003B byte 0x0F (parametric GDB)
  17077. >0x00003B byte 0x10 (diffeq GDB)
  17078. >0x00003B byte 0x11 (picture)
  17079. >0x00003B byte 0x12 (program)
  17080. >0x00003B byte 0x13 (range)
  17081. >0x00003B byte 0x17 (window settings)
  17082. >0x00003B byte 0x18 (window settings)
  17083. >0x00003B byte 0x19 (window settings)
  17084. >0x00003B byte 0x1A (window settings)
  17085. >0x00003B byte 0x1B (zoom)
  17086. >0x00003B byte 0x1D (backup)
  17087. >0x00003B byte 0x1E (unknown)
  17088. >0x00003B byte 0x2A (equation)
  17089. >0x000032 string ZS4 - ZShell Version 4 File.
  17090. >0x000032 string ZS3 - ZShell Version 3 File.
  17091. #
  17092. # Magic Numbers for the TI-86
  17093. #
  17094. 0 string **TI86** TI-86 Graphing Calculator
  17095. >0x00003B byte 0x00 (real number)
  17096. >0x00003B byte 0x01 (complex number)
  17097. >0x00003B byte 0x02 (real vector)
  17098. >0x00003B byte 0x03 (complex vector)
  17099. >0x00003B byte 0x04 (real list)
  17100. >0x00003B byte 0x05 (complex list)
  17101. >0x00003B byte 0x06 (real matrix)
  17102. >0x00003B byte 0x07 (complex matrix)
  17103. >0x00003B byte 0x08 (real constant)
  17104. >0x00003B byte 0x09 (complex constant)
  17105. >0x00003B byte 0x0A (equation)
  17106. >0x00003B byte 0x0C (string)
  17107. >0x00003B byte 0x0D (function GDB)
  17108. >0x00003B byte 0x0E (polar GDB)
  17109. >0x00003B byte 0x0F (parametric GDB)
  17110. >0x00003B byte 0x10 (diffeq GDB)
  17111. >0x00003B byte 0x11 (picture)
  17112. >0x00003B byte 0x12 (program)
  17113. >0x00003B byte 0x13 (range)
  17114. >0x00003B byte 0x17 (window settings)
  17115. >0x00003B byte 0x18 (window settings)
  17116. >0x00003B byte 0x19 (window settings)
  17117. >0x00003B byte 0x1A (window settings)
  17118. >0x00003B byte 0x1B (zoom)
  17119. >0x00003B byte 0x1D (backup)
  17120. >0x00003B byte 0x1E (unknown)
  17121. >0x00003B byte 0x2A (equation)
  17122. #
  17123. # Magic Numbers for the TI-89
  17124. #
  17125. 0 string **TI89** TI-89 Graphing Calculator
  17126. >0x000048 byte 0x00 (expression)
  17127. >0x000048 byte 0x04 (list)
  17128. >0x000048 byte 0x06 (matrix)
  17129. >0x000048 byte 0x0A (data)
  17130. >0x000048 byte 0x0B (text)
  17131. >0x000048 byte 0x0C (string)
  17132. >0x000048 byte 0x0D (graphic data base)
  17133. >0x000048 byte 0x0E (figure)
  17134. >0x000048 byte 0x10 (picture)
  17135. >0x000048 byte 0x12 (program)
  17136. >0x000048 byte 0x13 (function)
  17137. >0x000048 byte 0x14 (macro)
  17138. >0x000048 byte 0x1C (zipped)
  17139. >0x000048 byte 0x21 (assembler)
  17140. #
  17141. # Magic Numbers for the TI-92
  17142. #
  17143. 0 string **TI92** TI-92 Graphing Calculator
  17144. >0x000048 byte 0x00 (expression)
  17145. >0x000048 byte 0x04 (list)
  17146. >0x000048 byte 0x06 (matrix)
  17147. >0x000048 byte 0x0A (data)
  17148. >0x000048 byte 0x0B (text)
  17149. >0x000048 byte 0x0C (string)
  17150. >0x000048 byte 0x0D (graphic data base)
  17151. >0x000048 byte 0x0E (figure)
  17152. >0x000048 byte 0x10 (picture)
  17153. >0x000048 byte 0x12 (program)
  17154. >0x000048 byte 0x13 (function)
  17155. >0x000048 byte 0x14 (macro)
  17156. >0x000048 byte 0x1D (backup)
  17157. #
  17158. # Magic Numbers for the TI-92+/V200
  17159. #
  17160. 0 string **TI92P* TI-92+/V200 Graphing Calculator
  17161. >0x000048 byte 0x00 (expression)
  17162. >0x000048 byte 0x04 (list)
  17163. >0x000048 byte 0x06 (matrix)
  17164. >0x000048 byte 0x0A (data)
  17165. >0x000048 byte 0x0B (text)
  17166. >0x000048 byte 0x0C (string)
  17167. >0x000048 byte 0x0D (graphic data base)
  17168. >0x000048 byte 0x0E (figure)
  17169. >0x000048 byte 0x10 (picture)
  17170. >0x000048 byte 0x12 (program)
  17171. >0x000048 byte 0x13 (function)
  17172. >0x000048 byte 0x14 (macro)
  17173. >0x000048 byte 0x1C (zipped)
  17174. >0x000048 byte 0x21 (assembler)
  17175. #
  17176. # Magic Numbers for the TI-73/83+/89/92+/V200 FLASH upgrades
  17177. #
  17178. 0x0000016 string Advanced TI-XX Graphing Calculator (FLASH)
  17179. 0 string **TIFL** TI-XX Graphing Calculator (FLASH)
  17180. >8 byte >0 - Revision %d
  17181. >>9 byte x \b.%d,
  17182. >12 byte >0 Revision date %02x
  17183. >>13 byte x \b/%02x
  17184. >>14 beshort x \b/%04x,
  17185. >17 string >/0 name: '%s',
  17186. >48 byte 0x74 device: TI-73,
  17187. >48 byte 0x73 device: TI-83+,
  17188. >48 byte 0x98 device: TI-89,
  17189. >48 byte 0x88 device: TI-92+,
  17190. >49 byte 0x23 type: OS upgrade,
  17191. >49 byte 0x24 type: application,
  17192. >49 byte 0x25 type: certificate,
  17193. >49 byte 0x3e type: license,
  17194. >74 lelong >0 size: %ld bytes
  17195. # VTi & TiEmu skins (TI Graphing Calculators).
  17196. # From: Romain Lievin (roms@lpg.ticalc.org).
  17197. # Magic Numbers for the VTi skins
  17198. 0 string VTI Virtual TI skin
  17199. >3 string v - Version
  17200. >>4 byte >0 \b %c
  17201. >>6 byte x \b.%c
  17202. # Magic Numbers for the TiEmu skins
  17203. 0 string TiEmu TiEmu skin
  17204. >6 string v - Version
  17205. >>7 byte >0 \b %c
  17206. >>9 byte x \b.%c
  17207. >>10 byte x \b%c
  17208. #------------------------------------------------------------------------------
  17209. # $File: timezone,v 1.11 2009/09/19 16:28:12 christos Exp $
  17210. # timezone: file(1) magic for timezone data
  17211. #
  17212. # from Daniel Quinlan (quinlan@yggdrasil.com)
  17213. # this should work on Linux, SunOS, and maybe others
  17214. # Added new official magic number for recent versions of the Olson code
  17215. 0 string TZif timezone data
  17216. >4 byte 0 \b, old version
  17217. >4 byte >0 \b, version %c
  17218. >20 belong 0 \b, no gmt time flags
  17219. >20 belong 1 \b, 1 gmt time flag
  17220. >20 belong >1 \b, %d gmt time flags
  17221. >24 belong 0 \b, no std time flags
  17222. >20 belong 1 \b, 1 std time flag
  17223. >24 belong >1 \b, %d std time flags
  17224. >28 belong 0 \b, no leap seconds
  17225. >28 belong 1 \b, 1 leap second
  17226. >28 belong >1 \b, %d leap seconds
  17227. >32 belong 0 \b, no transition times
  17228. >32 belong 1 \b, 1 transition time
  17229. >32 belong >1 \b, %d transition times
  17230. >36 belong 0 \b, no abbreviation chars
  17231. >36 belong 1 \b, 1 abbreviation char
  17232. >36 belong >1 \b, %d abbreviation chars
  17233. 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
  17234. 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
  17235. 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
  17236. 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
  17237. 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
  17238. 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
  17239. #------------------------------------------------------------------------------
  17240. # $File: troff,v 1.10 2009/09/19 16:28:12 christos Exp $
  17241. # troff: file(1) magic for *roff
  17242. #
  17243. # updated by Daniel Quinlan (quinlan@yggdrasil.com)
  17244. # troff input
  17245. 0 search/1 .\\" troff or preprocessor input text
  17246. !:mime text/troff
  17247. 0 search/1 '\\" troff or preprocessor input text
  17248. !:mime text/troff
  17249. 0 search/1 '.\\" troff or preprocessor input text
  17250. !:mime text/troff
  17251. 0 search/1 \\" troff or preprocessor input text
  17252. !:mime text/troff
  17253. 0 search/1 ''' troff or preprocessor input text
  17254. !:mime text/troff
  17255. 0 regex/20 \^\\.[A-Za-z0-9][A-Za-z0-9][\ \t] troff or preprocessor input text
  17256. !:mime text/troff
  17257. 0 regex/20 \^\\.[A-Za-z0-9][A-Za-z0-9]$ troff or preprocessor input text
  17258. !:mime text/troff
  17259. # ditroff intermediate output text
  17260. 0 search/1 x\ T ditroff output text
  17261. >4 search/1 cat for the C/A/T phototypesetter
  17262. >4 search/1 ps for PostScript
  17263. >4 search/1 dvi for DVI
  17264. >4 search/1 ascii for ASCII
  17265. >4 search/1 lj4 for LaserJet 4
  17266. >4 search/1 latin1 for ISO 8859-1 (Latin 1)
  17267. >4 search/1 X75 for xditview at 75dpi
  17268. >>7 search/1 -12 (12pt)
  17269. >4 search/1 X100 for xditview at 100dpi
  17270. >>8 search/1 -12 (12pt)
  17271. # output data formats
  17272. 0 string \100\357 very old (C/A/T) troff output data
  17273. #------------------------------------------------------------------------------
  17274. # $File: tuxedo,v 1.4 2009/09/19 16:28:13 christos Exp $
  17275. # tuxedo: file(1) magic for BEA TUXEDO data files
  17276. #
  17277. # from Ian Springer <ispringer@hotmail.com>
  17278. #
  17279. 0 string \0\0\1\236\0\0\0\0\0\0\0\0\0\0\0\0 BEA TUXEDO DES mask data
  17280. #------------------------------------------------------------------------------
  17281. # $File: typeset,v 1.8 2009/09/19 16:28:13 christos Exp $
  17282. # typeset: file(1) magic for other typesetting
  17283. #
  17284. 0 string Interpress/Xerox Xerox InterPress data
  17285. >16 string / (version
  17286. >>17 string >\0 %s)
  17287. #------------------------------------------------------------------------------
  17288. # $File: unicode,v 1.6 2010/09/20 18:55:20 rrt Exp $
  17289. # Unicode: BOM prefixed text files - Adrian Havill <havill@turbolinux.co.jp>
  17290. # GRR: These types should be recognised in file_ascmagic so these
  17291. # encodings can be treated by text patterns.
  17292. # Missing types are already dealt with internally.
  17293. #
  17294. 0 string +/v8 Unicode text, UTF-7
  17295. 0 string +/v9 Unicode text, UTF-7
  17296. 0 string +/v+ Unicode text, UTF-7
  17297. 0 string +/v/ Unicode text, UTF-7
  17298. 0 string \335\163\146\163 Unicode text, UTF-8-EBCDIC
  17299. 0 string \000\000\376\377 Unicode text, UTF-32, big-endian
  17300. 0 string \377\376\000\000 Unicode text, UTF-32, little-endian
  17301. 0 string \016\376\377 Unicode text, SCSU (Standard Compression Scheme for Unicode)
  17302. #------------------------------------------------------------------------------
  17303. # $File: unknown,v 1.8 2013/01/09 22:37:24 christos Exp $
  17304. # unknown: file(1) magic for unknown machines
  17305. #
  17306. # 0x107 is 0407, 0x108 is 0410, and 0x109 is 0411; those are all PDP-11
  17307. # (executable, pure, and split I&D, respectively), but the PDP-11 version
  17308. # doesn't have the "version %ld", which may be a bogus COFFism (I don't
  17309. # think there was ever COFF for the PDP-11).
  17310. #
  17311. # 0x10B is 0413; that's VAX demand-paged, but this is a short, not a
  17312. # long, as it would be on a VAX. In any case, that could collide with
  17313. # VAX demand-paged files, as the magic number is little-endian on those
  17314. # binaries, so the first 16 bits of the file would contain 0x10B.
  17315. #
  17316. # Therefore, those entries are commented out.
  17317. #
  17318. # 0x10C is 0414 and 0x10E is 0416; those *are* unknown.
  17319. #
  17320. #0 short 0x107 unknown machine executable
  17321. #>8 short >0 not stripped
  17322. #>15 byte >0 - version %ld
  17323. #0 short 0x108 unknown pure executable
  17324. #>8 short >0 not stripped
  17325. #>15 byte >0 - version %ld
  17326. #0 short 0x109 PDP-11 separate I&D
  17327. #>8 short >0 not stripped
  17328. #>15 byte >0 - version %ld
  17329. #0 short 0x10b unknown pure executable
  17330. #>8 short >0 not stripped
  17331. #>15 byte >0 - version %ld
  17332. 0 long 0x10c unknown demand paged pure executable
  17333. >16 long >0 not stripped
  17334. 0 long 0x10e unknown readable demand paged pure executable
  17335. #------------------------------------------------------------------------------
  17336. # $File: uterus,v 1.1 2012/12/18 18:53:32 christos Exp $
  17337. # file(1) magic for uterus files
  17338. # http://freecode.com/projects/uterus
  17339. #
  17340. 0 string UTE+ uterus file
  17341. >4 string v \b, version
  17342. >5 byte x %c
  17343. >6 string . \b.
  17344. >7 byte x \b%c
  17345. >8 string \<\> \b, big-endian
  17346. >>16 belong >0 \b, slut size %u
  17347. >8 string \>\< \b, litte-endian
  17348. >>16 lelong >0 \b, slut size %u
  17349. >10 byte &8 \b, compressed
  17350. #------------------------------------------------------------------------------
  17351. # $File: uuencode,v 1.7 2009/09/19 16:28:13 christos Exp $
  17352. # uuencode: file(1) magic for ASCII-encoded files
  17353. #
  17354. # GRR: the first line of xxencoded files is identical to that in uuencoded
  17355. # files, but the first character in most subsequent lines is 'h' instead of
  17356. # 'M'. (xxencoding uses lowercase letters in place of most of uuencode's
  17357. # punctuation and survives BITNET gateways better.) If regular expressions
  17358. # were supported, this entry could possibly be split into two with
  17359. # "begin\040\.\*\012M" or "begin\040\.\*\012h" (where \. and \* are REs).
  17360. 0 search/1 begin\ uuencoded or xxencoded text
  17361. # btoa(1) is an alternative to uuencode that requires less space.
  17362. 0 search/1 xbtoa\ Begin btoa'd text
  17363. # ship(1) is another, much cooler alternative to uuencode.
  17364. # Greg Roelofs, newt@uchicago.edu
  17365. 0 search/1 $\012ship ship'd binary text
  17366. # bencode(8) is used to encode compressed news batches (Bnews/Cnews only?)
  17367. # Greg Roelofs, newt@uchicago.edu
  17368. 0 search/1 Decode\ the\ following\ with\ bdeco bencoded News text
  17369. # BinHex is the Macintosh ASCII-encoded file format (see also "apple")
  17370. # Daniel Quinlan, quinlan@yggdrasil.com
  17371. 11 search/1 must\ be\ converted\ with\ BinHex BinHex binary text
  17372. >41 search/1 x \b, version %.3s
  17373. # GRR: handle BASE64
  17374. #------------------------------------------------------------------------------
  17375. # $File: varied.out,v 1.22 2010/07/02 00:06:27 christos Exp $
  17376. # varied.out: file(1) magic for various USG systems
  17377. #
  17378. # Herewith many of the object file formats used by USG systems.
  17379. # Most have been moved to files for a particular processor,
  17380. # and deleted if they duplicate other entries.
  17381. #
  17382. 0 short 0610 Perkin-Elmer executable
  17383. # AMD 29K
  17384. 0 beshort 0572 amd 29k coff noprebar executable
  17385. 0 beshort 01572 amd 29k coff prebar executable
  17386. 0 beshort 0160007 amd 29k coff archive
  17387. # Cray
  17388. 6 beshort 0407 unicos (cray) executable
  17389. # Ultrix 4.3
  17390. 596 string \130\337\377\377 Ultrix core file
  17391. >600 string >\0 from '%s'
  17392. # BeOS and MAcOS PEF executables
  17393. # From: hplus@zilker.net (Jon Watte)
  17394. 0 string Joy!peffpwpc header for PowerPC PEF executable
  17395. #
  17396. # ava assembler/linker Uros Platise <uros.platise@ijs.si>
  17397. 0 string avaobj AVR assembler object code
  17398. >7 string >\0 version '%s'
  17399. # gnu gmon magic From: Eugen Dedu <dedu@ese-metz.fr>
  17400. 0 string gmon GNU prof performance data
  17401. >4 long x - version %ld
  17402. # From: Dave Pearson <davep@davep.org>
  17403. # Harbour <URL:http://harbour-project.org/> HRB files.
  17404. 0 string \xc0HRB Harbour HRB file
  17405. >4 leshort x version %d
  17406. # Harbour HBV files
  17407. 0 string \xc0HBV Harbour variable dump file
  17408. >4 leshort x version %d
  17409. # From: Alex Beregszaszi <alex@fsn.hu>
  17410. # 0 string exec BugOS executable
  17411. # 0 string pack BugOS archive
  17412. # From: Jason Spence <jspence@lightconsulting.com>
  17413. # Generated by the "examples" in STM's ST40 devkit, and derived code.
  17414. 0 lelong 0x13a9f17e ST40 component image format
  17415. >4 string >\0 \b, name '%s'
  17416. #------------------------------------------------------------------------------
  17417. # $File: varied.script,v 1.9 2011/12/16 16:32:48 rrt Exp $
  17418. # varied.script: file(1) magic for various interpreter scripts
  17419. 0 string/t #!\ / a
  17420. >3 string >\0 %s script text executable
  17421. !:strength / 2
  17422. 0 string/t #!\t/ a
  17423. >3 string >\0 %s script text executable
  17424. !:strength / 2
  17425. 0 string/t #!/ a
  17426. >2 string >\0 %s script text executable
  17427. !:strength / 2
  17428. 0 string/t #!\ script text executable
  17429. >3 string >\0 for %s
  17430. !:strength / 3
  17431. # using env
  17432. 0 string/t #!/usr/bin/env a
  17433. >15 string/t >\0 %s script text executable
  17434. !:strength / 10
  17435. 0 string/t #!\ /usr/bin/env a
  17436. >16 string/t >\0 %s script text executable
  17437. !:strength / 10
  17438. # From: arno <arenevier@fdn.fr>
  17439. # mozilla xpconnect typelib
  17440. # see http://www.mozilla.org/scriptable/typelib_file.html
  17441. 0 string XPCOM\nTypeLib\r\n\032 XPConnect Typelib
  17442. >0x10 byte x version %d
  17443. >>0x11 byte x \b.%d
  17444. #------------------------------------------------------------------------------
  17445. # $File: vax,v 1.8 2013/01/09 22:37:24 christos Exp $
  17446. # vax: file(1) magic for VAX executable/object and APL workspace
  17447. #
  17448. 0 lelong 0101557 VAX single precision APL workspace
  17449. 0 lelong 0101556 VAX double precision APL workspace
  17450. #
  17451. # VAX a.out (BSD; others collide with 386 and other 32-bit little-endian
  17452. # executables, and are handled in aout)
  17453. #
  17454. 0 lelong 0420 a.out VAX demand paged (first page unmapped) pure executable
  17455. >16 lelong >0 not stripped
  17456. #
  17457. # VAX COFF
  17458. #
  17459. # The `versions' were commented out, but have been un-commented out.
  17460. # (Was the problem just one of endianness?)
  17461. #
  17462. 0 leshort 0570 VAX COFF executable
  17463. >12 lelong >0 not stripped
  17464. >22 leshort >0 - version %ld
  17465. 0 leshort 0575 VAX COFF pure executable
  17466. >12 lelong >0 not stripped
  17467. >22 leshort >0 - version %ld
  17468. #------------------------------------------------------------------------------
  17469. # $File: vicar,v 1.4 2009/09/19 16:28:13 christos Exp $
  17470. # vicar: file(1) magic for VICAR files.
  17471. #
  17472. # From: Ossama Othman <othman@astrosun.tn.cornell.edu
  17473. # VICAR is JPL's in-house spacecraft image processing program
  17474. # VICAR image
  17475. 0 string LBLSIZE= VICAR image data
  17476. >32 string BYTE \b, 8 bits = VAX byte
  17477. >32 string HALF \b, 16 bits = VAX word = Fortran INTEGER*2
  17478. >32 string FULL \b, 32 bits = VAX longword = Fortran INTEGER*4
  17479. >32 string REAL \b, 32 bits = VAX longword = Fortran REAL*4
  17480. >32 string DOUB \b, 64 bits = VAX quadword = Fortran REAL*8
  17481. >32 string COMPLEX \b, 64 bits = VAX quadword = Fortran COMPLEX*8
  17482. # VICAR label file
  17483. 43 string SFDU_LABEL VICAR label file
  17484. #------------------------------------------------------------------------------
  17485. # $File: virtual,v 1.2 2011/11/22 13:30:05 christos Exp $
  17486. # From: James Nobis <quel@quelrod.net>
  17487. # Microsoft hard disk images for:
  17488. # Virtual Server
  17489. # Virtual PC
  17490. # http://technet.microsoft.com/en-us/virtualserver/bb676673.aspx
  17491. # .vhd
  17492. 0 string conectix Microsoft Disk Image, Virtual Server or Virtual PC
  17493. # Sun xVM VirtualBox Disk Image
  17494. # From: Richard W.M. Jones <rich@annexia.org>
  17495. # VirtualBox Disk Image
  17496. 0x40 ulelong 0xbeda107f VirtualBox Disk Image
  17497. >0x44 uleshort >0 \b, major %u
  17498. >0x46 uleshort >0 \b, minor %u
  17499. #------------------------------------------------------------------------------
  17500. # $File: virtutech,v 1.4 2009/09/19 16:28:13 christos Exp $
  17501. # Virtutech Compressed Random Access File Format
  17502. #
  17503. # From <gustav@virtutech.com>
  17504. 0 string \211\277\036\203 Virtutech CRAFF
  17505. >4 belong x v%d
  17506. >20 belong 0 uncompressed
  17507. >20 belong 1 bzipp2ed
  17508. >20 belong 2 gzipped
  17509. >24 belong 0 not clean
  17510. #------------------------------------------------------------------------------
  17511. # $File: visx,v 1.5 2009/09/19 16:28:13 christos Exp $
  17512. # visx: file(1) magic for Visx format files
  17513. #
  17514. 0 short 0x5555 VISX image file
  17515. >2 byte 0 (zero)
  17516. >2 byte 1 (unsigned char)
  17517. >2 byte 2 (short integer)
  17518. >2 byte 3 (float 32)
  17519. >2 byte 4 (float 64)
  17520. >2 byte 5 (signed char)
  17521. >2 byte 6 (bit-plane)
  17522. >2 byte 7 (classes)
  17523. >2 byte 8 (statistics)
  17524. >2 byte 10 (ascii text)
  17525. >2 byte 15 (image segments)
  17526. >2 byte 100 (image set)
  17527. >2 byte 101 (unsigned char vector)
  17528. >2 byte 102 (short integer vector)
  17529. >2 byte 103 (float 32 vector)
  17530. >2 byte 104 (float 64 vector)
  17531. >2 byte 105 (signed char vector)
  17532. >2 byte 106 (bit plane vector)
  17533. >2 byte 121 (feature vector)
  17534. >2 byte 122 (feature vector library)
  17535. >2 byte 124 (chain code)
  17536. >2 byte 126 (bit vector)
  17537. >2 byte 130 (graph)
  17538. >2 byte 131 (adjacency graph)
  17539. >2 byte 132 (adjacency graph library)
  17540. >2 string .VISIX (ascii text)
  17541. #------------------------------------------------------------------------------
  17542. # $File: vms,v 1.7 2013/03/09 22:36:00 christos Exp $
  17543. # vms: file(1) magic for VMS executables (experimental)
  17544. #
  17545. # VMS .exe formats, both VAX and AXP (Greg Roelofs, newt@uchicago.edu)
  17546. # GRR 950122: I'm just guessing on these, based on inspection of the headers
  17547. # of three executables each for Alpha and VAX architectures. The VAX files
  17548. # all had headers similar to this:
  17549. #
  17550. # 00000 b0 00 30 00 44 00 60 00 00 00 00 00 30 32 30 35 ..0.D.`.....0205
  17551. # 00010 01 01 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 ................
  17552. #
  17553. 0 string \xb0\0\x30\0 VMS VAX executable
  17554. >44032 string PK\003\004 \b, Info-ZIP SFX archive v5.12 w/decryption
  17555. #
  17556. # The AXP files all looked like this, except that the byte at offset 0x22
  17557. # was 06 in some of them and 07 in others:
  17558. #
  17559. # 00000 03 00 00 00 00 00 00 00 ec 02 00 00 10 01 00 00 ................
  17560. # 00010 68 00 00 00 98 00 00 00 b8 00 00 00 00 00 00 00 h...............
  17561. # 00020 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  17562. # 00030 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
  17563. # 00040 00 00 00 00 ff ff ff ff ff ff ff ff 02 00 00 00 ................
  17564. #
  17565. # GRR this test is still too general as it catches example adressen.dbt
  17566. 0 belong 0x03000000
  17567. >8 ubelong 0xec020000 VMS Alpha executable
  17568. >>75264 string PK\003\004 \b, Info-ZIP SFX archive v5.12 w/decryption
  17569. #------------------------------------------------------------------------------
  17570. # $File: vmware,v 1.7 2009/09/19 16:28:13 christos Exp $
  17571. # VMware specific files (deducted from version 1.1 and log file entries)
  17572. # Anthon van der Neut (anthon@mnt.org)
  17573. 0 belong 0x4d52564e VMware nvram
  17574. #------------------------------------------------------------------------------
  17575. # $File: vorbis,v 1.16 2009/09/19 16:28:13 christos Exp $
  17576. # vorbis: file(1) magic for Ogg/Vorbis files
  17577. #
  17578. # From Felix von Leitner <leitner@fefe.de>
  17579. # Extended by Beni Cherniavsky <cben@crosswinds.net>
  17580. # Further extended by Greg Wooledge <greg@wooledge.org>
  17581. #
  17582. # Most (everything but the number of channels and bitrate) is commented
  17583. # out with `##' as it's not interesting to the average user. The most
  17584. # probable things advanced users would want to uncomment are probably
  17585. # the number of comments and the encoder version.
  17586. #
  17587. # FIXME: The first match has been made a search, so that it can skip
  17588. # over prepended ID3 tags. This will work for MIME type detection, but
  17589. # won't work for detecting other properties of the file (they all need
  17590. # to be made relative to the search). In any case, if the file has ID3
  17591. # tags, the ID3 information will be printed, not the Ogg information,
  17592. # so until that's fixed, this doesn't matter.
  17593. # FIXME[2]: Disable the above for now, since search assumes text mode.
  17594. #
  17595. # --- Ogg Framing ---
  17596. #0 search/1000 OggS Ogg data
  17597. 0 string OggS Ogg data
  17598. !:mime application/ogg
  17599. >4 byte !0 UNKNOWN REVISION %u
  17600. ##>4 byte 0 revision 0
  17601. >4 byte 0
  17602. ##>>14 lelong x (Serial %lX)
  17603. # non-Vorbis content: FLAC (Free Lossless Audio Codec, http://flac.sourceforge.net)
  17604. >>28 string \x7fFLAC \b, FLAC audio
  17605. # non-Vorbis content: Theora
  17606. >>28 string \x80theora \b, Theora video
  17607. # non-Vorbis content: Kate
  17608. >>28 string \x80kate\0\0\0\0 \b, Kate
  17609. >>>37 ubyte x v%u
  17610. >>>38 ubyte x \b.%u,
  17611. >>>40 byte 0 utf8 encoding,
  17612. >>>40 byte !0 unknown character encoding,
  17613. >>>60 string >\0 language %s,
  17614. >>>60 string \0 no language set,
  17615. >>>76 string >\0 category %s
  17616. >>>76 string \0 no category set
  17617. # non-Vorbis content: Skeleton
  17618. >>28 string fishead\0 \b, Skeleton
  17619. >>>36 short x v%u
  17620. >>>40 short x \b.%u
  17621. # non-Vorbis content: Speex
  17622. >>28 string Speex\ \ \ \b, Speex audio
  17623. # non-Vorbis content: OGM
  17624. >>28 string \x01video\0\0\0 \b, OGM video
  17625. >>>37 string/c div3 (DivX 3)
  17626. >>>37 string/c divx (DivX 4)
  17627. >>>37 string/c dx50 (DivX 5)
  17628. >>>37 string/c xvid (XviD)
  17629. # --- First vorbis packet - general header ---
  17630. >>28 string \x01vorbis \b, Vorbis audio,
  17631. >>>35 lelong !0 UNKNOWN VERSION %lu,
  17632. ##>>>35 lelong 0 version 0,
  17633. >>>35 lelong 0
  17634. >>>>39 ubyte 1 mono,
  17635. >>>>39 ubyte 2 stereo,
  17636. >>>>39 ubyte >2 %u channels,
  17637. >>>>40 lelong x %lu Hz
  17638. # Minimal, nominal and maximal bitrates specified when encoding
  17639. >>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \b,
  17640. # The above tests if at least one of these is specified:
  17641. >>>>>52 lelong !-1
  17642. # Vorbis RC2 has a bug which puts -1000 in the min/max bitrate fields
  17643. # instead of -1.
  17644. # Vorbis 1.0 uses 0 instead of -1.
  17645. >>>>>>52 lelong !0
  17646. >>>>>>>52 lelong !-1000
  17647. >>>>>>>>52 lelong x <%lu
  17648. >>>>>48 lelong !-1
  17649. >>>>>>48 lelong x ~%lu
  17650. >>>>>44 lelong !-1
  17651. >>>>>>44 lelong !-1000
  17652. >>>>>>>44 lelong !0
  17653. >>>>>>>>44 lelong x >%lu
  17654. >>>>>48 string <\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff bps
  17655. # -- Second vorbis header packet - the comments
  17656. # A kludge to read the vendor string. It's a counted string, not a
  17657. # zero-terminated one, so file(1) can't read it in a generic way.
  17658. # libVorbis is the only one existing currently, so I detect specifically
  17659. # it. The interesting value is the cvs date (8 digits decimal).
  17660. # Post-RC1 Ogg files have the second header packet (and thus the version)
  17661. # in a different place, so we must use an indirect offset.
  17662. >>>(84.b+85) string \x03vorbis
  17663. >>>>(84.b+96) string/c Xiphophorus\ libVorbis\ I \b, created by: Xiphophorus libVorbis I
  17664. >>>>>(84.b+120) string >00000000
  17665. # Map to beta version numbers:
  17666. >>>>>>(84.b+120) string <20000508 (<beta1, prepublic)
  17667. >>>>>>(84.b+120) string 20000508 (1.0 beta 1 or beta 2)
  17668. >>>>>>(84.b+120) string >20000508
  17669. >>>>>>>(84.b+120) string <20001031 (beta2-3)
  17670. >>>>>>(84.b+120) string 20001031 (1.0 beta 3)
  17671. >>>>>>(84.b+120) string >20001031
  17672. >>>>>>>(84.b+120) string <20010225 (beta3-4)
  17673. >>>>>>(84.b+120) string 20010225 (1.0 beta 4)
  17674. >>>>>>(84.b+120) string >20010225
  17675. >>>>>>>(84.b+120) string <20010615 (beta4-RC1)
  17676. >>>>>>(84.b+120) string 20010615 (1.0 RC1)
  17677. >>>>>>(84.b+120) string 20010813 (1.0 RC2)
  17678. >>>>>>(84.b+120) string 20010816 (RC2 - Garf tuned v1)
  17679. >>>>>>(84.b+120) string 20011014 (RC2 - Garf tuned v2)
  17680. >>>>>>(84.b+120) string 20011217 (1.0 RC3)
  17681. >>>>>>(84.b+120) string 20011231 (1.0 RC3)
  17682. # Some pre-1.0 CVS snapshots still had "Xiphphorus"...
  17683. >>>>>>(84.b+120) string >20011231 (pre-1.0 CVS)
  17684. # For the 1.0 release, Xiphophorus is replaced by Xiph.Org
  17685. >>>>(84.b+96) string/c Xiph.Org\ libVorbis\ I \b, created by: Xiph.Org libVorbis I
  17686. >>>>>(84.b+117) string >00000000
  17687. >>>>>>(84.b+117) string <20020717 (pre-1.0 CVS)
  17688. >>>>>>(84.b+117) string 20020717 (1.0)
  17689. >>>>>>(84.b+117) string 20030909 (1.0.1)
  17690. >>>>>>(84.b+117) string 20040629 (1.1.0 RC1)
  17691. #------------------------------------------------------------------------------
  17692. # $File: vxl,v 1.4 2009/09/19 16:28:13 christos Exp $
  17693. # VXL: file(1) magic for VXL binary IO data files
  17694. #
  17695. # from Ian Scott <scottim@sf.net>
  17696. #
  17697. # VXL is a collection of C++ libraries for Computer Vision.
  17698. # See the vsl chapter in the VXL Book for more info
  17699. # http://www.isbe.man.ac.uk/public_vxl_doc/books/vxl/book.html
  17700. # http:/vxl.sf.net
  17701. 2 lelong 0x472b2c4e VXL data file,
  17702. >0 leshort >0 schema version no %d
  17703. #------------------------------------------------------------------------------
  17704. # $File: warc,v 1.3 2010/11/25 15:05:43 christos Exp $
  17705. # warc: file(1) magic for WARC files
  17706. 0 string WARC/ WARC Archive
  17707. >5 string x version %.4s
  17708. !:mime application/warc
  17709. #------------------------------------------------------------------------------
  17710. # Arc File Format from Internet Archive
  17711. # see http://www.archive.org/web/researcher/ArcFileFormat.php
  17712. 0 string filedesc:// Internet Archive File
  17713. !:mime application/x-ia-arc
  17714. >11 search/256 \x0A \b
  17715. >>&0 ubyte >0 \b version %c
  17716. #------------------------------------------------------------------------------
  17717. # weak: file(1) magic for very weak magic entries, disabled by default
  17718. #
  17719. # These entries are so weak that they might interfere identification of
  17720. # other formats. Example include:
  17721. # - Only identify for 1 or 2 bytes
  17722. # - Match against very wide range of values
  17723. # - Match against generic word in some spoken languages (e.g. English)
  17724. # Summary: Computer Graphics Metafile
  17725. # Extension: .cgm
  17726. #0 beshort&0xffe0 0x0020 binary Computer Graphics Metafile
  17727. #0 beshort 0x3020 character Computer Graphics Metafile
  17728. #0 string =!! Bennet Yee's "face" format
  17729. #------------------------------------------------------------------------------
  17730. # $File: windows,v 1.6 2013/04/19 20:12:29 christos Exp $
  17731. # windows: file(1) magic for Microsoft Windows
  17732. #
  17733. # This file is mainly reserved for files where programs
  17734. # using them are run almost always on MS Windows 3.x or
  17735. # above, or files only used exclusively in Windows OS,
  17736. # where there is no better category to allocate for.
  17737. # For example, even though WinZIP almost run on Windows
  17738. # only, it is better to treat them as "archive" instead.
  17739. # For format usable in DOS, such as generic executable
  17740. # format, please specify under "msdos" file.
  17741. #
  17742. # Summary: Outlook Express DBX file
  17743. # Extension: .dbx
  17744. # Created by: Christophe Monniez
  17745. 0 string \xCF\xAD\x12\xFE MS Outlook Express DBX file
  17746. >4 byte =0xC5 \b, message database
  17747. >4 byte =0xC6 \b, folder database
  17748. >4 byte =0xC7 \b, account information
  17749. >4 byte =0x30 \b, offline database
  17750. # Summary: Windows crash dump
  17751. # Extension: .dmp
  17752. # Created by: Andreas Schuster (http://computer.forensikblog.de/)
  17753. # Reference (1): http://computer.forensikblog.de/en/2008/02/64bit_magic.html
  17754. # Modified by (1): Abel Cheung (Avoid match with first 4 bytes only)
  17755. 0 string PAGE
  17756. >4 string DUMP MS Windows 32bit crash dump
  17757. >>0x05c byte 0 \b, no PAE
  17758. >>0x05c byte 1 \b, PAE
  17759. >>0xf88 lelong 1 \b, full dump
  17760. >>0xf88 lelong 2 \b, kernel dump
  17761. >>0xf88 lelong 3 \b, small dump
  17762. >>0x068 lelong x \b, %ld pages
  17763. >4 string DU64 MS Windows 64bit crash dump
  17764. >>0xf98 lelong 1 \b, full dump
  17765. >>0xf98 lelong 2 \b, kernel dump
  17766. >>0xf98 lelong 3 \b, small dump
  17767. >>0x090 lequad x \b, %lld pages
  17768. # Summary: Vista Event Log
  17769. # Extension: .evtx
  17770. # Created by: Andreas Schuster (http://computer.forensikblog.de/)
  17771. # Reference (1): http://computer.forensikblog.de/en/2007/05/some_magic.html
  17772. 0 string ElfFile\0 MS Windows Vista Event Log
  17773. >0x2a leshort x \b, %d chunks
  17774. >>0x10 lelong x \b (no. %d in use)
  17775. >0x18 lelong >1 \b, next record no. %d
  17776. >0x18 lelong =1 \b, empty
  17777. >0x78 lelong &1 \b, DIRTY
  17778. >0x78 lelong &2 \b, FULL
  17779. # Summary: Windows 3.1 group files
  17780. # Extension: .grp
  17781. # Created by: unknown
  17782. 0 string \120\115\103\103 MS Windows 3.1 group files
  17783. # Summary: Old format help files
  17784. # Extension: .hlp
  17785. # Created by: Dirk Jagdmann <doj@cubic.org>
  17786. 0 lelong 0x00035f3f MS Windows 3.x help file
  17787. # Summary: Hyper terminal
  17788. # Extension: .ht
  17789. # Created by: unknown
  17790. 0 string HyperTerminal\
  17791. >15 string 1.0\ --\ HyperTerminal\ data\ file MS Windows HyperTerminal profile
  17792. # http://ithreats.files.wordpress.com/2009/05/\
  17793. # lnk_the_windows_shortcut_file_format.pdf
  17794. # Summary: Windows shortcut
  17795. # Extension: .lnk
  17796. # Created by: unknown
  17797. # 'L' + GUUID
  17798. 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
  17799. >20 lelong&1 1 \b, Item id list present
  17800. >20 lelong&2 2 \b, Points to a file or directory
  17801. >20 lelong&4 4 \b, Has Description string
  17802. >20 lelong&8 8 \b, Has Relative path
  17803. >20 lelong&16 16 \b, Has Working directory
  17804. >20 lelong&32 32 \b, Has command line arguments
  17805. >20 lelong&64 64 \b, Icon
  17806. >>56 lelong \b number=%d
  17807. >24 lelong&1 1 \b, Read-Only
  17808. >24 lelong&2 2 \b, Hidden
  17809. >24 lelong&4 4 \b, System
  17810. >24 lelong&8 8 \b, Volume Label
  17811. >24 lelong&16 16 \b, Directory
  17812. >24 lelong&32 32 \b, Archive
  17813. >24 lelong&64 64 \b, Encrypted
  17814. >24 lelong&128 128 \b, Normal
  17815. >24 lelong&256 256 \b, Temporary
  17816. >24 lelong&512 512 \b, Sparse
  17817. >24 lelong&1024 1024 \b, Reparse point
  17818. >24 lelong&2048 2048 \b, Compressed
  17819. >24 lelong&4096 4096 \b, Offline
  17820. >28 leqwdate x \b, ctime=%s
  17821. >36 leqwdate x \b, mtime=%s
  17822. >44 leqwdate x \b, atime=%s
  17823. >52 lelong x \b, length=%u, window=
  17824. >60 lelong&1 1 \bhide
  17825. >60 lelong&2 2 \bnormal
  17826. >60 lelong&4 4 \bshowminimized
  17827. >60 lelong&8 8 \bshowmaximized
  17828. >60 lelong&16 16 \bshownoactivate
  17829. >60 lelong&32 32 \bminimize
  17830. >60 lelong&64 64 \bshowminnoactive
  17831. >60 lelong&128 128 \bshowna
  17832. >60 lelong&256 256 \brestore
  17833. >60 lelong&512 512 \bshowdefault
  17834. #>20 lelong&1 0
  17835. #>>20 lelong&2 2
  17836. #>>>(72.l-64) pstring/h x \b [%s]
  17837. #>20 lelong&1 1
  17838. #>>20 lelong&2 2
  17839. #>>>(72.s) leshort x
  17840. #>>>&75 pstring/h x \b [%s]
  17841. # Summary: Outlook Personal Folders
  17842. # Created by: unknown
  17843. 0 lelong 0x4E444221 Microsoft Outlook email folder
  17844. >10 leshort 0x0e (<=2002)
  17845. >10 leshort 0x17 (>=2003)
  17846. # Summary: Windows help cache
  17847. # Created by: unknown
  17848. 0 string \164\146\115\122\012\000\000\000\001\000\000\000 MS Windows help cache
  17849. # Summary: IE cache file
  17850. # Created by: Christophe Monniez
  17851. 0 string Client\ UrlCache\ MMF Internet Explorer cache file
  17852. >20 string >\0 version %s
  17853. # Summary: Registry files
  17854. # Created by: unknown
  17855. # Modified by (1): Joerg Jenderek
  17856. 0 string regf MS Windows registry file, NT/2000 or above
  17857. 0 string CREG MS Windows 95/98/ME registry file
  17858. 0 string SHCC3 MS Windows 3.1 registry file
  17859. # Summary: Windows Registry text
  17860. # Extension: .reg
  17861. # Submitted by: Abel Cheung <abelcheung@gmail.com>
  17862. 0 string REGEDIT4\r\n\r\n Windows Registry text (Win95 or above)
  17863. 0 string Windows\ Registry\ Editor\
  17864. >&0 string Version\ 5.00\r\n\r\n Windows Registry text (Win2K or above)
  17865. # Windows *.INF *.INI files updated by Joerg Jenderek at Apr 2013
  17866. # emtpy ,comment , section , unicode line
  17867. 0 regex/s \\`(\r\n|;|[[]|\xFF\xFE)
  17868. # left bracket in section line
  17869. >&0 search/8192 [
  17870. # http://en.wikipedia.org/wiki/Autorun.inf
  17871. # http://msdn.microsoft.com/en-us/library/windows/desktop/cc144200.aspx
  17872. >>&0 regex/c \^(autorun)]\r\n
  17873. >>>&0 ubyte =0x5b INItialization configuration
  17874. !:mime application/x-wine-extension-ini
  17875. # From: Pal Tamas <folti@balabit.hu>
  17876. # Autorun File
  17877. >>>&0 ubyte !0x5b Microsoft Windows Autorun file
  17878. !:mime application/x-setupscript
  17879. # http://msdn.microsoft.com/en-us/library/windows/hardware/ff549520(v=vs.85).aspx
  17880. # version strings ASCII coded case-independent for Windows setup information script file
  17881. >>&0 regex/c \^(version|strings)] Windows setup INFormation
  17882. !:mime application/x-setupscript
  17883. #!:mime application/inf
  17884. #!:mime application/x-wine-extension-inf
  17885. >>&0 regex/c \^(WinsockCRCList|OEMCPL)] Windows setup INFormation
  17886. !:mime text/inf
  17887. # http://www.winfaq.de/faq_html/Content/tip2500/onlinefaq.php?h=tip2653.htm
  17888. # http://msdn.microsoft.com/en-us/library/windows/desktop/cc144102.aspx
  17889. # .ShellClassInfo DeleteOnCopy LocalizedFileNames ASCII coded case-independent
  17890. >>&0 regex/c \^(\.ShellClassInfo|DeleteOnCopy|LocalizedFileNames)] Windows desktop.ini
  17891. !:mime application/x-wine-extension-ini
  17892. #!:mime text/plain
  17893. # http://support.microsoft.com/kb/84709/
  17894. >>&0 regex/c \^(don't\ load)] Windows CONTROL.INI
  17895. !:mime application/x-wine-extension-ini
  17896. >>&0 regex/c \^(ndishlp\\$|protman\\$|NETBEUI\\$)] Windows PROTOCOL.INI
  17897. !:mime application/x-wine-extension-ini
  17898. # http://technet.microsoft.com/en-us/library/cc722567.aspx
  17899. # http://www.winfaq.de/faq_html/Content/tip0000/onlinefaq.php?h=tip0137.htm
  17900. >>&0 regex/c \^(windows|Compatibility|embedding)] Windows WIN.INI
  17901. !:mime application/x-wine-extension-ini
  17902. # http://en.wikipedia.org/wiki/SYSTEM.INI
  17903. >>&0 regex/c \^(boot|386enh|drivers)] Windows SYSTEM.INI
  17904. !:mime application/x-wine-extension-ini
  17905. # http://www.mdgx.com/newtip6.htm
  17906. >>&0 regex/c \^(SafeList)] Windows IOS.INI
  17907. !:mime application/x-wine-extension-ini
  17908. # http://en.wikipedia.org/wiki/NTLDR Windows Boot Loader information
  17909. >>&0 regex/c \^(boot\x20loader)] Windows boot.ini
  17910. !:mime application/x-wine-extension-ini
  17911. >>>&0 ubyte x
  17912. # http://en.wikipedia.org/wiki/CONFIG.SYS
  17913. >>&0 regex/c \^(menu)]\r\n MS-DOS CONFIG.SYS
  17914. # http://support.microsoft.com/kb/118579/
  17915. >>&0 regex/c \^(Paths)]\r\n MS-DOS MSDOS.SYS
  17916. # VERS string unicoded case-independent
  17917. >>&0 ubequad&0xFFdfFFdfFFdfFFdf 0x0056004500520053
  17918. # ION] string unicoded case-independent
  17919. >>>&0 ubequad&0xFFdfFFdfFFdfFFff 0x0049004f004e005d Windows setup INFormation
  17920. !:mime application/x-setupscript
  17921. # STRI string unicoded case-independent
  17922. >>&0 ubequad&0xFFdfFFdfFFdfFFdf 0x0053005400520049
  17923. # NGS] string unicoded case-independent
  17924. >>>&0 ubequad&0xFFdfFFdfFFdfFFff 0x004e00470053005D Windows setup INFormation
  17925. !:mime application/x-setupscript
  17926. # unknown keyword after opening bracket
  17927. >>&0 default x
  17928. >>>&0 search/8192 [
  17929. # version Strings FileIdentification
  17930. >>>>&0 string/c version Windows setup INFormation
  17931. !:mime application/x-setupscript
  17932. # VERS string unicoded case-independent
  17933. >>>>&0 ubequad&0xFFdfFFdfFFdfFFdf 0x0056004500520053
  17934. # ION] string unicoded case-independent
  17935. >>>>>&0 ubequad&0xFFdfFFdfFFdfFFff 0x0049004f004e005d Windows setup INFormation
  17936. !:mime application/x-setupscript
  17937. # http://en.wikipedia.org/wiki/Initialization_file Windows Initialization File or other
  17938. #>>>>&0 default x Generic INItialization configuration
  17939. #!:mime application/x-wine-extension-ini
  17940. # Windows Precompiled INF files *.PNF added by Joerg Jenderek at Mar 2013 of _PNF_HEADER inf.h
  17941. # http://read.pudn.com/downloads3/sourcecode/windows/248345/win2k/private/windows/setup/setupapi/inf.h__.htm
  17942. # GRR: line below too general as it catches also PDP-11 UNIX/RT ldp
  17943. 0 leshort&0xFeFe 0x0000
  17944. # test for unused null bits in PNF_FLAGs
  17945. >4 ulelong&0xFCffFe00 0x00000000
  17946. # only found 58h for Offset of WinDirPath immediately after _PNF_HEADER structure
  17947. >>68 ulelong >0x57
  17948. # test for zero high byte of InfValueBlockSize, followed by WinDirPath like
  17949. # C:\WINDOWS (ASCII 0x433a5c.. , unicode 0x43003a005c..) or X:\MININT
  17950. >>>(68.l-1) ubelong&0xffE0C519 =0x00400018 Windows Precompiled iNF
  17951. !:mime application/x-pnf
  17952. # currently only found Major Version=1 and Minor Version=1
  17953. #>>>>0 uleshort =0x0101
  17954. #>>>>>1 ubyte x \b, version %u
  17955. #>>>>>0 ubyte x \b.%u
  17956. >>>>0 uleshort !0x0101
  17957. >>>>>1 ubyte x \b, version %u
  17958. >>>>>0 ubyte x \b.%u
  17959. # 1 ,2 (windows 98 SE)
  17960. #>>>>2 uleshort =2 \b, InfStyle %u
  17961. >>>>2 uleshort !2 \b, InfStyle %u
  17962. # PNF_FLAG_IS_UNICODE 0x00000001
  17963. # PNF_FLAG_HAS_STRINGS 0x00000002
  17964. # PNF_FLAG_SRCPATH_IS_URL 0x00000004
  17965. # PNF_FLAG_HAS_VOLATILE_DIRIDS 0x00000008
  17966. # PNF_FLAG_INF_VERIFIED 0x00000010
  17967. # PNF_FLAG_INF_DIGITALLY_SIGNED 0x00000020
  17968. # ?? 0x00000100
  17969. # ?? 0x01000000
  17970. # ?? 0x02000000
  17971. >>>>4 ulelong&0x00000001 0x00000001 \b, unicoded
  17972. >>>>4 ulelong&0x00000020 0x00000020 \b, digitally signed
  17973. #>>>>8 ulelong x \b, InfSubstValueListOffset 0x%x
  17974. # many 0, 1 lmouusb.PNF, 2 linkfx10.PNF , f webfdr16.PNF
  17975. #>>>>12 uleshort x \b, InfSubstValueCount 0x%x
  17976. # only < 9 found
  17977. #>>>>14 uleshort x \b, InfVersionDatumCount 0x%x
  17978. # only found values lower 0x0000ffff
  17979. #>>>>16 ulelong x \b, InfVersionDataSize 0x%x
  17980. # only found positive values lower 0x00ffFFff for InfVersionDataOffset
  17981. >>>>20 ulelong x \b, at 0x%x
  17982. >>>>4 ulelong&0x00000001 =0x00000001
  17983. # case independent: CatalogFile Class DriverVer layoutfile LayoutFile SetupClass signature Signature
  17984. >>>>>(20.l) lestring16 x "%s"
  17985. >>>>4 ulelong&0x00000001 !0x00000001
  17986. >>>>>(20.l) string x "%s"
  17987. # FILETIME is number of 100-nanosecond intervals since 1 January 1601
  17988. #>>>>24 ulequad x \b, InfVersionLastWriteTime %16.16llx
  17989. # only found values lower 0x00ffFFff
  17990. #>>>>32 ulelong x \b, StringTableBlockOffset 0x%x
  17991. #>>>>36 ulelong x \b, StringTableBlockSize 0x%x
  17992. #>>>>40 ulelong x \b, InfSectionCount 0x%x
  17993. #>>>>44 ulelong x \b, InfSectionBlockOffset 0x%x
  17994. #>>>>48 ulelong x \b, InfSectionBlockSize 0x%x
  17995. #>>>>52 ulelong x \b, InfLineBlockOffset 0x%x
  17996. #>>>>56 ulelong x \b, InfLineBlockSize 0x%x
  17997. #>>>>60 ulelong x \b, InfValueBlockOffset 0x%x
  17998. #>>>>64 ulelong x \b, InfValueBlockSize 0x%x
  17999. # WinDirPathOffset
  18000. #>>>>68 ulelong x \b, at 0x%x
  18001. >>>>68 ulelong >0x57
  18002. >>>>>4 ulelong&0x00000001 =0x00000001
  18003. >>>>>>(68.l) ubequad =0x43003a005c005700
  18004. # normally unicoded C:\Windows
  18005. #>>>>>>>(68.l) lestring16 x \b, WinDirPath "%s"
  18006. >>>>>>(68.l) ubequad !0x43003a005c005700
  18007. >>>>>>>(68.l) lestring16 x \b, WinDirPath "%s"
  18008. >>>>>4 ulelong&0x00000001 !0x00000001
  18009. # normally ASCII C:\WINDOWS
  18010. #>>>>>>(68.l) string =C:\\WINDOWS \b, WinDirPath "%s"
  18011. >>>>>>(68.l) string !C:\\WINDOWS \b, WinDirPath "%s"
  18012. # found OsLoaderPathOffset values often 0 , once 70h corelist.PNF, once 68h ASCII machine.PNF
  18013. #>>>>72 ulelong >0 \b, at 0x%x
  18014. >>>>72 ulelong >0 \b,
  18015. >>>>>4 ulelong&0x00000001 =0x00000001
  18016. >>>>>>(72.l) lestring16 x OsLoaderPath "%s"
  18017. >>>>>4 ulelong&0x00000001 !0x00000001
  18018. # seldom C:\ instead empty
  18019. >>>>>>(72.l) string x OsLoaderPath "%s"
  18020. # 1fdh
  18021. #>>>>76 uleshort x \b, StringTableHashBucketCount 0x%x
  18022. >>>>78 uleshort !0x407 \b, LanguageId %x
  18023. # only 407h found
  18024. #>>>>78 uleshort =0x407 \b, LanguageId %x
  18025. # InfSourcePathOffset often 0
  18026. #>>>>80 ulelong >0 \b, at 0x%x
  18027. >>>>80 ulelong >0 \b,
  18028. >>>>>4 ulelong&0x00000001 =0x00000001
  18029. >>>>>>(80.l) lestring16 x SourcePath "%s"
  18030. >>>>>4 ulelong&0x00000001 !0x00000001
  18031. >>>>>>(80.l) string >\0 SourcePath "%s"
  18032. # OriginalInfNameOffset often 0
  18033. #>>>>84 ulelong >0 \b, at 0x%x
  18034. >>>>84 ulelong >0 \b,
  18035. >>>>>4 ulelong&0x00000001 =0x00000001
  18036. >>>>>>(84.l) lestring16 x InfName "%s"
  18037. >>>>>4 ulelong&0x00000001 !0x00000001
  18038. >>>>>>(84.l) string >\0 InfName "%s"
  18039. #------------------------------------------------------------------------------
  18040. # $File: wireless,v 1.2 2009/09/19 16:28:13 christos Exp $
  18041. # wireless-regdb: file(1) magic for CRDA wireless-regdb file format
  18042. #
  18043. 0 string RGDB CRDA wireless regulatory database file
  18044. >4 belong 19 (Version 1)
  18045. #------------------------------------------------------------------------------
  18046. # $File: wordprocessors,v 1.18 2013/06/03 19:07:29 christos Exp $
  18047. # wordprocessors: file(1) magic fo word processors.
  18048. #
  18049. ####### PWP file format used on Smith Corona Personal Word Processors:
  18050. 2 string \040\040\040\040\040\040\040\040\040\040\040ML4D\040'92 Smith Corona PWP
  18051. >24 byte 2 \b, single spaced
  18052. >24 byte 3 \b, 1.5 spaced
  18053. >24 byte 4 \b, double spaced
  18054. >25 byte 0x42 \b, letter
  18055. >25 byte 0x54 \b, legal
  18056. >26 byte 0x46 \b, A4
  18057. #WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
  18058. 0 string \377WPC\020\000\000\000\022\012\001\001\000\000\000\000 (WP) loadable file
  18059. >15 byte 0 Optimized for Intel
  18060. >15 byte 1 Optimized for Non-Intel
  18061. 1 string WPC (Corel/WP)
  18062. >8 short 257 WordPerfect macro
  18063. >8 short 258 WordPerfect help file
  18064. >8 short 259 WordPerfect keyboard file
  18065. >8 short 266 WordPerfect document
  18066. >8 short 267 WordPerfect dictionary
  18067. >8 short 268 WordPerfect thesaurus
  18068. >8 short 269 WordPerfect block
  18069. >8 short 270 WordPerfect rectangular block
  18070. >8 short 271 WordPerfect column block
  18071. >8 short 272 WordPerfect printer data
  18072. >8 short 275 WordPerfect printer data
  18073. >8 short 276 WordPerfect driver resource data
  18074. >8 short 279 WordPerfect hyphenation code
  18075. >8 short 280 WordPerfect hyphenation data
  18076. >8 short 281 WordPerfect macro resource data
  18077. >8 short 283 WordPerfect hyphenation lex
  18078. >8 short 285 WordPerfect wordlist
  18079. >8 short 286 WordPerfect equation resource data
  18080. >8 short 289 WordPerfect spell rules
  18081. >8 short 290 WordPerfect dictionary rules
  18082. >8 short 295 WordPerfect spell rules (Microlytics)
  18083. >8 short 299 WordPerfect settings file
  18084. >8 short 301 WordPerfect 4.2 document
  18085. >8 short 325 WordPerfect dialog file
  18086. >8 short 332 WordPerfect button bar
  18087. >8 short 513 Shell macro
  18088. >8 short 522 Shell definition
  18089. >8 short 769 Notebook macro
  18090. >8 short 770 Notebook help file
  18091. >8 short 771 Notebook keyboard file
  18092. >8 short 778 Notebook definition
  18093. >8 short 1026 Calculator help file
  18094. >8 short 1538 Calendar help file
  18095. >8 short 1546 Calendar data file
  18096. >8 short 1793 Editor macro
  18097. >8 short 1794 Editor help file
  18098. >8 short 1795 Editor keyboard file
  18099. >8 short 1817 Editor macro resource file
  18100. >8 short 2049 Macro editor macro
  18101. >8 short 2050 Macro editor help file
  18102. >8 short 2051 Macro editor keyboard file
  18103. >8 short 2305 PlanPerfect macro
  18104. >8 short 2306 PlanPerfect help file
  18105. >8 short 2307 PlanPerfect keyboard file
  18106. >8 short 2314 PlanPerfect worksheet
  18107. >8 short 2319 PlanPerfect printer definition
  18108. >8 short 2322 PlanPerfect graphic definition
  18109. >8 short 2323 PlanPerfect data
  18110. >8 short 2324 PlanPerfect temporary printer
  18111. >8 short 2329 PlanPerfect macro resource data
  18112. >8 byte 11 Mail
  18113. >8 short 2818 help file
  18114. >8 short 2821 distribution list
  18115. >8 short 2826 out box
  18116. >8 short 2827 in box
  18117. >8 short 2836 users archived mailbox
  18118. >8 short 2837 archived message database
  18119. >8 short 2838 archived attachments
  18120. >8 short 3083 Printer temporary file
  18121. >8 short 3330 Scheduler help file
  18122. >8 short 3338 Scheduler in file
  18123. >8 short 3339 Scheduler out file
  18124. >8 short 3594 GroupWise settings file
  18125. >8 short 3601 GroupWise directory services
  18126. >8 short 3627 GroupWise settings file
  18127. >8 short 4362 Terminal resource data
  18128. >8 short 4363 Terminal resource data
  18129. >8 short 4395 Terminal resource data
  18130. >8 short 4619 GUI loadable text
  18131. >8 short 4620 graphics resource data
  18132. >8 short 4621 printer settings file
  18133. >8 short 4622 port definition file
  18134. >8 short 4623 print queue parameters
  18135. >8 short 4624 compressed file
  18136. >8 short 5130 Network service msg file
  18137. >8 short 5131 Network service msg file
  18138. >8 short 5132 Async gateway login msg
  18139. >8 short 5134 GroupWise message file
  18140. >8 short 7956 GroupWise admin domain database
  18141. >8 short 7957 GroupWise admin host database
  18142. >8 short 7959 GroupWise admin remote host database
  18143. >8 short 7960 GroupWise admin ADS deferment data file
  18144. >8 short 8458 IntelliTAG (SGML) compiled DTD
  18145. >8 long 18219264 WordPerfect graphic image (1.0)
  18146. >8 long 18219520 WordPerfect graphic image (2.0)
  18147. #end of WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE
  18148. # Hangul (Korean) Word Processor File
  18149. 0 string HWP\ Document\ File Hangul (Korean) Word Processor File 3.0
  18150. # From: Won-Kyu Park <wkpark@kldp.org>
  18151. 512 string R\0o\0o\0t\0 Hangul (Korean) Word Processor File 2000
  18152. !:mime application/x-hwp
  18153. # CosmicBook, from Benoit Rouits
  18154. 0 string CSBK Ted Neslson's CosmicBook hypertext file
  18155. 2 string EYWR AmigaWriter file
  18156. # chi: file(1) magic for ChiWriter files
  18157. 0 string \\1cw\ ChiWriter file
  18158. >5 string >\0 version %s
  18159. 0 string \\1cw ChiWriter file
  18160. # Quark Express from http://www.garykessler.net/library/file_sigs.html
  18161. 2 string IIXPR3 Intel Quark Express Document (English)
  18162. 2 string IIXPRa Intel Quark Express Document (Korean)
  18163. 2 string MMXPR3 Motorola Quark Express Document (English)
  18164. !:mime application/x-quark-xpress-3
  18165. 2 string MMXPRa Motorola Quark Express Document (Korean)
  18166. # adobe indesign (document, whatever...) from querkan
  18167. 0 belong 0x0606edf5 Adobe InDesign
  18168. >16 string DOCUMENT Document
  18169. #------------------------------------------------------------------------------
  18170. # ichitaro456: file(1) magic for Just System Word Processor Ichitaro
  18171. #
  18172. # Contributor kenzo-:
  18173. # Reversed-engineered JS Ichitaro magic numbers
  18174. #
  18175. 0 string DOC
  18176. >43 byte 0x14 Just System Word Processor Ichitaro v4
  18177. !:mime application/x-ichitaro4
  18178. >144 string JDASH application/x-ichitaro4
  18179. 0 string DOC
  18180. >43 byte 0x15 Just System Word Processor Ichitaro v5
  18181. !:mime application/x-ichitaro5
  18182. 0 string DOC
  18183. >43 byte 0x16 Just System Word Processor Ichitaro v6
  18184. !:mime application/x-ichitaro6
  18185. # Type: Freemind mindmap documents
  18186. # From: Jamie Thompson <debian-bugs@jamie-thompson.co.uk>
  18187. 0 string/w \<map\ version Freemind document
  18188. !:mime application/x-freemind
  18189. # Type: Freeplane mindmap documents
  18190. # From: Felix Natter <fnatter@gmx.net>
  18191. 0 string/w \<map\ version="freeplane Freeplane document
  18192. !:mime application/x-freeplane
  18193. # Type: Scribus
  18194. # From: Werner Fink <werner@suse.de>
  18195. 0 string \<SCRIBUSUTF8\ Version Scribus Document
  18196. 0 string \<SCRIBUSUTF8NEW\ Version Scribus Document
  18197. !:mime application/x-scribus
  18198. # help files .hlp compiled from html and used by gfxboot added by Joerg Jenderek
  18199. # markups page=0x04,label=0x12, followed by strings like "opt" or "main" and title=0x14
  18200. 0 ulelong&0x8080FFFF 0x00001204 gfxboot compiled html help file
  18201. #------------------------------------------------------------------------------
  18202. # $File: wsdl,v 1.3 2013/02/06 14:18:52 christos Exp $
  18203. # wsdl: PHP WSDL Cache, http://www.php.net/manual/en/book.soap.php
  18204. # Cache format extracted from source:
  18205. # http://svn.php.net/viewvc/php/php-src/trunk/ext/soap/php_sdl.c?revision=HEAD&view=markup
  18206. # Requires file >= 5.05, see http://mx.gw.com/pipermail/file/2010/000683.html
  18207. # By Elan Ruusamae <glen@delfi.ee>, Patryk Zawadzki <patrys@pld-linux.org>, 2010-2011
  18208. 0 string wsdl PHP WSDL cache,
  18209. >4 byte x version 0x%02x
  18210. >6 ledate x \b, created %s
  18211. # uri
  18212. >10 lelong <0x7fffffff
  18213. >>10 pstring/l x \b, uri: "%s"
  18214. # source
  18215. >>>&0 lelong <0x7fffffff
  18216. >>>>&-4 pstring/l x \b, source: "%s"
  18217. # target_ns
  18218. >>>>>&0 lelong <0x7fffffff
  18219. >>>>>>&-4 pstring/l x \b, target_ns: "%s"
  18220. #------------------------------------------------------------------------------
  18221. # $File: xdelta,v 1.5 2011/08/08 09:01:05 christos Exp $
  18222. # file(1) magic(5) data for xdelta Josh MacDonald <jmacd@CS.Berkeley.EDU>
  18223. #
  18224. 0 string %XDELTA% XDelta binary patch file 0.14
  18225. 0 string %XDZ000% XDelta binary patch file 0.18
  18226. 0 string %XDZ001% XDelta binary patch file 0.20
  18227. 0 string %XDZ002% XDelta binary patch file 1.0
  18228. 0 string %XDZ003% XDelta binary patch file 1.0.4
  18229. 0 string %XDZ004% XDelta binary patch file 1.1
  18230. 0 string \xD6\xC3\xC4\x00 VCDIFF binary diff
  18231. #------------------------------------------------------------------------------
  18232. # $File: xenix,v 1.9 2009/09/19 16:28:13 christos Exp $
  18233. # xenix: file(1) magic for Microsoft Xenix
  18234. #
  18235. # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
  18236. # model" lifted from "magic.xenix", with comment "derived empirically;
  18237. # treat as folklore until proven"
  18238. #
  18239. # "small model", "large model", "huge model" stuff lifted from XXX
  18240. #
  18241. # XXX - "x.out" collides with PDP-11 archives
  18242. #
  18243. 0 string core core file (Xenix)
  18244. 0 byte 0x80 8086 relocatable (Microsoft)
  18245. 0 leshort 0xff65 x.out
  18246. >2 string __.SYMDEF randomized
  18247. >0 byte x archive
  18248. 0 leshort 0x206 Microsoft a.out
  18249. >8 leshort 1 Middle model
  18250. >0x1e leshort &0x10 overlay
  18251. >0x1e leshort &0x2 separate
  18252. >0x1e leshort &0x4 pure
  18253. >0x1e leshort &0x800 segmented
  18254. >0x1e leshort &0x400 standalone
  18255. >0x1e leshort &0x8 fixed-stack
  18256. >0x1c byte &0x80 byte-swapped
  18257. >0x1c byte &0x40 word-swapped
  18258. >0x10 lelong >0 not-stripped
  18259. >0x1e leshort ^0xc000 pre-SysV
  18260. >0x1e leshort &0x4000 V2.3
  18261. >0x1e leshort &0x8000 V3.0
  18262. >0x1c byte &0x4 86
  18263. >0x1c byte &0xb 186
  18264. >0x1c byte &0x9 286
  18265. >0x1c byte &0xa 386
  18266. >0x1f byte <0x040 small model
  18267. >0x1f byte =0x048 large model
  18268. >0x1f byte =0x049 huge model
  18269. >0x1e leshort &0x1 executable
  18270. >0x1e leshort ^0x1 object file
  18271. >0x1e leshort &0x40 Large Text
  18272. >0x1e leshort &0x20 Large Data
  18273. >0x1e leshort &0x120 Huge Objects Enabled
  18274. >0x10 lelong >0 not stripped
  18275. 0 leshort 0x140 old Microsoft 8086 x.out
  18276. >0x3 byte &0x4 separate
  18277. >0x3 byte &0x2 pure
  18278. >0 byte &0x1 executable
  18279. >0 byte ^0x1 relocatable
  18280. >0x14 lelong >0 not stripped
  18281. 0 lelong 0x206 b.out
  18282. >0x1e leshort &0x10 overlay
  18283. >0x1e leshort &0x2 separate
  18284. >0x1e leshort &0x4 pure
  18285. >0x1e leshort &0x800 segmented
  18286. >0x1e leshort &0x400 standalone
  18287. >0x1e leshort &0x1 executable
  18288. >0x1e leshort ^0x1 object file
  18289. >0x1e leshort &0x4000 V2.3
  18290. >0x1e leshort &0x8000 V3.0
  18291. >0x1c byte &0x4 86
  18292. >0x1c byte &0xb 186
  18293. >0x1c byte &0x9 286
  18294. >0x1c byte &0x29 286
  18295. >0x1c byte &0xa 386
  18296. >0x1e leshort &0x4 Large Text
  18297. >0x1e leshort &0x2 Large Data
  18298. >0x1e leshort &0x102 Huge Objects Enabled
  18299. 0 leshort 0x580 XENIX 8086 relocatable or 80286 small model
  18300. #------------------------------------------------------------------------------
  18301. # $File: xilinx,v 1.6 2013/11/19 23:15:13 christos Exp $
  18302. # This is Aaron's attempt at a MAGIC file for Xilinx .bit files.
  18303. # Xilinx-Magic@RevRagnarok.com
  18304. # Got the info from FPGA-FAQ 0026
  18305. #
  18306. # Rewritten to use pstring/H instead of hardcoded lengths by O. Freyermuth,
  18307. # fixes at least reading of bitfiles from Spartan 2, 3, 6.
  18308. # http://www.fpga-faq.com/FAQ_Pages/0026_Tell_me_about_bit_files.htm
  18309. #
  18310. # First there is the sync header and its length
  18311. 0 beshort 0x0009
  18312. >2 belong =0x0ff00ff0
  18313. >>&0 belong =0x0ff00ff0
  18314. >>>&0 byte =0x00
  18315. >>>&1 beshort =0x0001
  18316. >>>&3 string a Xilinx BIT data
  18317. # Next is a Pascal-style string with the NCD name. We want to capture that.
  18318. >>>>&0 pstring/H x - from %s
  18319. # And then 'b'
  18320. >>>>>&1 string b
  18321. # Then the model / part number:
  18322. >>>>>>&0 pstring/H x - for %s
  18323. # Then 'c'
  18324. >>>>>>>&1 string c
  18325. # Then the build-date
  18326. >>>>>>>>&0 pstring/H x - built %s
  18327. # Then 'd'
  18328. >>>>>>>>>&1 string d
  18329. # Then the build-time
  18330. >>>>>>>>>>&0 pstring/H x \b(%s)
  18331. # Then 'e'
  18332. >>>>>>>>>>>&1 string e
  18333. # And length of data
  18334. >>>>>>>>>>>>&0 belong x - data length 0x%lx
  18335. # Raw bitstream files
  18336. 0 long 0xffffffff
  18337. >&0 belong 0xaa995566 Xilinx RAW bitstream (.BIN)
  18338. #------------------------------------------------------------------------------
  18339. # $File: xo65,v 1.4 2009/09/19 16:28:13 christos Exp $
  18340. # xo65 object files
  18341. # From: "Ullrich von Bassewitz" <uz@cc65.org>
  18342. #
  18343. 0 string \x55\x7A\x6E\x61 xo65 object,
  18344. >4 leshort x version %d,
  18345. >6 leshort&0x0001 =0x0001 with debug info
  18346. >6 leshort&0x0001 =0x0000 no debug info
  18347. # xo65 library files
  18348. 0 string \x6E\x61\x55\x7A xo65 library,
  18349. >4 leshort x version %d
  18350. # o65 object files
  18351. 0 string \x01\x00\x6F\x36\x35 o65
  18352. >6 leshort&0x1000 =0x0000 executable,
  18353. >6 leshort&0x1000 =0x1000 object,
  18354. >5 byte x version %d,
  18355. >6 leshort&0x8000 =0x8000 65816,
  18356. >6 leshort&0x8000 =0x0000 6502,
  18357. >6 leshort&0x2000 =0x2000 32 bit,
  18358. >6 leshort&0x2000 =0x0000 16 bit,
  18359. >6 leshort&0x4000 =0x4000 page reloc,
  18360. >6 leshort&0x4000 =0x0000 byte reloc,
  18361. >6 leshort&0x0003 =0x0000 alignment 1
  18362. >6 leshort&0x0003 =0x0001 alignment 2
  18363. >6 leshort&0x0003 =0x0002 alignment 4
  18364. >6 leshort&0x0003 =0x0003 alignment 256
  18365. #------------------------------------------------------------------------------
  18366. # $File: xwindows,v 1.8 2013/02/08 17:25:57 christos Exp $
  18367. # xwindows: file(1) magic for various X/Window system file formats.
  18368. # Compiled X Keymap
  18369. # XKM (compiled X keymap) files (including version and byte ordering)
  18370. 1 string mkx Compiled XKB Keymap: lsb,
  18371. >0 byte >0 version %d
  18372. >0 byte =0 obsolete
  18373. 0 string xkm Compiled XKB Keymap: msb,
  18374. >3 byte >0 version %d
  18375. >3 byte =0 obsolete
  18376. # xfsdump archive
  18377. 0 string xFSdump0 xfsdump archive
  18378. >8 belong x (version %d)
  18379. # Jaleo XFS files
  18380. 0 long 395726 Jaleo XFS file
  18381. >4 long x - version %ld
  18382. >8 long x - [%ld -
  18383. >20 long x \b%ldx
  18384. >24 long x \b%ldx
  18385. >28 long 1008 \bYUV422]
  18386. >28 long 1000 \bRGB24]
  18387. # Xcursor data
  18388. # X11 mouse cursor format defined in libXcursor, see
  18389. # http://www.x.org/archive/X11R6.8.1/doc/Xcursor.3.html
  18390. # http://cgit.freedesktop.org/xorg/lib/libXcursor/tree/include/X11/Xcursor/Xcursor.h
  18391. 0 string Xcur Xcursor data
  18392. !:mime image/x-xcursor
  18393. >10 leshort x version %hd
  18394. >>8 leshort x \b.%hd
  18395. #------------------------------------------------------------------------------
  18396. # zfs: file(1) magic for ZFS dumps
  18397. #
  18398. # From <rea-fbsd@codelabs.ru>
  18399. # ZFS dump header has the following structure (as per zfs_ioctl.h
  18400. # in FreeBSD with drr_type is set to DRR_BEGIN)
  18401. #
  18402. # enum {
  18403. # DRR_BEGIN, DRR_OBJECT, DRR_FREEOBJECTS,
  18404. # DRR_WRITE, DRR_FREE, DRR_END,
  18405. # } drr_type;
  18406. # uint32_t drr_pad;
  18407. # uint64_t drr_magic;
  18408. # uint64_t drr_version;
  18409. # uint64_t drr_creation_time;
  18410. # dmu_objset_type_t drr_type;
  18411. # uint32_t drr_pad;
  18412. # uint64_t drr_toguid;
  18413. # uint64_t drr_fromguid;
  18414. # char drr_toname[MAXNAMELEN];
  18415. #
  18416. # Backup magic is 0x00000002f5bacbac (quad word)
  18417. # The drr_type is defined as
  18418. # typedef enum dmu_objset_type {
  18419. # DMU_OST_NONE,
  18420. # DMU_OST_META,
  18421. # DMU_OST_ZFS,
  18422. # DMU_OST_ZVOL,
  18423. # DMU_OST_OTHER, /* For testing only! */
  18424. # DMU_OST_ANY, /* Be careful! */
  18425. # DMU_OST_NUMTYPES
  18426. # } dmu_objset_type_t;
  18427. #
  18428. # Almost all uint64_t fields are printed as the 32-bit ones (with high
  18429. # 32 bits zeroed), because there is no simple way to print them as the
  18430. # full 64-bit values.
  18431. # Big-endian values
  18432. 8 string \000\000\000\002\365\272\313\254 ZFS shapshot (big-endian machine),
  18433. >20 belong x version %lu,
  18434. >32 belong 0 type: NONE,
  18435. >32 belong 1 type: META,
  18436. >32 belong 2 type: ZFS,
  18437. >32 belong 3 type: ZVOL,
  18438. >32 belong 4 type: OTHER,
  18439. >32 belong 5 type: ANY,
  18440. >32 belong >5 type: UNKNOWN (%lu),
  18441. >40 byte x destination GUID: %02X
  18442. >41 byte x %02X
  18443. >42 byte x %02X
  18444. >43 byte x %02X
  18445. >44 byte x %02X
  18446. >45 byte x %02X
  18447. >46 byte x %02X
  18448. >47 byte x %02X,
  18449. >48 ulong >0
  18450. >>52 ulong >0
  18451. >>>48 byte x source GUID: %02X
  18452. >>>49 byte x %02X
  18453. >>>50 byte x %02X
  18454. >>>51 byte x %02X
  18455. >>>52 byte x %02X
  18456. >>>53 byte x %02X
  18457. >>>54 byte x %02X
  18458. >>>55 byte x %02X,
  18459. >56 string >\0 name: '%s'
  18460. # Little-endian values
  18461. 8 string \254\313\272\365\002\000\000\000 ZFS shapshot (little-endian machine),
  18462. >16 lelong x version %lu,
  18463. >32 lelong 0 type: NONE,
  18464. >32 lelong 1 type: META,
  18465. >32 lelong 2 type: ZFS,
  18466. >32 lelong 3 type: ZVOL,
  18467. >32 lelong 4 type: OTHER,
  18468. >32 lelong 5 type: ANY,
  18469. >32 lelong >5 type: UNKNOWN (%lu),
  18470. >47 byte x destination GUID: %02X
  18471. >46 byte x %02X
  18472. >45 byte x %02X
  18473. >44 byte x %02X
  18474. >43 byte x %02X
  18475. >42 byte x %02X
  18476. >41 byte x %02X
  18477. >40 byte x %02X,
  18478. >48 ulong >0
  18479. >>52 ulong >0
  18480. >>>55 byte x source GUID: %02X
  18481. >>>54 byte x %02X
  18482. >>>53 byte x %02X
  18483. >>>52 byte x %02X
  18484. >>>51 byte x %02X
  18485. >>>50 byte x %02X
  18486. >>>49 byte x %02X
  18487. >>>48 byte x %02X,
  18488. >56 string >\0 name: '%s'
  18489. #------------------------------------------------------------------------------
  18490. # $File: zilog,v 1.7 2009/09/19 16:28:13 christos Exp $
  18491. # zilog: file(1) magic for Zilog Z8000.
  18492. #
  18493. # Was it big-endian or little-endian? My Product Specification doesn't
  18494. # say.
  18495. #
  18496. 0 long 0xe807 object file (z8000 a.out)
  18497. 0 long 0xe808 pure object file (z8000 a.out)
  18498. 0 long 0xe809 separate object file (z8000 a.out)
  18499. 0 long 0xe805 overlay object file (z8000 a.out)
  18500. #------------------------------------------------------------------------------
  18501. # $File: zyxel,v 1.6 2009/09/19 16:28:13 christos Exp $
  18502. # zyxel: file(1) magic for ZyXEL modems
  18503. #
  18504. # From <rob@pe1chl.ampr.org>
  18505. # These are the /etc/magic entries to decode datafiles as used for the
  18506. # ZyXEL U-1496E DATA/FAX/VOICE modems. (This header conforms to a
  18507. # ZyXEL-defined standard)
  18508. 0 string ZyXEL\002 ZyXEL voice data
  18509. >10 byte 0 - CELP encoding
  18510. >10 byte&0x0B 1 - ADPCM2 encoding
  18511. >10 byte&0x0B 2 - ADPCM3 encoding
  18512. >10 byte&0x0B 3 - ADPCM4 encoding
  18513. >10 byte&0x0B 8 - New ADPCM3 encoding
  18514. >10 byte&0x04 4 with resync