mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 17:57:43 +00:00
Start of ingest module to test user types
This commit is contained in:
parent
4c275716b0
commit
afb6acfeb1
2
Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/Bundle.properties
Executable file
2
Core/src/org/sleuthkit/autopsy/modules/UserArtifacts/Bundle.properties
Executable file
@ -0,0 +1,2 @@
|
||||
UserArtifactIngestModuleFactory.moduleName=Custom Artifact Adder
|
||||
AndroidModuleFactory.moduleDescription=Adds custom artifact types
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.modules.UserArtifacts;
|
||||
|
||||
import org.sleuthkit.autopsy.ingest.DataSourceIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.DataSourceIngestModuleProgress;
|
||||
import org.sleuthkit.autopsy.ingest.IngestJobContext;
|
||||
import org.sleuthkit.datamodel.BlackboardArtifact;
|
||||
import org.sleuthkit.datamodel.Content;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author oliver
|
||||
*/
|
||||
public class UserArtifactIngestModule implements DataSourceIngestModule {
|
||||
|
||||
private IngestJobContext context = null;
|
||||
private BlackboardArtifact.Type type1, type2;
|
||||
|
||||
@Override
|
||||
public ProcessResult process(Content dataSource, DataSourceIngestModuleProgress progressBar) {
|
||||
try {
|
||||
dataSource.newArtifact(type1.getTypeID());
|
||||
dataSource.newArtifact(type2.getTypeID());
|
||||
return ProcessResult.OK;
|
||||
}
|
||||
catch (TskCoreException ex) {
|
||||
return ProcessResult.ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startUp(IngestJobContext context) throws IngestModuleException {
|
||||
this.context = context;
|
||||
type1 = new BlackboardArtifact.Type(40, "TSK_TEST1", "Test 1");
|
||||
type2 = new BlackboardArtifact.Type(41, "TSK_TEST2", "Test 2");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package org.sleuthkit.autopsy.modules.UserArtifacts;
|
||||
|
||||
import org.openide.util.NbBundle;
|
||||
import org.python.apache.xmlcommons.Version;
|
||||
import org.sleuthkit.autopsy.ingest.DataSourceIngestModule;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleFactoryAdapter;
|
||||
import org.sleuthkit.autopsy.ingest.IngestModuleIngestJobSettings;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author oliver
|
||||
*/
|
||||
public class UserArtifactIngestModuleFactory extends IngestModuleFactoryAdapter {
|
||||
|
||||
static String getModuleName() {
|
||||
return NbBundle.getMessage(UserArtifactIngestModuleFactory.class, "UserArtifactIngestModuleFactory.moduleName");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModuleDisplayName() {
|
||||
return getModuleName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModuleDescription() {
|
||||
return NbBundle.getMessage(UserArtifactIngestModuleFactory.class, "AndroidModuleFactory.moduleDescription");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModuleVersionNumber() {
|
||||
return Version.getVersion();
|
||||
}
|
||||
@Override
|
||||
public DataSourceIngestModule createDataSourceIngestModule(IngestModuleIngestJobSettings ingestOptions) {
|
||||
return new UserArtifactIngestModule();
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user