Skip to content

Commit

Permalink
[NOBIN] Cleanup, removed commented out lines
Browse files Browse the repository at this point in the history
  • Loading branch information
hasherezade committed Sep 3, 2021
1 parent 327ad07 commit fb9c3d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions scanners/module_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ bool pesieve::ModuleData::loadRelocatedFields(std::set<DWORD>& fields_rvas)
virtual bool processRelocField(ULONG_PTR relocField)
{
DWORD reloc_rva = mod.vaToRva(relocField, (ULONG_PTR)mod.original_module);
//std::cout << "reloc: " << std::hex << reloc_rva << "\n";
fields.insert(reloc_rva);
return true;
}
Expand All @@ -86,19 +85,16 @@ bool pesieve::ModuleData::loadRelocatedFields(std::set<DWORD>& fields_rvas)
ModuleData &mod;
};
//---
//std::cout << "module: " << this->szModName << "\n";
if (!peconv::has_valid_relocation_table(original_module, original_size)) {
//std::cout << "No reloc table\n";
// No reloc table
return false;
}
CollectRelocField collector(*this, fields_rvas);
if (!peconv::process_relocation_table(original_module, original_size, &collector)) {
//std::cout << "Could not collect relocations!\n";
// Could not collect relocations
return false;
}

if (fields_rvas.size()) {
//std::cout << "relocs: " << fields_rvas.size() << "\n";
return true;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion scanners/patch_analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ size_t pesieve::PatchAnalyzer::_analyzeRelocated(PatchList::Patch &patch, BYTE*
if (this->relocs.find(patch.startRva) == this->relocs.end()) {
return 0;
}
//std::cout << "This patch is a relocated field\n";
// This patch is a relocated field
const size_t fieldSize = (this->moduleData.is64bit()) ? sizeof(ULONGLONG) : sizeof(DWORD);
if (!peconv::validate_ptr(this->patchedCode, this->codeSize, patch_ptr, fieldSize)) {
return 0;
Expand Down

0 comments on commit fb9c3d8

Please sign in to comment.