Version: 2.5.2 Update
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
package burp.rule.utils;
|
package burp.rule.utils;
|
||||||
|
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import burp.BurpExtender;
|
|
||||||
import org.yaml.snakeyaml.DumperOptions;
|
import org.yaml.snakeyaml.DumperOptions;
|
||||||
import org.yaml.snakeyaml.Yaml;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
@@ -25,13 +26,11 @@ public class YamlTool {
|
|||||||
|
|
||||||
public static Map<String, Object> loadYaml(String filePath) {
|
public static Map<String, Object> loadYaml(String filePath) {
|
||||||
try {
|
try {
|
||||||
InputStream inputStream = new FileInputStream(filePath);
|
InputStream inputStream = Files.newInputStream(Paths.get(filePath));
|
||||||
Yaml yaml = newStandardYaml();
|
return newStandardYaml().load(inputStream);
|
||||||
return yaml.load(inputStream);
|
} catch (Exception e) {
|
||||||
} catch (FileNotFoundException e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user