Skip to content

Commit

Permalink
[Dropper] # fix osx build #182 #181
Browse files Browse the repository at this point in the history
  • Loading branch information
gheorghitamutu committed Jul 15, 2024
1 parent 91b4a54 commit f03dbbd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion AppCUI
Submodule AppCUI updated 1 files
+1 −1 vcpkg
15 changes: 11 additions & 4 deletions GenericPlugins/Dropper/include/Dropper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,25 @@ class Instance

inline static struct Context {
std::vector<std::unique_ptr<IDrop>> objectDroppers;
std::unique_ptr<IDrop> textDropper{ nullptr };
bool initialized{ false };
std::unique_ptr<IDrop> textDropper;
bool initialized;

bool binaryCharSetMatrix[BINARY_CHARSET_MATRIX_SIZE]{};
bool binaryCharSetMatrix[BINARY_CHARSET_MATRIX_SIZE];

GView::Utils::ZonesList zones;
std::vector<Finding> findings;
std::map<std::string_view, uint32> occurences;

std::set<std::filesystem::path> objectPaths;

bool stringsCharSetMatrix[STRINGS_CHARSET_MATRIX_SIZE]{};
bool stringsCharSetMatrix[STRINGS_CHARSET_MATRIX_SIZE];

Context() {
textDropper = nullptr;
initialized = false;
memset(binaryCharSetMatrix, 0, BINARY_CHARSET_MATRIX_SIZE);
memset(stringsCharSetMatrix, 0, STRINGS_CHARSET_MATRIX_SIZE);
}
} context;

uint64 objectId{ 0 };
Expand Down
4 changes: 2 additions & 2 deletions GenericPlugins/EntropyVisualizer/src/EntropyVisualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PLUGIN_EXPORT bool Run(const string_view command, Reference<GView::Object> objec

PLUGIN_EXPORT void UpdateSettings(IniSection sect)
{
sect["command.EntropyVisualizer"] = Input::Key::Ctrl | Input::Key::F10;
sect["command.EntropyVisualizer"] = Input::Key::F12;
}
}

Expand Down Expand Up @@ -70,7 +70,7 @@ Color Plugin::ShannonEntropyDataTypeValueToColorName(std::string_view name)
return Color::Black;
}

double Plugin::ComputeEpsilon(size_t sample_size)
double Plugin::ComputeEpsilon(uint64 sample_size)
{
return 2.0 - (std::log2(sample_size) - 2.0) / 10;
}
Expand Down

0 comments on commit f03dbbd

Please sign in to comment.