def get_exports(self): if not self.allexports: #print "[*] Get exports" for sym in self.bin.get_symbols(): if not self.use_va: if common.version_ge(self.version, '0.9.8'): self.allexports.append([hex(self.baddr+sym.vaddr), "sym." + sym.name, '', '']) else: self.allexports.append([hex(self.baddr+sym.rva), "sym." + sym.name, '', '']) else: if common.version_ge(self.version, '0.9.8'): self.allexports.append([hex(sym.vaddr), "sym." + sym.name, '', '']) else: self.allexports.append([hex(sym.rva), "sym." + sym.name, '', '']) return self.allexports
def get_sections(self): if self.allsections == [] and self.core.format != 'Hexdump': self.update_progress_bar("Getting sections", 0.15) for section in self.bin.get_sections(): if common.version_ge(self.version, '0.9.8'): self.allsections.append([ section.name, hex(self.baddr + section.vaddr), hex(section.size), hex(section.paddr) ]) else: self.allsections.append([ section.name, hex(self.baddr + section.rva), hex(section.size), hex(section.offset) ]) if section.srwx & 1 == 1 and section.name != "phdr0": self.execsections.append([section.name, section.size]) self.sections_size.append(section.size) if '.text' in section.name: self.textsize = section.size self.sections_size.append(sum(self.sections_size)) return self.allsections
def get_sections(self): if self.allsections == [] and self.core.format != 'Hexdump': self.update_progress_bar("Getting sections", 0.15) for section in self.bin.get_sections(): if common.version_ge(self.version, '0.9.8'): self.allsections.append([section.name, hex(self.baddr+section.vaddr), hex(section.size), hex(section.paddr)]) else: self.allsections.append([section.name, hex(self.baddr+section.rva), hex(section.size), hex(section.offset)]) if section.srwx & 1 == 1 and section.name != "phdr0": self.execsections.append([section.name, section.size]) self.sections_size.append(section.size) if '.text' in section.name: self.textsize = section.size self.sections_size.append(sum(self.sections_size)) return self.allsections