1672082456.FILE5_44-5-g813b3304.pr-410-pandrew-add-bitcoin-and-leveldb-support.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. Subject: PR/410: pandrew: Add bitcoin and leveldb support
  2. Origin: FILE5_44-5-g813b3304 <https://github.com/file/file/commit/FILE5_44-5-g813b3304>
  3. Upstream-Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Mon Dec 26 19:20:56 2022 +0000
  5. --- a/magic/Magdir/crypto
  6. +++ b/magic/Magdir/crypto
  7. @@ -3,3 +3,29 @@
  8. # $File: crypto,v 1.2 2021/03/27 20:15:53 christos Exp $
  9. # crypto: file(1) magic for crypto formats
  10. #
  11. +# Bitcoin block files
  12. +0 lelong 0xD9B4BEF9 Bitcoin
  13. +>(4.l+40) lelong 0xD9B4BEF9 reverse block
  14. +>>4 lelong x \b, size %u
  15. +# normal block below
  16. +>0 default x block
  17. +>>4 lelong x \b, size %u
  18. +>>8 lelong&0xE0000000 0x20000000
  19. +>>>8 lelong x \b, BIP9 0x%x
  20. +>>8 lelong&0xE0000000 !0x20000000
  21. +>>>8 lelong x \b, version 0x%x
  22. +>>76 ledate x \b, %s UTC
  23. +# VarInt counter
  24. +>>88 ubyte <0xfd \b, txcount %u
  25. +>>88 ubyte 0xfd
  26. +>>>89 leshort x \b, txcount %u
  27. +>>88 ubyte 0xfe
  28. +>>>89 lelong x \b, txcount %u
  29. +>>88 ubyte 0xff
  30. +>>>89 lequad x \b, txcount %llu
  31. +!:ext dat
  32. +# option to find more blocks in the file
  33. +#>>(4.l+8) indirect x ;
  34. +
  35. +# LevelDB
  36. +-8 lequad 0xdb4775248b80fb57 LevelDB table data