Start of ingest module to test user types

This commit is contained in:
Oliver Spohngellert 2016-01-12 16:45:17 -05:00
parent 4c275716b0
commit afb6acfeb1
3 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,2 @@
UserArtifactIngestModuleFactory.moduleName=Custom Artifact Adder
AndroidModuleFactory.moduleDescription=Adds custom artifact types

View File

@ -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");
}
}

View File

@ -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();
}
}