database (267897) | database (275698) |
---|---|
1 2#------------------------------------------------------------------------------ | 1 2#------------------------------------------------------------------------------ |
3# $File: database,v 1.41 2014/06/03 19:17:27 christos Exp $ | 3# $File: database,v 1.43 2014/10/28 15:47:39 christos Exp $ |
4# database: file(1) magic for various databases 5# 6# extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk) 7# 8# 9# GDBM magic numbers 10# Will be maintained as part of the GDBM distribution in the future. 11# <downsj@teeny.org> | 4# database: file(1) magic for various databases 5# 6# extracted from header/code files by Graeme Wilford (eep2gw@ee.surrey.ac.uk) 7# 8# 9# GDBM magic numbers 10# Will be maintained as part of the GDBM distribution in the future. 11# <downsj@teeny.org> |
120 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian | 120 belong 0x13579acd GNU dbm 1.x or ndbm database, big endian, 32-bit |
13!:mime application/x-gdbm | 13!:mime application/x-gdbm |
140 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian | 140 belong 0x13579ace GNU dbm 1.x or ndbm database, big endian, old |
15!:mime application/x-gdbm | 15!:mime application/x-gdbm |
160 belong 0x13579acf GNU dbm 1.x or ndbm database, big endian, 64-bit 17!:mime application/x-gdbm 180 lelong 0x13579acd GNU dbm 1.x or ndbm database, little endian, 32-bit 19!:mime application/x-gdbm 200 lelong 0x13579ace GNU dbm 1.x or ndbm database, little endian, old 21!:mime application/x-gdbm 220 lelong 0x13579acf GNU dbm 1.x or ndbm database, little endian, 64-bit 23!:mime application/x-gdbm |
|
160 string GDBM GNU dbm 2.x database 17!:mime application/x-gdbm 18# 19# Berkeley DB 20# 21# Ian Darwin's file /etc/magic files: big/little-endian version. 22# 23# Hash 1.85/1.86 databases store metadata in network byte order. --- 173 unchanged lines hidden (view full) --- 197>>>>>>>>>>>>8 uleshort >0 198>>>>>>>>>>>>(8.s+1) ubyte >0 199>>>>>>>>>>>>>8 uleshort >0 \b, at offset %d 200>>>>>>>>>>>>>(8.s+1) ubyte >0 201>>>>>>>>>>>>>>&-1 string >\0 1st record "%s" 202# for multiple index files (*.MDX) Production flag,tag numbers(<=0x30),tag length(<=0x20), reserverd (NULL) 203>>>>>>>24 ubelong&0x0133f7ff >0 204# test for reserved NULL byte | 240 string GDBM GNU dbm 2.x database 25!:mime application/x-gdbm 26# 27# Berkeley DB 28# 29# Ian Darwin's file /etc/magic files: big/little-endian version. 30# 31# Hash 1.85/1.86 databases store metadata in network byte order. --- 173 unchanged lines hidden (view full) --- 205>>>>>>>>>>>>8 uleshort >0 206>>>>>>>>>>>>(8.s+1) ubyte >0 207>>>>>>>>>>>>>8 uleshort >0 \b, at offset %d 208>>>>>>>>>>>>>(8.s+1) ubyte >0 209>>>>>>>>>>>>>>&-1 string >\0 1st record "%s" 210# for multiple index files (*.MDX) Production flag,tag numbers(<=0x30),tag length(<=0x20), reserverd (NULL) 211>>>>>>>24 ubelong&0x0133f7ff >0 212# test for reserved NULL byte |
205>>>>>>>>47 ubyte x | 213>>>>>>>>47 ubyte 0 |
206# test for valid TAG key format (0x10 or 0) 207>>>>>>>>>559 ubyte&0xeF 0 208# test MM <= 12 | 214# test for valid TAG key format (0x10 or 0) 215>>>>>>>>>559 ubyte&0xeF 0 216# test MM <= 12 |
209>>>>>>>>>45 ubeshort <0x0C20 210>>>>>>>>>>45 ubyte >0 211>>>>>>>>>>>46 ubyte <32 212>>>>>>>>>>>>46 ubyte >0 | 217>>>>>>>>>>45 ubeshort <0x0C20 218>>>>>>>>>>>45 ubyte >0 219>>>>>>>>>>>>46 ubyte <32 220>>>>>>>>>>>>>46 ubyte >0 |
213#!:mime application/x-mdx | 221#!:mime application/x-mdx |
214>>>>>>>>>>>>>0 use xbase-type 215>>>>>>>>>>>>>0 ubyte x \b MDX 216>>>>>>>>>>>>>1 ubyte x \b, creation-date 217>>>>>>>>>>>>>1 use xbase-date 218>>>>>>>>>>>>>44 ubyte x \b, update-date 219>>>>>>>>>>>>>44 use xbase-date | 222>>>>>>>>>>>>>>0 use xbase-type 223>>>>>>>>>>>>>>0 ubyte x \b MDX 224>>>>>>>>>>>>>>1 ubyte x \b, creation-date 225>>>>>>>>>>>>>>1 use xbase-date 226>>>>>>>>>>>>>>44 ubyte x \b, update-date 227>>>>>>>>>>>>>>44 use xbase-date |
220# No.of tags in use (1,2,5,12) | 228# No.of tags in use (1,2,5,12) |
221>>>>>>>>>>>>>28 uleshort x \b, %d | 229>>>>>>>>>>>>>>28 uleshort x \b, %d |
222# No. of entries in tag (0x30) | 230# No. of entries in tag (0x30) |
223>>>>>>>>>>>>>25 ubyte x \b/%d tags | 231>>>>>>>>>>>>>>25 ubyte x \b/%d tags |
224# Length of tag | 232# Length of tag |
225>>>>>>>>>>>>>26 ubyte x * %d | 233>>>>>>>>>>>>>>26 ubyte x * %d |
226# 1st tag name_ 227>>>>>>>>>>>>>548 string x \b, 1st tag "%.11s" 228# 2nd tag name 229#>>>>>>>>>>>>(26.b+548) string x \b, 2nd tag "%.11s" 230# 231# Print the xBase names of different version variants 2320 name xbase-type 233>0 ubyte <2 --- 98 unchanged lines hidden (view full) --- 332>>>0 ulelong >0 333# skip many JPG. ZIP, BZ2 by test for reserved bytes NULL , 0|2 , 0|1 , low byte of block size 334>>>>17 ubelong&0xFFfdFE00 0x00000000 335# skip many RAR by test for low byte 0 ,high byte 0|2|even of block size, 0|a|e|d7 , 0|64h 336>>>>>20 ubelong&0xFF01209B 0x00000000 337# dBASE III 338>>>>>>16 ubyte 3 339# dBASE III DBT | 234# 1st tag name_ 235>>>>>>>>>>>>>548 string x \b, 1st tag "%.11s" 236# 2nd tag name 237#>>>>>>>>>>>>(26.b+548) string x \b, 2nd tag "%.11s" 238# 239# Print the xBase names of different version variants 2400 name xbase-type 241>0 ubyte <2 --- 98 unchanged lines hidden (view full) --- 340>>>0 ulelong >0 341# skip many JPG. ZIP, BZ2 by test for reserved bytes NULL , 0|2 , 0|1 , low byte of block size 342>>>>17 ubelong&0xFFfdFE00 0x00000000 343# skip many RAR by test for low byte 0 ,high byte 0|2|even of block size, 0|a|e|d7 , 0|64h 344>>>>>20 ubelong&0xFF01209B 0x00000000 345# dBASE III 346>>>>>>16 ubyte 3 347# dBASE III DBT |
340>>>>>>>0 use xbase-memo-print 341# dBASE IV DBT , FoxPro FPT or many PNG , ZIP , DBF garbage | 348>>>>>>>0 use dbase3-memo-print 349# dBASE III DBT without version, dBASE IV DBT , FoxPro FPT , or many ZIP , DBF garbage |
342>>>>>>16 ubyte 0 | 350>>>>>>16 ubyte 0 |
343# dBASE IV DBT with DBF name or DBF garbage 344>>>>>>>8 ubelong >0x40000000 345# skip DBF and catch dBASE IV DBT with DBF name and with non big index of next free block 346>>>>>>>>0 ulelong <0x01010002 347>>>>>>>>>0 use xbase-memo-print 348>>>>>>>8 ubelong 0 | 351# unusual dBASE III DBT like angest.dbt, dBASE IV DBT with block size 0 , FoxPro FPT , or garbage PCX DBF 352>>>>>>>20 uleshort 0 353# FoxPro FPT , unusual dBASE III DBT like biblio.dbt or garbage 354>>>>>>>>8 ulong =0 355>>>>>>>>>6 ubeshort >0 356# skip emacs.PIF 357>>>>>>>>>>4 ushort 0 358>>>>>>>>>>>0 use foxpro-memo-print 359# dBASE III DBT , garbage 360>>>>>>>>>6 ubeshort 0 |
349# skip MM*DD*.bin by test for for reserved NULL byte | 361# skip MM*DD*.bin by test for for reserved NULL byte |
350>>>>>>>>508 ubelong 0 351# real memo files should contain text here 352>>>>>>>>>520 ubelong >0x20202019 353>>>>>>>>>>520 ubelong <0xFEFEFEFF 354>>>>>>>>>>>0 use xbase-memo-print 355# garbage PCX , ZIP , JAR , XPI 356>>>>>>>8 default x | 362>>>>>>>>>>510 ubeshort 0 363# skip TK-DOS11.img image by looking for memo text 364>>>>>>>>>>>512 ubelong <0xfeffff03 365# skip EFI executables by looking for memo text 366>>>>>>>>>>>>512 ubelong >0x1F202020 367>>>>>>>>>>>>>513 ubyte >0 368# unusual dBASE III DBT like adressen.dbt 369>>>>>>>>>>>>>>0 use dbase3-memo-print 370# dBASE III DBT like angest.dbt, or garbage PCX DBF 371>>>>>>>>8 ubelong !0 372# skip PCX and some DBF by test for for reserved NULL bytes 373>>>>>>>>>510 ubeshort 0 374# skip some DBF by test of invalid version 375>>>>>>>>>>0 ubyte >5 376>>>>>>>>>>>0 ubyte <48 377>>>>>>>>>>>>0 use dbase3-memo-print 378# dBASE IV DBT with positive block size 379>>>>>>>20 uleshort >0 380>>>>>>>>0 use dbase4-memo-print |
357 | 381 |
358# Print the information of dBase DBT or FoxPro FPT memo files 3590 name xbase-memo-print 360>0 ubyte x 361# test version 362# memo file 363>>16 ubyte 3 dBase III DBT 364>>16 ubyte 0 365>>>512 ubelong <0x00000003 FoxPro FPT 366# Size of blocks for FoxPro 367>>>>6 ubeshort x \b, blocks size %u 368# Number of next available block for appending data for FoxPro 369>>>>0 ubelong =0 \b, next free block index %u 370>>>>0 ubelong !0 \b, next free block index %u 371>>>512 default x dBase IV DBT 372# DBF file name without extension 373>>>>8 string >\0 \b of %-.8s.DBF 374# size of blocks ; not reliable 0x2020204C 375#>>>>4 ulelong =0 \b, blocks size %u 376>>>>4 ulelong !0 \b, blocks size %u 377# Block length found 0 , 512 378#>>>>20 uleshort =0 \b, block length %u 379>>>>20 uleshort !0 \b, block length %u | 382# Print the information of dBase III DBT memo file 3830 name dbase3-memo-print 384>0 ubyte x dBase III DBT 385# instead 3 as version number 0 for unusual examples like biblio.dbt 386>16 ubyte !3 \b, version number %u |
380# Number of next available block for appending data | 387# Number of next available block for appending data |
381>>>>0 ulelong =0 \b, next free block index %u 382>>>>0 ulelong !0 \b, next free block index %u 383>>512 ubelong x 384>>>512 ubelong =0xFFFF0800 385>>>>520 string >\0 \b, 1st used item "%s" 386# FoxPro 387>>>512 ubelong <3 388# FoxPro memo 389>>>>512 ubelong =1 390>>>>520 string >\0 \b, 1st used item "%s" 391>>>512 default x 392# may be deleted memo field 393>>>>512 string >\0 \b, 1st item "%s" | 388#>0 lelong =0 \b, next free block index %u 389>0 lelong !0 \b, next free block index %u 390# no positiv block length 391#>20 uleshort =0 \b, block length %u 392>20 uleshort !0 \b, block length %u 393# dBase III memo field terminated by \032\032 394>512 string >\0 \b, 1st item "%s" 395# Print the information of dBase IV DBT memo file 3960 name dbase4-memo-print 397>0 lelong x dBase IV DBT 398# 8 character shorted main name of coresponding dBASE IV DBF file 399>8 ubelong >0x20000000 400# skip unusual like for angest.dbt 401>>20 uleshort >0 402>>>8 string >\0 \b of %-.8s.DBF 403# value 0 implies 512 as size 404#>4 ulelong =0 \b, blocks size %u 405# size of blocks not reliable like 0x2020204C in angest.dbt 406>4 ulelong !0 407>>4 ulelong&0x0000003f 0 \b, blocks size %u 408# dBase IV DBT with positive block length (found 512 , 1024) 409>20 uleshort >0 \b, block length %u 410# next available block 411#>0 lelong =0 \b, next free block index %u 412>0 lelong !0 \b, next free block index %u 413>20 uleshort >0 414>>(20.s) ubelong x 415>>>&-4 use dbase4-memofield-print 416# unusual dBase IV DBT without block length (implies 512 as length) 417>20 uleshort =0 418>>512 ubelong x 419>>>&-4 use dbase4-memofield-print 420# Print the information of dBase IV memo field 4210 name dbase4-memofield-print 422# free dBase IV memo field 423>0 ubelong !0xFFFF0800 424>>0 lelong x \b, next free block %u 425>>4 lelong x \b, next used block %u 426# used dBase IV memo field 427>0 ubelong =0xFFFF0800 428# length of memo field 429>>4 lelong x \b, field length %d 430>>>8 string >\0 \b, 1st used item "%s" 431# Print the information of FoxPro FPT memo file 4320 name foxpro-memo-print 433>0 belong x FoxPro FPT 434# Size of blocks for FoxPro ( 64,256 ) 435>6 ubeshort x \b, blocks size %u 436# next available block 437#>0 belong =0 \b, next free block index %u 438>0 belong !0 \b, next free block index %u 439# field type ( 0~picture, 1~memo, 2~object ) 440>512 ubelong <3 \b, field type %u 441# length of memo field 442>512 ubelong 1 443>>516 belong >0 \b, field length %d 444>>>520 string >\0 \b, 1st item "%s" |
394 395# TODO: 396# DBASE index file *.NDX 397# DBASE Compound Index file *.CDX 398# dBASE IV Printer Driver *.PRF 399## End of XBase database stuff 400 401# MS Access database --- 89 unchanged lines hidden --- | 445 446# TODO: 447# DBASE index file *.NDX 448# DBASE Compound Index file *.CDX 449# dBASE IV Printer Driver *.PRF 450## End of XBase database stuff 451 452# MS Access database --- 89 unchanged lines hidden --- |