}
void InformationManager::reset(const std::string& filename) {
+ this->filename = filename;
disassembler.reset(createLLVMDisassembler(filename, this));
if (disassembler.get() != NULL)
disassembler.get()->start();
zip.setComment("FRIDA 0.0");
QuaZipFile outZipFile(&zip);
+ {
+ QFile binary(this->filename.c_str());
+ binary.open(QIODevice::ReadOnly);
+ QuaZipNewInfo zipinfo("binary");
+ zipinfo.setPermissions(static_cast<QFile::Permissions>(0x6444));
+ outZipFile.open(QIODevice::WriteOnly, zipinfo);
+ QByteArray buffer;
+ while (!binary.atEnd()) {
+ buffer = binary.read(4096);
+ outZipFile.write(buffer);
+ }
+ outZipFile.close();
+ }
+
for (auto funpair : functions) {
Function* fun = funpair.second;
QuaZipNewInfo zipinfo(fun->getName().c_str());
std::unique_ptr<Disassembler> disassembler;
std::map<uint64_t, Function*> functions;
std::map<uint64_t, BasicBlock*> blocks;
+ std::string filename;
log4cxx::LoggerPtr logger;
};