Skip to content

Commit

Permalink
Change matched function namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
fmagin committed Jul 23, 2024
1 parent 8ec1bfe commit 37f6ce0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ghidra_scripts/RevEngAutoRenamePostScript.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import ghidra.util.exception.DuplicateNameException;
import ghidra.util.exception.InvalidInputException;

import static ai.reveng.toolkit.ghidra.binarysimularity.BinarySimularityPlugin.REVENG_AI_NAMESPACE;

public class RevEngAutoRenamePostScript extends GhidraScript {
@Override
protected void run() throws Exception {
Expand All @@ -21,7 +23,7 @@ protected void run() throws Exception {

var revengMatchNamespace = currentProgram.getSymbolTable().getOrCreateNameSpace(
currentProgram.getGlobalNamespace(),
"RevEng",
REVENG_AI_NAMESPACE,
SourceType.ANALYSIS
);
// Fetch Function matches
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public class BinarySimularityPlugin extends ProgramPlugin {
public ReaiLoggingService loggingService;
private RunManager runMgr;

public final static String REVENG_AI_NAMESPACE = "RevEng.ai";

/**
* Plugin constructor.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
import javax.swing.SwingConstants;
import java.awt.Component;

import static ai.reveng.toolkit.ghidra.binarysimularity.BinarySimularityPlugin.REVENG_AI_NAMESPACE;

/**
* Panel for configuring auto analysis options
*/
Expand Down Expand Up @@ -266,7 +268,7 @@ private void performAutoAnalysis() {
try {
revengMatchNamespace = currentProgram.getSymbolTable().getOrCreateNameSpace(
currentProgram.getGlobalNamespace(),
"RevEng",
REVENG_AI_NAMESPACE,
SourceType.ANALYSIS
);
} catch (DuplicateNameException e) {
Expand Down

0 comments on commit 37f6ce0

Please sign in to comment.