Skip to content

Commit

Permalink
update Jep requirement to 4.2 (#83)
Browse files Browse the repository at this point in the history
* update Jep requirement to 4.2

* fix Python 3.12 escape error

* fix #79

* update README for Jep 4.2
  • Loading branch information
mike-hunhoff authored Dec 19, 2023
1 parent e39a2ce commit a7b2d9c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The following tools are needed to build, install, and run Ghidrathon:
Tool | Version |Source |
|---|---|---|
| Ghidra | `>= 10.3` | https://ghidra-sre.org |
| Jep | `>= 4.1.1` | https://github.com/ninia/jep |
| Jep | `4.2.0` | https://github.com/ninia/jep |
| Gradle | `>= 7.3` | https://gradle.org/releases |
| Python | `>= 3.8` | https://www.python.org/downloads |

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ else {
// the env variable "JAVA_HOME" containing absolute path to Java JDK configured for Ghidra
task installJep(type: Exec) {
environment "JAVA_HOME", System.getProperty("java.home")
commandLine pythonBin, '-m', 'pip', 'install', 'jep'
commandLine pythonBin, '-m', 'pip', 'install', 'jep==4.2'
}

// we need to copy the Jep native binaries built in installJep to our extension directory; we use a small
Expand Down
2 changes: 1 addition & 1 deletion data/python/jepwelcome.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import sys


message = """
message = r"""
_____ _ _ _ _ _
/ ____| | (_) | | | | | |
| | __| |__ _ __| |_ __ __ _| |_| |__ ___ _ __
Expand Down
5 changes: 5 additions & 0 deletions data/python/jepwrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ def wrapped_state():
return get_script_state()


def wrapped_script():
return get_script()


def wrapped_currentProgram():
return get_script_state().getCurrentProgram()

Expand All @@ -333,6 +337,7 @@ def wrapped_currentHighlight():

__builtins__["monitor"] = wrapped_monitor
__builtins__["state"] = wrapped_state
__builtins__["script"] = wrapped_script
__builtins__["currentProgram"] = wrapped_currentProgram
__builtins__["currentAddress"] = wrapped_currentAddress
__builtins__["currentLocation"] = wrapped_currentLocation
Expand Down

0 comments on commit a7b2d9c

Please sign in to comment.