Commit 5645a94fd3b836092a695f408e235dee2d29831a
1 parent
cf40e208
olemap compliant python3.5
Showing
1 changed file
with
7 additions
and
7 deletions
oletools/olemap.py
| ... | ... | @@ -90,14 +90,14 @@ FAT_COLORS = { |
| 90 | 90 | |
| 91 | 91 | if __name__ == '__main__': |
| 92 | 92 | # print banner with version |
| 93 | - print 'olemap %s - http://decalage.info/python/oletools' % __version__ | |
| 93 | + print('olemap %s - http://decalage.info/python/oletools' % __version__) | |
| 94 | 94 | |
| 95 | 95 | fname = sys.argv[1] |
| 96 | 96 | ole = olefile.OleFileIO(fname) |
| 97 | 97 | |
| 98 | - print 'FAT:' | |
| 98 | + print('FAT:') | |
| 99 | 99 | t = tablestream.TableStream([8, 12, 8, 8], header_row=['Sector #', 'Type', 'Offset', 'Next #']) |
| 100 | - for i in xrange(ole.nb_sect): | |
| 100 | + for i in range(ole.nb_sect): | |
| 101 | 101 | fat_value = ole.fat[i] |
| 102 | 102 | fat_type = FAT_TYPES.get(fat_value, '<Data>') |
| 103 | 103 | color_type = FAT_COLORS.get(fat_value, FAT_COLORS['default']) |
| ... | ... | @@ -106,15 +106,15 @@ if __name__ == '__main__': |
| 106 | 106 | # print '%8X: %-12s offset=%08X next=%8X' % (i, fat_type, 0, fat_value) |
| 107 | 107 | t.write_row(['%8X' % i, fat_type, '%08X' % offset, '%8X' % fat_value], |
| 108 | 108 | colors=[None, color_type, None, None]) |
| 109 | - print '' | |
| 109 | + print('') | |
| 110 | 110 | |
| 111 | - print 'MiniFAT:' | |
| 111 | + print('MiniFAT:') | |
| 112 | 112 | # load MiniFAT if it wasn't already done: |
| 113 | 113 | ole.loadminifat() |
| 114 | - for i in xrange(len(ole.minifat)): | |
| 114 | + for i in range(len(ole.minifat)): | |
| 115 | 115 | fat_value = ole.minifat[i] |
| 116 | 116 | fat_type = FAT_TYPES.get(fat_value, 'Data') |
| 117 | - print '%8X: %-12s offset=%08X next=%8X' % (i, fat_type, 0, fat_value) | |
| 117 | + print('%8X: %-12s offset=%08X next=%8X' % (i, fat_type, 0, fat_value)) | |
| 118 | 118 | |
| 119 | 119 | ole.close() |
| 120 | 120 | ... | ... |