Commits

nneonneo  committed fba4c06

hachoir-parser/program/python: add magic numbers for 2.7, 3.1, 3.2

  • Participants
  • Parent commits 763b163

Comments (0)

Files changed (1)

File hachoir-parser/hachoir_parser/program/python.py

     MAGIC = {
         # Python 1.x
         20121: ("1.5", 0x1050000),
+        50428: ("1.6", 0x1060000),
 
         # Python 2.x
         50823: ("2.0", 0x2000000),
         62111: ("2.5b3", 0x2050000),
         62121: ("2.5c1", 0x2050000),
         62131: ("2.5c2", 0x2050000),
+        62151: ("2.6a0", 0x2070000),
+        62161: ("2.6a1", 0x2070000),
+        62171: ("2.7a0", 0x2070000),
+        62181: ("2.7a0", 0x2070000),
+        62191: ("2.7a0", 0x2070000),
+        62201: ("2.7a0", 0x2070000),
+        62211: ("2.7a0", 0x2070000),
 
         # Python 3.x
         3000:  ("3.0 (3000)",  0x3000000),
         3040:  ("3.0 (3040)",  0x3000000),
         3050:  ("3.0 (3050)",  0x3000000),
         3060:  ("3.0 (3060)",  0x3000000),
-        3070:  ("3.0 (3070)",  0x3000000),
-        3080:  ("3.0 (3080)",  0x3000000),
-        3090:  ("3.0 (3090)",  0x3000000),
-        3100:  ("3.0 (3100)",  0x3000000),
-        3102:  ("3.0 (3102)",  0x3000000),
-        3110:  ("3.0a4",       0x3000000),
-        3130:  ("3.0a5",       0x3000000),
-        3131:  ("3.0a5 unicode",       0x3000000),
+        3061:  ("3.0 (3061)",  0x3000000),
+        3071:  ("3.0 (3071)",  0x3000000),
+        3081:  ("3.0 (3081)",  0x3000000),
+        3091:  ("3.0 (3091)",  0x3000000),
+        3101:  ("3.0 (3101)",  0x3000000),
+        3103:  ("3.0 (3103)",  0x3000000),
+        3111:  ("3.0a4",       0x3000000),
+        3131:  ("3.0a5",       0x3000000),
+        3141:  ("3.1a0",       0x3010000),
+        3151:  ("3.1a0",       0x3010000),
+        3160:  ("3.2a0",       0x3020000),
+        3170:  ("3.2a1",       0x3020000),
+        3180:  ("3.2a2",       0x3020000),
     }
 
     # Dictionnary which associate the pyc signature (4-byte long string)