mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge branch '3700-3730-3731-3732-3639-roundup' of https://github.com/briangsweeney/autopsy into common-files-type-filter
# Conflicts: # Core/src/org/sleuthkit/autopsy/commonfilesearch/AllDataSources.java # Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaDataBuilder.java # Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java # Core/src/org/sleuthkit/autopsy/commonfilesearch/SingleDataSource.java # Conflicts: # Core/src/org/sleuthkit/autopsy/commonfilesearch/AllDataSources.java # Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesMetaDataBuilder.java # Core/src/org/sleuthkit/autopsy/commonfilesearch/CommonFilesPanel.java # Core/src/org/sleuthkit/autopsy/commonfilesearch/SingleDataSource.java
This commit is contained in:
parent
538bd3c2af
commit
a3038ac395
@ -26,15 +26,20 @@ import java.util.Map;
|
||||
*/
|
||||
final class AllDataSources extends CommonFilesMetaDataBuilder {
|
||||
|
||||
private static final String WHERE_CLAUSE = "md5 in (select md5 from tsk_files where (known != 1 OR known IS NULL)%s GROUP BY md5 HAVING COUNT(*) > 1) order by md5";
|
||||
private static final String WHERE_CLAUSE = "%s md5 in (select md5 from tsk_files where (known != 1 OR known IS NULL)%s GROUP BY md5 HAVING COUNT(*) > 1) order by md5";
|
||||
|
||||
/**
|
||||
* Implements the algorithm for getting common files across all data sources.
|
||||
* @param dataSourceIdMap a map of obj_id to datasource name
|
||||
*/
|
||||
public AllDataSources(Map<Long, String> dataSourceIdMap, boolean filterByMediaMimeType, boolean filterByDocMimeType) {
|
||||
super(dataSourceIdMap, filterByMediaMimeType, filterByDocMimeType);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String buildSqlSelectStatement() {
|
||||
Object[] args = new String[] {CommonFilesMetaDataBuilder.SELECT_PREFIX};
|
||||
Object[] args = new String[] {CommonFilesMetaDataBuilder.SELECT_PREFIX, determineMimeTypeFilter()};
|
||||
return String.format(WHERE_CLAUSE, args);
|
||||
}
|
||||
}
|
||||
|
@ -30,11 +30,15 @@ import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.Exceptions;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
|
||||
import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector;
|
||||
import org.sleuthkit.datamodel.AbstractFile;
|
||||
import org.sleuthkit.datamodel.HashUtility;
|
||||
import org.sleuthkit.datamodel.HashUtility;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase;
|
||||
import org.sleuthkit.datamodel.SleuthkitCase.CaseDbQuery;
|
||||
import org.sleuthkit.datamodel.TskCoreException;
|
||||
|
@ -255,11 +255,11 @@ public final class CommonFilesPanel extends javax.swing.JPanel {
|
||||
}
|
||||
}
|
||||
if (dataSourceId == CommonFilesPanel.NO_DATA_SOURCE_SELECTED) {
|
||||
builder = new AllDataSources(dataSourceMap, filterByMedia, filterByDocuments);
|
||||
builder = new AllDataSources(CommonFilesPanel.this.dataSourceMap, filterByMedia, filterByDocuments);
|
||||
|
||||
setTitleForAllDataSources();
|
||||
} else {
|
||||
builder = new SingleDataSource(dataSourceId, dataSourceMap, filterByMedia, filterByDocuments);
|
||||
builder = new SingleDataSource(dataSourceId, CommonFilesPanel.this.dataSourceMap, filterByMedia, filterByDocuments);
|
||||
|
||||
setTitleForSingleSource(dataSourceId);
|
||||
}
|
||||
|
@ -37,14 +37,14 @@ final class SingleDataSource extends CommonFilesMetaDataBuilder {
|
||||
* @param dataSourceId data source id for which common files must appear at least once
|
||||
* @param dataSourceIdMap map of obj_id to data source name
|
||||
*/
|
||||
public SingleDataSource(Long dataSourceId, Map<Long, String> dataSourceIdMap, boolean filterByMediaMimeType, boolean filterByDocMimeType) {
|
||||
public SingleDataSource(Long dataSourceId, Map<Long, String> dataSourceIdMap, boolean filterByMediaMimeType, boolean filterByDocMimeType) {
|
||||
super(dataSourceIdMap, filterByMediaMimeType, filterByDocMimeType);
|
||||
this.selectedDataSourceId = dataSourceId;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String buildSqlSelectStatement() {
|
||||
Object[] args = new String[]{CommonFilesMetaDataBuilder.SELECT_PREFIX, Long.toString(this.selectedDataSourceId)};
|
||||
Object[] args = new String[]{CommonFilesMetaDataBuilder.SELECT_PREFIX, Long.toString(this.selectedDataSourceId), determineMimeTypeFilter()};
|
||||
return String.format(SingleDataSource.WHERE_CLAUSE, args);
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
#Updated by build script
|
||||
#Tue, 17 Apr 2018 09:14:51 -0600
|
||||
#Mon, 19 Mar 2018 11:17:11 -0700
|
||||
LBL_splash_window_title=Starting Autopsy
|
||||
SPLASH_HEIGHT=314
|
||||
SPLASH_WIDTH=538
|
||||
|
@ -1,4 +1,4 @@
|
||||
#Updated by build script
|
||||
#Tue, 17 Apr 2018 09:14:51 -0600
|
||||
#Fri, 09 Mar 2018 13:03:41 -0700
|
||||
CTL_MainWindow_Title=Autopsy 4.6.0
|
||||
CTL_MainWindow_Title_No_Project=Autopsy 4.6.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user