mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Moving hashdatabase package to new module
This commit is contained in:
parent
3af4b9458a
commit
6818d6c96e
@ -56,8 +56,6 @@
|
||||
</folder>
|
||||
<folder name="Tools">
|
||||
<file name="org-sleuthkit-autopsy-filebrowser-FileBrowserAction.instance"></file>
|
||||
<file name="org-sleuthkit-autopsy-hashdatabase-HashDbMgmtAction.instance">
|
||||
</file>
|
||||
</folder>
|
||||
<folder name="View">
|
||||
<file name="org-netbeans-core-windows-actions-ToolbarsListAction.instance">
|
||||
@ -146,22 +144,7 @@
|
||||
<folder name="Help">
|
||||
<file name="org-netbeans-modules-autoupdate-ui-actions-CheckForUpdatesAction.shadow_hidden"/>
|
||||
</folder>
|
||||
<folder name="Tools">
|
||||
<file name="org-sleuthkit-autopsy-hashdatabase-HashDatabaseSettingsAction.shadow">
|
||||
<attr name="originalFile" stringvalue="Actions/Tools/org-sleuthkit-autopsy-hashdatabase-HashDbMgmtAction.instance"/>
|
||||
<attr name="position" intvalue="1000"/>
|
||||
</file>
|
||||
<file name="SeparatorAfterHashDatabaseSettings.instance">
|
||||
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
|
||||
<attr name="position" intvalue="1001"/>
|
||||
</file>
|
||||
<file name="Separator1.instance_hidden"/>
|
||||
<file name="Separator3.instance_hidden"/>
|
||||
<file name="org-netbeans-modules-autoupdate-ui-actions-PluginManagerAction.shadow_hidden"/>
|
||||
<file name="org-netbeans-modules-favorites-templates-TemplatesAction.shadow_hidden"/>
|
||||
<file name="org-netbeans-modules-options-OptionsWindowAction.shadow_hidden"/>
|
||||
<file name="org-openide-actions-ToolsAction.shadow_hidden"/>
|
||||
</folder>
|
||||
|
||||
<folder name="View">
|
||||
<file name="org-netbeans-core-actions-HTMLViewAction.shadow_hidden"/>
|
||||
<file name="org-netbeans-core-actions-LogAction.shadow_hidden"/>
|
||||
@ -188,11 +171,6 @@
|
||||
<attr name="position" intvalue="3075"/>
|
||||
</file>
|
||||
</folder>
|
||||
<file name="org-sleuthkit-autopsy-hashdatabase-HashDbIngestService.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.ingest.IngestServiceFsContent"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.hashdatabase.HashDbIngestService.getDefault"/>
|
||||
<attr name="position" intvalue="300"/>
|
||||
</file>
|
||||
</folder>
|
||||
<folder name="Shortcuts">
|
||||
<file name="D-N.shadow">
|
||||
|
@ -1,76 +0,0 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package org.sleuthkit.autopsy.hashdatabase;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestServiceFsContent;
|
||||
import org.sleuthkit.datamodel.FsContent;
|
||||
|
||||
public class HashDbIngestService implements IngestServiceFsContent {
|
||||
|
||||
private static HashDbIngestService instance = null;
|
||||
|
||||
private static String SERVICE_NAME = "Hash Db";
|
||||
|
||||
private static final Logger logger = Logger.getLogger(HashDbIngestService.class.getName());
|
||||
|
||||
private HashDbIngestService() {
|
||||
|
||||
}
|
||||
|
||||
public static synchronized HashDbIngestService getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new HashDbIngestService();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(FsContent fsContent) {
|
||||
logger.log(Level.INFO, "Processing fsContent: " + fsContent.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void complete() {
|
||||
logger.log(Level.INFO, "complete()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return SERVICE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(IngestManager manager) {
|
||||
logger.log(Level.INFO, "init()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop() {
|
||||
logger.log(Level.INFO, "stop()");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
8
HashDatabase/build.xml
Normal file
8
HashDatabase/build.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
|
||||
<!-- for some information on what you could do (e.g. targets to override). -->
|
||||
<!-- If you delete this file and reopen the project it will be recreated. -->
|
||||
<project name="org.sleuthkit.autopsy.hashdatabase" default="netbeans" basedir=".">
|
||||
<description>Builds, tests, and runs the project org.sleuthkit.autopsy.hashdatabase.</description>
|
||||
<import file="nbproject/build-impl.xml"/>
|
||||
</project>
|
6
HashDatabase/manifest.mf
Normal file
6
HashDatabase/manifest.mf
Normal file
@ -0,0 +1,6 @@
|
||||
Manifest-Version: 1.0
|
||||
OpenIDE-Module: org.sleuthkit.autopsy.hashdatabase
|
||||
OpenIDE-Module-Layer: org/sleuthkit/autopsy/hashdatabase/layer.xml
|
||||
OpenIDE-Module-Localizing-Bundle: org/sleuthkit/autopsy/hashdatabase/Bundle.properties
|
||||
OpenIDE-Module-Specification-Version: 1.0
|
||||
|
45
HashDatabase/nbproject/build-impl.xml
Normal file
45
HashDatabase/nbproject/build-impl.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
*** GENERATED FROM project.xml - DO NOT EDIT ***
|
||||
*** EDIT ../build.xml INSTEAD ***
|
||||
-->
|
||||
<project name="org.sleuthkit.autopsy.hashdatabase-impl" basedir="..">
|
||||
<fail message="Please build using Ant 1.7.1 or higher.">
|
||||
<condition>
|
||||
<not>
|
||||
<antversion atleast="1.7.1"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<property file="nbproject/private/suite-private.properties"/>
|
||||
<property file="nbproject/suite.properties"/>
|
||||
<fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
|
||||
<property file="${suite.dir}/nbproject/private/platform-private.properties"/>
|
||||
<property file="${suite.dir}/nbproject/platform.properties"/>
|
||||
<macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="name"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{name}" value="${@{value}}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
|
||||
<attribute name="property"/>
|
||||
<attribute name="value"/>
|
||||
<sequential>
|
||||
<property name="@{property}" value="@{value}"/>
|
||||
</sequential>
|
||||
</macrodef>
|
||||
<property file="${user.properties.file}"/>
|
||||
<nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
|
||||
<fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
|
||||
<condition>
|
||||
<not>
|
||||
<contains string="${cluster.path.evaluated}" substring="platform"/>
|
||||
</not>
|
||||
</condition>
|
||||
</fail>
|
||||
<import file="${harness.dir}/build.xml"/>
|
||||
</project>
|
8
HashDatabase/nbproject/genfiles.properties
Normal file
8
HashDatabase/nbproject/genfiles.properties
Normal file
@ -0,0 +1,8 @@
|
||||
build.xml.data.CRC32=3540e213
|
||||
build.xml.script.CRC32=1308cb72
|
||||
build.xml.stylesheet.CRC32=a56c6a5b@1.46.2
|
||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||
nbproject/build-impl.xml.data.CRC32=3540e213
|
||||
nbproject/build-impl.xml.script.CRC32=a7a0d07a
|
||||
nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46.2
|
2
HashDatabase/nbproject/project.properties
Normal file
2
HashDatabase/nbproject/project.properties
Normal file
@ -0,0 +1,2 @@
|
||||
javac.source=1.6
|
||||
javac.compilerargs=-Xlint -Xlint:-serial
|
73
HashDatabase/nbproject/project.xml
Normal file
73
HashDatabase/nbproject/project.xml
Normal file
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.apisupport.project</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
|
||||
<code-name-base>org.sleuthkit.autopsy.hashdatabase</code-name-base>
|
||||
<suite-component/>
|
||||
<module-dependencies>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.awt</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.31.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.dialogs</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>7.20.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.openide.util</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<specification-version>8.15.1</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.sleuthkit.autopsy.casemodule</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.0</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.sleuthkit.autopsy.coreutils</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>0-1</release-version>
|
||||
<specification-version>0.0</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.sleuthkit.autopsy.datamodel</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>1</release-version>
|
||||
<specification-version>1.0</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<code-name-base>org.sleuthkit.autopsy.ingest</code-name-base>
|
||||
<build-prerequisite/>
|
||||
<compile-dependency/>
|
||||
<run-dependency>
|
||||
<release-version>0-1</release-version>
|
||||
<specification-version>1.0</specification-version>
|
||||
</run-dependency>
|
||||
</dependency>
|
||||
</module-dependencies>
|
||||
<public-packages/>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
1
HashDatabase/nbproject/suite.properties
Normal file
1
HashDatabase/nbproject/suite.properties
Normal file
@ -0,0 +1 @@
|
||||
suite.dir=${basedir}/..
|
@ -1,2 +1,3 @@
|
||||
OpenIDE-Module-Name=HashDatabase
|
||||
HashDatabaseManagementPanel.okayButton.text=Okay
|
||||
HashDbPanel.fileSelectButton.text=Select...\n
|
@ -0,0 +1,111 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> org
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package org.sleuthkit.autopsy.hashdatabase;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.ingest.IngestManager;
|
||||
import org.sleuthkit.autopsy.ingest.IngestMessage;
|
||||
import org.sleuthkit.autopsy.ingest.IngestServiceFsContent;
|
||||
import org.sleuthkit.datamodel.FsContent;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.TskException;
|
||||
|
||||
public class HashDbIngestService implements IngestServiceFsContent {
|
||||
|
||||
private static HashDbIngestService instance = null;
|
||||
|
||||
private static final Logger logger = Logger.getLogger(HashDbIngestService.class.getName());
|
||||
|
||||
private IngestManager manager;
|
||||
|
||||
private SleuthkitCase skCase;
|
||||
|
||||
private HashDbIngestService() {
|
||||
|
||||
}
|
||||
|
||||
public static synchronized HashDbIngestService getDefault() {
|
||||
if (instance == null) {
|
||||
instance = new HashDbIngestService();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
||||
private final static String NAME = "Hash Ingest Service";
|
||||
/**
|
||||
* notification from manager that brand new processing should be initiated.
|
||||
* Service loads its configuration and performs initialization
|
||||
*
|
||||
* @param IngestManager handle to the manager to postMessage() to
|
||||
*/
|
||||
@Override
|
||||
public void init(IngestManager manager){
|
||||
logger.log(Level.INFO, "init()");
|
||||
this.manager = manager;
|
||||
this.skCase = Case.getCurrentCase().getSleuthkitCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* notification from manager that there is no more content to process and all work is done.
|
||||
* Service performs any clean-up, notifies viewers and may also write results to the black-board
|
||||
*/
|
||||
@Override
|
||||
public void complete(){
|
||||
logger.log(Level.INFO, "complete()");
|
||||
}
|
||||
|
||||
/**
|
||||
* notification from manager to stop processing due to some interruption (user, error, exception)
|
||||
*/
|
||||
@Override
|
||||
public void stop(){
|
||||
logger.log(Level.INFO, "stop()");
|
||||
}
|
||||
|
||||
/**
|
||||
* get specific name of the service
|
||||
* should be unique across services, a user-friendly name of the service shown in GUI
|
||||
*/
|
||||
@Override
|
||||
public String getName(){
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(FsContent fsContent){
|
||||
logger.log(Level.INFO, "Processing fsContent: " + fsContent.getName());
|
||||
try{
|
||||
long status = skCase.analyzeFileMd5(fsContent);
|
||||
if(status == 1){
|
||||
manager.postMessage(IngestMessage.createDataMessage(123, this, "Found known file", null));
|
||||
}else if(status == 2){
|
||||
manager.postMessage(IngestMessage.createDataMessage(123, this, "Found known bad file", null));
|
||||
}
|
||||
} catch (TskException e){
|
||||
logger.log(Level.SEVERE, "Couldn't analyze file - see sleuthkit log for details");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?xml version="1.1" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
@ -33,7 +33,7 @@
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Component id="fileSelectButton" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="databaseDetailsLabel" alignment="0" max="32767" attributes="1"/>
|
||||
<Component id="databaseDetailsLabel" alignment="0" pref="408" max="32767" attributes="1"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
|
||||
<filesystem>
|
||||
<folder name="Actions">
|
||||
<folder name="Tools">
|
||||
<file name="org-sleuthkit-autopsy-hashdatabase-HashDbMgmtAction.instance">
|
||||
</file>
|
||||
</folder>
|
||||
</folder>
|
||||
<folder name="Menu">
|
||||
|
||||
<folder name="Tools">
|
||||
<file name="org-sleuthkit-autopsy-hashdatabase-HashDatabaseSettingsAction.shadow">
|
||||
<attr name="originalFile" stringvalue="Actions/Tools/org-sleuthkit-autopsy-hashdatabase-HashDbMgmtAction.instance"/>
|
||||
<attr name="position" intvalue="1000"/>
|
||||
</file>
|
||||
<file name="SeparatorAfterHashDatabaseSettings.instance">
|
||||
<attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
|
||||
<attr name="position" intvalue="1001"/>
|
||||
</file>
|
||||
<file name="Separator1.instance_hidden"/>
|
||||
<file name="Separator3.instance_hidden"/>
|
||||
<file name="org-netbeans-modules-autoupdate-ui-actions-PluginManagerAction.shadow_hidden"/>
|
||||
<file name="org-netbeans-modules-favorites-templates-TemplatesAction.shadow_hidden"/>
|
||||
<file name="org-netbeans-modules-options-OptionsWindowAction.shadow_hidden"/>
|
||||
<file name="org-openide-actions-ToolsAction.shadow_hidden"/>
|
||||
</folder>
|
||||
</folder>
|
||||
<folder name="Services">
|
||||
<file name="org-sleuthkit-autopsy-hashdatabase-HashDbIngestService.instance">
|
||||
<attr name="instanceOf" stringvalue="org.sleuthkit.autopsy.ingest.IngestServiceFsContent"/>
|
||||
<attr name="instanceCreate" methodvalue="org.sleuthkit.autopsy.hashdatabase.HashDbIngestService.getDefault"/>
|
||||
<attr name="position" intvalue="300"/>
|
||||
</file>
|
||||
</folder>
|
||||
</filesystem>
|
@ -19,13 +19,15 @@ modules=\
|
||||
${project.org.sleuthkit.autopsy.casemodule}:\
|
||||
${project.org.sleuthkit.autopsy.keywordsearch}:\
|
||||
${project.org.sleuthkit.autopsy.coreutils}:\
|
||||
${project.org.sleuthkit.autopsy.ingest}
|
||||
${project.org.sleuthkit.autopsy.ingest}:\
|
||||
${project.org.sleuthkit.autopsy.hashdatabase}
|
||||
project.org.sleuthkit.autopsy.casemodule=Case
|
||||
project.org.sleuthkit.autopsy.corecomponentinterfaces=CoreComponentInterfaces
|
||||
project.org.sleuthkit.autopsy.corecomponents=CoreComponents
|
||||
project.org.sleuthkit.autopsy.coreutils=CoreUtils
|
||||
project.org.sleuthkit.autopsy.directorytree=DirectoryTree
|
||||
project.org.sleuthkit.autopsy.filesearch=FileSearch
|
||||
project.org.sleuthkit.autopsy.hashdatabase=HashDatabase
|
||||
project.org.sleuthkit.autopsy.ingest=Ingest
|
||||
project.org.sleuthkit.autopsy.keywordsearch=KeywordSearch
|
||||
project.org.sleuthkit.autopsy.menuactions=MenuActions
|
||||
|
Loading…
x
Reference in New Issue
Block a user