def testAsproxMarshalling(self): report_as_dict = self.asprox_disassembly.toDict() assert report_as_dict["status"] == "ok" assert report_as_dict["base_addr"] == 0x8D0000 assert report_as_dict["statistics"]["num_instructions"] == 15706 assert report_as_dict[ "sha256"] == "db8a133fed1b706608a4492079b702ded6b70369a980d2b5ae355a6adc78ef00" reimported_report = SmdaReport.fromDict(report_as_dict)
def testCutwailMarshalling(self): report_as_dict = self.cutwail_disassembly.toDict() assert report_as_dict["status"] == "ok" assert report_as_dict["base_addr"] == 0x4000000 assert report_as_dict["statistics"]["num_instructions"] == 1611 assert report_as_dict[ "sha256"] == "a348a0ddfab135d152b684d561a3215ab6c472570facd3d75aa2c7ee845a8e2b" # compare our manual file loading with unmapped buffer assert self.cutwail_disassembly.num_instructions == self.cutwail_unmapped_disassembly.num_instructions reimported_report = SmdaReport.fromDict(report_as_dict)