aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gq
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-06-08 03:47:38 +0200
committernea <nea@nea.moe>2023-06-08 03:47:38 +0200
commitd423203d960e6e2340798f00f907d2b1271c3d89 (patch)
tree007846bff6390c7f3648f8a5b3ce5e071c024250 /src/main/java/gq
parentf6b449e65d050b321abf0e54826ec48c0d993b2a (diff)
downloadNoSession-d423203d960e6e2340798f00f907d2b1271c3d89.tar.gz
NoSession-d423203d960e6e2340798f00f907d2b1271c3d89.tar.bz2
NoSession-d423203d960e6e2340798f00f907d2b1271c3d89.zip
Use kotlin buildscript
Diffstat (limited to 'src/main/java/gq')
-rw-r--r--src/main/java/gq/malwarefight/nosession/linux/bwrap/BubblewrapBuilder.java2
-rw-r--r--src/main/java/gq/malwarefight/nosession/linux/libc/Libc.java2
-rw-r--r--src/main/java/gq/malwarefight/nosession/utils/Utils.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/gq/malwarefight/nosession/linux/bwrap/BubblewrapBuilder.java b/src/main/java/gq/malwarefight/nosession/linux/bwrap/BubblewrapBuilder.java
index 34542cd..6a5b9a5 100644
--- a/src/main/java/gq/malwarefight/nosession/linux/bwrap/BubblewrapBuilder.java
+++ b/src/main/java/gq/malwarefight/nosession/linux/bwrap/BubblewrapBuilder.java
@@ -395,7 +395,7 @@ public class BubblewrapBuilder {
finalArgs.addAll(bubblewrapArgs);
finalArgs.add(command);
finalArgs.addAll(programArgs);
- pb.command(finalArgs).redirectOutput(new File("/home/pandaninjas/log")).redirectError(new File("/home/pandaninjas/log1"));
+ pb.command(finalArgs).redirectOutput(new File(System.getProperty("NOSESSION_STDOUT", System.getProperty("user.home") + "/nosession-stdout.log"))).redirectError(new File(System.getProperty("NOSESSION_STDERR", System.getProperty("user.home") + "/nosession-stderr.log")));
return pb;
}
}
diff --git a/src/main/java/gq/malwarefight/nosession/linux/libc/Libc.java b/src/main/java/gq/malwarefight/nosession/linux/libc/Libc.java
index 670f83d..3677537 100644
--- a/src/main/java/gq/malwarefight/nosession/linux/libc/Libc.java
+++ b/src/main/java/gq/malwarefight/nosession/linux/libc/Libc.java
@@ -16,7 +16,7 @@ public class Libc {
static {
try {
File tempFile = Files.createTempFile("nosession_libc", ".so").toFile();
- try (InputStream is = Libc.class.getResourceAsStream("/native/" + System.getProperty("os.arch") + "/" + System.getProperty("os.name") + "/" + System.mapLibraryName("linux"))) {
+ try (InputStream is = Libc.class.getResourceAsStream("/native/" + System.getProperty("os.arch") + "/" + System.getProperty("os.name") + "/" + System.mapLibraryName("nosession_libc"))) {
assert is != null: "Native library not compiled";
Utils.copy(is, Files.newOutputStream(tempFile.toPath()));
}
diff --git a/src/main/java/gq/malwarefight/nosession/utils/Utils.java b/src/main/java/gq/malwarefight/nosession/utils/Utils.java
index 7f65b2a..ab10319 100644
--- a/src/main/java/gq/malwarefight/nosession/utils/Utils.java
+++ b/src/main/java/gq/malwarefight/nosession/utils/Utils.java
@@ -174,7 +174,7 @@ public class Utils {
public static void setToken(String token) throws IOException, URISyntaxException {
ProcessBuilder processBuilder = new ProcessBuilder(
- getJavaExe(p), "-XX:+DisableAttachMechanism", "-cp", getClasspath(p), Main.class.getName()
+ getJavaExe(), "-XX:+DisableAttachMechanism", "-cp", getClasspath(), Main.class.getName()
);
processBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT).redirectError(ProcessBuilder.Redirect.INHERIT);
Process c = processBuilder.start();