mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -09:00
GP-6148: better end-of-life logic for x64dbg
This commit is contained in:
@@ -71,6 +71,7 @@ public abstract class AbstractX64dbgTraceRmiTest extends AbstractGhidraHeadedDeb
|
||||
protected static boolean didSetupPython = false;
|
||||
|
||||
public static final String NOTEPAD = "C:\\\\Windows\\\\notepad.exe";
|
||||
public static final String NETSTAT = "C:\\\\Windows\\\\System32\\\\netstat.exe";
|
||||
public static final String INSTRUMENT_STATE = """
|
||||
import sys
|
||||
from ghidraxdbg import commands
|
||||
|
||||
@@ -391,7 +391,7 @@ public class X64dbgMethodsTest extends AbstractX64dbgTraceRmiTest {
|
||||
@Test
|
||||
public void testRemoveProcess() throws Exception {
|
||||
try (PythonAndConnection conn = startAndConnectPython()) {
|
||||
start(conn, "netstat.exe");
|
||||
start(conn, NETSTAT);
|
||||
txPut(conn, "processes");
|
||||
|
||||
RemoteMethod removeProcess = conn.getMethod("remove_process");
|
||||
@@ -404,7 +404,7 @@ public class X64dbgMethodsTest extends AbstractX64dbgTraceRmiTest {
|
||||
String out = conn.executeCapture("print(list(util.process_list0()))");
|
||||
conn.execute("util.terminate_session()");
|
||||
|
||||
assertThat(out, containsString("python.exe"));
|
||||
assertEquals(out, "[]\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -465,7 +465,7 @@ public class X64dbgMethodsTest extends AbstractX64dbgTraceRmiTest {
|
||||
@Test
|
||||
public void testDetach() throws Exception {
|
||||
try (PythonAndConnection conn = startAndConnectPython()) {
|
||||
start(conn, "netstat.exe");
|
||||
start(conn, NETSTAT);
|
||||
txPut(conn, "processes");
|
||||
|
||||
RemoteMethod detach = conn.getMethod("detach");
|
||||
@@ -525,7 +525,7 @@ public class X64dbgMethodsTest extends AbstractX64dbgTraceRmiTest {
|
||||
String out = conn.executeCapture("print(list(util.process_list0()))");
|
||||
conn.execute("util.terminate_session()");
|
||||
|
||||
assertThat(out, containsString("python.exe"));
|
||||
assertEquals(out, "[]\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user