magic.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. #
  2. #------------------------------------------------------------------------------
  3. ### author: Wiimm, 2012-09-20
  4. ### info: man magic(5) file(1)
  5. ### append to: /etc/magic
  6. ### download: http://wit.wiimm.de/download/magic.txt
  7. #------------------------------------------------------------------------------
  8. # ISO image of a GameCube disc
  9. # Created by: Wiimm, www.wiimm.de, 2012-09-19
  10. 0x1c belong 0xc2339f3d
  11. >0 regex =^[A-Z0-9]{6} GameCube ISO image
  12. !:mime application/x-gamecube-iso-image
  13. >>0x00 string x '%.6s'
  14. >>0x20 string x %.64s
  15. #------------------------------------------------------------------------------
  16. # ISO image of a Wii disc
  17. # Created by: Wiimm, www.wiimm.de, 2012-09-19
  18. 0x18 belong 0x5d1c9ea3
  19. >0 regex =^[A-Z0-9]{6} Wii ISO image
  20. !:mime application/x-wii-iso-image
  21. >>0x00 string x '%.6s'
  22. >>0x20 string x %.64s
  23. #------------------------------------------------------------------------------
  24. # WBFS == Wii Backup File System
  25. # Created by: Wiimm, www.wiimm.de, 2012-09-19
  26. 0 string WBFS WBFS
  27. !:mime application/x-wbfs
  28. >10 byte x v%u
  29. >8 byte 9 \b, hss 512
  30. >8 byte 10 \b, hss 1K
  31. >8 byte 11 \b, hss 2K
  32. >8 byte 12 \b, hss 4K
  33. >8 byte 13 \b, hss 8K
  34. >8 byte 14 \b, hss 16K
  35. >8 byte <9 \b, hss 2^%u
  36. >8 byte >14 \b, hss 2^%u
  37. >9 byte 20 \b, wss 1M
  38. >9 byte 21 \b, wss 2M
  39. >9 byte 22 \b, wss 4M
  40. >9 byte 23 \b, wss 8M
  41. >9 byte 24 \b, wss 16M
  42. >9 byte 25 \b, wss 32M
  43. >9 byte 26 \b, wss 64M
  44. >9 byte >26 \b, wss 2^%u
  45. >9 byte <20 \b, wss 2^%u
  46. >12 quad !1 \b, multi disc archive
  47. >12 quad =1
  48. >>0x200 regex =^[A-Z0-9]{6}
  49. >>>0x21c belong 0xc2339f3d
  50. >>>>0x200 string x \b, GC '%.6s'
  51. >>>>0x220 string x %.64s
  52. >>>0x218 belong 0x5d1c9ea3
  53. >>>>0x200 string x \b, Wii '%.6s'
  54. >>>>0x220 string x %.64s
  55. #------------------------------------------------------------------------------
  56. # WDF == Wii(mms) Disc File
  57. # Created by: Wiimm, www.wiimm.de, 2012-09-19
  58. 0 string WII\001DISC WDF
  59. !:mime application/x-wdf
  60. >8 belong x v%u,
  61. >24 bequad x v-size %lld,
  62. >44 belong x %u chunks
  63. >0x38 regex =^[A-Z0-9]{6}
  64. >>0x54 belong 0xc2339f3d
  65. >>>0x38 string x \b, GC '%.6s'
  66. >>>0x58 string x %.64s
  67. >>0x50 belong 0x5d1c9ea3
  68. >>>0x38 string x \b, Wii '%.6s'
  69. >>>0x58 string x %.64s
  70. #------------------------------------------------------------------------------
  71. # WIA == Wii(mms) ISO Achive
  72. # Created by: Wiimm, www.wiimm.de, 2012-09-19
  73. 0 string WIA\001 WIA
  74. !:mime application/x-wia
  75. >4 byte x v%u
  76. >5 byte x \b.%02x
  77. >0x4c belong 0 NONE
  78. >0x4c belong 1 PURGE
  79. >0x4c belong 2 BZIP2
  80. >0x4c belong 3 LZMA
  81. >0x4c belong 4 LZMA2
  82. >0x4c belong >4 ?
  83. >0x50 belong x \b.%u
  84. >0x54 belong 0x0200000 \b@1
  85. >0x54 belong !0x0200000
  86. >>0x54 belong 0x0a00000 \b@5
  87. >>0x54 belong !0x0a00000
  88. >>>0x54 belong 0x1400000 \b@10
  89. >>>0x54 belong !0x1400000
  90. >>>>0x54 belong 0x2800000 \b@20
  91. >>>>0x54 belong !0x2800000
  92. >>>>>0x54 belong 0x3c00000 \b@30
  93. >>>>>0x54 belong !0x3c00000
  94. >>>>>>0x54 belong 0x5000000 \b@40
  95. >>>>>>0x54 belong !0x5000000
  96. >>>>>>>0x54 belong 0x6400000 \b@50
  97. >>>>>>>0x54 belong !0x6400000
  98. >>>>>>>>0x54 belong x \b, c-size %x
  99. >0x24 bequad x \b, v-size %llu
  100. >0x58 regex =^[A-Z0-9]{6}
  101. >>0x74 belong 0xc2339f3d
  102. >>>0x58 string x \b, GC '%.6s'
  103. >>>0x78 string x %.64s
  104. >>0x70 belong 0x5d1c9ea3
  105. >>>0x58 string x \b, Wii '%.6s'
  106. >>>0x78 string x %.64s
  107. #------------------------------------------------------------------------------