mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
Merge pull request #5982 from gdicristofaro/6290-jythonModuleLoaderScanner
6290 jython module loader scanner
This commit is contained in:
commit
ef00fe959b
@ -41,6 +41,8 @@ import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
||||
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactory;
|
||||
import org.sleuthkit.autopsy.report.GeneralReportModule;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
|
||||
/**
|
||||
* Finds and loads Autopsy modules written using the Jython variant of the
|
||||
@ -97,7 +99,7 @@ public final class JythonModuleLoader {
|
||||
if (file.isDirectory()) {
|
||||
File[] pythonScripts = file.listFiles(new PythonScriptFileFilter());
|
||||
for (File script : pythonScripts) {
|
||||
try (Scanner fileScanner = new Scanner(script)) {
|
||||
try (Scanner fileScanner = new Scanner(new BufferedReader(new FileReader(script)))) {
|
||||
while (fileScanner.hasNextLine()) {
|
||||
String line = fileScanner.nextLine();
|
||||
if (line.startsWith("class ") && filter.accept(line)) { //NON-NLS
|
||||
|
Loading…
x
Reference in New Issue
Block a user