summaryrefslogtreecommitdiff
path: root/plugins/workflow_objc/Plugin.cpp
diff options
context:
space:
mode:
authorkat <kat@vector35.com>2025-06-20 16:17:01 -0400
committerkat <kat@vector35.com>2025-06-23 10:40:55 -0400
commit76215b86ff629da58aa94d4cf4093d2e67017412 (patch)
tree06af88506096351e99053ab5ed9901ff892801f3 /plugins/workflow_objc/Plugin.cpp
parent17b2cb59846073fdbc08235555fd68cdb6852c42 (diff)
Move workflow_objc to API repo, remove CFString & relptr renderers
Diffstat (limited to 'plugins/workflow_objc/Plugin.cpp')
-rw-r--r--plugins/workflow_objc/Plugin.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/plugins/workflow_objc/Plugin.cpp b/plugins/workflow_objc/Plugin.cpp
new file mode 100644
index 00000000..2773e10a
--- /dev/null
+++ b/plugins/workflow_objc/Plugin.cpp
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2022-2023 Jon Palmisciano. All rights reserved.
+ *
+ * Use of this source code is governed by the BSD 3-Clause license; the full
+ * terms of the license can be found in the LICENSE.txt file.
+ */
+
+#include "Constants.h"
+#include "Workflow.h"
+
+extern "C" {
+
+BN_DECLARE_CORE_ABI_VERSION
+
+BINARYNINJAPLUGIN void CorePluginDependencies()
+{
+ BinaryNinja::AddOptionalPluginDependency("arch_x86");
+ BinaryNinja::AddOptionalPluginDependency("arch_armv7");
+ BinaryNinja::AddOptionalPluginDependency("arch_arm64");
+}
+
+BINARYNINJAPLUGIN bool CorePluginInit()
+{
+ Workflow::registerActivities();
+
+ std::vector<BinaryNinja::Ref<BinaryNinja::Architecture>> targets = {
+ BinaryNinja::Architecture::GetByName("aarch64"),
+ BinaryNinja::Architecture::GetByName("x86_64")
+ };
+
+ BinaryNinja::LogRegistry::CreateLogger(PluginLoggerName);
+
+ auto settings = BinaryNinja::Settings::Instance();
+ settings->RegisterSetting("core.function.objectiveC.rewriteMessageSendTarget",
+ R"({
+ "title" : "Rewrite objc_msgSend calls in IL",
+ "type" : "boolean",
+ "default" : false,
+ "description" : "Message sends of selectors with any visible implementation are replaced with a direct call to the first visible implementation. Note that this can produce false positives if the selector is implemented by more than one class, or shares a name with a method from a system framework."
+ })");
+
+ return true;
+}
+}