mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
passed reference of FileManager as an argument
This commit is contained in:
parent
7ccfe9ceb8
commit
849a6a7ebf
@ -22,6 +22,8 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.services.FileManager;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.ingest.DataSourceIngestModuleProgress;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModule;
|
||||
@ -53,9 +55,10 @@ class AndroidIngestModule implements DataSourceIngestModule {
|
||||
|
||||
ArrayList<String> errors = new ArrayList<>();
|
||||
progressBar.switchToDeterminate(9);
|
||||
FileManager fileManager = Case.getCurrentCase().getServices().getFileManager();
|
||||
|
||||
try {
|
||||
ContactAnalyzer.findContacts(dataSource);
|
||||
ContactAnalyzer.findContacts(dataSource, fileManager);
|
||||
progressBar.progress(1);
|
||||
if (context.dataSourceIngestIsCancelled()) {
|
||||
return IngestModule.ProcessResult.OK;
|
||||
@ -65,7 +68,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
|
||||
}
|
||||
|
||||
try {
|
||||
CallLogAnalyzer.findCallLogs(dataSource);
|
||||
CallLogAnalyzer.findCallLogs(dataSource, fileManager);
|
||||
progressBar.progress(2);
|
||||
if (context.dataSourceIngestIsCancelled()) {
|
||||
return IngestModule.ProcessResult.OK;
|
||||
@ -75,7 +78,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
|
||||
}
|
||||
|
||||
try {
|
||||
TextMessageAnalyzer.findTexts(dataSource);
|
||||
TextMessageAnalyzer.findTexts(dataSource, fileManager);
|
||||
progressBar.progress(3);
|
||||
if (context.dataSourceIngestIsCancelled()) {
|
||||
return IngestModule.ProcessResult.OK;
|
||||
@ -85,7 +88,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
|
||||
}
|
||||
|
||||
try {
|
||||
TangoMessageAnalyzer.findTangoMessages(dataSource);
|
||||
TangoMessageAnalyzer.findTangoMessages(dataSource, fileManager);
|
||||
progressBar.progress(4);
|
||||
if (context.dataSourceIngestIsCancelled()) {
|
||||
return IngestModule.ProcessResult.OK;
|
||||
@ -95,7 +98,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
|
||||
}
|
||||
|
||||
try {
|
||||
WWFMessageAnalyzer.findWWFMessages(dataSource);
|
||||
WWFMessageAnalyzer.findWWFMessages(dataSource, fileManager);
|
||||
progressBar.progress(5);
|
||||
if (context.dataSourceIngestIsCancelled()) {
|
||||
return IngestModule.ProcessResult.OK;
|
||||
@ -105,7 +108,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
|
||||
}
|
||||
|
||||
try {
|
||||
GoogleMapLocationAnalyzer.findGeoLocations(dataSource);
|
||||
GoogleMapLocationAnalyzer.findGeoLocations(dataSource, fileManager);
|
||||
progressBar.progress(6);
|
||||
if (context.dataSourceIngestIsCancelled()) {
|
||||
return IngestModule.ProcessResult.OK;
|
||||
@ -115,7 +118,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
|
||||
}
|
||||
|
||||
try {
|
||||
BrowserLocationAnalyzer.findGeoLocations(dataSource);
|
||||
BrowserLocationAnalyzer.findGeoLocations(dataSource, fileManager);
|
||||
progressBar.progress(7);
|
||||
if (context.dataSourceIngestIsCancelled()) {
|
||||
return IngestModule.ProcessResult.OK;
|
||||
@ -125,7 +128,7 @@ class AndroidIngestModule implements DataSourceIngestModule {
|
||||
}
|
||||
|
||||
try {
|
||||
CacheLocationAnalyzer.findGeoLocations(dataSource);
|
||||
CacheLocationAnalyzer.findGeoLocations(dataSource, fileManager);
|
||||
progressBar.progress(8);
|
||||
} catch (Exception e) {
|
||||
errors.add("Error getting Cache Locations"); //NON-NLS
|
||||
|
@ -47,9 +47,8 @@ class BrowserLocationAnalyzer {
|
||||
private static final String moduleName = AndroidModuleFactory.getModuleName();
|
||||
private static final Logger logger = Logger.getLogger(BrowserLocationAnalyzer.class.getName());
|
||||
|
||||
public static void findGeoLocations(Content dataSource) {
|
||||
public static void findGeoLocations(Content dataSource, FileManager fileManager) {
|
||||
try {
|
||||
FileManager fileManager = Case.getCurrentCase().getServices().getFileManager();
|
||||
List<AbstractFile> abstractFiles = fileManager.findFiles(dataSource, "CachedGeoposition%.db"); //NON-NLS
|
||||
|
||||
for (AbstractFile abstractFile : abstractFiles) {
|
||||
|
@ -49,10 +49,9 @@ class CacheLocationAnalyzer {
|
||||
/**
|
||||
* cache.cell stores mobile tower GPS locations and cache.wifi stores GPS and MAC info from Wifi points.
|
||||
*/
|
||||
public static void findGeoLocations(Content dataSource) {
|
||||
public static void findGeoLocations(Content dataSource, FileManager fileManager) {
|
||||
|
||||
try {
|
||||
FileManager fileManager = Case.getCurrentCase().getServices().getFileManager();
|
||||
List<AbstractFile> abstractFiles = fileManager.findFiles(dataSource, "cache.cell"); //NON-NLS
|
||||
abstractFiles.addAll(fileManager.findFiles(dataSource, "cache.wifi"));
|
||||
|
||||
|
@ -54,9 +54,8 @@ class CallLogAnalyzer {
|
||||
/** the names of tables that potentially hold call logs in the dbs */
|
||||
private static final Iterable<String> tableNames = Arrays.asList("calls", "logs"); //NON-NLS
|
||||
|
||||
public static void findCallLogs(Content dataSource) {
|
||||
public static void findCallLogs(Content dataSource, FileManager fileManager) {
|
||||
try {
|
||||
FileManager fileManager = Case.getCurrentCase().getServices().getFileManager();
|
||||
List<AbstractFile> absFiles = fileManager.findFiles(dataSource, "logs.db"); //NON-NLS
|
||||
absFiles.addAll(fileManager.findFiles(dataSource, "contacts.db")); //NON-NLS
|
||||
absFiles.addAll(fileManager.findFiles(dataSource, "contacts2.db")); //NON-NLS
|
||||
|
@ -47,11 +47,10 @@ class ContactAnalyzer {
|
||||
private static final String moduleName = AndroidModuleFactory.getModuleName();
|
||||
private static final Logger logger = Logger.getLogger(ContactAnalyzer.class.getName());
|
||||
|
||||
public static void findContacts(Content dataSource) {
|
||||
public static void findContacts(Content dataSource, FileManager fileManager) {
|
||||
|
||||
List<AbstractFile> absFiles;
|
||||
try {
|
||||
FileManager fileManager = Case.getCurrentCase().getServices().getFileManager();
|
||||
absFiles = fileManager.findFiles(dataSource, "contacts.db"); //NON-NLS
|
||||
absFiles.addAll(fileManager.findFiles(dataSource, "contacts2.db")); //NON-NLS
|
||||
if (absFiles.isEmpty()) {
|
||||
|
@ -47,10 +47,9 @@ class GoogleMapLocationAnalyzer {
|
||||
private static final String moduleName = AndroidModuleFactory.getModuleName();
|
||||
private static final Logger logger = Logger.getLogger(GoogleMapLocationAnalyzer.class.getName());
|
||||
|
||||
public static void findGeoLocations(Content dataSource) {
|
||||
public static void findGeoLocations(Content dataSource, FileManager fileManager) {
|
||||
List<AbstractFile> absFiles;
|
||||
try {
|
||||
FileManager fileManager = Case.getCurrentCase().getServices().getFileManager();
|
||||
absFiles = fileManager.findFiles(dataSource, "da_destination_history"); //NON-NLS
|
||||
if (absFiles.isEmpty()) {
|
||||
return;
|
||||
|
@ -47,10 +47,9 @@ class TangoMessageAnalyzer {
|
||||
private static final String moduleName = AndroidModuleFactory.getModuleName();
|
||||
private static final Logger logger = Logger.getLogger(TangoMessageAnalyzer.class.getName());
|
||||
|
||||
public static void findTangoMessages(Content dataSource) {
|
||||
public static void findTangoMessages(Content dataSource, FileManager fileManager) {
|
||||
List<AbstractFile> absFiles;
|
||||
try {
|
||||
FileManager fileManager = Case.getCurrentCase().getServices().getFileManager();
|
||||
absFiles = fileManager.findFiles(dataSource, "tc.db"); //NON-NLS
|
||||
for (AbstractFile abstractFile : absFiles) {
|
||||
try {
|
||||
|
@ -47,10 +47,9 @@ class TextMessageAnalyzer {
|
||||
private static final String moduleName = AndroidModuleFactory.getModuleName();
|
||||
private static final Logger logger = Logger.getLogger(TextMessageAnalyzer.class.getName());
|
||||
|
||||
public static void findTexts(Content dataSource) {
|
||||
public static void findTexts(Content dataSource, FileManager fileManager) {
|
||||
try {
|
||||
|
||||
FileManager fileManager = Case.getCurrentCase().getServices().getFileManager();
|
||||
List<AbstractFile> absFiles = fileManager.findFiles(dataSource, "mmssms.db"); //NON-NLS
|
||||
for (AbstractFile abstractFile : absFiles) {
|
||||
try {
|
||||
|
@ -47,10 +47,9 @@ class WWFMessageAnalyzer {
|
||||
private static final String moduleName = AndroidModuleFactory.getModuleName();
|
||||
private static final Logger logger = Logger.getLogger(WWFMessageAnalyzer.class.getName());
|
||||
|
||||
public static void findWWFMessages(Content dataSource) {
|
||||
public static void findWWFMessages(Content dataSource, FileManager fileManager) {
|
||||
List<AbstractFile> absFiles;
|
||||
try {
|
||||
FileManager fileManager = Case.getCurrentCase().getServices().getFileManager();
|
||||
absFiles = fileManager.findFiles(dataSource, "WordsFramework"); //NON-NLS
|
||||
|
||||
for (AbstractFile abstractFile : absFiles) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user