Commit 46f45fd 1 parent c1a8400 commit 46f45fd Copy full SHA for 46f45fd
File tree 5 files changed +27
-29
lines changed
5 files changed +27
-29
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,9 @@ def _jepeval(line):
79
79
# in the Ghidra console window
80
80
import traceback
81
81
82
- import utils
82
+ import jeputils
83
83
84
84
traceback .print_exc ()
85
- utils .log_env_details (type (err ))
85
+ jeputils .log_env_details (type (err ))
86
86
87
87
return more_input_needed
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def jep_runscript(path):
36
36
# messages in the Ghidra console window
37
37
import traceback
38
38
39
- import utils
39
+ import jeputils
40
40
41
41
traceback .print_exc ()
42
- utils .log_env_details (type (err ))
42
+ jeputils .log_env_details (type (err ))
Original file line number Diff line number Diff line change
1
+ import sys
2
+ import platform
3
+
4
+ import jep
5
+ import ghidrathon
6
+ from java .lang import System
7
+
8
+ ALLOWED_EXCEPTIONS = [RuntimeError , OSError ]
9
+
10
+
11
+ def log_env_details (exc_type ):
12
+ if any (issubclass (exc_type , exc_class ) for exc_class in ALLOWED_EXCEPTIONS ):
13
+ print (
14
+ f"Python={ platform .python_version ()} , "
15
+ f"Arch={ System .getProperty ('os.arch' )} , "
16
+ f"OS={ System .getProperty ('os.name' )} , "
17
+ f"Ghidra={ getGhidraVersion ()} , "
18
+ f"Java={ System .getProperty ('java.version' )} , "
19
+ f"Ghidrathon={ ghidrathon .GhidrathonPlugin .getVersion ()} , "
20
+ f"Jep={ jep .__version__ } " ,
21
+ file = sys .stderr ,
22
+ )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ GhidrathonScript getInteractiveScript() {
73
73
return interactiveScript ;
74
74
}
75
75
76
- public String getVersion () {
76
+ public static String getVersion () {
77
77
return VERSION ;
78
78
}
79
79
You can’t perform that action at this time.
0 commit comments