Autopsy 4.22.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
DroneIngestModule.java
Go to the documentation of this file.
1/*
2 * Autopsy Forensic Browser
3 *
4 * Copyright 2020 Basis Technology Corp.
5 * Contact: carrier <at> sleuthkit <dot> org
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19package org.sleuthkit.autopsy.modules.drones;
20
21import java.util.ArrayList;
22import java.util.List;
23import java.util.logging.Level;
24import java.util.logging.Logger;
25import org.openide.util.NbBundle.Messages;
26import org.sleuthkit.autopsy.ingest.DataSourceIngestModule;
27import org.sleuthkit.autopsy.ingest.DataSourceIngestModuleProgress;
28import org.sleuthkit.autopsy.ingest.IngestJobContext;
29import org.sleuthkit.autopsy.ingest.IngestMessage;
30import org.sleuthkit.autopsy.ingest.IngestServices;
31import org.sleuthkit.datamodel.Content;
32
37public final class DroneIngestModule implements DataSourceIngestModule {
38
39 private static final Logger logger = Logger.getLogger(DroneIngestModule.class.getName());
40 final private List<DroneExtractor> extractors;
41
43
47 DroneIngestModule() {
48 extractors = new ArrayList<>();
49 }
50
51 @Override
53 this.context = context;
54
55 extractors.add(new DATExtractor());
56 }
57
58 @Messages({
59 "# {0} - AbstractFileName",
60 "DroneIngestModule_process_start=Started {0}"
61 })
62 @Override
63 public ProcessResult process(Content dataSource, DataSourceIngestModuleProgress progressBar) {
64 ProcessResult processResult = ProcessResult.OK;
65
67
70 DroneIngestModuleFactory.getModuleName(),
71 Bundle.DroneIngestModule_process_start(dataSource.getName())));
72
73 progressBar.switchToIndeterminate();
74
75 for (DroneExtractor extractor : extractors) {
76
77 if (context.dataSourceIngestIsCancelled()) {
78 logger.log(Level.INFO, "Drone ingest has been canceled, quitting before {0}", extractor.getName()); //NON-NLS
79 break;
80 }
81
82 progressBar.progress(extractor.getName());
83
84 try {
85 extractor.process(dataSource, context, progressBar);
86 } catch (DroneIngestException ex) {
87 logger.log(Level.SEVERE, String.format("Exception thrown from drone extractor %s", extractor.getName()), ex);
88 }
89 }
90
91 return processResult;
92 }
93
94}
static IngestMessage createMessage(MessageType messageType, String source, String subject, String detailsHtml)
void postMessage(final IngestMessage message)
static synchronized IngestServices getInstance()
ProcessResult process(Content dataSource, DataSourceIngestModuleProgress progressBar)

Copyright © 2012-2024 Sleuth Kit Labs. Generated on:
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.