-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
54 lines (50 loc) · 1.09 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "plugin.hpp"
int idaapi decryptFunctionStrsHandler::activate(action_activation_ctx_t* ctx)
{
vdui_t* vdui = get_widget_vdui(ctx->widget);
if (vdui != nullptr)
{
if (!handlers::extractAESInfo(pluginModule))
return 0;
pluginModule->pluginSingleDecryptActive = true;
vdui->refresh_view(true);
return 1;
}
return 0;
}
int idaapi decryptAllHandler::activate(action_activation_ctx_t* ctx)
{
vdui_t* vdui = get_widget_vdui(ctx->widget);
if (vdui != nullptr)
{
if (!handlers::extractAESInfo(pluginModule))
return 0;
handlers::decryptAllStrings(pluginModule);
vdui->refresh_view(true);
return 1;
}
return 0;
}
static plugmod_t* idaapi init()
{
if (!init_hexrays_plugin())
{
error("[-] Decompiler plugin not found\n");
return PLUGIN_SKIP;
}
msg("[+] Pikabot deobfuscator (v%s) initialized\n", VERSION);
pluginCtx* plugmod = new pluginCtx;
return plugmod;
}
plugin_t PLUGIN =
{
IDP_INTERFACE_VERSION,
PLUGIN_HIDE | PLUGIN_MULTI,
init,
nullptr,
nullptr,
nullptr,
nullptr,
"PikabotDeobfuscator",
nullptr
};