javascript 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #------------------------------------------------------------------------------
  2. # $File: javascript,v 1.4 2022/09/02 08:08:17 christos Exp $
  3. # javascript: magic for javascript and node.js scripts.
  4. #
  5. 0 string/w #!/bin/node Node.js script text executable
  6. !:mime application/javascript
  7. 0 string/w #!/usr/bin/node Node.js script text executable
  8. !:mime application/javascript
  9. 0 string/w #!/bin/nodejs Node.js script text executable
  10. !:mime application/javascript
  11. 0 string/w #!/usr/bin/nodejs Node.js script text executable
  12. !:mime application/javascript
  13. 0 string #!/usr/bin/env\ node Node.js script text executable
  14. !:mime application/javascript
  15. 0 string #!/usr/bin/env\ nodejs Node.js script text executable
  16. !:mime application/javascript
  17. # Hermes by Facebook https://hermesengine.dev/
  18. # https://github.com/facebook/hermes/blob/master/include/hermes/\
  19. # BCGen/HBC/BytecodeFileFormat.h#L24
  20. 0 lequad 0x1F1903C103BC1FC6 Hermes JavaScript bytecode
  21. >8 lelong x \b, version %d
  22. # v8 JavaScript engine bytecode
  23. # From: Alexandre Iooss <erdnaxe@crans.org>
  24. # URL: https://v8.dev/docs/ignition
  25. # Note: used in bytenode and NW.js protected source code
  26. # V8 bytecode extraction was added in NodeJS v5.7.0 (V8 4.6.85.31).
  27. # Version information is provided for some v8 versions found in NodeJS releases.
  28. 2 uleshort =0xC0DE
  29. >0 ulelong^0xC0DE0000 >0
  30. # Reservation table starts at 40
  31. >>40 ulelong&0xFFFFFF00 =0x80000000
  32. # Stub keys present
  33. >>>24 ulelong >0
  34. >>>>0 ulelong^0xC0DE0000 x v8 bytecode, external reference table size: %u bytes,
  35. >>>>4 ulelong =0xEE4BF478 version 5.1.281.111,
  36. >>>>4 ulelong =0xC4A0100C version 5.5.372.43,
  37. >>>>8 ulelong x source size: %u bytes,
  38. >>>>12 ulelong x cpu features: %#08X,
  39. >>>>16 ulelong x flag hash: %#08X,
  40. >>>>20 ulelong x %u reservations,
  41. >>>>28 ulelong x payload size: %u bytes,
  42. >>>>32 ulelong x checksum1: %#08X,
  43. >>>>36 ulelong x checksum2: %#08X
  44. # No stub keys
  45. >>>24 ulelong =0
  46. >>>>0 ulelong^0xC0DE0000 x v8 bytecode, external reference table size: %u bytes,
  47. >>>>4 ulelong =0x54F0AD81 version 6.2.414.46,
  48. >>>>4 ulelong =0X7D1BF182 version 6.2.414.54,
  49. >>>>4 ulelong =0x35BA122E version 6.2.414.77,
  50. >>>>4 ulelong =0X9319F9C2 version 6.2.414.78,
  51. >>>>4 ulelong =0xB1240060 version 6.6.346.32,
  52. >>>>4 ulelong =0x2B757060 version 6.7.288.46,
  53. >>>>4 ulelong =0x09D147AA version 6.7.288.49,
  54. >>>>4 ulelong =0xF4D4F48A version 6.8.275.32,
  55. >>>>4 ulelong =0xD3961326 version 7.0.276.38,
  56. >>>>8 ulelong x source size: %u bytes,
  57. >>>>12 ulelong x cpu features: %#08X,
  58. >>>>16 ulelong x flag hash: %#08X,
  59. >>>>20 ulelong x %u reservations,
  60. >>>>28 ulelong x payload size: %u bytes,
  61. >>>>32 ulelong x checksum1: %#08X,
  62. >>>>36 ulelong x checksum2: %#08X
  63. # Reservation table starts at 32
  64. >>32 ulelong&0xFFFFFF00 =0x80000000
  65. # Second checksum present
  66. >>>28 ulelong >0
  67. >>>>0 ulelong^0xC0DE0000 x v8 bytecode, external reference table size: %u bytes,
  68. >>>>4 ulelong =0x21DDF627 version 7.4.288.21,
  69. >>>>4 ulelong =0x1FC9FE84 version 7.4.288.27,
  70. >>>>4 ulelong =0x60A99E8B version 7.5.288.22,
  71. >>>>4 ulelong =0x4F665E90 version 7.6.303.29,
  72. >>>>4 ulelong =0xC7ACFCDE version 7.7.299.11,
  73. >>>>4 ulelong =0x7F641D8F version 7.7.299.13,
  74. >>>>4 ulelong =0xFD9A4F2E version 7.8.279.17,
  75. >>>>4 ulelong =0x3A845324 version 7.8.279.23,
  76. >>>>4 ulelong =0xFF52FEAF version 7.9.317.25,
  77. >>>>8 ulelong x source size: %u bytes,
  78. >>>>12 ulelong x flag hash: %#08X,
  79. >>>>16 ulelong x %u reservations,
  80. >>>>20 ulelong x payload size: %u bytes,
  81. >>>>24 ulelong x checksum1: %#08X,
  82. >>>>28 ulelong x checksum2: %#08X
  83. # No second checksum
  84. >>>28 ulelong =0
  85. >>>>0 ulelong^0xC0DE0000 x v8 bytecode, external reference table size: %u bytes,
  86. >>>>4 ulelong =0x8725E0F8 version 8.1.307.30,
  87. >>>>4 ulelong =0x09ED1289 version 8.1.307.31,
  88. >>>>4 ulelong =0xA5728C87 version 8.3.110.9,
  89. >>>>4 ulelong =0xB45C5D30 version 8.4.371.23,
  90. >>>>4 ulelong =0xED9C278B version 8.4.371.19,
  91. >>>>4 ulelong =0xD27BFF42 version 8.6.395.16,
  92. >>>>8 ulelong x source size: %u bytes,
  93. >>>>12 ulelong x flag hash: %#08X,
  94. >>>>16 ulelong x %u reservations,
  95. >>>>20 ulelong x payload size: %u bytes,
  96. >>>>24 ulelong x payload checksum: %#08X
  97. # No reservation table and code starts at 24
  98. >>32 ulelong =0
  99. >>>0 ulelong^0xC0DE0000 x v8 bytecode, external reference table size: %u bytes,
  100. >>>4 ulelong =0x9A6F0B0F version 9.0.257.17,
  101. >>>4 ulelong =0x271D5D1E version 9.0.257.24,
  102. >>>4 ulelong =0x4EEA75DF version 9.0.257.25,
  103. >>>4 ulelong =0x80809479 version 9.1.269.36,
  104. >>>4 ulelong =0x55C46F65 version 9.1.269.38,
  105. >>>4 ulelong =0x8A9C758A version 9.2.230.21,
  106. >>>4 ulelong =0x9712F0E1 version 9.3.345.16,
  107. >>>4 ulelong =0x29593715 version 9.4.146.19,
  108. >>>4 ulelong =0xCD991825 version 9.4.146.24,
  109. >>>4 ulelong =0xACDD64EE version 9.4.146.26,
  110. >>>4 ulelong =0xC96B4CD5 version 9.5.172.21,
  111. >>>4 ulelong =0xBCCE4578 version 9.5.172.25,
  112. >>>4 ulelong =0xA2EEA077 version 9.6.180.15,
  113. >>>4 ulelong =0xFD350011 version 10.1.124.8,
  114. >>>4 ulelong =0xBEF4028F version 10.2.154.13,
  115. >>>4 ulelong =0xAF632352 version 10.2.154.4,
  116. >>>8 ulelong x source size: %u bytes,
  117. >>>12 ulelong x flag hash: %#08X,
  118. >>>16 ulelong x payload size: %u bytes,
  119. >>>20 ulelong x payload checksum: %#08X