def basic_parse(self): print(bold(blue("[To]")), (":").rjust(11), self.eml["To"]) print(bold(green("[From]")), (":").rjust(9), self.eml["From"]) print(bold(yellow("[Sender]")), (":").rjust(7), self.eml["Sender"]) print(bold(orange("[Delivered To]")), ":", self.eml["Delivered-To"]) print(bold(red("[Subject]")), (":").rjust(6), self.eml["Subject"]) print(bold(purple("[Date]")), (":").rjust(9), self.eml["Date"]) print(bold(grey("[Content-Type]")), (":").rjust(1), self.eml["Content-Type"])
def get_optional_header(self): headers = [ bold(blue("Fields")), bold(red("FileOffset")), bold(green("Offset")), bold(orange("Value")) ] table = [] print("\n\t\t\t\t", bold(white("OPTIONAL HEADER")), "\n")
def get_file_header(self): headers = [ bold(blue("Fields")), bold(red("FileOffset")), bold(green("Offset")), bold(orange("Value")) ] table = [] print("\n\t\t\t\t", bold(white("FILE HEADER")), "\n") for field, value in self.pedump["FILE_HEADER"].items(): if isinstance(value, dict): t = [field] for subvalue in value.values(): if isinstance(subvalue, int): subvalue = hex(subvalue) t.append(subvalue) table.append(t) print(tabulate(table, headers=headers))
def showstats(self): if self.rarity == "Rare": print(colors.cyan(self.name), "\n", "HP + ", self.hpi, "\n", "MP + ", self.mpi, "\n", "Damage + ", self.dmgi, "\n", "Rarity: ", self.rarity) elif self.rarity == "Common": print(colors.yellow(self.name), "\n", "HP + ", self.hpi, "\n", "MP + ", self.mpi, "\n", "Damage + ", self.dmgi, "\n", "Rarity: ", self.rarity) elif self.rarity == "Uncommon": print(colors.green(self.name), "\n", "HP + ", self.hpi, "\n", "MP + ", self.mpi, "\n", "Damage + ", self.dmgi, "\n", "Rarity: ", self.rarity) elif self.rarity == "Epic": print(colors.magenta(self.name), "\n", "HP + ", self.hpi, "\n", "MP + ", self.mpi, "\n", "Damage + ", self.dmgi, "\n", "Rarity: ", self.rarity) else: print(colors.orange(self.name), "\n", "HP + ", self.hpi, "\n", "MP + ", self.mpi, "\n", "Damage + ", self.dmgi, "\n", "Rarity: ", self.rarity)