mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Merge branch 'master' of https://github.com/sleuthkit/autopsy
This commit is contained in:
commit
f5ff3b45d9
4
.gitignore
vendored
4
.gitignore
vendored
@ -46,8 +46,10 @@ genfiles.properties
|
||||
/branding/nbproject/*
|
||||
!/branding/nbproject/project.xml
|
||||
!/branding/nbproject/project.properties
|
||||
/test/input/
|
||||
/test/input/*
|
||||
!/test/input/notablehashes.txt-md5.idx
|
||||
!/test/input/notablekeywords.xml
|
||||
!/test/input/NSRL.txt-md5.idx
|
||||
/test/output/*
|
||||
!/test/output/gold
|
||||
/test/output/gold/tmp
|
||||
|
@ -816,7 +816,7 @@ public class Case {
|
||||
* Invoke the creation of startup dialog window.
|
||||
*/
|
||||
static public void invokeStartupDialog() {
|
||||
StartupWindow.getInstance().open();
|
||||
StartupWindowProvider.getInstance().open();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,7 +86,7 @@ public final class CaseCloseAction extends CallableSystemAction implements Prese
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
StartupWindow.getInstance().open();
|
||||
StartupWindowProvider.getInstance().open();
|
||||
}
|
||||
});
|
||||
} catch (Exception ex) {
|
||||
|
@ -85,7 +85,7 @@ public final class CaseOpenAction implements ActionListener {
|
||||
} else {
|
||||
// try to close Startup window if there's one
|
||||
try {
|
||||
StartupWindow.getInstance().close();
|
||||
StartupWindowProvider.getInstance().close();
|
||||
} catch (Exception ex) {
|
||||
// no need to show the error message to the user.
|
||||
logger.log(Level.WARNING, "Error closing startup window.", ex);
|
||||
@ -97,7 +97,7 @@ public final class CaseOpenAction implements ActionListener {
|
||||
+ ": " + ex.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
|
||||
logger.log(Level.WARNING, "Error opening case in folder " + path, ex);
|
||||
|
||||
StartupWindow.getInstance().open();
|
||||
StartupWindowProvider.getInstance().open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ class NewCaseWizardPanel1 implements WizardDescriptor.ValidatingPanel<WizardDesc
|
||||
createdDirectory = caseDirPath;
|
||||
// try to close Startup window if there's one
|
||||
try {
|
||||
StartupWindow.getInstance().close();
|
||||
StartupWindowProvider.getInstance().close();
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.WARNING, "Startup window didn't close as expected.", ex);
|
||||
|
||||
|
@ -187,7 +187,7 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
|
||||
if (!casePath.equals("")) {
|
||||
// Close the startup menu
|
||||
try {
|
||||
StartupWindow.getInstance().close();
|
||||
StartupWindowProvider.getInstance().close();
|
||||
CueBannerPanel.closeOpenRecentCasesWindow();
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.WARNING, "Error: couldn't open case: " + caseName, ex);
|
||||
@ -200,7 +200,7 @@ class OpenRecentCasePanel extends javax.swing.JPanel {
|
||||
|
||||
//if case is not opened, open the start window
|
||||
if (Case.isCaseOpen() == false) {
|
||||
StartupWindow.getInstance().open();
|
||||
StartupWindowProvider.getInstance().open();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -65,7 +65,7 @@ class RecentItems implements ActionListener {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
StartupWindow.getInstance().open();
|
||||
StartupWindowProvider.getInstance().open();
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -26,40 +26,28 @@ import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JFrame;
|
||||
import org.openide.util.lookup.ServiceProvider;
|
||||
|
||||
/**
|
||||
* Displays
|
||||
* The default implementation of the Autopsy startup window
|
||||
*/
|
||||
public final class StartupWindow extends JDialog {
|
||||
@ServiceProvider(service=StartupWindowInterface.class)
|
||||
public final class StartupWindow extends JDialog implements StartupWindowInterface {
|
||||
|
||||
private static StartupWindow instance;
|
||||
private static final String TITLE = "Welcome";
|
||||
private static Dimension DIMENSIONS = new Dimension(750, 400);
|
||||
|
||||
private StartupWindow(JFrame frame, String title, boolean isModal) {
|
||||
super(frame, title, isModal);
|
||||
public StartupWindow() {
|
||||
super(new JFrame(TITLE), TITLE, true);
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the startup window
|
||||
* @return the startup window singleton
|
||||
*/
|
||||
public static synchronized StartupWindow getInstance() {
|
||||
if (StartupWindow.instance == null) {
|
||||
JFrame frame = new JFrame(TITLE);
|
||||
boolean isModal = true;
|
||||
StartupWindow.instance = new StartupWindow(frame, TITLE, isModal);
|
||||
}
|
||||
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the startup window.
|
||||
*/
|
||||
public void init() {
|
||||
private void init() {
|
||||
|
||||
Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
|
||||
|
||||
@ -88,6 +76,7 @@ public final class StartupWindow extends JDialog {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void open() {
|
||||
setVisible(true);
|
||||
}
|
||||
@ -95,6 +84,7 @@ public final class StartupWindow extends JDialog {
|
||||
/**
|
||||
* Closes the startup window.
|
||||
*/
|
||||
@Override
|
||||
public void close() {
|
||||
this.setVisible(false);
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013 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.casemodule;
|
||||
|
||||
/**
|
||||
* Interface for startup window implementations
|
||||
*/
|
||||
public interface StartupWindowInterface {
|
||||
|
||||
/**
|
||||
* Shows and makes active the startup window
|
||||
*/
|
||||
public void open();
|
||||
|
||||
/**
|
||||
* Closes the startup window
|
||||
*/
|
||||
public void close();
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2013 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.casemodule;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.logging.Level;
|
||||
import org.openide.util.Lookup;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
|
||||
/**
|
||||
* Provides the start up window to rest of the application. It may return the
|
||||
* main / default startup window, or a custom one if it has been discovered.
|
||||
*
|
||||
* All that is required to create a custom startup window in a module and active it,
|
||||
* is to implement StartupWindowInterface and register it with lookup as a ServiceProvider.
|
||||
* The custom startup window is automatically chosen over the default one, given it is the only external module custom startup window.
|
||||
*/
|
||||
public class StartupWindowProvider implements StartupWindowInterface {
|
||||
|
||||
private static volatile StartupWindowProvider instance;
|
||||
private static final Logger logger = Logger.getLogger(StartupWindowProvider.class.getName());
|
||||
private volatile StartupWindowInterface startupWindowToUse;
|
||||
|
||||
public static StartupWindowProvider getInstance() {
|
||||
if (instance == null) {
|
||||
synchronized (StartupWindowProvider.class) {
|
||||
if (instance == null) {
|
||||
instance = new StartupWindowProvider();
|
||||
instance.init();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
private void init() {
|
||||
if (startupWindowToUse == null) {
|
||||
//discover the registered windows
|
||||
Collection<? extends StartupWindowInterface> startupWindows =
|
||||
Lookup.getDefault().lookupAll(StartupWindowInterface.class);
|
||||
|
||||
int windowsCount = startupWindows.size();
|
||||
if (windowsCount > 2) {
|
||||
logger.log(Level.WARNING, "More than 2 (" + windowsCount + ") start up windows discovered, will use the first custom one");
|
||||
} else if (windowsCount == 1) {
|
||||
startupWindowToUse = startupWindows.iterator().next();
|
||||
logger.log(Level.INFO, "Will use the default startup window: " + startupWindowToUse.toString());
|
||||
} else {
|
||||
//pick the non default one
|
||||
Iterator<? extends StartupWindowInterface> it = startupWindows.iterator();
|
||||
while (it.hasNext()) {
|
||||
StartupWindowInterface window = it.next();
|
||||
if (!org.sleuthkit.autopsy.casemodule.StartupWindow.class.isInstance(window)) {
|
||||
startupWindowToUse = window;
|
||||
logger.log(Level.INFO, "Will use the custom startup window: " + startupWindowToUse.toString());
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (startupWindowToUse == null) {
|
||||
logger.log(Level.SEVERE, "Unexpected error, no custom startup window found, using the default");
|
||||
startupWindowToUse = new org.sleuthkit.autopsy.casemodule.StartupWindow();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void open() {
|
||||
if (startupWindowToUse != null) {
|
||||
startupWindowToUse.open();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
if (startupWindowToUse != null) {
|
||||
startupWindowToUse.close();
|
||||
}
|
||||
}
|
||||
}
|
@ -124,7 +124,7 @@ public class Installer extends ModuleInstall {
|
||||
javaFxInit = false;
|
||||
final String msg = "Error initializing JavaFX. ";
|
||||
final String details = " Some features will not be available. "
|
||||
+ " Check that you have the right JRE installed (Sun JRE > 1.7.10). ";
|
||||
+ " Check that you have the right JRE installed (Oracle JRE > 1.7.10). ";
|
||||
logger.log(Level.SEVERE, msg
|
||||
+ details, e);
|
||||
|
||||
|
@ -578,22 +578,21 @@ class IngestScheduler {
|
||||
* of skipped
|
||||
* @return true if should be enqueued, false otherwise
|
||||
*/
|
||||
private static boolean shouldEnqueueTask(ProcessTask processTask) {
|
||||
private static boolean shouldEnqueueTask(final ProcessTask processTask) {
|
||||
final AbstractFile aFile = processTask.file;
|
||||
|
||||
//if it's unalloc file, skip if so scheduled
|
||||
if (processTask.context.isProcessUnalloc() == false) {
|
||||
if (aFile.isVirtual() == true) {
|
||||
if (processTask.context.isProcessUnalloc() == false
|
||||
&& aFile.getType().equals(TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS //unalloc files
|
||||
) ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
String fileName = aFile.getName();
|
||||
if (fileName.equals(".") || fileName.equals("..")) {
|
||||
return false;
|
||||
}
|
||||
if (aFile.isVirtual() == false && aFile.isFile() == true
|
||||
&& aFile.getType() == TSK_DB_FILES_TYPE_ENUM.FS) {
|
||||
else if (aFile instanceof org.sleuthkit.datamodel.File ) {
|
||||
final org.sleuthkit.datamodel.File f = (File) aFile;
|
||||
|
||||
//skip files in root dir, starting with $, containing : (not default attributes)
|
||||
|
@ -23,19 +23,19 @@ import javax.swing.JPanel;
|
||||
public interface GeneralReportModule extends ReportModule {
|
||||
|
||||
/**
|
||||
* Generate the report and update the report's ProgressPanel, then save the report
|
||||
* to the reportPath.
|
||||
* Called to generate the report. Method is responsible for saving the file at the
|
||||
* path specified and updating progress via the progressPanel object.
|
||||
*
|
||||
* @param reportPath path to save the report
|
||||
* @param progressPanel panel to update the report's progress
|
||||
* @param progressPanel panel to update the report's progress with
|
||||
*/
|
||||
public void generateReport(String reportPath, ReportProgressPanel progressPanel);
|
||||
|
||||
/**
|
||||
* Returns the configuration panel for the report, which is displayed in
|
||||
* the report configuration step of the report wizard.
|
||||
* the report configuration step of the report wizard.
|
||||
*
|
||||
* @return the report's configuration panel
|
||||
* @return Configuration panel or null if the module does not need configuration.
|
||||
*/
|
||||
public JPanel getConfigurationPanel();
|
||||
|
||||
|
@ -43,8 +43,7 @@ public interface ReportModule {
|
||||
public String getDescription();
|
||||
|
||||
/**
|
||||
* Calls to the report module to execute a method to get the extension that
|
||||
* is used for the report
|
||||
* Returns the extension that is used for the report
|
||||
*
|
||||
* @return String the extension the file will be saved as
|
||||
*
|
||||
|
@ -53,7 +53,7 @@
|
||||
<target name="retrieve-deps-local" description="build library dependencies that are stored local-only">
|
||||
<!-- javafx: note: this a workaround, needs to match the one from jre/jdk and ideally be automatically included -->
|
||||
<!-- javafx native libs are always on runtime classpath from jre -->
|
||||
<copy file="${thirdparty.dir}/jfxrt/1.7.13/jfxrt.jar" todir="release/modules/ext/" />
|
||||
<copy file="${thirdparty.dir}/jfxrt/1.7.21/jfxrt.jar" todir="release/modules/ext/" />
|
||||
</target>
|
||||
|
||||
<target name="retrieve-deps" description="retrieve dependencies using ivy" depends="init-ivy,build-native-libs">
|
||||
|
@ -2,9 +2,9 @@ file.reference.activation-1.1.jar=release/modules/ext/activation-1.1.jar
|
||||
file.reference.ant-1.8.2.jar=release/modules/ext/ant-1.8.2.jar
|
||||
file.reference.ant-launcher-1.8.2.jar=release/modules/ext/ant-launcher-1.8.2.jar
|
||||
file.reference.AppleJavaExtensions-1.4.jar=release/modules/ext/AppleJavaExtensions-1.4.jar
|
||||
file.reference.avalon-framework-4.1.3.jar=release/modules/ext/avalon-framework-4.1.3.jar
|
||||
file.reference.commons-codec-1.5.jar=release/modules/ext/commons-codec-1.5.jar
|
||||
file.reference.commons-io-2.4.jar=release/modules/ext/commons-io-2.4.jar
|
||||
file.reference.commons-lang-2.6.jar=release/modules/ext/commons-lang-2.6.jar
|
||||
file.reference.commons-lang3-3.0-javadoc.jar=release/modules/ext/commons-lang3-3.0-javadoc.jar
|
||||
file.reference.commons-lang3-3.0-sources.jar=release/modules/ext/commons-lang3-3.0-sources.jar
|
||||
file.reference.commons-lang3-3.0.jar=release/modules/ext/commons-lang3-3.0.jar
|
||||
|
@ -816,10 +816,6 @@
|
||||
<runtime-relative-path>ext/commons-lang-2.6.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/commons-lang-2.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/avalon-framework-4.1.3.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/avalon-framework-4.1.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/javassist-3.12.1.GA.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/javassist-3.12.1.GA.jar</binary-origin>
|
||||
@ -828,14 +824,14 @@
|
||||
<runtime-relative-path>ext/ant-launcher-1.8.2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/ant-launcher-1.8.2.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jcalendarbutton-1.4.6.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jcalendarbutton-1.4.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/mail-1.4.3.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/mail-1.4.3.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/jcalendarbutton-1.4.6.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/jcalendarbutton-1.4.6.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/xml-apis-1.0.b2.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/xml-apis-1.0.b2.jar</binary-origin>
|
||||
@ -920,6 +916,10 @@
|
||||
<runtime-relative-path>ext/poi-excelant-3.8.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/poi-excelant-3.8.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
<class-path-extension>
|
||||
<runtime-relative-path>ext/avalon-framework-4.1.5.jar</runtime-relative-path>
|
||||
<binary-origin>release/modules/ext/avalon-framework-4.1.5.jar</binary-origin>
|
||||
</class-path-extension>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
||||
|
1
NEWS.txt
1
NEWS.txt
@ -7,6 +7,7 @@ Improvements:
|
||||
|
||||
Bugfixes:
|
||||
- Keyword Search: fix when Solr does not cleanly shutdown
|
||||
- fix for "Process Unallocated Space" option doesn't do anything
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -302,6 +302,7 @@ public class RegressionTest extends TestCase{
|
||||
JDialog previewDialog = JDialogOperator.waitJDialog("Progress", false, false);
|
||||
screenshot("Progress");
|
||||
JDialogOperator previewDialogOperator = new JDialogOperator(previewDialog);
|
||||
JLabel waiter = JLabelOperator.waitJLabel(previewDialog, "Complete", false, false);
|
||||
JButtonOperator jbo2 = new JButtonOperator(previewDialogOperator, "Close");
|
||||
jbo2.pushNoBlock();
|
||||
new Timeout("pausing", 3000).sleep(); // Give the program a second to idle to be safe
|
||||
|
@ -38,16 +38,16 @@ If you implement GeneralReportModule, the overriden methods will be:
|
||||
- org.sleuthkit.autopsy.report.GeneralReportModule::generateReport(String reportPath, ReportProgressPanel progressPanel)
|
||||
- org.sleuthkit.autopsy.report.GeneralReportModule::getConfigurationPanel()
|
||||
|
||||
For general report modules, Autopsy will simply call the generateReport(String reportPath, ReportProgressPanel progressPanel) method and leave it up to the module to aquire and report data in its desired format. The only requirements are that the module saves to the given report path and updates the org.sleuthkit.autopsy.report.ReportProgressPanel as the report progresses.
|
||||
For general report modules, Autopsy will simply call the generateReport(String reportPath, ReportProgressPanel progressPanel) method and leave it up to the module to aquire and report data in its desired format. The only requirements are that the module saves to the given report path and updates the org.sleuthkit.autopsy.report.ReportProgressPanel as the report progresses.
|
||||
|
||||
When updating the progress panel, it is recommened to update it as infrequently as possible, while still keeping the user informed. If your report processes 100,000 files and you chose to update the UI each time a file is reviewed, the UI would freeze when trying to process all your requests. This would cause problems to not only your reporting module, but to other modules running in parellel. A safer approach would be to update the UI every 1,000 files, or when a certain "category" of the files being processed has changed. For example, the HTML report module increments the progress bar and changes the processing label every time a new Blackboard Artifact Type is being processed.
|
||||
When updating the progress panel, it is recommended to update it as infrequently as possible, while still keeping the user informed. If your report processes 100,000 files and you chose to update the UI each time a file is reviewed, the UI would freeze when trying to process all your requests. This would cause problems to not only your reporting module, but to other modules running in parallel. A safer approach would be to update the UI every 1,000 files, or when a certain "category" of the files being processed has changed. For example, the HTML report module increments the progress bar and changes the processing label every time a new Blackboard Artifact Type is being processed.
|
||||
|
||||
Autopsy will also display the panel returned by getConfigurationPanel() in the generate report wizard, when that particular report module is selected. If null is returned, a blank panel will be displayed instead. This panel can be used to allow the user custom controls over the report.
|
||||
Autopsy will also display the panel returned by getConfigurationPanel() in the generate report wizard. This panel can be used to allow the user custom controls over the report.
|
||||
|
||||
Typically a general report module should interact with both the Blackboard API in the org.sleuthkit.datamodel.SleuthkitCase class, in addition to an API (possibly external/thirdparty) to convert Blackboard Artifacts to the desired reporting format.
|
||||
|
||||
\subsection report_create_module_layer Registering the Report in layer.xml
|
||||
Lastly, it is important to register each report module, regardless of the type, to a layer.xml file. This file serves as a globally excessible instance of the report module, and allows all report modules to be recognized abstractly without knowing each class. Without this file, Autopsy will be unable to see your report module.
|
||||
Lastly, it is important to register each report module, regardless of the type, to a layer.xml file. This file allows Autopsy to find the report module.
|
||||
|
||||
An example entry into layer.xml is shown below:
|
||||
\code
|
||||
|
6
test/input/NSRL.txt-md5.idx
Normal file
6
test/input/NSRL.txt-md5.idx
Normal file
@ -0,0 +1,6 @@
|
||||
00000000000000000000000000000000000000000|md5sum
|
||||
00000000000000000000000000000000000000001|NSRLcreator.txt
|
||||
0D4A1C9ED5A49CAF22FD5F52C666DE2C|0000000000000045
|
||||
35BA15EC1C3CF03531282147DB10A089|0000000000000100
|
||||
91C66396EEC4BCEEAF6EDE7A48F60C63|0000000000000152
|
||||
A99F69068F958CF412E7F8B8A0142B41|0000000000000000
|
6
test/input/notablehashes.txt-md5.idx
Normal file
6
test/input/notablehashes.txt-md5.idx
Normal file
@ -0,0 +1,6 @@
|
||||
00000000000000000000000000000000000000000|md5sum
|
||||
00000000000000000000000000000000000000001|notablehashescreator.txt
|
||||
48199F51973F317459E80E18DC744B12|0000000000000000
|
||||
5CCB10AEA1EC335139715D4AA44D0EE0|0000000000000062
|
||||
94610B03A4295300AA29C3364DB18683|0000000000000108
|
||||
A06B65C36E0E5A8229749375C3AAC4B1|0000000000000160
|
15
test/input/notablekeywords.xml
Normal file
15
test/input/notablekeywords.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<keyword_lists>
|
||||
<keyword_list created="2012-03-23 11:06:17" modified="2012-03-23 11:08:48" name="notable_keywords" use_for_ingest="true">
|
||||
<keyword literal="true">Jean</keyword>
|
||||
<keyword literal="true">Personalized</keyword>
|
||||
<keyword literal="true">DIRT</keyword>
|
||||
<keyword literal="true">Osama</keyword>
|
||||
<keyword literal="true">bomb</keyword>
|
||||
<keyword literal="true">hacking</keyword>
|
||||
<keyword literal="true">molotov</keyword>
|
||||
<keyword literal="true">nuclear</keyword>
|
||||
<keyword literal="true">صحافة و إعلام</keyword>
|
||||
<keyword literal="true">مطلوبا</keyword>
|
||||
</keyword_list>
|
||||
</keyword_lists>
|
84
test/script/Emailer.py
Normal file
84
test/script/Emailer.py
Normal file
@ -0,0 +1,84 @@
|
||||
import smtplib
|
||||
from email.mime.image import MIMEImage
|
||||
from email.mime.multipart import MIMEMultipart
|
||||
from email.mime.text import MIMEText
|
||||
from email.MIMEBase import MIMEBase
|
||||
from email import Encoders
|
||||
import urllib2
|
||||
import xml
|
||||
from time import localtime, strftime
|
||||
from xml.dom.minidom import parse, parseString
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
|
||||
def send_email(parsed, errorem, attachl, passFail):
|
||||
element = parsed.getElementsByTagName("email")
|
||||
if(len(element)<=0):
|
||||
return
|
||||
element = element[0]
|
||||
toval = element.getAttribute("value").encode().decode("utf_8")
|
||||
if(toval==None):
|
||||
return
|
||||
element = parsed.getElementsByTagName("mail_server")[0]
|
||||
serverval = element.getAttribute("value").encode().decode("utf_8")
|
||||
# Create the container (outer) email message.
|
||||
msg = MIMEMultipart()
|
||||
if(passFail):
|
||||
msg['Subject'] = '[Test]Autopsy test passed.'
|
||||
else:
|
||||
msg['Subject'] = '[Test]Autopsy test failed.'
|
||||
# me == the sender's email address
|
||||
# family = the list of all recipients' email addresses
|
||||
msg['From'] = 'AutopsyTest'
|
||||
msg['To'] = toval
|
||||
msg.preamble = 'This is a test'
|
||||
container = MIMEText(errorem, 'plain')
|
||||
msg.attach(container)
|
||||
Build_email(msg, attachl)
|
||||
s = smtplib.SMTP(serverval)
|
||||
s.sendmail(msg['From'], msg['To'], msg.as_string())
|
||||
s.quit()
|
||||
|
||||
def Build_email(msg, attachl):
|
||||
for file in attachl:
|
||||
part = MIMEBase('application', "octet-stream")
|
||||
atach = open(file, "rb")
|
||||
attch = atach.read()
|
||||
noml = file.split("\\")
|
||||
nom = noml[len(noml)-1]
|
||||
part.set_payload(attch)
|
||||
Encoders.encode_base64(part)
|
||||
part.add_header('Content-Disposition', 'attachment; filename="' + nom + '"')
|
||||
msg.attach(part)
|
||||
|
||||
# Returns a Windows style path starting with the cwd and
|
||||
# ending with the list of directories given
|
||||
def make_local_path(*dirs):
|
||||
path = wgetcwd()
|
||||
for dir in dirs:
|
||||
path += ("\\" + dir)
|
||||
return path_fix(path)
|
||||
|
||||
# Returns a Windows style path based only off the given directories
|
||||
def make_path(*dirs):
|
||||
path = dirs[0]
|
||||
for dir in dirs[1:]:
|
||||
path += ("\\" + dir)
|
||||
return path_fix(path)
|
||||
|
||||
# Fix a standard os.path by making it Windows format
|
||||
def path_fix(path):
|
||||
return path.replace("/", "\\")
|
||||
|
||||
# Gets the true current working directory instead of Cygwin's
|
||||
def wgetcwd():
|
||||
proc = subprocess.Popen(("cygpath", "-m", os.getcwd()), stdout=subprocess.PIPE)
|
||||
out,err = proc.communicate()
|
||||
tst = out.rstrip()
|
||||
if os.getcwd == tst:
|
||||
return os.getcwd
|
||||
else:
|
||||
proc = subprocess.Popen(("cygpath", "-m", os.getcwd()), stdout=subprocess.PIPE)
|
||||
out,err = proc.communicate()
|
||||
return out.rstrip()
|
186
test/script/srcupdater.py
Normal file
186
test/script/srcupdater.py
Normal file
@ -0,0 +1,186 @@
|
||||
import codecs
|
||||
import datetime
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import socket
|
||||
import sqlite3
|
||||
import subprocess
|
||||
import sys
|
||||
from sys import platform as _platform
|
||||
import time
|
||||
import traceback
|
||||
import xml
|
||||
from xml.dom.minidom import parse, parseString
|
||||
import Emailer
|
||||
|
||||
def compile(errore, attachli, parsedin):
|
||||
global redo
|
||||
global tryredo
|
||||
global failedbool
|
||||
global errorem
|
||||
errorem = errore
|
||||
global attachl
|
||||
attachl = attachli
|
||||
global passed
|
||||
global parsed
|
||||
parsed = parsedin
|
||||
passed = True
|
||||
tryredo = False
|
||||
redo = True
|
||||
while(redo):
|
||||
passed = True
|
||||
if(passed):
|
||||
gitPull("sleuthkit")
|
||||
if(passed):
|
||||
vsBuild()
|
||||
if(passed):
|
||||
gitPull("autopsy")
|
||||
if(passed):
|
||||
antBuild("datamodel", False)
|
||||
if(passed):
|
||||
antBuild("autopsy", True)
|
||||
if(passed):
|
||||
redo = False
|
||||
else:
|
||||
print("Compile Failed")
|
||||
time.sleep(3600)
|
||||
attachl = []
|
||||
errorem = "The test standard didn't match the gold standard.\n"
|
||||
failedbool = False
|
||||
if(tryredo):
|
||||
errorem += "Rebuilt properly.\n"
|
||||
Emailer.send_email(parsed, errorem, attachl, True)
|
||||
attachl = []
|
||||
errorem = "The test standard didn't match the gold standard.\n"
|
||||
passed = True
|
||||
|
||||
#Pulls from git
|
||||
def gitPull(TskOrAutopsy):
|
||||
global SYS
|
||||
global errorem
|
||||
global attachl
|
||||
ccwd = ""
|
||||
gppth = Emailer.make_local_path("..", "GitPullOutput" + TskOrAutopsy + ".txt")
|
||||
attachl.append(gppth)
|
||||
gpout = open(gppth, 'a')
|
||||
toPull = "http://www.github.com/sleuthkit/" + TskOrAutopsy
|
||||
call = ["git", "pull", toPull]
|
||||
if TskOrAutopsy == "sleuthkit":
|
||||
ccwd = os.path.join("..", "..", "..", "sleuthkit")
|
||||
else:
|
||||
ccwd = os.path.join("..", "..")
|
||||
subprocess.call(call, stdout=gpout, cwd=ccwd)
|
||||
gpout.close()
|
||||
|
||||
|
||||
#Builds TSK as a win32 applicatiion
|
||||
def vsBuild():
|
||||
global redo
|
||||
global tryredo
|
||||
global passed
|
||||
global parsed
|
||||
#Please ensure that the current working directory is $autopsy/testing/script
|
||||
oldpath = os.getcwd()
|
||||
os.chdir(os.path.join("..", "..", "..","sleuthkit", "win32"))
|
||||
vs = []
|
||||
vs.append("/cygdrive/c/windows/microsoft.NET/framework/v4.0.30319/MSBuild.exe")
|
||||
vs.append(os.path.join("Tsk-win.sln"))
|
||||
vs.append("/p:configuration=release")
|
||||
vs.append("/p:platform=win32")
|
||||
vs.append("/t:clean")
|
||||
vs.append("/t:rebuild")
|
||||
print(vs)
|
||||
VSpth = Emailer.make_local_path("..", "VSOutput.txt")
|
||||
VSout = open(VSpth, 'a')
|
||||
subprocess.call(vs, stdout=VSout)
|
||||
VSout.close()
|
||||
os.chdir(oldpath)
|
||||
chk = os.path.join("..", "..", "..","sleuthkit", "win32", "Release", "libtsk_jni.dll")
|
||||
try:
|
||||
open(chk)
|
||||
except IOError as e:
|
||||
global errorem
|
||||
global attachl
|
||||
if(not tryredo):
|
||||
errorem += "LIBTSK C++ failed to build.\n"
|
||||
attachl.append(VSpth)
|
||||
Emailer.send_email(parsed, errorem, attachl, False)
|
||||
tryredo = True
|
||||
passed = False
|
||||
redo = True
|
||||
|
||||
|
||||
|
||||
#Builds Autopsy or the Datamodel
|
||||
def antBuild(which, Build):
|
||||
global redo
|
||||
global passed
|
||||
global tryredo
|
||||
global parsed
|
||||
directory = os.path.join("..", "..")
|
||||
ant = []
|
||||
if which == "datamodel":
|
||||
directory = os.path.join("..", "..", "..", "sleuthkit", "bindings", "java")
|
||||
ant.append("ant")
|
||||
ant.append("-f")
|
||||
ant.append(directory)
|
||||
ant.append("clean")
|
||||
if(Build):
|
||||
ant.append("build")
|
||||
else:
|
||||
ant.append("dist")
|
||||
antpth = Emailer.make_local_path("..", "ant" + which + "Output.txt")
|
||||
antout = open(antpth, 'a')
|
||||
succd = subprocess.call(ant, stdout=antout)
|
||||
antout.close()
|
||||
global errorem
|
||||
global attachl
|
||||
if which == "datamodel":
|
||||
chk = os.path.join("..", "..", "..","sleuthkit", "bindings", "java", "dist", "TSK_DataModel.jar")
|
||||
try:
|
||||
open(chk)
|
||||
except IOError as e:
|
||||
if(not tryredo):
|
||||
errorem += "DataModel Java build failed.\n"
|
||||
attachl.append(antpth)
|
||||
Emailer.send_email(parsed, errorem, attachl, False)
|
||||
passed = False
|
||||
tryredo = True
|
||||
elif (succd != 0 and (not tryredo)):
|
||||
errorem += "Autopsy build failed.\n"
|
||||
attachl.append(antpth)
|
||||
Emailer.send_email(parsed, errorem, attachl, False)
|
||||
tryredo = True
|
||||
elif (succd != 0):
|
||||
passed = False
|
||||
|
||||
|
||||
def main():
|
||||
errore = ""
|
||||
attachli = []
|
||||
config_file = ""
|
||||
arg = sys.argv.pop(0)
|
||||
arg = sys.argv.pop(0)
|
||||
config_file = arg
|
||||
parsedin = parse(config_file)
|
||||
compile(errore, attachli, parsedin)
|
||||
|
||||
class OS:
|
||||
LINUX, MAC, WIN, CYGWIN = range(4)
|
||||
if __name__ == "__main__":
|
||||
global SYS
|
||||
if _platform == "linux" or _platform == "linux2":
|
||||
SYS = OS.LINUX
|
||||
elif _platform == "darwin":
|
||||
SYS = OS.MAC
|
||||
elif _platform == "win32":
|
||||
SYS = OS.WIN
|
||||
elif _platform == "cygwin":
|
||||
SYS = OS.CYGWIN
|
||||
|
||||
if SYS is OS.WIN or SYS is OS.CYGWIN:
|
||||
main()
|
||||
else:
|
||||
print("We only support Windows and Cygwin at this time.")
|
BIN
thirdparty/jfxrt/1.7.21/jfxrt.jar
vendored
Normal file
BIN
thirdparty/jfxrt/1.7.21/jfxrt.jar
vendored
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user