conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
import org.sleuthkit.autopsy.datamodel.tags.Category;
=======
import org.sleuthkit.datamodel.TskData;
>>>>>>>
import org.sleuthkit.autopsy.datamodel.tags.Category;
import org.sleuthkit.datamodel.TskData;
<<<<<<<
private static final List<String> STANDARD_NOTABLE_TAG_DISPLAY_NAMES = Arrays.asList(TagsManager.getNotableItemText(), Category.ONE.getDisplayName(), Category.TWO.getDisplayName(), Category.THREE.getDisplayName()); // NON-NLS
private static final List<String> STANDARD_TAG_DISPLAY_NAMES = Arrays.asList(TagsManager.getBookmarkText(), TagsManager.getFollowUpText(),
TagsManager.getNotableItemText(), Category.ONE.getDisplayName(),
Category.TWO.getDisplayName(), Category.THREE.getDisplayName(),
Category.FOUR.getDisplayName(), Category.FIVE.getDisplayName());
static final String NOTABLE = "(Notable)";
=======
private static final String STANDARD_NOTABLE_TAG_DISPLAY_NAMES = "Evidence,Notable Item,"
+ "CAT-1: Child Exploitation (Illegal),CAT-2: Child Exploitation (Non-Illegal/Age Difficult),CAT-3: Child Exploitive"; // NON-NLS
>>>>>>>
private static final List<String> STANDARD_NOTABLE_TAG_DISPLAY_NAMES = Arrays.asList(TagsManager.getNotableItemText(), Category.ONE.getDisplayName(), Category.TWO.getDisplayName(), Category.THREE.getDisplayName()); // NON-NLS
private static final List<String> STANDARD_TAG_DISPLAY_NAMES = Arrays.asList(TagsManager.getBookmarkText(), TagsManager.getFollowUpText(),
TagsManager.getNotableItemText(), Category.ONE.getDisplayName(),
Category.TWO.getDisplayName(), Category.THREE.getDisplayName(),
Category.FOUR.getDisplayName(), Category.FIVE.getDisplayName());
<<<<<<<
TagNameDefiniton(String displayName, String description, TagName.HTML_COLOR color, String knownStatus) {
=======
TagNameDefiniton(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown status) {
>>>>>>>
TagNameDefiniton(String displayName, String description, TagName.HTML_COLOR color, TskData.FileKnown status) {
<<<<<<<
this.knownStatusDenoted = knownStatus;
=======
this.knownStatusDenoted = status;
>>>>>>>
this.knownStatusDenoted = status;
<<<<<<<
boolean isNotable() {
return knownStatusDenoted.equals(NOTABLE);
=======
boolean isNotable(){
return knownStatusDenoted == TskData.FileKnown.BAD;
>>>>>>>
boolean isNotable() {
return knownStatusDenoted == TskData.FileKnown.BAD;
<<<<<<<
standardTags.remove(tagNameAttributes[0]); //Use standard tag's saved settings instead of default settings
=======
if (badTags == null) {
String badTagsStr = ModuleSettings.getConfigSetting("CentralRepository", "db.badTags"); // NON-NLS
if (badTagsStr == null) {
badTagsStr = STANDARD_NOTABLE_TAG_DISPLAY_NAMES;
}
if (badTagsStr.isEmpty()) {
badTags = new ArrayList<>();
} else {
badTags = new ArrayList<>(Arrays.asList(badTagsStr.split(",")));
}
}
>>>>>>>
standardTags.remove(tagNameAttributes[0]); //Use standard tag's saved settings instead of default settings
<<<<<<<
standardTags.remove(tagNameAttributes[0]); //Use standard tag's saved settings instead of default settings
tagNames.add(new TagNameDefiniton(tagNameAttributes[0], tagNameAttributes[1], TagName.HTML_COLOR.valueOf(tagNameAttributes[2]), tagNameAttributes[3]));
=======
tagNames.add(new TagNameDefiniton(tagNameAttributes[0], tagNameAttributes[1], TagName.HTML_COLOR.valueOf(tagNameAttributes[2]), TskData.FileKnown.valueOf(tagNameAttributes[3])));
>>>>>>>
standardTags.remove(tagNameAttributes[0]); //Use standard tag's saved settings instead of default settings
tagNames.add(new TagNameDefiniton(tagNameAttributes[0], tagNameAttributes[1], TagName.HTML_COLOR.valueOf(tagNameAttributes[2]), TskData.FileKnown.valueOf(tagNameAttributes[3]))); |
<<<<<<<
if (!this.isCancelled()) {
MessageNotifyUtil.Message.info(
NbBundle.getMessage(this.getClass(), "ExtractAction.done.notifyMsg.fileExtr.text"));
=======
if (!this.isCancelled() && !msgDisplayed) {
MessageNotifyUtil.Message.info("File(s) extracted.");
>>>>>>>
if (!this.isCancelled() && !msgDisplayed) {
MessageNotifyUtil.Message.info(
NbBundle.getMessage(this.getClass(), "ExtractAction.done.notifyMsg.fileExtr.text")); |
<<<<<<<
protected boolean createKeys(List<KeyValueThing> toPopulate) {
//final String origQuery = queryThing.getName();
final KeyValueThingQuery queryThingQuery = (KeyValueThingQuery) queryThing;
=======
protected boolean createKeys(List<KeyValue> toPopulate) {
final String origQuery = queryThing.getName();
final KeyValueQuery queryThingQuery = (KeyValueQuery) queryThing;
>>>>>>>
protected boolean createKeys(List<KeyValue> toPopulate) {
//final String origQuery = queryThing.getName();
final KeyValueQuery queryThingQuery = (KeyValueQuery) queryThing;
<<<<<<<
if (literal_query) {
final String snippet = LuceneQuery.getSnippet(tcq.getQueryString(), f.getId());
setCommonProperty(resMap, CommonPropertyTypes.CONTEXT, snippet);
}
toPopulate.add(new KeyValueThingContent(f.getName(), resMap, ++resID, f, highlightQueryEscaped));
=======
toPopulate.add(new KeyValueContent(f.getName(), resMap, ++resID, f, highlightQueryEscaped));
>>>>>>>
if (literal_query) {
final String snippet = LuceneQuery.getSnippet(tcq.getQueryString(), f.getId());
setCommonProperty(resMap, CommonPropertyTypes.CONTEXT, snippet);
}
toPopulate.add(new KeyValueContent(f.getName(), resMap, ++resID, f, highlightQueryEscaped));
<<<<<<<
private static class KeyValueThingContent extends KeyValueThing {
=======
class KeyValueContent extends KeyValue {
>>>>>>>
class KeyValueContent extends KeyValue { |
<<<<<<<
import java.time.temporal.ChronoUnit;
=======
import com.google.common.collect.FluentIterable;
import com.google.common.collect.Iterables;
>>>>>>>
import com.google.common.collect.FluentIterable;
import com.google.common.collect.Iterables;
import java.time.temporal.ChronoUnit; |
<<<<<<<
=======
/**
* Check if is jpeg file based on header
*
* @param file
*
* @return true if jpeg file, false otherwise
*/
@SuppressWarnings("cast")
public static boolean isJpegFileHeader(AbstractFile file) {
if (file.getSize() < 100) {
return false;
}
byte[] fileHeaderBuffer = new byte[2];
int bytesRead;
try {
bytesRead = file.read(fileHeaderBuffer, 0, 2);
} catch (TskCoreException ex) {
//ignore if can't read the first few bytes, not a JPEG
return false;
}
if (bytesRead != 2) {
return false;
}
/*
* Check for the JPEG header. Since Java bytes are signed, we cast them
* to an int first.
*/
if (((int) (fileHeaderBuffer[0] & 0xff) == 0xff) && ((int) (fileHeaderBuffer[1] & 0xff) == 0xd8)) {
return true;
}
return false;
}
>>>>>>> |
<<<<<<<
// user feedback for successful add
extErrorLabel.setForeground(Color.blue);
extErrorLabel.setText(
NbBundle.getMessage(this.getClass(), "FileExtMismatchConfigPanel.addExtButton.errLabel.extAdded",
newExt));
extRemoveErrLabel.setText(" ");
userExtTextField.setText("");
setIsModified();
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
=======
this.userExtTextField.setText("");
>>>>>>>
this.userExtTextField.setText("");
<<<<<<<
setIsModified();
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
=======
>>>>>>>
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
<<<<<<<
// user feedback for successful add
mimeRemoveErrLabel.setForeground(Color.blue);
mimeRemoveErrLabel.setText(
NbBundle.getMessage(this.getClass(), "FileExtMismatchConfigPanel.remoteTypeButton.deleted", deadMime));
setIsModified();
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
=======
>>>>>>>
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
<<<<<<<
// user feedback for successful add
extRemoveErrLabel.setForeground(Color.blue);
extRemoveErrLabel.setText(
NbBundle.getMessage(this.getClass(), "FileExtMismatchConfigPanel.removeExtButton.deleted", deadExt));
setIsModified();
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null);
=======
>>>>>>>
pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, null, null); |
<<<<<<<
import org.sleuthkit.datamodel.InvalidAccountIDException;
=======
import org.sleuthkit.datamodel.DataSource;
>>>>>>>
import org.sleuthkit.datamodel.InvalidAccountIDException;
import org.sleuthkit.datamodel.DataSource; |
<<<<<<<
import javafx.beans.property.ReadOnlyBooleanProperty;
import javafx.beans.property.ReadOnlyBooleanWrapper;
=======
import javafx.beans.binding.DoubleBinding;
import javafx.beans.property.SimpleBooleanProperty;
>>>>>>>
import javafx.beans.binding.DoubleBinding;
import javafx.beans.property.ReadOnlyBooleanProperty;
import javafx.beans.property.ReadOnlyBooleanWrapper;
<<<<<<<
import javafx.scene.layout.BorderStroke;
import javafx.scene.layout.BorderStrokeStyle;
import javafx.scene.layout.BorderWidths;
import javafx.scene.layout.CornerRadii;
=======
import javafx.scene.layout.HBox;
>>>>>>>
import javafx.scene.layout.BorderStroke;
import javafx.scene.layout.BorderStrokeStyle;
import javafx.scene.layout.BorderWidths;
import javafx.scene.layout.CornerRadii;
import javafx.scene.layout.HBox;
<<<<<<<
import javafx.scene.paint.Color;
=======
import javafx.scene.layout.VBox;
>>>>>>>
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
<<<<<<<
private static final Logger LOGGER = Logger.getLogger(AbstractVisualizationPane.class.getName());
=======
>>>>>>>
private static final Logger LOGGER = Logger.getLogger(AbstractVisualizationPane.class.getName());
<<<<<<<
private static final Border ONLY_LEFT_BORDER = new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(0, 0, 0, 1)));
=======
private static final Logger LOGGER = Logger.getLogger(AbstractVisualizationPane.class.getName());
>>>>>>>
private static final Border ONLY_LEFT_BORDER = new Border(new BorderStroke(Color.BLACK, BorderStrokeStyle.SOLID, CornerRadii.EMPTY, new BorderWidths(0, 0, 0, 1)));
<<<<<<<
private final ReadOnlyBooleanWrapper hasVisibleEvents = new ReadOnlyBooleanWrapper(true);
=======
protected final SimpleBooleanProperty hasEvents = new SimpleBooleanProperty(true);
>>>>>>>
private final ReadOnlyBooleanWrapper hasVisibleEvents = new ReadOnlyBooleanWrapper(true);
<<<<<<<
final private TimeLineController controller;
final private FilteredEventsModel filteredEvents;
final private ObservableList<NodeType> selectedNodes = FXCollections.observableArrayList();
private InvalidationListener updateListener = any -> update();
/**
* The visualization nodes that are selected.
*
* @return An ObservableList<NodeType> of the nodes that are selected in
* this visualization.
*/
=======
final protected TimeLineController controller;
final protected FilteredEventsModel filteredEvents;
final protected ObservableList<NodeType> selectedNodes = FXCollections.observableArrayList();
private InvalidationListener invalidationListener = (Observable observable) -> {
update();
};
>>>>>>>
final private TimeLineController controller;
final private FilteredEventsModel filteredEvents;
final private ObservableList<NodeType> selectedNodes = FXCollections.observableArrayList();
private InvalidationListener updateListener = any -> update();
/**
* The visualization nodes that are selected.
*
* @return An ObservableList<NodeType> of the nodes that are selected in
* this visualization.
*/
<<<<<<<
protected void setSettingsNodes(List<Node> settingsNodes) {
this.settingsNodes = settingsNodes;
}
/**
* Get the TimelineController for this visualization.
*
* @return The TimelineController for this visualization.
*/
=======
protected List<Node> settingsNodes;
>>>>>>>
protected void setSettingsNodes(List<Node> settingsNodes) {
this.settingsNodes = settingsNodes;
}
/**
* Get the TimelineController for this visualization.
*
* @return The TimelineController for this visualization.
*/
<<<<<<<
/**
* Clear all data items from this chart.
*/
=======
>>>>>>>
/**
* Clear all data items from this chart.
*/
<<<<<<<
/**
* Dispose of this visualization and any resources it holds onto.
*/
=======
>>>>>>>
/**
* Dispose of this visualization and any resources it holds onto.
*/
<<<<<<<
/**
* Constructor
*
* @param controller The TimelineController for this visualization.
* @param specificPane The container for the specific axis labels.
* @param contextPane The container for the contextual axis labels.
* @param spacer The Region to use as a spacer to keep the axis labels
* aligned.
*/
protected AbstractVisualizationPane(TimeLineController controller, Pane specificPane, Pane contextPane, Region spacer) {
=======
protected AbstractVisualizationPane(TimeLineController controller) {
>>>>>>>
/**
* Constructor
*
* @param controller The TimelineController for this visualization.
*/
protected AbstractVisualizationPane(TimeLineController controller) {
<<<<<<<
this.filteredEvents.zoomParametersProperty().addListener(updateListener);
this.specificLabelPane = specificPane;
this.contextLabelPane = contextPane;
this.spacer = spacer;
=======
this.filteredEvents.zoomParametersProperty().addListener(invalidationListener);
Platform.runLater(() -> {
VBox vBox = new VBox(leafPane, branchPane);
vBox.setFillWidth(false);
HBox hBox = new HBox(spacer, vBox);
hBox.setFillHeight(false);
setBottom(hBox);
DoubleBinding spacerSize = getYAxis().widthProperty().add(getYAxis().tickLengthProperty()).add(getAxisMargin());//getXAxis().startMarginProperty().multiply(2));
spacer.minWidthProperty().bind(spacerSize);
spacer.prefWidthProperty().bind(spacerSize);
spacer.maxWidthProperty().bind(spacerSize);
});
>>>>>>>
this.filteredEvents.zoomParametersProperty().addListener(updateListener);
Platform.runLater(() -> {
VBox vBox = new VBox(specificLabelPane, contextLabelPane);
vBox.setFillWidth(false);
HBox hBox = new HBox(spacer, vBox);
hBox.setFillHeight(false);
setBottom(hBox);
DoubleBinding spacerSize = getYAxis().widthProperty().add(getYAxis().tickLengthProperty()).add(getAxisMargin());//getXAxis().startMarginProperty().multiply(2));
spacer.minWidthProperty().bind(spacerSize);
spacer.prefWidthProperty().bind(spacerSize);
spacer.maxWidthProperty().bind(spacerSize);
});
<<<<<<<
SortedList<Axis.TickMark<X>> tickMarks = getXAxis().getTickMarks().sorted(Comparator.comparing(Axis.TickMark::getPosition));
=======
ObservableList<Axis.TickMark<X>> tickMarks = FXCollections.observableArrayList(getXAxis().getTickMarks());
tickMarks.sort(Comparator.comparing(Axis.TickMark::getPosition));
>>>>>>>
SortedList<Axis.TickMark<X>> tickMarks = getXAxis().getTickMarks().sorted(Comparator.comparing(Axis.TickMark::getPosition));
<<<<<<<
double specificLabelX = 0;
if (dateTime.context.isEmpty()) {
=======
double leafLabelX = 0;
if (dateTime.branch.isEmpty()) {
>>>>>>>
double specificLabelX = 0;
if (dateTime.context.isEmpty()) {
<<<<<<<
specificLabelX += spacing; //increment x
=======
leafLabelX += spacing; //increment x
>>>>>>>
specificLabelX += spacing; //increment x
<<<<<<<
double contextLabelX = 0;
double contextLabelWidth = 0;
=======
double branchLabelX = 0;
double branchLabelWidth = 0;
for (Axis.TickMark<X> t : tickMarks) { //for each tick
>>>>>>>
double contextLabelX = 0;
double contextLabelWidth = 0;
<<<<<<<
private synchronized void addSpecificLabel(String labelText, double labelWidth, double labelX, boolean bold) {
Text label = new Text(" " + labelText + " "); //NON-NLS
=======
private synchronized void assignLeafLabel(String labelText, double labelWidth, double labelX, boolean bold) {
Text label = new Text(" " + labelText + " "); //NOI18N
>>>>>>>
private synchronized void addSpecificLabel(String labelText, double labelWidth, double labelX, boolean bold) {
Text label = new Text(" " + labelText + " "); //NON-NLS
<<<<<<<
if (specificLabelPane.getChildren().isEmpty()) {
=======
if (leafPane.getChildren().isEmpty()) {
>>>>>>>
if (specificLabelPane.getChildren().isEmpty()) {
<<<<<<<
final Node lastLabel = specificLabelPane.getChildren().get(specificLabelPane.getChildren().size() - 1);
if (false == lastLabel.getBoundsInParent().intersects(label.getBoundsInParent())) {
specificLabelPane.getChildren().add(label);
=======
final Text lastLabel = (Text) leafPane.getChildren().get(leafPane.getChildren().size() - 1);
if (!lastLabel.getBoundsInParent().intersects(label.getBoundsInParent())) {
leafPane.getChildren().add(label);
>>>>>>>
final Node lastLabel = specificLabelPane.getChildren().get(specificLabelPane.getChildren().size() - 1);
if (false == lastLabel.getBoundsInParent().intersects(label.getBoundsInParent())) {
specificLabelPane.getChildren().add(label);
<<<<<<<
private synchronized void addContextLabel(String labelText, double labelWidth, double labelX) {
=======
private synchronized void assignBranchLabel(String labelText, double labelWidth, double labelX) {
>>>>>>>
private synchronized void addContextLabel(String labelText, double labelWidth, double labelX) {
<<<<<<<
private final String specifics;
/**
* Constructor
*
* @param dateString The Date/Time to represent, formatted as per
* RangeDivisionInfo.getTickFormatter().
*/
=======
private final String leaf;
>>>>>>>
private final String specifics;
/**
* Constructor
*
* @param dateString The Date/Time to represent, formatted as per
* RangeDivisionInfo.getTickFormatter().
*/
<<<<<<<
=======
protected Interval getTimeRange() {
return filteredEvents.timeRangeProperty().get();
}
>>>>>>>
<<<<<<<
private final Node center;
/**
* Constructor
*
* @param taskName The name of this task.
* @param logStateChanges Whether or not task state chanes should be
* logged.
*/
=======
>>>>>>>
private final Node center;
/**
* Constructor
*
* @param taskName The name of this task.
* @param logStateChanges Whether or not task state chanes should be
* logged.
*/
<<<<<<<
cleanup();
}
/**
* Removes the blocking progress indicator. Derived Tasks should be sure
* to call this as part of their cancelled() implementation.
*/
@Override
protected void cancelled() {
super.cancelled();
cleanup();
=======
Platform.runLater(() -> {
setCenter(center); //clear masker pane
setCursor(Cursor.DEFAULT);
});
>>>>>>>
cleanup();
}
/**
* Removes the blocking progress indicator. Derived Tasks should be sure
* to call this as part of their cancelled() implementation.
*/
@Override
protected void cancelled() {
super.cancelled();
cleanup();
<<<<<<<
=======
>>>>>>>
<<<<<<<
/**
* Set the horizontal range that this chart will show.
*
* @param values A single object representing the range that this chart
* will show.
*/
=======
>>>>>>>
/**
* Set the horizontal range that this chart will show.
*
* @param values A single object representing the range that this chart
* will show.
*/ |
<<<<<<<
private static final List<TagNameDefinition> STANDARD_TAGS_DEFINITIONS = new ArrayList<>();
private static final List<TagNameDefinition> PROJECT_VIC_TAG_DEFINITIONS = new ArrayList<>();
=======
private static final Map<String, TagNameDefinition> STANDARD_TAGS_DEFINITIONS = new HashMap<>();
private static final Map<String, TagNameDefinition> PROJECT_VIC_TAG_DEFINITIONS = new HashMap<>();
private static final List<String> OLD_CATEGORY_TAG_NAMES = new ArrayList<>();
>>>>>>>
private static final List<TagNameDefinition> STANDARD_TAGS_DEFINITIONS = new ArrayList<>();
private static final List<TagNameDefinition> PROJECT_VIC_TAG_DEFINITIONS = new ArrayList<>();
private static final List<String> OLD_CATEGORY_TAG_NAMES = new ArrayList<>();
<<<<<<<
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_bookmark_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN));
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_followUp_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN));
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_notableItem_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.add(new TagNameDefinition(CATEGORY_ONE_NAME, "", TagName.HTML_COLOR.RED, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.add(new TagNameDefinition(CATEGORY_TWO_NAME, "", TagName.HTML_COLOR.LIME, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.add(new TagNameDefinition(CATEGORY_THREE_NAME, "", TagName.HTML_COLOR.YELLOW, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.add(new TagNameDefinition(CATEGORY_FOUR_NAME, "", TagName.HTML_COLOR.PURPLE, TskData.FileKnown.UNKNOWN));
PROJECT_VIC_TAG_DEFINITIONS.add(new TagNameDefinition(CATEGORY_FIVE_NAME, "", TagName.HTML_COLOR.FUCHSIA, TskData.FileKnown.UNKNOWN));
=======
STANDARD_TAGS_DEFINITIONS.put(Bundle.TagNameDefinition_predefTagNames_bookmark_text(), new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_bookmark_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN));
STANDARD_TAGS_DEFINITIONS.put(Bundle.TagNameDefinition_predefTagNames_followUp_text(), new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_followUp_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN));
STANDARD_TAGS_DEFINITIONS.put(Bundle.TagNameDefinition_predefTagNames_notableItem_text(), new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_notableItem_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.put(CATEGORY_ONE_NAME, new TagNameDefinition(CATEGORY_ONE_NAME, "", TagName.HTML_COLOR.RED, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.put(CATEGORY_TWO_NAME, new TagNameDefinition(CATEGORY_TWO_NAME, "", TagName.HTML_COLOR.LIME, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.put(CATEGORY_THREE_NAME, new TagNameDefinition(CATEGORY_THREE_NAME, "", TagName.HTML_COLOR.YELLOW, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.put(CATEGORY_FOUR_NAME, new TagNameDefinition(CATEGORY_FOUR_NAME, "", TagName.HTML_COLOR.PURPLE, TskData.FileKnown.UNKNOWN));
PROJECT_VIC_TAG_DEFINITIONS.put(CATEGORY_FIVE_NAME, new TagNameDefinition(CATEGORY_FIVE_NAME, "", TagName.HTML_COLOR.FUCHSIA, TskData.FileKnown.UNKNOWN));
OLD_CATEGORY_TAG_NAMES.add("CAT-1: " + CATEGORY_ONE_NAME);
OLD_CATEGORY_TAG_NAMES.add("CAT-2: " + CATEGORY_TWO_NAME);
OLD_CATEGORY_TAG_NAMES.add("CAT-3: " + CATEGORY_THREE_NAME);
OLD_CATEGORY_TAG_NAMES.add("CAT-4: " + CATEGORY_FOUR_NAME);
OLD_CATEGORY_TAG_NAMES.add("CAT-5: " + CATEGORY_FIVE_NAME);
OLD_CATEGORY_TAG_NAMES.add("CAT-0: Uncategorized");
>>>>>>>
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_bookmark_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN));
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_followUp_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.UNKNOWN));
STANDARD_TAGS_DEFINITIONS.add(new TagNameDefinition(Bundle.TagNameDefinition_predefTagNames_notableItem_text(), "", TagName.HTML_COLOR.NONE, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.add(new TagNameDefinition(CATEGORY_ONE_NAME, "", TagName.HTML_COLOR.RED, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.add(new TagNameDefinition(CATEGORY_TWO_NAME, "", TagName.HTML_COLOR.LIME, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.add(new TagNameDefinition(CATEGORY_THREE_NAME, "", TagName.HTML_COLOR.YELLOW, TskData.FileKnown.BAD));
PROJECT_VIC_TAG_DEFINITIONS.add(new TagNameDefinition(CATEGORY_FOUR_NAME, "", TagName.HTML_COLOR.PURPLE, TskData.FileKnown.UNKNOWN));
PROJECT_VIC_TAG_DEFINITIONS.add(new TagNameDefinition(CATEGORY_FIVE_NAME, "", TagName.HTML_COLOR.FUCHSIA, TskData.FileKnown.UNKNOWN));
OLD_CATEGORY_TAG_NAMES.add("CAT-1: " + CATEGORY_ONE_NAME);
OLD_CATEGORY_TAG_NAMES.add("CAT-2: " + CATEGORY_TWO_NAME);
OLD_CATEGORY_TAG_NAMES.add("CAT-3: " + CATEGORY_THREE_NAME);
OLD_CATEGORY_TAG_NAMES.add("CAT-4: " + CATEGORY_FOUR_NAME);
OLD_CATEGORY_TAG_NAMES.add("CAT-5: " + CATEGORY_FIVE_NAME);
OLD_CATEGORY_TAG_NAMES.add("CAT-0: Uncategorized"); |
<<<<<<<
=======
contentViewer = new MessageDataContent();
contentViewer.setPreferredSize(new java.awt.Dimension(450, 400));
splitPane.setRightComponent(contentViewer);
proxyLookup = new ModifiableProxyLookup(createLookup(tableEM, getActionMap()));
// See org.sleuthkit.autopsy.timeline.TimeLineTopComponent for a detailed
// explaination of focusPropertyListener
focusPropertyListener = (final PropertyChangeEvent focusEvent) -> {
if (focusEvent.getPropertyName().equalsIgnoreCase("focusOwner")) {
final Component newFocusOwner = (Component) focusEvent.getNewValue();
if (newFocusOwner == null) {
return;
}
if (isDescendingFrom(newFocusOwner, contentViewer)) {
//if the focus owner is within the MessageContentViewer (the attachments table)
proxyLookup.setNewLookups(createLookup((contentViewer).getExplorerManager(), getActionMap()));
} else if (isDescendingFrom(newFocusOwner, MediaViewer.this)) {
//... or if it is within the Results table.
proxyLookup.setNewLookups(createLookup(tableEM, getActionMap()));
>>>>>>>
contentViewer = new MessageDataContent();
contentViewer.setPreferredSize(new java.awt.Dimension(450, 400));
splitPane.setRightComponent(contentViewer); |
<<<<<<<
import org.drools.guvnor.server.security.PackageNameType;
import org.drools.guvnor.server.security.PackageUUIDType;
import org.drools.guvnor.server.security.RoleTypes;
import org.drools.guvnor.server.util.BeanManagerUtils;
=======
>>>>>>>
<<<<<<<
import org.jboss.seam.remoting.annotations.WebRemote;
import org.jboss.seam.security.annotations.LoggedIn;
import org.jboss.seam.solder.beanManager.BeanManagerLocator;
import org.jboss.seam.security.Identity;
=======
import org.jboss.seam.annotations.remoting.WebRemote;
import org.jboss.seam.annotations.security.Restrict;
>>>>>>>
import org.jboss.seam.remoting.annotations.WebRemote;
import org.jboss.seam.security.annotations.LoggedIn;
import org.jboss.seam.solder.beanManager.BeanManagerLocator;
import org.jboss.seam.security.Identity;
<<<<<<<
@Inject
private RulesRepository rulesRepository;
@Inject
private RepositoryAssetService repositoryAssetService;
=======
private final ServiceSecurity serviceSecurity = new ServiceSecurity();
protected RepositoryAssetService getAssetService() {
return RepositoryServiceServlet.getAssetService();
}
>>>>>>>
@Inject
private ServiceSecurity serviceSecurity;
@Inject
private RulesRepository rulesRepository;
@Inject
private RepositoryAssetService repositoryAssetService;
<<<<<<<
private void hasPackageDeveloperPermission(String packageUUID) {
BeanManagerLocator beanManagerLocator = new BeanManagerLocator();
if (beanManagerLocator.isBeanManagerAvailable()) {
BeanManagerUtils.getContextualInstance(Identity.class).checkPermission(new PackageUUIDType(packageUUID), RoleTypes.PACKAGE_DEVELOPER);
}
}
private void hasPackageDeveloperPermission(RuleAsset asset) {
BeanManagerLocator beanManagerLocator = new BeanManagerLocator();
if (beanManagerLocator.isBeanManagerAvailable()) {
BeanManagerUtils.getContextualInstance(Identity.class).checkPermission(new PackageNameType(asset.metaData.packageName), RoleTypes.PACKAGE_DEVELOPER);
}
}
=======
>>>>>>> |
<<<<<<<
=======
import java.io.IOException;
import org.openide.util.Lookup;
import org.sleuthkit.autopsy.keywordsearchservice.KeywordSearchService;
>>>>>>>
<<<<<<<
private org.sleuthkit.datamodel.Blackboard delegate;
=======
private SleuthkitCase caseDb;
>>>>>>>
private org.sleuthkit.datamodel.Blackboard delegate; |
<<<<<<<
path = path.substring(path.indexOf("/harddiskvolume") + 16); //NON-NLS
=======
int index = filePath.indexOf("/harddiskvolume");
if (index+16 < filePath.length())
filePath = filePath.substring(index + 16);
>>>>>>>
int index = path.indexOf("/harddiskvolume"); //NON-NLS
if (index+16 < path.length()) {
path = path.substring(index + 16);
}
<<<<<<<
else if (line.startsWith("0x") && line.length() > 33) { //NON-NLS
=======
if (line.startsWith("0x") && line.length() > 33) {
>>>>>>>
if (line.startsWith("0x") && line.length() > 33) {
<<<<<<<
errorMsgs.add(Bundle.VolatilityProcessor_errorMessage_outputParsingError("dlllist"));
/*
* Log the exception as well as add it to the error messages, to
* ensure that the stack trace is not lost.
*/
logger.log(Level.SEVERE, Bundle.VolatilityProcessor_errorMessage_outputParsingError("dlllist"), ex);
}
return fileSet;
=======
String msg = "Error parsing dlllist output";
logger.log(Level.SEVERE, msg, ex);
errorMsgs.add(msg);
}
return fileSet;
}
private Set<String> parseFilescan(File PluginFile) {
String line;
Set<String> fileSet = new HashSet<>();
try {
BufferedReader br = new BufferedReader(new FileReader(PluginFile));
// read the first line from the text file
while ((line = br.readLine()) != null) {
try {
if (line.length() < 41)
continue;
String file_path = line.substring(41);
fileSet.add(normalizePath(file_path));
} catch (StringIndexOutOfBoundsException ex) {
// TO DO Catch exception
}
}
br.close();
} catch (IOException ex) {
String msg = "Error parsing filescan output";
logger.log(Level.SEVERE, msg, ex);
errorMsgs.add(msg);
}
return fileSet;
>>>>>>>
errorMsgs.add(Bundle.VolatilityProcessor_errorMessage_outputParsingError("dlllist"));
/*
* Log the exception as well as add it to the error messages, to
* ensure that the stack trace is not lost.
*/
logger.log(Level.SEVERE, Bundle.VolatilityProcessor_errorMessage_outputParsingError("dlllist"), ex);
}
return fileSet;
<<<<<<<
String TAG = "Command line : "; //NON-NLS
if (line.startsWith(TAG)) {
=======
String TAG = "Command line : ";
if ((line.startsWith(TAG)) && line.length() > TAG.length() + 1) {
>>>>>>>
String TAG = "Command line : "; //NON-NLS
if ((line.startsWith(TAG)) && line.length() > TAG.length() + 1) {
<<<<<<<
}
=======
if (line.length() < 37)
continue;
>>>>>>>
}
else if (line.length() < 37) {
continue;
}
<<<<<<<
}
=======
if (line.length() < 34)
continue;
>>>>>>>
}
else if (line.length() < 34) {
continue;
}
<<<<<<<
try (BufferedReader br = new BufferedReader(new FileReader(outputFile))) {
// read the first line from the text file
while ((line = br.readLine()) != null) {
// ... 0x897e5020:services.exe 772 728 15 287 2017-12-07 14:05:35 UTC+000
String file_path;
=======
try {
BufferedReader br = new BufferedReader(new FileReader(PluginFile));
// read the first line from the text file
while ((line = br.readLine()) != null) {
// ... 0x897e5020:services.exe 772 728 15 287 2017-12-07 14:05:35 UTC+000
>>>>>>>
try (BufferedReader br = new BufferedReader(new FileReader(outputFile))) {
// read the first line from the text file
while ((line = br.readLine()) != null) {
// ... 0x897e5020:services.exe 772 728 15 287 2017-12-07 14:05:35 UTC+000
<<<<<<<
file_path = line.substring(line.indexOf(':') + 1, 52); //NON-NLS
=======
int index = line.indexOf(TAG);
if (line.length() < 52 || index + 1 >= 52)
continue;
String file_path = line.substring(line.indexOf(TAG) + 1, 52);
>>>>>>>
int index = line.indexOf(TAG);
if (line.length() < 52 || index + 1 >= 52) {
continue;
}
String file_path = line.substring(line.indexOf(':') + 1, 52); //NON-NLS |
<<<<<<<
final String domainsQuery =
/*SELECT */" domain," +
" MIN(date) AS activity_start," +
" MAX(date) AS activity_end," +
" SUM(CASE " +
" WHEN artifact_type_id = " + TSK_WEB_DOWNLOAD.getTypeID() + " THEN 1 " +
" ELSE 0 " +
" END) AS fileDownloads," +
" SUM(CASE " +
" WHEN artifact_type_id = " + TSK_WEB_HISTORY.getTypeID() + " THEN 1 " +
" ELSE 0 " +
" END) AS totalVisits," +
" SUM(CASE " +
" WHEN artifact_type_id = " + TSK_WEB_HISTORY.getTypeID() + " AND" +
" date BETWEEN " + sixtyDaysAgo.getEpochSecond() + " AND " + currentTime.getEpochSecond() + " THEN 1 " +
" ELSE 0 " +
" END) AS last60," +
" MAX(data_source_obj_id) AS dataSource " +
"FROM blackboard_artifacts" +
" JOIN (" + domainsTable + ") AS domains_table" +
" ON artifact_id = parent_artifact_id " +
// Add the data source where clause here if present.
((dataSourceWhereClause != null) ? "WHERE " + dataSourceWhereClause + " " : "") +
"GROUP BY " + groupByClause;
=======
final String domainsQuery
= /*
* SELECT
*/ " domain,"
+ " MIN(date) AS activity_start,"
+ " MAX(date) AS activity_end,"
+ " SUM(CASE "
+ " WHEN artifact_type_id = " + TSK_WEB_DOWNLOAD.getTypeID() + " THEN 1 "
+ " ELSE 0 "
+ " END) AS fileDownloads,"
+ " SUM(CASE "
+ " WHEN artifact_type_id = " + TSK_WEB_HISTORY.getTypeID() + " THEN 1 "
+ " ELSE 0 "
+ " END) AS totalVisits,"
+ " SUM(CASE "
+ " WHEN artifact_type_id = " + TSK_WEB_HISTORY.getTypeID() + " AND"
+ " date BETWEEN " + sixtyDaysAgo.getEpochSecond() + " AND " + currentTime.getEpochSecond() + " THEN 1 "
+ " ELSE 0 "
+ " END) AS last60,"
+ " data_source_obj_id AS dataSource "
+ "FROM blackboard_artifacts"
+ " JOIN (" + domainsTable + ") AS domains_table"
+ " ON artifact_id = parent_artifact_id "
+ // Add the data source where clause here if present.
((dataSourceWhereClause != null) ? "WHERE " + dataSourceWhereClause + " " : "")
+ "GROUP BY " + groupByClause;
>>>>>>>
final String domainsQuery
= /*
* SELECT
*/ " domain,"
+ " MIN(date) AS activity_start,"
+ " MAX(date) AS activity_end,"
+ " SUM(CASE "
+ " WHEN artifact_type_id = " + TSK_WEB_DOWNLOAD.getTypeID() + " THEN 1 "
+ " ELSE 0 "
+ " END) AS fileDownloads,"
+ " SUM(CASE "
+ " WHEN artifact_type_id = " + TSK_WEB_HISTORY.getTypeID() + " THEN 1 "
+ " ELSE 0 "
+ " END) AS totalVisits,"
+ " SUM(CASE "
+ " WHEN artifact_type_id = " + TSK_WEB_HISTORY.getTypeID() + " AND"
+ " date BETWEEN " + sixtyDaysAgo.getEpochSecond() + " AND " + currentTime.getEpochSecond() + " THEN 1 "
+ " ELSE 0 "
+ " END) AS last60,"
+ " MAX(data_source_obj_id) AS dataSource "
+ "FROM blackboard_artifacts"
+ " JOIN (" + domainsTable + ") AS domains_table"
+ " ON artifact_id = parent_artifact_id "
+ // Add the data source where clause here if present.
((dataSourceWhereClause != null) ? "WHERE " + dataSourceWhereClause + " " : "")
+ "GROUP BY " + groupByClause; |
<<<<<<<
/**
* Get absolute module output directory path where modules should save their permanent data
* The directory is a subdirectory of this case dir.
=======
/**
* Get absolute module output directory path where modules should save their
* permanent data The directory is a subdirectory of this case dir.
*
>>>>>>>
/**
* Get absolute module output directory path where modules should save their
* permanent data The directory is a subdirectory of this case dir.
*
<<<<<<<
=======
>>>>>>> |
<<<<<<<
private static final Logger LOGGER = Logger.getLogger(DataResultViewerTable.class.getName());
=======
>>>>>>>
<<<<<<<
private static final Color TAGGED_COLOR = new Color(255, 255, 195);
=======
static private final Color TAGGED_ROW_COLOR = new Color(255, 255, 195);
private static final Logger logger = Logger.getLogger(DataResultViewerTable.class.getName());
>>>>>>>
static private final Color TAGGED_ROW_COLOR = new Color(255, 255, 195);
private static final Logger logger = Logger.getLogger(DataResultViewerTable.class.getName());
<<<<<<<
// add a listener so that when columns are moved, the new order is stored
tableListener = new TableListener();
outline.getColumnModel().addColumnModelListener(tableListener);
// the listener also moves columns back if user tries to move the first column out of place
outline.getTableHeader().addMouseListener(tableListener);
=======
/*
* Add a table listener to the child OutlineView (explorer view) to
* persist the order of the table columns when a column is moved.
*/
outlineViewListener = new TableListener();
outline.getColumnModel().addColumnModelListener(outlineViewListener);
/*
* Add a mouse listener to the child OutlineView (explorer view) to make
* sure the first column of the table is kept in place.
*/
outline.getTableHeader().addMouseListener(outlineViewListener);
>>>>>>>
/*
* Add a table listener to the child OutlineView (explorer view) to
* persist the order of the table columns when a column is moved.
*/
outlineViewListener = new TableListener();
outline.getColumnModel().addColumnModelListener(outlineViewListener);
/*
* Add a mouse listener to the child OutlineView (explorer view) to make
* sure the first column of the table is kept in place.
*/
outline.getTableHeader().addMouseListener(outlineViewListener);
<<<<<<<
tableListener.listenToVisibilityChanges(false);
/**
=======
outlineViewListener.listenToVisibilityChanges(false);
/*
>>>>>>>
outlineViewListener.listenToVisibilityChanges(false);
/* |
<<<<<<<
return new ArrayList<String>(Arrays.asList(new String[] {"Comment", "File Name", "Source File"}));
case 23: // TSK_CONTACT
return new ArrayList<String>(Arrays.asList(new String[] {"Person Name", "Phone Number", "Phone Number (Home)", "Phone Number (Office)", "Phone Number (Mobile)", "Email", "Source File" }));
case 24: // TSK_MESSAGE
return new ArrayList<String>(Arrays.asList(new String[] {"Message Type", "Direction", "Date/Time", "From Phone Number", "From Email", "To Phone Number", "To Email", "Subject", "Text", "Source File" }));
case 25: // TSK_CALLLOG
return new ArrayList<String>(Arrays.asList(new String[] {"Person Name", "Phone Number", "Date/Time", "Direction", "Source File" }));
case 26: // TSK_CALENDAR_ENTRY
return new ArrayList<String>(Arrays.asList(new String[] {"Calendar Entry Type", "Description", "Start Date/Time", "End Date/Time", "Location", "Source File" }));
=======
columnHeaders = new ArrayList<String>(Arrays.asList(new String[] {"Result Type", "Tag", "Comment", "Source File"}));
break;
default:
return null;
>>>>>>>
columnHeaders = new ArrayList<String>(Arrays.asList(new String[] {"Result Type", "Tag", "Comment", "Source File"}));
break;
case 23: // TSK_CONTACT
columnHeaders = new ArrayList<String>(Arrays.asList(new String[] {"Person Name", "Phone Number", "Phone Number (Home)", "Phone Number (Office)", "Phone Number (Mobile)", "Email", "Source File" }));
break;
case 24: // TSK_MESSAGE
columnHeaders = new ArrayList<String>(Arrays.asList(new String[] {"Message Type", "Direction", "Date/Time", "From Phone Number", "From Email", "To Phone Number", "To Email", "Subject", "Text", "Source File" }));
break;
case 25: // TSK_CALLLOG
columnHeaders = new ArrayList<String>(Arrays.asList(new String[] {"Person Name", "Phone Number", "Date/Time", "Direction", "Source File" }));
break;
case 26: // TSK_CALENDAR_ENTRY
columnHeaders = new ArrayList<String>(Arrays.asList(new String[] {"Calendar Entry Type", "Description", "Start Date/Time", "End Date/Time", "Location", "Source File" }));
break;
default:
return null;
<<<<<<<
return tagArtifact;
case 23: // TSK_CONTACT
List<String> contact = new ArrayList<String>();
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_NAME_PERSON.getTypeID()));
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER.getTypeID()));
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_HOME.getTypeID()));
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_OFFICE.getTypeID()));
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_MOBILE.getTypeID()));
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_EMAIL.getTypeID()));
contact.add(getFileUniquePath(entry.getKey().getObjectID()));
return contact;
case 24: // TSK_MESSAGE
List<String> message = new ArrayList<String>();
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_DIRECTION.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_EMAIL_FROM.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_EMAIL_TO.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_SUBJECT.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_TEXT.getTypeID()));
message.add(getFileUniquePath(entry.getKey().getObjectID()));
return message;
case 25: // TSK_CALLLOG
List<String> call_log = new ArrayList<String>();
call_log.add(attributes.get(ATTRIBUTE_TYPE.TSK_NAME_PERSON.getTypeID()));
call_log.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER.getTypeID()));
call_log.add(attributes.get(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID()));
call_log.add(attributes.get(ATTRIBUTE_TYPE.TSK_DIRECTION.getTypeID()));
call_log.add(getFileUniquePath(entry.getKey().getObjectID()));
return call_log;
case 26: // TSK_CALENDAR_ENTRY
List<String> calEntry = new ArrayList<String>();
calEntry.add(attributes.get(ATTRIBUTE_TYPE.TSK_CALENDAR_ENTRY_TYPE.getTypeID()));
calEntry.add(attributes.get(ATTRIBUTE_TYPE.TSK_DESCRIPTION.getTypeID()));
calEntry.add(attributes.get(ATTRIBUTE_TYPE.TSK_DATETIME_START.getTypeID()));
calEntry.add(attributes.get(ATTRIBUTE_TYPE.TSK_DATETIME_END.getTypeID()));
calEntry.add(attributes.get(ATTRIBUTE_TYPE.TSK_LOCATION.getTypeID()));
calEntry.add(getFileUniquePath(entry.getKey().getObjectID()));
return calEntry;
=======
return taggedArtifactRow;
>>>>>>>
return taggedArtifactRow;
case 23: // TSK_CONTACT
List<String> contact = new ArrayList<String>();
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_NAME_PERSON.getTypeID()));
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER.getTypeID()));
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_HOME.getTypeID()));
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_OFFICE.getTypeID()));
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_MOBILE.getTypeID()));
contact.add(attributes.get(ATTRIBUTE_TYPE.TSK_EMAIL.getTypeID()));
contact.add(getFileUniquePath(entry.getKey().getObjectID()));
return contact;
case 24: // TSK_MESSAGE
List<String> message = new ArrayList<String>();
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_MESSAGE_TYPE.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_DIRECTION.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_FROM.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_EMAIL_FROM.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER_TO.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_EMAIL_TO.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_SUBJECT.getTypeID()));
message.add(attributes.get(ATTRIBUTE_TYPE.TSK_TEXT.getTypeID()));
message.add(getFileUniquePath(entry.getKey().getObjectID()));
return message;
case 25: // TSK_CALLLOG
List<String> call_log = new ArrayList<String>();
call_log.add(attributes.get(ATTRIBUTE_TYPE.TSK_NAME_PERSON.getTypeID()));
call_log.add(attributes.get(ATTRIBUTE_TYPE.TSK_PHONE_NUMBER.getTypeID()));
call_log.add(attributes.get(ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID()));
call_log.add(attributes.get(ATTRIBUTE_TYPE.TSK_DIRECTION.getTypeID()));
call_log.add(getFileUniquePath(entry.getKey().getObjectID()));
return call_log;
case 26: // TSK_CALENDAR_ENTRY
List<String> calEntry = new ArrayList<String>();
calEntry.add(attributes.get(ATTRIBUTE_TYPE.TSK_CALENDAR_ENTRY_TYPE.getTypeID()));
calEntry.add(attributes.get(ATTRIBUTE_TYPE.TSK_DESCRIPTION.getTypeID()));
calEntry.add(attributes.get(ATTRIBUTE_TYPE.TSK_DATETIME_START.getTypeID()));
calEntry.add(attributes.get(ATTRIBUTE_TYPE.TSK_DATETIME_END.getTypeID()));
calEntry.add(attributes.get(ATTRIBUTE_TYPE.TSK_LOCATION.getTypeID()));
calEntry.add(getFileUniquePath(entry.getKey().getObjectID()));
return calEntry; |
<<<<<<<
} catch (NoCurrentCaseException ex) {
logger.log(Level.SEVERE, "Attempted to access ImageGallery with no case open.", ex); //NON-NLS
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Error getting ImageGalleryController.", ex); //NON-NLS
=======
>>>>>>> |
<<<<<<<
import net.sf.sevenzipjbinding.ExtractOperationResult;
import net.sf.sevenzipjbinding.IArchiveExtractCallback;
import net.sf.sevenzipjbinding.ICryptoGetTextPassword;
import net.sf.sevenzipjbinding.IInArchive;
import net.sf.sevenzipjbinding.ISequentialOutStream;
import net.sf.sevenzipjbinding.PropID;
import net.sf.sevenzipjbinding.SevenZip;
import net.sf.sevenzipjbinding.SevenZipException;
import net.sf.sevenzipjbinding.SevenZipNativeInitializationException;
import org.mozilla.universalchardet.UniversalDetector;
=======
import net.sf.sevenzipjbinding.ExtractOperationResult;
import net.sf.sevenzipjbinding.IArchiveExtractCallback;
import net.sf.sevenzipjbinding.ICryptoGetTextPassword;
import net.sf.sevenzipjbinding.ISequentialOutStream;
import net.sf.sevenzipjbinding.ISevenZipInArchive;
import net.sf.sevenzipjbinding.PropID;
import net.sf.sevenzipjbinding.SevenZip;
import net.sf.sevenzipjbinding.SevenZipException;
import net.sf.sevenzipjbinding.SevenZipNativeInitializationException;
>>>>>>>
import net.sf.sevenzipjbinding.ExtractOperationResult;
import net.sf.sevenzipjbinding.IArchiveExtractCallback;
import net.sf.sevenzipjbinding.ICryptoGetTextPassword;
import net.sf.sevenzipjbinding.IInArchive;
import net.sf.sevenzipjbinding.ISequentialOutStream;
import net.sf.sevenzipjbinding.PropID;
import net.sf.sevenzipjbinding.SevenZip;
import net.sf.sevenzipjbinding.SevenZipException;
import net.sf.sevenzipjbinding.SevenZipNativeInitializationException;
import org.mozilla.universalchardet.UniversalDetector;
<<<<<<<
private IngestServices services = IngestServices.getInstance();
private final IngestJobContext context;
private final FileTypeDetector fileTypeDetector;
private final UniversalDetector universalDetector = new UniversalDetector(null);
=======
private static final String MODULE_NAME = EmbeddedFileExtractorModuleFactory.getModuleName();
>>>>>>>
private static final String MODULE_NAME = EmbeddedFileExtractorModuleFactory.getModuleName();
<<<<<<<
public StandardIArchiveExtractCallback(IInArchive inArchive,
AbstractFile archiveFile, ProgressHandle progressHandle,
Map<Integer, InArchiveItemDetails> archiveDetailsMap,
String password, long freeDiskSpace) {
=======
StandardIArchiveExtractCallback(ISevenZipInArchive inArchive,
AbstractFile archiveFile, ProgressHandle progressHandle,
Map<Integer, InArchiveItemDetails> archiveDetailsMap,
String password, long freeDiskSpace) {
>>>>>>>
StandardIArchiveExtractCallback(IInArchive inArchive,
AbstractFile archiveFile, ProgressHandle progressHandle,
Map<Integer, InArchiveItemDetails> archiveDetailsMap,
String password, long freeDiskSpace) { |
<<<<<<<
DbManager.processInstanceTableWhere(theType, String.format("id = %s", attrbuteId), instancetableCallback);
=======
CorrelationAttributeInstance.Type fileType = DbManager.getCorrelationTypeById(CorrelationAttributeInstance.FILES_TYPE_ID);
DbManager.processInstanceTableWhere(fileType, String.format("id = %s", attrbuteId), instancetableCallback);
>>>>>>>
DbManager.processInstanceTableWhere(theType, String.format("id = %s", attrbuteId), instancetableCallback);
<<<<<<<
=======
CorrelationAttributeInstance.Type fileType = DbManager.getCorrelationTypeById(CorrelationAttributeInstance.FILES_TYPE_ID);
>>>>>>>
<<<<<<<
correlationAttribute = DbManager.getCorrelationAttribute(null, // TODO, CorrelationInstance will soon have Type one merged into develop
=======
correlationAttributeInstance = DbManager.getCorrelationAttributeInstance(fileType,
>>>>>>>
correlationAttributeInstance = DbManager.getCorrelationAttributeInstance(correlationType, |
<<<<<<<
=======
private Map<String, Long> imagePathToObjIdMap;
private long totalFiles;
>>>>>>>
<<<<<<<
addMultipleImageTask = null;
AddDataSourceCallback privateCallback = null;
=======
Path resultsPath = Paths.get(dest.toString(), resultsFilename);
try {
totalFiles = Files.lines(resultsPath).count() - 1; // skip the header line
} catch (IOException ex) {
errorList.add(Bundle.AddLogicalImageTask_failedToGetTotalFilesCount(ex.getMessage()));
callback.done(DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS, errorList, emptyDataSources);
return;
}
AddMultipleImageTask addMultipleImageTask = null;
>>>>>>>
Path resultsPath = Paths.get(dest.toString(), resultsFilename);
try {
totalFiles = Files.lines(resultsPath).count() - 1; // skip the header line
} catch (IOException ex) {
errorList.add(Bundle.AddLogicalImageTask_failedToGetTotalFilesCount(ex.getMessage()));
callback.done(DataSourceProcessorCallback.DataSourceProcessorResult.CRITICAL_ERRORS, errorList, emptyDataSources);
return;
}
AddMultipleImageTask addMultipleImageTask = null;
<<<<<<<
=======
boolean createVHD;
>>>>>>>
boolean createVHD;
<<<<<<<
addingInterestingFiles = true;
addInterestingFiles(dest, Paths.get(dest.toString(), resultsFilename), createVHD);
=======
addInterestingFiles(Paths.get(dest.toString(), resultsFilename), createVHD);
>>>>>>>
addingInterestingFiles = true;
addInterestingFiles(Paths.get(dest.toString(), resultsFilename), createVHD);
<<<<<<<
//addLocalFile here
=======
if (lineNumber % 100 == 0) {
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_addingExtractedFile(lineNumber, totalFiles));
}
//addLocalFile here
>>>>>>>
if (lineNumber % 100 == 0) {
progressMonitor.setProgressText(Bundle.AddLogicalImageTask_addingExtractedFile(lineNumber, totalFiles));
}
//addLocalFile here
<<<<<<<
Paths.get(src.toString(), extractedFilePath).toFile(),
filename,
parentPath,
Long.parseLong(ctime),
Long.parseLong(crtime),
Long.parseLong(atime),
Long.parseLong(mtime),
localFilesDataSource);
=======
Paths.get(src.toString(), extractedFilePath).toFile(),
filename,
parentPath,
Long.parseLong(ctime),
Long.parseLong(crtime),
Long.parseLong(atime),
Long.parseLong(mtime),
localFilesDataSource);
>>>>>>>
Paths.get(src.toString(), extractedFilePath).toFile(),
filename,
parentPath,
Long.parseLong(ctime),
Long.parseLong(crtime),
Long.parseLong(atime),
Long.parseLong(mtime),
localFilesDataSource);
<<<<<<<
Map<Long, List<String>> imagePaths = currentCase.getSleuthkitCase().getImagePaths();
Map<String, Long> imagePathToObjIdMap = imagePathsToDataSourceObjId(imagePaths);
String targetImagePath = Paths.get(dest.toString(), vhdFilename).toString();
=======
String targetImagePath = Paths.get(dest.toString(), vhdFilename).toString();
>>>>>>>
String targetImagePath = Paths.get(dest.toString(), vhdFilename).toString(); |
<<<<<<<
import android.app.Activity;
=======
>>>>>>>
import android.app.Activity;
import android.content.Intent; |
<<<<<<<
private boolean containedAsFooter(final AbstractFile file) {
if(file.getSize() < signatureBytes.length)
return false;
long newOffset = file.getSize() - signatureBytes.length;
Signature newSignature = new Signature(signatureBytes, newOffset);
return newSignature.containedIn(file);
}
=======
@Override
public boolean equals(Object other) {
if (other != null && other instanceof Signature) {
Signature that = (Signature) other;
if(Arrays.equals(this.getSignatureBytes(), that.getSignatureBytes())
&& this.getOffset() == that.getOffset()
&& this.getType().equals(that.getType()))
return true;
}
return false;
}
@Override
public int hashCode() {
int hash = 3;
hash = 97 * hash + Arrays.hashCode(this.signatureBytes);
hash = 97 * hash + (int) (this.offset ^ (this.offset >>> 32));
hash = 97 * hash + Objects.hashCode(this.type);
return hash;
}
>>>>>>>
private boolean containedAsFooter(final AbstractFile file) {
if(file.getSize() < signatureBytes.length)
return false;
long newOffset = file.getSize() - signatureBytes.length;
Signature newSignature = new Signature(signatureBytes, newOffset);
return newSignature.containedIn(file);
}
@Override
public boolean equals(Object other) {
if (other != null && other instanceof Signature) {
Signature that = (Signature) other;
if(Arrays.equals(this.getSignatureBytes(), that.getSignatureBytes())
&& this.getOffset() == that.getOffset()
&& this.getType().equals(that.getType()))
return true;
}
return false;
}
@Override
public int hashCode() {
int hash = 3;
hash = 97 * hash + Arrays.hashCode(this.signatureBytes);
hash = 97 * hash + (int) (this.offset ^ (this.offset >>> 32));
hash = 97 * hash + Objects.hashCode(this.type);
return hash;
} |
<<<<<<<
try{
hashDbManager.updateHashSetsFromCentralRepository();
} catch (TskCoreException ex){
Logger.getLogger(HashLookupModuleSettingsPanel.class.getName()).log(Level.SEVERE, "Error updating central repository hash sets", ex); //NON-NLS
}
initializeHashSetModels(settings, validSetsOnly(hashDbManager.getKnownFileHashSets()), knownHashSetModels);
initializeHashSetModels(settings, validSetsOnly(hashDbManager.getKnownBadFileHashSets()), knownBadHashSetModels);
=======
initializeHashSetModels(settings, hashDbManager.getKnownFileHashSets(), knownHashSetModels);
initializeHashSetModels(settings, hashDbManager.getKnownBadFileHashSets(), knownBadHashSetModels);
>>>>>>>
initializeHashSetModels(settings, validSetsOnly(hashDbManager.getKnownFileHashSets()), knownHashSetModels);
initializeHashSetModels(settings, validSetsOnly(hashDbManager.getKnownBadFileHashSets()), knownBadHashSetModels); |
<<<<<<<
class AddNewOrganizationDialog extends javax.swing.JDialog {
=======
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
public class AddNewOrganizationDialog extends javax.swing.JDialog {
>>>>>>>
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
class AddNewOrganizationDialog extends javax.swing.JDialog {
<<<<<<<
LOGGER.log(Level.SEVERE, "Failed adding new organization.", ex);
newOrg = null;
=======
logger.log(Level.SEVERE, "Failed adding new organization.", ex);
>>>>>>>
logger.log(Level.SEVERE, "Failed adding new organization.", ex);
newOrg = null; |
<<<<<<<
synchronized public void unRegisterForEvents(Object listener) {
eventbus.unregister(0);
=======
synchronized public void unRegisterForEvents(Object o) {
eventbus.unregister(o);
>>>>>>>
synchronized public void unRegisterForEvents(Object listener) {
eventbus.unregister(o); |
<<<<<<<
import com.kabouzeid.gramophone.model.UiPreferenceChangedEvent;
=======
>>>>>>>
import com.kabouzeid.gramophone.model.UIPreferenceChangedEvent;
<<<<<<<
@Subscribe
public void onUIChangeEvent(UiPreferenceChangedEvent event) {
switch (event.getAction()) {
case UiPreferenceChangedEvent.ALBUM_OVERVIEW_PALETTE_CHANGED:
usePalette = (boolean) event.getValue();
notifyDataSetChanged();
break;
}
}
=======
>>>>>>> |
<<<<<<<
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.sql.ResultSet;
import java.sql.SQLException;
=======
>>>>>>>
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import org.openide.nodes.Children;
<<<<<<<
import org.openide.nodes.Children;
=======
import org.apache.commons.lang3.StringUtils;
>>>>>>>
import org.apache.commons.lang3.StringUtils;
<<<<<<<
import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.BlackboardAttribute;
import org.sleuthkit.datamodel.Content;
import org.sleuthkit.datamodel.SleuthkitCase;
import org.sleuthkit.datamodel.SleuthkitCase.CaseDbQuery;
=======
>>>>>>>
import org.sleuthkit.datamodel.Content;
<<<<<<<
@Override
public String toString() {
return NbBundle.getMessage(this.getClass(), "AbstractAbstractFileNode.md5HashColLbl");
}
},
=======
@Override
public String toString() {
return NbBundle.getMessage(this.getClass(), "AbstractAbstractFileNode.md5HashColLbl");
}
},
>>>>>>>
@Override
public String toString() {
return NbBundle.getMessage(this.getClass(), "AbstractAbstractFileNode.md5HashColLbl");
}
},
<<<<<<<
=======
@SuppressWarnings("deprecation")
>>>>>>>
@SuppressWarnings("deprecation") |
<<<<<<<
import org.sleuthkit.autopsy.coreutils.PathValidator;
=======
>>>>>>>
import org.sleuthkit.autopsy.coreutils.PathValidator;
<<<<<<<
=======
>>>>>>> |
<<<<<<<
=======
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.core.RuntimeProperties;
import org.sleuthkit.autopsy.corecomponentinterfaces.AutopsyService;
>>>>>>>
import org.sleuthkit.autopsy.core.RuntimeProperties;
import org.sleuthkit.autopsy.corecomponentinterfaces.AutopsyService;
<<<<<<<
private static final String SERVICE_NAME = "Solr Search Service";
=======
private static final String SERVICE_NAME = "Solr Keyword Search Service";
>>>>>>>
private static final String SERVICE_NAME = "Solr Keyword Search Service"; |
<<<<<<<
"XRYDataSourceProcessor.noPathSelected=Please select a folder containing exported XRY text files",
"XRYDataSourceProcessor.notReadable=Could not read from the selected folder",
"XRYDataSourceProcessor.notXRYFolder=Selected folder did not contain any XRY text files",
"XRYDataSourceProcessor.ioError=I/O error occured trying to test the selected folder"
=======
"XRYDataSourceProcessor.noPathSelected=Please select a XRY folder",
"XRYDataSourceProcessor.notReadable=Selected path is not readable",
"XRYDataSourceProcessor.notXRYFolder=Selected folder did not contain any XRY files",
"XRYDataSourceProcessor.ioError=I/O error occured trying to test the XRY report folder",
"XRYDataSourceProcessor.childNotReadable=Top level path [ %s ] is not readable",
"XRYDataSourceProcessor.notAFolder=The selected path is not a folder"
>>>>>>>
"XRYDataSourceProcessor.noPathSelected=Please select a folder containing exported XRY text files",
"XRYDataSourceProcessor.notReadable=Selected path is not readable",
"XRYDataSourceProcessor.notXRYFolder=Selected folder did not contain any XRY text files",
"XRYDataSourceProcessor.ioError=I/O error occured trying to test the selected folder",
"XRYDataSourceProcessor.childNotReadable=Top level path [ %s ] is not readable",
"XRYDataSourceProcessor.notAFolder=The selected path is not a folder" |
<<<<<<<
=======
private HashDb nsrlHashSet;
private ArrayList<HashDb> knownBadHashSets = new ArrayList<>();
>>>>>>>
private HashDb nsrlHashSet;
private ArrayList<HashDb> knownBadHashSets = new ArrayList<>();
<<<<<<<
public void init(IngestModuleInit initContext) {
services = IngestServices.getDefault();
this.skCase = Case.getCurrentCase().getSleuthkitCase();
try {
HashDbXML hdbxml = HashDbXML.getCurrent();
knownBadSets.clear();
skCase.clearLookupDatabases();
nsrlIsSet = false;
knownBadIsSet = false;
calcHashesIsSet = hdbxml.getCalculate();
HashDb nsrl = hdbxml.getNSRLSet();
if (nsrl != null && nsrl.getUseForIngest() && IndexStatus.isIngestible(nsrl.status())) {
nsrlIsSet = true;
// @@@ Unchecked return value
skCase.setNSRLDatabase(nsrl.getDatabasePaths().get(0));
}
for (HashDb db : hdbxml.getKnownBadSets()) {
IndexStatus status = db.status();
if (db.getUseForIngest() && IndexStatus.isIngestible(status)) {
knownBadIsSet = true;
int ret = skCase.addKnownBadDatabase(db.getDatabasePaths().get(0)); // TODO: support multiple paths
knownBadSets.put(ret, db);
}
}
if (!nsrlIsSet) {
this.services.postMessage(IngestMessage.createWarningMessage(++messageId, this, "No NSRL database set", "Known file search will not be executed."));
}
if (!knownBadIsSet) {
this.services.postMessage(IngestMessage.createWarningMessage(++messageId, this, "No known bad database set", "Known bad file search will not be executed."));
}
} catch (TskException ex) {
logger.log(Level.SEVERE, "Setting NSRL and Known database failed", ex);
this.services.postMessage(IngestMessage.createErrorMessage(++messageId, this, "Error Configuring Hash Databases", "Setting NSRL and Known database failed."));
}
}
@Override
public void complete() {
if ((knownBadIsSet) || (nsrlIsSet)) {
StringBuilder detailsSb = new StringBuilder();
//details
detailsSb.append("<table border='0' cellpadding='4' width='280'>");
detailsSb.append("<tr><td>Known bads found:</td>");
detailsSb.append("<td>").append(knownBadCount).append("</td></tr>");
detailsSb.append("<tr><td>Total Calculation Time</td><td>").append(calctime).append("</td></tr>\n");
detailsSb.append("<tr><td>Total Lookup Time</td><td>").append(lookuptime).append("</td></tr>\n");
detailsSb.append("</table>");
detailsSb.append("<p>Databases Used:</p>\n<ul>");
for (HashDb db : knownBadSets.values()) {
detailsSb.append("<li>").append(db.getName()).append("</li>\n");
}
detailsSb.append("</ul>");
services.postMessage(IngestMessage.createMessage(++messageId, IngestMessage.MessageType.INFO, this, "Hash Lookup Results", detailsSb.toString()));
clearHashDatabaseHandles();
}
}
private void clearHashDatabaseHandles() {
try {
skCase.clearLookupDatabases();
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Error clearing hash database handles. ", ex);
}
this.nsrlIsSet = false;
this.knownBadIsSet = false;
}
/**
* notification from manager to stop processing due to some interruption
* (user, error, exception)
*/
@Override
public void stop() {
clearHashDatabaseHandles();
}
/**
* get specific name of the module should be unique across modules, a
* user-friendly name of the module shown in GUI
*
* @return The name of this Ingest Module
*/
@Override
=======
>>>>>>>
<<<<<<<
=======
>>>>>>>
<<<<<<<
if (knownBadIsSet) {
for (Map.Entry<Integer, HashDb> entry : knownBadSets.entrySet()) {
=======
if (status.equals(TskData.FileKnown.BAD)) {
foundBad = true;
knownBadCount += 1;
>>>>>>>
if (status.equals(TskData.FileKnown.BAD)) {
foundBad = true;
knownBadCount += 1; |
<<<<<<<
logger.log(Level.INFO, "Starting ewf verification of {0}", img.getName());
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, EwfVerifierModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.startingImg",
imgName)));
=======
logger.log(Level.INFO, "Starting hash verification of " + img.getName());
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, this,
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.startingImg",
imgName)));
>>>>>>>
logger.log(Level.INFO, "Starting hash verification of {0}", img.getName());
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, EwfVerifierModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.startingImg",
imgName))); |
<<<<<<<
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
=======
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker;
import javax.swing.filechooser.FileNameExtensionFilter;
import org.apache.commons.io.FilenameUtils;
>>>>>>>
import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.SwingWorker;
import javax.swing.filechooser.FileNameExtensionFilter;
import org.apache.commons.io.FilenameUtils;
<<<<<<<
import org.openide.util.NbBundle;
=======
import org.netbeans.api.progress.ProgressHandleFactory;
import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages;
>>>>>>>
import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages;
<<<<<<<
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import org.sleuthkit.autopsy.coreutils.PlatformUtil;
import org.sleuthkit.autopsy.coreutils.XMLUtil;
import org.sleuthkit.autopsy.ingest.IngestManager;
=======
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import org.sleuthkit.autopsy.ingest.IngestManager;
import org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettings.HashDbInfo;
>>>>>>>
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
import org.sleuthkit.autopsy.ingest.IngestManager;
import org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettings.HashDbInfo;
<<<<<<<
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
=======
>>>>>>> |
<<<<<<<
logger.log(Level.SEVERE, "Error creating a case: " + caseName + " in dir " + caseDir + " " + ex.getMessage(), ex); //NON-NLS
SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
});
throw new CaseActionException(NbBundle.getMessage(Case.class, "CaseOpenException.DatabaseSettingsIssue") + " " + ex.getMessage()); //NON-NLS
=======
logger.log(Level.SEVERE, "Error creating a case: " + caseName + " in dir " + caseDir, ex); //NON-NLS
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.create.exception.msg", caseName, caseDir), ex);
} catch (UserPreferencesException ex) {
logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex);
>>>>>>>
logger.log(Level.SEVERE, "Error creating a case: " + caseName + " in dir " + caseDir + " " + ex.getMessage(), ex); //NON-NLS
SwingUtilities.invokeLater(() -> {
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
});
throw new CaseActionException(NbBundle.getMessage(Case.class, "CaseOpenException.DatabaseSettingsIssue") + " " + ex.getMessage()); //NON-NLS
} catch (UserPreferencesException ex) {
logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS
throw new CaseActionException(
NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex); |
<<<<<<<
LinkedHashMap<String, List<ResultFile>> searchResults = runFileSearch(filters,
=======
Map<String, List<AbstractFile>> searchResults = runFileSearch(filters,
>>>>>>>
Map<String, List<ResultFile>> searchResults = runFileSearch(filters,
<<<<<<<
private synchronized static LinkedHashMap<String, List<ResultFile>> runFileSearch(
=======
private synchronized static Map<String, List<AbstractFile>> runFileSearch(
>>>>>>>
private synchronized static Map<String, List<ResultFile>> runFileSearch( |
<<<<<<<
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNormalizationException;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute;
=======
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
>>>>>>>
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNormalizationException;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttribute;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance;
<<<<<<<
try {
correlationAttribute = DbManager.getCorrelationAttribute(fileType,
correlationCase,
dataSource,
InstanceTableCallback.getValue(resultSet),
InstanceTableCallback.getFilePath(resultSet));
} catch (CorrelationAttributeNormalizationException ex) {
LOGGER.log(Level.INFO, "Error getting single correlation artifact instance from database.", ex); // NON-NLS
}
=======
correlationAttributeInstance = DbManager.getCorrelationAttributeInstance(fileType,
correlationCase,
dataSource,
InstanceTableCallback.getValue(resultSet),
InstanceTableCallback.getFilePath(resultSet));
>>>>>>>
correlationAttributeInstance = DbManager.getCorrelationAttributeInstance(fileType,
correlationCase,
dataSource,
InstanceTableCallback.getValue(resultSet),
InstanceTableCallback.getFilePath(resultSet)); |
<<<<<<<
ImageView albumArt;
TextView title;
TextView year;
=======
final ImageView image;
final TextView title;
final TextView year;
>>>>>>>
final ImageView albumArt;
final TextView title;
final TextView year; |
<<<<<<<
selectedDomainTabName = validateLastSelectedType(searchCompleteEvent);
rightSplitPane.setBottomComponent(new DomainDetailsPanel(selectedDomainTabName));
} else {
rightSplitPane.setBottomComponent(new FileDetailsPanel());
=======
>>>>>>> |
<<<<<<<
"ImageGalleryTopComponent.chooseDataSourceDialog.headerText=Choose a data source to view.",
"ImageGalleryTopComponent.chooseDataSourceDialog.contentText=Data source:",
"ImageGalleryTopComponent.chooseDataSourceDialog.all=All",
"ImageGalleryTopComponent.chooseDataSourceDialog.titleText=Image Gallery",})
public static void openTopComponent() throws NoCurrentCaseException {
=======
"ImageGalleryTopComponent.openTopCommponent.chooseDataSourceDialog.headerText=Choose a data source to view.",
"ImageGalleryTopComponent.openTopCommponent.chooseDataSourceDialog.contentText=Data source:",
"ImageGalleryTopComponent.openTopCommponent.chooseDataSourceDialog.all=All",
"ImageGalleryTopComponent.openTopCommponent.chooseDataSourceDialog.titleText=Image Gallery",})
public static void openTopComponent() throws NoCurrentCaseException, TskCoreException {
>>>>>>>
"ImageGalleryTopComponent.chooseDataSourceDialog.headerText=Choose a data source to view.",
"ImageGalleryTopComponent.chooseDataSourceDialog.contentText=Data source:",
"ImageGalleryTopComponent.chooseDataSourceDialog.all=All",
"ImageGalleryTopComponent.chooseDataSourceDialog.titleText=Image Gallery",})
public static void openTopComponent() throws NoCurrentCaseException, TskCoreException { |
<<<<<<<
private static final Logger LOGGER = Logger.getLogger(DataResultViewerTable.class.getName());
=======
>>>>>>>
<<<<<<<
=======
>>>>>>> |
<<<<<<<
addTreeExpansionListener(new DelayedLoadChildNodesOnTreeExpansion());
=======
outlineView.addTreeExpansionListener(new InstanceCountNodeTreeExpansionListener());
>>>>>>>
addTreeExpansionListener(new InstanceCountNodeTreeExpansionListener()); |
<<<<<<<
if (mode != OptionsUiMode.DOWNLOADING_CONFIGURATION) {
jLabelSelectInputFolder.setEnabled(mode == OptionsUiMode.AIM);
inputPathTextField.setEnabled(mode == OptionsUiMode.AIM);
browseInputFolderButton.setEnabled(mode == OptionsUiMode.AIM);
=======
if (mode != OptionsUiMode.DOWNLOADING_CONFIGURATION) {
jRadioButtonAutomated.setEnabled(cbJoinAutoIngestCluster.isSelected());
jRadioButtonReview.setEnabled(cbJoinAutoIngestCluster.isSelected());
jLabelSelectInputFolder.setEnabled(mode == OptionsUiMode.UTILITY || mode == OptionsUiMode.AIM);
inputPathTextField.setEnabled(mode == OptionsUiMode.UTILITY || mode == OptionsUiMode.AIM);
browseInputFolderButton.setEnabled(mode == OptionsUiMode.UTILITY || mode == OptionsUiMode.AIM);
>>>>>>>
if (mode != OptionsUiMode.DOWNLOADING_CONFIGURATION) {
jRadioButtonAutomated.setEnabled(cbJoinAutoIngestCluster.isSelected());
jRadioButtonReview.setEnabled(cbJoinAutoIngestCluster.isSelected());
jLabelSelectInputFolder.setEnabled(mode == OptionsUiMode.AIM);
inputPathTextField.setEnabled(mode == OptionsUiMode.AIM);
browseInputFolderButton.setEnabled(mode == OptionsUiMode.AIM); |
<<<<<<<
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.Type;
=======
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNormalizationException;
>>>>>>>
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeInstance.Type;
import org.sleuthkit.autopsy.centralrepository.datamodel.CorrelationAttributeNormalizationException;
<<<<<<<
correlationAttributeInstance = DbManager.getCorrelationAttributeInstance(correlationType,
correlationCase,
dataSource,
InstanceTableCallback.getValue(resultSet),
InstanceTableCallback.getFilePath(resultSet));
=======
try {
correlationAttributeInstance = DbManager.getCorrelationAttributeInstance(fileType,
correlationCase,
dataSource,
InstanceTableCallback.getValue(resultSet),
InstanceTableCallback.getFilePath(resultSet));
} catch (CorrelationAttributeNormalizationException ex) {
LOGGER.log(Level.INFO, "Unable to get CorrelationAttributeInstance.", ex); // NON-NLS
}
>>>>>>>
try {
correlationAttributeInstance = DbManager.getCorrelationAttributeInstance(correlationType,
correlationCase,
dataSource,
InstanceTableCallback.getValue(resultSet),
InstanceTableCallback.getFilePath(resultSet));
} catch (CorrelationAttributeNormalizationException ex) {
LOGGER.log(Level.INFO, "Unable to get CorrelationAttributeInstance.", ex); // NON-NLS
} |
<<<<<<<
Examiner examiner = controller.getSleuthKitCase().getCurrentExaminer();
getDrawableDB().markGroupSeen(group.getGroupKey(), seen, examiner.getId());
=======
Examiner examiner = controller.getSleuthKitCase().getCurrentExaminer();
getDrawableDB().markGroupSeen(group.getGroupKey(), seen, examiner.getId());
>>>>>>>
Examiner examiner = controller.getSleuthKitCase().getCurrentExaminer();
getDrawableDB().markGroupSeen(group.getGroupKey(), seen, examiner.getId());
<<<<<<<
=======
Examiner examiner = controller.getSleuthKitCase().getCurrentExaminer();
final boolean groupSeen = getDrawableDB().isGroupSeenByExaminer(groupKey, examiner.getId());
>>>>>>> |
<<<<<<<
import org.openide.util.NbBundle;
=======
import org.sleuthkit.autopsy.datamodel.KeywordHits.KeywordHitsRootNode;
import org.sleuthkit.datamodel.Content;
>>>>>>>
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.datamodel.KeywordHits.KeywordHitsRootNode;
import org.sleuthkit.datamodel.Content;
<<<<<<<
protected AbstractContentNode defaultVisit(SleuthkitVisitableItem di) {
throw new UnsupportedOperationException(NbBundle.getMessage(this.getClass(),
"AbstractContentChildren.CreateTSKNodeVisitor.exception.noNodeMsg"));
=======
protected AbstractContentNode<? extends Content> defaultVisit(SleuthkitVisitableItem di) {
throw new UnsupportedOperationException("No Node defined for the given SleuthkitItem");
>>>>>>>
protected AbstractContentNode<? extends Content> defaultVisit(SleuthkitVisitableItem di) {
throw new UnsupportedOperationException(NbBundle.getMessage(this.getClass(),
"AbstractContentChildren.CreateTSKNodeVisitor.exception.noNodeMsg")); |
<<<<<<<
Node sffn = new SlackFileFilterNode(kffn, SlackFileFilterNode.getSelectionContext(originNode));
/*
* TODO (AUT-1849): Correct or remove peristent column
* reordering code
*
* The following conditional was added to support this
* feature.
*/
// if(originNode instanceof DisplayableItemNode) {
// dataResult.setNode(new TableFilterNode(kffn, true, ((DisplayableItemNode) originNode).getItemType()));
// } else {
dataResult.setNode(new TableFilterNode(sffn, true));
// }
=======
// Create a TableFilterNode with knowledge of the node's type to allow for column order settings
if (originNode instanceof DisplayableItemNode) {
dataResult.setNode(new TableFilterNode(kffn, true, ((DisplayableItemNode) originNode).getItemType()));
} else {
dataResult.setNode(new TableFilterNode(kffn, true));
}
>>>>>>>
Node sffn = new SlackFileFilterNode(kffn, SlackFileFilterNode.getSelectionContext(originNode));
// Create a TableFilterNode with knowledge of the node's type to allow for column order settings
if (originNode instanceof DisplayableItemNode) {
dataResult.setNode(new TableFilterNode(sffn, true, ((DisplayableItemNode) originNode).getItemType()));
} else {
dataResult.setNode(new TableFilterNode(sffn, true));
} |
<<<<<<<
final PrivacyGroupManager privacyGroupManager = PrivacyGroupManager.create(config);
final PrivacyGroupResource privacyGroupResource = new PrivacyGroupResource(privacyGroupManager);
return Set.of(
transactionResource,
rawTransactionResource,
encodedPayloadResource,
privacyGroupResource,
upCheckResource);
=======
return Set.of(
transactionResource,
rawTransactionResource,
encodedPayloadResource,
upCheckResource,
transactionResource3);
>>>>>>>
final PrivacyGroupManager privacyGroupManager = PrivacyGroupManager.create(config);
final PrivacyGroupResource privacyGroupResource = new PrivacyGroupResource(privacyGroupManager);
return Set.of(
transactionResource,
rawTransactionResource,
encodedPayloadResource,
privacyGroupResource,
upCheckResource,
transactionResource3); |
<<<<<<<
=======
import java.text.MessageFormat;
import java.util.concurrent.ExecutionException;
>>>>>>>
<<<<<<<
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
=======
import org.sleuthkit.autopsy.casemodule.CaseActionException;
>>>>>>>
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
<<<<<<<
private long dataSourceID;
=======
private final Long selectDataSource;
@NbBundle.Messages({"DeleteDataSourceAction.name.text=Delete Data Source"})
public DeleteDataSourceAction(Long selectedDataSource) {
super(Bundle.DeleteDataSourceAction_name_text());
selectDataSource = selectedDataSource;
>>>>>>>
private long dataSourceID;
<<<<<<<
=======
@NbBundle.Messages({"ErrorDeletingDataSource.name.text=Error Deleting Data Source",
"DeleteDataSourceConfirmationDialog_message=Are you sure you want to delete the data source?",
"DeleteDataSourceConfirmationDialog_title=Delete Data Source?"})
>>>>>>>
<<<<<<<
try {
Case.getCurrentCaseThrows().getSleuthkitCase().deleteDataSource(dataSourceID);
KeywordSearchService kwsService = Lookup.getDefault().lookup(KeywordSearchService.class);
kwsService.deleteDataSource(dataSourceID);
Case.getCurrentCaseThrows().notifyDataSourceDeleted(dataSourceID);
} catch (NoCurrentCaseException | TskCoreException | KeywordSearchServiceException e) {
logger.log(Level.SEVERE, String.format("Error Deleting data source (obj_id=%d)", dataSourceID), e);
=======
Object response = DialogDisplayer.getDefault().notify(new NotifyDescriptor(
Bundle.DeleteDataSourceConfirmationDialog_message(),
Bundle.DeleteDataSourceConfirmationDialog_title(),
NotifyDescriptor.YES_NO_OPTION,
NotifyDescriptor.WARNING_MESSAGE,
null,
NotifyDescriptor.NO_OPTION));
if (null != response && DialogDescriptor.YES_OPTION == response) {
new SwingWorker<Void, Void>() {
@Override
protected Void doInBackground() throws Exception {
try {
Case.deleteDataSourceFromCurrentCase(selectDataSource);
deleteDataSource(selectDataSource);
} catch (CaseActionException | KeywordSearchServiceException ex) {
String msg = MessageFormat.format(Bundle.ErrorDeletingDataSource_name_text(), selectDataSource);
logger.log(Level.WARNING, msg, ex);
}
return null;
}
@Override
protected void done() {
}
}.execute();
>>>>>>>
// try {
// Case.getCurrentCaseThrows().getSleuthkitCase().deleteDataSource(dataSourceID);
// KeywordSearchService kwsService = Lookup.getDefault().lookup(KeywordSearchService.class);
// kwsService.deleteDataSource(dataSourceID);
// Case.getCurrentCaseThrows().notifyDataSourceDeleted(dataSourceID);
// } catch (NoCurrentCaseException | TskCoreException | KeywordSearchServiceException e) {
// logger.log(Level.SEVERE, String.format("Error Deleting data source (obj_id=%d)", dataSourceID), e);
// |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
@Override
public String getQueryText() {
return searchBox.getText();
}
@Override
public boolean isLuceneQuerySelected() {
return !regExCheckboxMenuItem.isSelected();
}
@Override
public boolean isMultiwordQuery() {
return false;
}
@Override
public List<Keyword> getQueryList() {
throw new UnsupportedOperationException(
NbBundle.getMessage(this.getClass(), "KeywordSearchPanel.getQueryList.exception.msg"));
}
>>>>>>> |
<<<<<<<
* Whether or not the status that this tag implies is the Notable status
*
* @return true if the Notable status is implied by this tag, false
* otherwise.
=======
*
>>>>>>>
* Whether or not the status that this tag implies is the Notable status
*
* @return true if the Notable status is implied by this tag, false
* otherwise.
<<<<<<<
=======
List<String> notableTags = null;
>>>>>>>
<<<<<<<
} else if (tagNameAttributes.length == 4) {
standardTags.remove(tagNameAttributes[0]); //Use standard tag's saved settings instead of default settings
=======
} else if (tagNameAttributes.length == 4) { //if there are 4 attributes its a current list we can use the values present
>>>>>>>
} else if (tagNameAttributes.length == 4) { //if there are 4 attributes its a current list we can use the values present
standardTags.remove(tagNameAttributes[0]); //remove tag from default tags we need to create still |
<<<<<<<
import com.google.common.eventbus.Subscribe;
import java.util.ArrayList;
=======
>>>>>>>
import com.google.common.eventbus.Subscribe;
<<<<<<<
=======
import java.util.Objects;
import java.util.Set;
>>>>>>>
import java.util.Set;
<<<<<<<
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.BlackboardArtifactTag;
import org.sleuthkit.datamodel.BlackboardAttribute;
import org.sleuthkit.datamodel.ContentTag;
=======
>>>>>>>
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.BlackboardArtifactTag;
import org.sleuthkit.datamodel.ContentTag;
<<<<<<<
private static final Logger LOGGER = Logger.getLogger(AggregateEventNode.class.getName());
private static final Image HASH_PIN = new Image("/org/sleuthkit/autopsy/images/hashset_hits.png");
=======
private static final Logger LOGGER = Logger.getLogger(AggregateEventNode.class.getName());
private static final Image HASH_PIN = new Image(AggregateEventNode.class.getResourceAsStream("/org/sleuthkit/autopsy/images/hashset_hits.png"));
>>>>>>>
private static final Logger LOGGER = Logger.getLogger(AggregateEventNode.class.getName());
private static final Image HASH_PIN = new Image("/org/sleuthkit/autopsy/images/hashset_hits.png");
<<<<<<<
synchronized private void installTooltip() {
//TODO: all this work should probably go on a background thread...
=======
private void installTooltip() {
>>>>>>>
synchronized private void installTooltip() {
//TODO: all this work should probably go on a background thread...
<<<<<<<
RootFilter combinedFilter = eventsModel.filter().get().copyOf();
=======
RootFilter combinedFilter = chart.getFilteredEvents().filter().get().copyOf();
>>>>>>>
RootFilter combinedFilter = eventsModel.filter().get().copyOf(); |
<<<<<<<
=======
/**
* Saves the hash sets configuration. Note that the configuration is only
* saved on demand to support cancellation of configuration panels.
*
* @return True on success, false otherwise.
*/
synchronized boolean save() {
try {
return HashLookupSettings.writeSettings(new HashLookupSettings(this.knownHashSets, this.knownBadHashSets));
} catch (HashLookupSettings.HashLookupSettingsException ex) {
return false;
}
}
>>>>>>>
<<<<<<<
} catch (TskCoreException ex) {
Logger.getLogger(HashDbManager.class.getName()).log(Level.SEVERE, "Error opening hash database", ex); //NON-NLS
=======
} catch (HashDbManagerException | TskCoreException ex) {
Logger.getLogger(HashDbManager.class.getName()).log(Level.SEVERE, "Error opening hash database", ex); //NON-NLS
>>>>>>>
} catch (TskCoreException ex) {
Logger.getLogger(HashDbManager.class.getName()).log(Level.SEVERE, "Error opening hash database", ex); //NON-NLS
<<<<<<<
HashLookupSettings.writeSettings(new HashLookupSettings(this.knownHashSets, this.knownBadHashSets));
} catch (HashLookupSettings.HashLookupSettingsException ex) {
logger.log(Level.SEVERE, "Could not overwrite hash database settings.");
=======
HashLookupSettings.writeSettings(new HashLookupSettings(this.knownHashSets, this.knownBadHashSets));
} catch (HashLookupSettings.HashLookupSettingsException ex) {
logger.log(Level.SEVERE, "Could not overwrite hash database settings.", ex);
>>>>>>>
HashLookupSettings.writeSettings(new HashLookupSettings(this.knownHashSets, this.knownBadHashSets));
} catch (HashLookupSettings.HashLookupSettingsException ex) {
logger.log(Level.SEVERE, "Could not overwrite hash database settings.", ex); |
<<<<<<<
=======
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.Response;
import org.junit.After;
>>>>>>>
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.Response;
import org.junit.After;
<<<<<<<
transactionResource = new TransactionResource(enclave);
=======
transactionResource = new TransactionResource(transactionService,base64Decoder);
>>>>>>>
transactionResource = new TransactionResource(enclave,base64Decoder); |
<<<<<<<
import org.sleuthkit.autopsy.progress.ProgressIndicator;
import org.sleuthkit.autopsy.textextractors.TextExtractor.ExtractionException;
=======
import org.sleuthkit.autopsy.textextractors.TextExtractor;
>>>>>>>
import org.sleuthkit.autopsy.progress.ProgressIndicator;
import org.sleuthkit.autopsy.textextractors.TextExtractor;
<<<<<<<
ingester.indexText(TextExtractorFactory.getDefaultExtractor(content, null).getReader(), content.getId(), content.getName(), content, null);
} catch (Ingester.IngesterException | ExtractionException ex1) {
=======
TextExtractor stringsExtractor = TextExtractorFactory.getStringsExtractor(content, null);
Reader stringsExtractedTextReader = stringsExtractor.getReader();
ingester.indexText(stringsExtractedTextReader,content.getId(),content.getName(), content, null);
} catch (Ingester.IngesterException | TextExtractor.InitReaderException ex1) {
>>>>>>>
TextExtractor stringsExtractor = TextExtractorFactory.getStringsExtractor(content, null);
Reader stringsExtractedTextReader = stringsExtractor.getReader();
ingester.indexText(stringsExtractedTextReader,content.getId(),content.getName(), content, null);
} catch (Ingester.IngesterException | TextExtractor.InitReaderException ex1) {
<<<<<<<
Reader contentSpecificReader
= TextExtractorFactory.getExtractor((Content) artifact, null).getReader();
=======
TextExtractor blackboardExtractor = TextExtractorFactory.getExtractor((Content) artifact, null);
Reader blackboardExtractedTextReader = blackboardExtractor.getReader();
>>>>>>>
TextExtractor blackboardExtractor = TextExtractorFactory.getExtractor((Content) artifact, null);
Reader blackboardExtractedTextReader = blackboardExtractor.getReader(); |
<<<<<<<
private static final SortedSet<MediaType> MEDIA_TYPES = MimeTypes.getDefaultMimeTypes().getMediaTypeRegistry().getTypes();
=======
>>>>>>>
<<<<<<<
private final JButton okButton = new JButton("OK");
private final JButton cancelButton = new JButton("Cancel");
private final String settingsFileName;
private final String settingsLegacyFileName;
private final String ruleDialogTitle;
=======
private final JButton okButton = new JButton("OK");
private final JButton cancelButton = new JButton("Cancel");
>>>>>>>
private final JButton okButton = new JButton("OK");
private final JButton cancelButton = new JButton("Cancel");
private final String settingsFileName;
private final String settingsLegacyFileName;
private final String ruleDialogTitle;
<<<<<<<
if (settingsLegacyFileName.equals("")) {
setName(Bundle.IngestFilterItemDefsPanel_Title());
} else {
setName(Bundle.InterestingItemDefsPanel_Title());
}
=======
setName(Bundle.InterestingItemDefsPanel_Title());
>>>>>>>
if (settingsLegacyFileName.equals("")) {
setName(Bundle.IngestFilterItemDefsPanel_Title());
} else {
setName(Bundle.InterestingItemDefsPanel_Title());
}
setName(Bundle.InterestingItemDefsPanel_Title());
<<<<<<<
for (MediaType mediaType : MEDIA_TYPES) {
fileTypesCollated.add(mediaType.toString());
=======
for (String mediaType : FileTypeDetector.getStandardDetectedTypes()) {
fileTypesCollated.add(mediaType);
>>>>>>>
for (String mediaType : FileTypeDetector.getStandardDetectedTypes()) {
fileTypesCollated.add(mediaType); |
<<<<<<<
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.SetEvt;
=======
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository;
>>>>>>>
import org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.SetEvt;
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepository; |
<<<<<<<
import java.io.UncheckedIOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.*;
=======
import java.util.Collections;
import java.util.List;
import java.util.Set;
>>>>>>>
import java.io.UncheckedIOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.*;
import java.util.Collections;
import java.util.List;
import java.util.Set;
<<<<<<<
private ResendBatchPublisher resendBatchPublisher;
=======
private KnownPeerChecker knownPeerChecker;
>>>>>>>
private ResendBatchPublisher resendBatchPublisher;
private KnownPeerChecker knownPeerChecker;
<<<<<<<
.isInstanceOf(AutoDiscoveryDisabledException.class)
.hasMessage("Peer SomeUnknownUri not found in known peer list");
=======
.isInstanceOf(AutoDiscoveryDisabledException.class)
.hasMessage("http://SomeUnknownUri is not a known peer");
verify(knownPeerChecker).isKnown("http://SomeUnknownUri");
>>>>>>>
.isInstanceOf(AutoDiscoveryDisabledException.class)
.hasMessage("http://SomeUnknownUri is not a known peer");
verify(knownPeerChecker).isKnown("http://SomeUnknownUri");
<<<<<<<
RUNTIME_CONTEXT.setDisablePeerDiscovery(true);
=======
RUNTIME_CONTEXT.setDisablePeerDiscovery(true);
when(knownPeerChecker.isKnown("http://known.com:8080")).thenReturn(true);
when(knownPeerChecker.isKnown("http://also-known.com:8080")).thenReturn(true);
>>>>>>>
RUNTIME_CONTEXT.setDisablePeerDiscovery(true);
when(knownPeerChecker.isKnown("http://known.com:8080")).thenReturn(true);
when(knownPeerChecker.isKnown("http://also-known.com:8080")).thenReturn(true);
<<<<<<<
final PartyInfo forUpdate = new PartyInfo("http://other-node.com:8080", Set.of(known, unknown), emptySet());
=======
final PartyInfo forUpdate =
new PartyInfo("http://known.com:8080", Set.of(known, alsoKnown, unknown), emptySet());
>>>>>>>
final PartyInfo forUpdate =
new PartyInfo("http://known.com:8080", Set.of(known, alsoKnown, unknown), emptySet());
<<<<<<<
new PartyInfo(
"http://other-node.com:8080",
emptySet(),
Stream.of(new Party("known"), new Party("unknown")).collect(toSet()));
=======
new PartyInfo(
"http://other-node.com:8080", emptySet(), Stream.of(new Party("unknown")).collect(toSet()));
>>>>>>>
new PartyInfo(
"http://other-node.com:8080", emptySet(), Stream.of(new Party("unknown")).collect(toSet()));
<<<<<<<
@Test
=======
@Test
>>>>>>>
@Test
public void createWithFactoryConstructor() throws Exception {
Set<Object> services =
Stream.of(mock(Enclave.class), mock(PayloadPublisher.class), mock(PartyInfoStore.class))
.collect(Collectors.toSet());
MockServiceLocator.createMockServiceLocator().setServices(services);
final PartyInfoServiceFactory factory = PartyInfoServiceFactory.create();
assertThat(new PartyInfoServiceImpl(factory)).isNotNull();
}
@Test |
<<<<<<<
private CommunicationsManager communicationsManager;
=======
private Case currentCase;
>>>>>>>
private Case currentCase;
<<<<<<<
Case currentCase = Case.getCurrentCaseThrows();
fileManager = currentCase.getServices().getFileManager();
blackboard = currentCase.getSleuthkitCase().getBlackboard();
communicationsManager = currentCase.getSleuthkitCase().getCommunicationsManager();
=======
currentCase = Case.getCurrentCaseThrows();
fileManager = Case.getCurrentCaseThrows().getServices().getFileManager();
>>>>>>>
currentCase = Case.getCurrentCaseThrows();
fileManager = currentCase.getServices().getFileManager();
<<<<<<<
switch (result) {
case OK:
=======
if (result == PstParser.ParseResult.OK) {
// parse success: Process email and add artifacts
processEmails(parser.getResults(), abstractFile);
} else if (result == PstParser.ParseResult.ENCRYPT) {
// encrypted pst: Add encrypted file artifact
try {
BlackboardArtifact artifact = abstractFile.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED);
artifact.addAttribute(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME, EmailParserModuleFactory.getModuleName(), NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.encryptionFileLevel")));
>>>>>>>
if (result == PstParser.ParseResult.OK) {
// parse success: Process email and add artifacts
processEmails(parser.getResults(), abstractFile);
} else if (result == PstParser.ParseResult.ENCRYPT) {
// encrypted pst: Add encrypted file artifact
try {
BlackboardArtifact artifact = abstractFile.newArtifact(BlackboardArtifact.ARTIFACT_TYPE.TSK_ENCRYPTION_DETECTED);
artifact.addAttribute(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_NAME, EmailParserModuleFactory.getModuleName(), NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.encryptionFileLevel")));
<<<<<<<
*
* @throws NoCurrentCaseException if there is no open case.
=======
>>>>>>>
<<<<<<<
BlackboardArtifact msgArtifact = addArtifact(email, abstractFile);
if ((msgArtifact != null) && (email.hasAttachment())) {
derivedFiles.addAll(handleAttachments(email.getAttachments(), abstractFile, msgArtifact));
=======
BlackboardArtifact msgArtifact = addEmailArtifact(email, abstractFile);
if ((msgArtifact != null) && (email.hasAttachment())) {
derivedFiles.addAll(handleAttachments(email.getAttachments(), abstractFile, msgArtifact ));
>>>>>>>
BlackboardArtifact msgArtifact = addEmailArtifact(email, abstractFile);
if ((msgArtifact != null) && (email.hasAttachment())) {
derivedFiles.addAll(handleAttachments(email.getAttachments(), abstractFile, msgArtifact));
<<<<<<<
* @param email
* @param abstractFile
*
* @throws NoCurrentCaseException if there is no open case.
=======
* @param email The e-mail message.
* @param abstractFile The associated file.
*
* @return The generated e-mail message artifact.
>>>>>>>
* @param email The e-mail message.
* @param abstractFile The associated file.
*
* @return The generated e-mail message artifact.
<<<<<<<
senderAccountInstance = communicationsManager.
createAccountFileInstance(Account.Type.EMAIL, senderAddress, EmailParserModuleFactory.getModuleName(), abstractFile);
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Failed to create account for email address " + senderAddress, ex); //NON-NLS
=======
senderAccountInstance = currentCase.getSleuthkitCase().getCommunicationsManager().createAccountFileInstance(Account.Type.EMAIL, senderAddress, EmailParserModuleFactory.getModuleName(), abstractFile);
}
catch(TskCoreException ex) {
logger.log(Level.WARNING, "Failed to create account for email address " + senderAddress, ex); //NON-NLS
>>>>>>>
senderAccountInstance = currentCase.getSleuthkitCase().getCommunicationsManager().createAccountFileInstance(Account.Type.EMAIL, senderAddress, EmailParserModuleFactory.getModuleName(), abstractFile);
} catch (TskCoreException ex) {
logger.log(Level.WARNING, "Failed to create account for email address " + senderAddress, ex); //NON-NLS
<<<<<<<
//TODO: should this be a set?
=======
else {
logger.log(Level.WARNING, "Failed to find sender address, from = {0}", from); //NON-NLS
}
>>>>>>>
<<<<<<<
AccountFileInstance recipientAccountInstance = communicationsManager
.createAccountFileInstance(Account.Type.EMAIL, addr,
EmailParserModuleFactory.getModuleName(), abstractFile);
=======
AccountFileInstance recipientAccountInstance =
currentCase.getSleuthkitCase().getCommunicationsManager().createAccountFileInstance(Account.Type.EMAIL, addr,
EmailParserModuleFactory.getModuleName(), abstractFile);
>>>>>>>
AccountFileInstance recipientAccountInstance
= currentCase.getSleuthkitCase().getCommunicationsManager().createAccountFileInstance(Account.Type.EMAIL, addr,
EmailParserModuleFactory.getModuleName(), abstractFile);
<<<<<<<
addEmailAttribute(email.getHeaders(), ATTRIBUTE_TYPE.TSK_HEADERS, bbattributes);
addEmailAttribute(from, ATTRIBUTE_TYPE.TSK_EMAIL_FROM, bbattributes);
addEmailAttribute(to, ATTRIBUTE_TYPE.TSK_EMAIL_TO, bbattributes);
addEmailAttribute(cc, ATTRIBUTE_TYPE.TSK_EMAIL_CC, bbattributes);
addEmailAttribute(email.getSubject(), ATTRIBUTE_TYPE.TSK_SUBJECT, bbattributes);
addEmailAttribute(dateL, ATTRIBUTE_TYPE.TSK_DATETIME_RCVD, bbattributes);
addEmailAttribute(dateL, ATTRIBUTE_TYPE.TSK_DATETIME_SENT, bbattributes);
addEmailAttribute(email.getTextBody(), ATTRIBUTE_TYPE.TSK_EMAIL_CONTENT_PLAIN, bbattributes);
addEmailAttribute(email.getHtmlBody(), ATTRIBUTE_TYPE.TSK_EMAIL_CONTENT_HTML, bbattributes);
addEmailAttribute(email.getRtfBody(), ATTRIBUTE_TYPE.TSK_EMAIL_CONTENT_RTF, bbattributes);
addEmailAttribute(((id < 0L) ? NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.notAvail") : String.valueOf(id)),
=======
addArtifactAttribute(headers, ATTRIBUTE_TYPE.TSK_HEADERS, bbattributes);
addArtifactAttribute(from, ATTRIBUTE_TYPE.TSK_EMAIL_FROM, bbattributes);
addArtifactAttribute(to, ATTRIBUTE_TYPE.TSK_EMAIL_TO, bbattributes);
addArtifactAttribute(subject, ATTRIBUTE_TYPE.TSK_SUBJECT, bbattributes);
addArtifactAttribute(dateL, ATTRIBUTE_TYPE.TSK_DATETIME_RCVD, bbattributes);
addArtifactAttribute(dateL, ATTRIBUTE_TYPE.TSK_DATETIME_SENT, bbattributes);
addArtifactAttribute(body, ATTRIBUTE_TYPE.TSK_EMAIL_CONTENT_PLAIN, bbattributes);
addArtifactAttribute(((id < 0L) ? NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.notAvail") : String.valueOf(id)),
>>>>>>>
addArtifactAttribute(headers, ATTRIBUTE_TYPE.TSK_HEADERS, bbattributes);
addArtifactAttribute(from, ATTRIBUTE_TYPE.TSK_EMAIL_FROM, bbattributes);
addArtifactAttribute(to, ATTRIBUTE_TYPE.TSK_EMAIL_TO, bbattributes);
addArtifactAttribute(subject, ATTRIBUTE_TYPE.TSK_SUBJECT, bbattributes);
addArtifactAttribute(dateL, ATTRIBUTE_TYPE.TSK_DATETIME_RCVD, bbattributes);
addArtifactAttribute(dateL, ATTRIBUTE_TYPE.TSK_DATETIME_SENT, bbattributes);
addArtifactAttribute(body, ATTRIBUTE_TYPE.TSK_EMAIL_CONTENT_PLAIN, bbattributes);
addArtifactAttribute(((id < 0L) ? NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.notAvail") : String.valueOf(id)),
<<<<<<<
addEmailAttribute(StringUtils.defaultIfEmpty(email.getLocalPath(), "/foo/bar"), //TODO: really /foo/bar?
=======
addArtifactAttribute(((localPath.isEmpty() == false) ? localPath : "/foo/bar"),
>>>>>>>
addArtifactAttribute(((localPath.isEmpty() == false) ? localPath : "/foo/bar"),
<<<<<<<
communicationsManager.addRelationships(senderAccountInstance, recipientAccountInstances, bbart, Relationship.Type.MESSAGE, dateL);
=======
currentCase.getSleuthkitCase().getCommunicationsManager().addRelationships(senderAccountInstance, recipientAccountInstances, bbart,Relationship.Type.MESSAGE, dateL);
>>>>>>>
currentCase.getSleuthkitCase().getCommunicationsManager().addRelationships(senderAccountInstance, recipientAccountInstances, bbart, Relationship.Type.MESSAGE, dateL);
<<<<<<<
=======
/**
* Post an error message for the user.
*
* @param subj The error subject.
* @param details The error details.
*/
>>>>>>>
/**
* Post an error message for the user.
*
* @param subj The error subject.
* @param details The error details.
*/
<<<<<<<
=======
/**
* Get the IngestServices object.
*
* @return The IngestServices object.
*/
IngestServices getServices() {
return services;
}
>>>>>>>
/**
* Get the IngestServices object.
*
* @return The IngestServices object.
*/
IngestServices getServices() {
return services;
} |
<<<<<<<
import org.sleuthkit.autopsy.ingest.DataSourceIngestModule;
import org.sleuthkit.autopsy.ingest.IngestJobContext;
=======
import org.openide.util.NbBundle;
>>>>>>>
import org.sleuthkit.autopsy.ingest.DataSourceIngestModule;
import org.sleuthkit.autopsy.ingest.IngestJobContext;
import org.openide.util.NbBundle;
<<<<<<<
public class EwfVerifyIngestModule extends IngestModuleAdapter implements DataSourceIngestModule {
private static final Logger logger = Logger.getLogger(EwfVerifyIngestModule.class.getName());
=======
public class EwfVerifyIngestModule extends IngestModuleDataSource {
private static final String MODULE_NAME = NbBundle.getMessage(EwfVerifyIngestModule.class,
"EwfVerifyIngestModule.moduleName.text");
private static final String MODULE_VERSION = Version.getVersion();
private static final String MODULE_DESCRIPTION = NbBundle.getMessage(EwfVerifyIngestModule.class,
"EwfVerifyIngestModule.moduleDesc.text");
>>>>>>>
public class EwfVerifyIngestModule extends IngestModuleAdapter implements DataSourceIngestModule {
private static final Logger logger = Logger.getLogger(EwfVerifyIngestModule.class.getName());
<<<<<<<
String message = "Failed to get image from Content";
context.logError(EwfVerifyIngestModule.class, message, ex);
context.postIngestMessage(++messageId, MessageType.ERROR, message);
return ResultCode.ERROR;
=======
logger.log(Level.SEVERE, "Failed to get image from Content.", ex);
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, this,
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.errProcImg",
imgName)));
return;
>>>>>>>
logger.log(Level.SEVERE, "Failed to get image from Content.", ex);
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, EwfVerifierModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.errProcImg",
imgName)));
return ResultCode.ERROR;
<<<<<<<
logger.log(Level.INFO, "Skipping non-ewf image {0}", imgName);
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, EwfVerifierModuleFactory.getModuleName(),
"Skipping non-ewf image " + imgName));
=======
logger.log(Level.INFO, "Skipping non-ewf image " + imgName);
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, this,
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.skipNonEwf",
imgName)));
>>>>>>>
logger.log(Level.INFO, "Skipping non-ewf image " + imgName);
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, EwfVerifierModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.skipNonEwf",
imgName)));
<<<<<<<
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, EwfVerifierModuleFactory.getModuleName(),
"Image " + imgName + " does not have stored hash."));
return ResultCode.ERROR;
=======
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, this,
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.noStoredHash",
imgName)));
return;
>>>>>>>
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, EwfVerifierModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.noStoredHash",
imgName)));
return ResultCode.ERROR;
<<<<<<<
logger.log(Level.INFO, "Starting ewf verification of {0}", img.getName());
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, EwfVerifierModuleFactory.getModuleName(),
"Starting " + imgName));
=======
logger.log(Level.INFO, "Starting ewf verification of " + img.getName());
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, this,
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.startingImg",
imgName)));
>>>>>>>
logger.log(Level.INFO, "Starting ewf verification of " + img.getName());
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, EwfVerifierModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.startingImg",
imgName)));
<<<<<<<
logger.log(Level.WARNING, "Size of image {0} was 0 when queried.", imgName);
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, EwfVerifierModuleFactory.getModuleName(),
"Error getting size of " + imgName + ". Image will not be processed."));
=======
logger.log(Level.WARNING, "Size of image " + imgName + " was 0 when queried.");
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, this,
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.errGetSizeOfImg",
imgName)));
>>>>>>>
logger.log(Level.WARNING, "Size of image " + imgName + " was 0 when queried.");
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, EwfVerifierModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.errGetSizeOfImg",
imgName)));
<<<<<<<
String msg = "Error reading " + imgName + " at chunk " + i;
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, EwfVerifierModuleFactory.getModuleName(), msg));
=======
String msg = NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.errReadImgAtChunk", imgName, i);
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, this, msg));
>>>>>>>
String msg = NbBundle.getMessage(this.getClass(),
"EwfVerifyIngestModule.process.errReadImgAtChunk", imgName, i);
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.ERROR, EwfVerifierModuleFactory.getModuleName(), msg));
<<<<<<<
public void shutDown(boolean ingestJobCancelled) {
logger.log(Level.INFO, "complete() {0}", EwfVerifierModuleFactory.getModuleName());
=======
public void init(IngestModuleInit initContext) throws IngestModuleException {
services = IngestServices.getDefault();
skCase = Case.getCurrentCase().getSleuthkitCase();
running = false;
verified = false;
skipped = false;
img = null;
imgName = "";
storedHash = "";
calculatedHash = "";
if (logger == null) {
logger = services.getLogger(this);
}
if (messageDigest == null) {
try {
messageDigest = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException ex) {
logger.log(Level.WARNING, "Error getting md5 algorithm", ex);
throw new RuntimeException(
NbBundle.getMessage(this.getClass(), "EwfVerifyIngestModule.init.exception.failGetMd5"));
}
} else {
messageDigest.reset();
}
}
@Override
public void complete() {
logger.info("complete() " + this.getName());
>>>>>>>
public void shutDown(boolean ingestJobCancelled) {
logger.log(Level.INFO, "complete() {0}", EwfVerifierModuleFactory.getModuleName());
<<<<<<<
String msg = verified ? " verified" : " not verified";
String extra = "<p>EWF Verification Results for " + imgName + "</p>";
extra += "<li>Result:" + msg + "</li>";
extra += "<li>Calculated hash: " + calculatedHash + "</li>";
extra += "<li>Stored hash: " + storedHash + "</li>";
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, EwfVerifierModuleFactory.getModuleName(), imgName + msg, extra));
logger.log(Level.INFO, "{0}{1}", new Object[]{imgName, msg});
=======
String msg = verified ? NbBundle.getMessage(this.getClass(), "EwfVerifyIngestModule.complete.verified") : NbBundle
.getMessage(this.getClass(), "EwfVerifyIngestModule.complete.notVerified");
String extra = NbBundle
.getMessage(this.getClass(), "EwfVerifyIngestModule.complete.verifResultsHead", imgName);
extra += NbBundle.getMessage(this.getClass(), "EwfVerifyIngestModule.complete.resultLi", msg);
extra += NbBundle.getMessage(this.getClass(), "EwfVerifyIngestModule.complete.calcHashLi", calculatedHash);
extra += NbBundle.getMessage(this.getClass(), "EwfVerifyIngestModule.complete.storedHashLi", storedHash);
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, this, imgName + msg, extra));
logger.info(imgName + msg);
>>>>>>>
String msg = verified ? " verified" : " not verified";
String extra = "<p>EWF Verification Results for " + imgName + "</p>";
extra += "<li>Result:" + msg + "</li>";
extra += "<li>Calculated hash: " + calculatedHash + "</li>";
extra += "<li>Stored hash: " + storedHash + "</li>";
services.postMessage(IngestMessage.createMessage(++messageId, MessageType.INFO, EwfVerifierModuleFactory.getModuleName(), imgName + msg, extra));
logger.log(Level.INFO, "{0}{1}", new Object[]{imgName, msg}); |
<<<<<<<
for (Closeable service : servicesList) {
service.close();
=======
for (Closeable service : services) {
if(service != null) {
service.close();
}
>>>>>>>
for (Closeable service : servicesList) {
if(service != null) {
service.close();
} |
<<<<<<<
logger.log(Level.SEVERE, "Error performing keyword search: " + e.getMessage());
services.postMessage(IngestMessage.createErrorMessage(KeywordSearchModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(),
"SearchRunner.Searcher.done.err.msg"), e.getMessage()));
=======
logger.log(Level.SEVERE, "Error performing keyword search: " + e.getMessage()); //NON-NLS
services.postMessage(IngestMessage.createErrorMessage(KeywordSearchModuleFactory.getModuleName(), "Error performing keyword search", e.getMessage()));
>>>>>>>
logger.log(Level.SEVERE, "Error performing keyword search: " + e.getMessage()); //NON-NLS
services.postMessage(IngestMessage.createErrorMessage(KeywordSearchModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(),
"SearchRunner.Searcher.done.err.msg"), e.getMessage())); |
<<<<<<<
import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel;
=======
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.corecomponents.OptionsPanel;
import org.sleuthkit.autopsy.coreutils.Logger;
>>>>>>>
import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSetttingsPanel;
import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger; |
<<<<<<<
import org.sleuthkit.autopsy.healthmonitor.HealthMonitorDashboard;
=======
import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestMonitor.JobsSnapshot;
>>>>>>>
import org.sleuthkit.autopsy.healthmonitor.HealthMonitorDashboard;
import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestMonitor.JobsSnapshot; |
<<<<<<<
import java.awt.image.BufferedImage;
=======
import com.google.common.io.Files;
>>>>>>>
import com.google.common.io.Files;
import java.awt.image.BufferedImage;
<<<<<<<
import java.util.Objects;
import java.util.logging.Level;
import javafx.embed.swing.SwingFXUtils;
=======
import java.util.Objects;
import java.util.logging.Level;
>>>>>>>
import java.util.Objects;
import java.util.logging.Level;
import javafx.embed.swing.SwingFXUtils;
<<<<<<<
import org.netbeans.api.progress.ProgressHandle;
import org.netbeans.api.progress.ProgressHandleFactory;
import org.sleuthkit.autopsy.coreutils.ImageUtils;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.VideoUtils;
=======
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.coreutils.Logger;
>>>>>>>
import org.netbeans.api.progress.ProgressHandle;
import org.netbeans.api.progress.ProgressHandleFactory;
import org.sleuthkit.autopsy.coreutils.ImageUtils;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.VideoUtils; |
<<<<<<<
private final Map<Integer, CommonAttributeValueList> instanceCountToAttributeValues;
=======
private final Map<Integer, List<CommonAttributeValue>> instanceCountToAttributeValues;
private final int percentageThreshold;
>>>>>>>
private final Map<Integer, CommonAttributeValueList> instanceCountToAttributeValues;
private final int percentageThreshold;
<<<<<<<
CommonAttributeSearchResults(Map<Integer, CommonAttributeValueList> metadata){
this.instanceCountToAttributeValues = metadata;
=======
CommonAttributeSearchResults(Map<Integer, List<CommonAttributeValue>> metadata, int percentageThreshold) {
//wrap in a new object in case any client code has used an unmodifiable collection
this.instanceCountToAttributeValues = new HashMap<>(metadata);
this.percentageThreshold = percentageThreshold;
>>>>>>>
CommonAttributeSearchResults(Map<Integer, CommonAttributeValueList> metadata, int percentageThreshold) {
//wrap in a new object in case any client code has used an unmodifiable collection
this.instanceCountToAttributeValues = new HashMap<>(metadata);
this.percentageThreshold = percentageThreshold;
<<<<<<<
*/
public Map<Integer, CommonAttributeValueList> getMetadata() {
=======
*/
public Map<Integer, List<CommonAttributeValue>> getMetadata() throws EamDbException {
if(this.percentageThreshold == 0){
return Collections.unmodifiableMap(this.instanceCountToAttributeValues);
} else {
return this.getMetadata(this.percentageThreshold);
}
}
/**
* Get an unmodifiable collection of values, indexed by number of
* grandchildren, which represents the common attributes found in the
* search.
*
* Remove results which are not found in the portion of available data
sources described by maximumPercentageThreshold.
*
* @return metadata
*/
private Map<Integer, List<CommonAttributeValue>> getMetadata(int maximumPercentageThreshold) throws EamDbException {
if(maximumPercentageThreshold == 0){
return Collections.unmodifiableMap(this.instanceCountToAttributeValues);
}
CorrelationAttributeInstance.Type fileAttributeType = CorrelationAttributeInstance
.getDefaultCorrelationTypes()
.stream()
.filter(filterType -> filterType.getId() == CorrelationAttributeInstance.FILES_TYPE_ID)
.findFirst().get();
EamDb eamDb = EamDb.getInstance();
Map<Integer, List<CommonAttributeValue>> itemsToRemove = new HashMap<>();
for(Entry<Integer, List<CommonAttributeValue>> listOfValues : Collections.unmodifiableMap(this.instanceCountToAttributeValues).entrySet()){
final Integer key = listOfValues.getKey();
final List<CommonAttributeValue> values = listOfValues.getValue();
for(CommonAttributeValue value : values){
int frequencyPercentage = eamDb.getFrequencyPercentage(new CorrelationAttributeInstance(fileAttributeType, value.getValue()));
if(frequencyPercentage > maximumPercentageThreshold){
if(itemsToRemove.containsKey(key)){
itemsToRemove.get(key).add(value);
} else {
List<CommonAttributeValue> toRemove = new ArrayList<>();
toRemove.add(value);
itemsToRemove.put(key, toRemove);
}
}
}
}
for(Entry<Integer, List<CommonAttributeValue>> valuesToRemove : itemsToRemove.entrySet()){
final Integer key = valuesToRemove.getKey();
final List<CommonAttributeValue> values = valuesToRemove.getValue();
for (CommonAttributeValue value : values){
final List<CommonAttributeValue> instanceCountValue = this.instanceCountToAttributeValues.get(key);
instanceCountValue.remove(value);
if(instanceCountValue.isEmpty()){
this.instanceCountToAttributeValues.remove(key);
}
}
}
>>>>>>>
*/
public Map<Integer, CommonAttributeValueList> getMetadata() throws EamDbException {
if(this.percentageThreshold == 0){
return Collections.unmodifiableMap(this.instanceCountToAttributeValues);
} else {
return this.getMetadata(this.percentageThreshold);
}
}
/**
* Get an unmodifiable collection of values, indexed by number of
* grandchildren, which represents the common attributes found in the
* search.
*
* Remove results which are not found in the portion of available data
sources described by maximumPercentageThreshold.
*
* @return metadata
*/
private Map<Integer, CommonAttributeValueList> getMetadata(int maximumPercentageThreshold) throws EamDbException {
if(maximumPercentageThreshold == 0){
return Collections.unmodifiableMap(this.instanceCountToAttributeValues);
}
CorrelationAttributeInstance.Type fileAttributeType = CorrelationAttributeInstance
.getDefaultCorrelationTypes()
.stream()
.filter(filterType -> filterType.getId() == CorrelationAttributeInstance.FILES_TYPE_ID)
.findFirst().get();
EamDb eamDb = EamDb.getInstance();
Map<Integer, List<CommonAttributeValue>> itemsToRemove = new HashMap<>();
for(Entry<Integer, CommonAttributeValueList> listOfValues : Collections.unmodifiableMap(this.instanceCountToAttributeValues).entrySet()){
final Integer key = listOfValues.getKey();
final CommonAttributeValueList values = listOfValues.getValue();
for(CommonAttributeValue value : values.getDelayedMetadataList()){ // Need the real metadata
int frequencyPercentage = eamDb.getFrequencyPercentage(new CorrelationAttributeInstance(fileAttributeType, value.getValue()));
if(frequencyPercentage > maximumPercentageThreshold){
if(itemsToRemove.containsKey(key)){
itemsToRemove.get(key).add(value);
} else {
List<CommonAttributeValue> toRemove = new ArrayList<>();
toRemove.add(value);
itemsToRemove.put(key, toRemove);
}
}
}
}
for(Entry<Integer, List<CommonAttributeValue>> valuesToRemove : itemsToRemove.entrySet()){
final Integer key = valuesToRemove.getKey();
final List<CommonAttributeValue> values = valuesToRemove.getValue();
for (CommonAttributeValue value : values){
final CommonAttributeValueList instanceCountValue = this.instanceCountToAttributeValues.get(key);
instanceCountValue.removeMetaData(value);
if(instanceCountValue.getDelayedMetadataList().isEmpty()){ // Check the real metadata
this.instanceCountToAttributeValues.remove(key);
}
}
}
<<<<<<<
for (CommonAttributeValueList data : this.instanceCountToAttributeValues.values()) {
for(CommonAttributeValue md5 : data.getMetadataList()){
=======
for (List<CommonAttributeValue> data : this.instanceCountToAttributeValues.values()) {
for (CommonAttributeValue md5 : data) {
>>>>>>>
for (CommonAttributeValueList data : this.instanceCountToAttributeValues.values()) {
for(CommonAttributeValue md5 : data.getMetadataList()){ |
<<<<<<<
Interval getBoundingEventsInterval(Interval timeRange, RootFilter filter) {
=======
List<AggregateEvent> getAggregatedEvents(ZoomParams params) {
return getAggregatedEvents(params.getTimeRange(), params.getFilter(), params.getTypeZoomLevel(), params.getDescrLOD());
}
Interval getBoundingEventsInterval(Interval timeRange, RootFilter filter) {
>>>>>>>
Interval getBoundingEventsInterval(Interval timeRange, RootFilter filter) {
<<<<<<<
LOGGER.log(Level.SEVERE, "problem upgrading events table", ex); // NON-NLS
}
}
if (hasTaggedColumn() == false) {
try (Statement stmt = con.createStatement()) {
String sql = "ALTER TABLE events ADD COLUMN tagged INTEGER"; // NON-NLS
stmt.execute(sql);
} catch (SQLException ex) {
LOGGER.log(Level.SEVERE, "problem upgrading events table", ex); // NON-NLS
=======
LOGGER.log(Level.SEVERE, "problem upgrading events table", ex); // NON-NLS
>>>>>>>
LOGGER.log(Level.SEVERE, "problem upgrading events table", ex); // NON-NLS
}
}
if (hasTaggedColumn() == false) {
try (Statement stmt = con.createStatement()) {
String sql = "ALTER TABLE events ADD COLUMN tagged INTEGER"; // NON-NLS
stmt.execute(sql);
} catch (SQLException ex) {
LOGGER.log(Level.SEVERE, "problem upgrading events table", ex); // NON-NLS
<<<<<<<
try (Statement stmt = con.createStatement()) {
String sql = "CREATE TABLE if not exists hash_sets "
+ "( hash_set_id INTEGER primary key,"
+ " hash_set_name VARCHAR(255) UNIQUE NOT NULL)";
stmt.execute(sql);
} catch (SQLException ex) {
LOGGER.log(Level.SEVERE, "problem creating hash_sets table", ex);
}
try (Statement stmt = con.createStatement()) {
String sql = "CREATE TABLE if not exists hash_set_hits "
+ "(hash_set_id INTEGER REFERENCES hash_sets(hash_set_id) not null, "
+ " event_id INTEGER REFERENCES events(event_id) not null, "
+ " PRIMARY KEY (hash_set_id, event_id))";
stmt.execute(sql);
} catch (SQLException ex) {
LOGGER.log(Level.SEVERE, "problem creating hash_set_hits table", ex);
}
createIndex("events", Arrays.asList("file_id"));
createIndex("events", Arrays.asList("artifact_id"));
createIndex("events", Arrays.asList("sub_type", "time"));
createIndex("events", Arrays.asList("base_type", "time"));
createIndex("events", Arrays.asList("known_state"));
try {
insertRowStmt = prepareStatement(
"INSERT INTO events (datasource_id,file_id ,artifact_id, time, sub_type, base_type, full_description, med_description, short_description, known_state, hash_hit, tagged) " // NON-NLS
+ "VALUES (?,?,?,?,?,?,?,?,?,?,?,?)"); // NON-NLS
getDataSourceIDsStmt = prepareStatement("SELECT DISTINCT datasource_id FROM events"); // NON-NLS
getMaxTimeStmt = prepareStatement("SELECT Max(time) AS max FROM events"); // NON-NLS
getMinTimeStmt = prepareStatement("SELECT Min(time) AS min FROM events"); // NON-NLS
getEventByIDStmt = prepareStatement("SELECT * FROM events WHERE event_id = ?"); // NON-NLS
recordDBInfoStmt = prepareStatement("INSERT OR REPLACE INTO db_info (key, value) values (?, ?)"); // NON-NLS
getDBInfoStmt = prepareStatement("SELECT value FROM db_info WHERE key = ?"); // NON-NLS
insertHashSetStmt = prepareStatement("INSERT OR IGNORE INTO hash_sets (hash_set_name) values (?)");
selectHashSetStmt = prepareStatement("SELECT hash_set_id FROM hash_sets WHERE hash_set_name = ?");
insertHashHitStmt = prepareStatement("INSERT OR IGNORE INTO hash_set_hits (hash_set_id, event_id) values (?,?)");
countAllEventsStmt = prepareStatement("SELECT count(*) AS count FROM events");
dropEventsTableStmt = prepareStatement("DROP TABLE IF EXISTS events");
dropHashSetHitsTableStmt = prepareStatement("DROP TABLE IF EXISTS hash_set_hits");
dropHashSetsTableStmt = prepareStatement("DROP TABLE IF EXISTS hash_sets");
dropDBInfoTableStmt = prepareStatement("DROP TABLE IF EXISTS db_ino");
selectEventsFromOBjectAndArtifactStmt = prepareStatement("SELECT event_id FROM events WHERE file_id == ? AND artifact_id IS ?");
} catch (SQLException sQLException) {
LOGGER.log(Level.SEVERE, "failed to prepareStatment", sQLException); // NON-NLS
}
=======
try (Statement stmt = con.createStatement()) {
String sql = "CREATE TABLE if not exists hash_sets "
+ "( hash_set_id INTEGER primary key,"
+ " hash_set_name VARCHAR(255) UNIQUE NOT NULL)";
stmt.execute(sql);
} catch (SQLException ex) {
LOGGER.log(Level.SEVERE, "problem creating hash_sets table", ex);
}
try (Statement stmt = con.createStatement()) {
String sql = "CREATE TABLE if not exists hash_set_hits "
+ "(hash_set_id INTEGER REFERENCES hash_sets(hash_set_id) not null, "
+ " event_id INTEGER REFERENCES events(event_id) not null, "
+ " PRIMARY KEY (hash_set_id, event_id))";
stmt.execute(sql);
} catch (SQLException ex) {
LOGGER.log(Level.SEVERE, "problem creating hash_set_hits table", ex);
}
createEventsIndex(Arrays.asList(EventTableColumn.FILE_ID));
createEventsIndex(Arrays.asList(EventTableColumn.ARTIFACT_ID));
createEventsIndex(Arrays.asList(EventTableColumn.SUB_TYPE, EventTableColumn.TIME));
createEventsIndex(Arrays.asList(EventTableColumn.BASE_TYPE, EventTableColumn.TIME));
createEventsIndex(Arrays.asList(EventTableColumn.KNOWN));
try {
insertRowStmt = prepareStatement(
"INSERT INTO events (datasource_id,file_id ,artifact_id, time, sub_type, base_type, full_description, med_description, short_description, known_state, hash_hit) " // NON-NLS
+ "VALUES (?,?,?,?,?,?,?,?,?,?,?)"); // NON-NLS
getDataSourceIDsStmt = prepareStatement("select distinct datasource_id from events"); // NON-NLS
getMaxTimeStmt = prepareStatement("select Max(time) as max from events"); // NON-NLS
getMinTimeStmt = prepareStatement("select Min(time) as min from events"); // NON-NLS
getEventByIDStmt = prepareStatement("select * from events where event_id = ?"); // NON-NLS
recordDBInfoStmt = prepareStatement("insert or replace into db_info (key, value) values (?, ?)"); // NON-NLS
getDBInfoStmt = prepareStatement("select value from db_info where key = ?"); // NON-NLS
insertHashSetStmt = prepareStatement("insert or ignore into hash_sets (hash_set_name) values (?)");
selectHashSetStmt = prepareStatement("select hash_set_id from hash_sets where hash_set_name = ?");
insertHashHitStmt = prepareStatement("insert or ignore into hash_set_hits (hash_set_id, event_id) values (?,?)");
} catch (SQLException sQLException) {
LOGGER.log(Level.SEVERE, "failed to prepareStatment", sQLException); // NON-NLS
}
>>>>>>>
try (Statement stmt = con.createStatement()) {
String sql = "CREATE TABLE if not exists hash_sets "
+ "( hash_set_id INTEGER primary key,"
+ " hash_set_name VARCHAR(255) UNIQUE NOT NULL)";
stmt.execute(sql);
} catch (SQLException ex) {
LOGGER.log(Level.SEVERE, "problem creating hash_sets table", ex);
}
try (Statement stmt = con.createStatement()) {
String sql = "CREATE TABLE if not exists hash_set_hits "
+ "(hash_set_id INTEGER REFERENCES hash_sets(hash_set_id) not null, "
+ " event_id INTEGER REFERENCES events(event_id) not null, "
+ " PRIMARY KEY (hash_set_id, event_id))";
stmt.execute(sql);
} catch (SQLException ex) {
LOGGER.log(Level.SEVERE, "problem creating hash_set_hits table", ex);
}
createIndex("events", Arrays.asList("file_id"));
createIndex("events", Arrays.asList("artifact_id"));
createIndex("events", Arrays.asList("sub_type", "time"));
createIndex("events", Arrays.asList("base_type", "time"));
createIndex("events", Arrays.asList("known_state"));
try {
insertRowStmt = prepareStatement(
"INSERT INTO events (datasource_id,file_id ,artifact_id, time, sub_type, base_type, full_description, med_description, short_description, known_state, hash_hit, tagged) " // NON-NLS
+ "VALUES (?,?,?,?,?,?,?,?,?,?,?,?)"); // NON-NLS
getDataSourceIDsStmt = prepareStatement("SELECT DISTINCT datasource_id FROM events"); // NON-NLS
getMaxTimeStmt = prepareStatement("SELECT Max(time) AS max FROM events"); // NON-NLS
getMinTimeStmt = prepareStatement("SELECT Min(time) AS min FROM events"); // NON-NLS
getEventByIDStmt = prepareStatement("SELECT * FROM events WHERE event_id = ?"); // NON-NLS
recordDBInfoStmt = prepareStatement("INSERT OR REPLACE INTO db_info (key, value) values (?, ?)"); // NON-NLS
getDBInfoStmt = prepareStatement("SELECT value FROM db_info WHERE key = ?"); // NON-NLS
insertHashSetStmt = prepareStatement("INSERT OR IGNORE INTO hash_sets (hash_set_name) values (?)");
selectHashSetStmt = prepareStatement("SELECT hash_set_id FROM hash_sets WHERE hash_set_name = ?");
insertHashHitStmt = prepareStatement("INSERT OR IGNORE INTO hash_set_hits (hash_set_id, event_id) values (?,?)");
countAllEventsStmt = prepareStatement("SELECT count(*) AS count FROM events");
dropEventsTableStmt = prepareStatement("DROP TABLE IF EXISTS events");
dropHashSetHitsTableStmt = prepareStatement("DROP TABLE IF EXISTS hash_set_hits");
dropHashSetsTableStmt = prepareStatement("DROP TABLE IF EXISTS hash_sets");
dropDBInfoTableStmt = prepareStatement("DROP TABLE IF EXISTS db_ino");
selectEventsFromOBjectAndArtifactStmt = prepareStatement("SELECT event_id FROM events WHERE file_id == ? AND artifact_id IS ?");
} catch (SQLException sQLException) {
LOGGER.log(Level.SEVERE, "failed to prepareStatment", sQLException); // NON-NLS
}
<<<<<<<
String shortDescription, TskData.FileKnown known, Set<String> hashSetNames,
boolean tagged,
=======
String shortDescription, TskData.FileKnown known, Set<String> hashSetNames,
>>>>>>>
String shortDescription, TskData.FileKnown known, Set<String> hashSetNames,
boolean tagged,
<<<<<<<
insertRowStmt.setInt(11, hashSetNames.isEmpty() ? 0 : 1);
insertRowStmt.setInt(12, tagged ? 1 : 0);
=======
insertRowStmt.setInt(11, hashSetNames.isEmpty() ? 0 : 1);
>>>>>>>
insertRowStmt.setInt(11, hashSetNames.isEmpty() ? 0 : 1);
insertRowStmt.setInt(12, tagged ? 1 : 0);
<<<<<<<
System.out.println(query);
// scoop up requested events in groups organized by interval, type, and desription
try (ResultSet rs = con.createStatement().executeQuery(query);) {
=======
System.out.println(query);
ResultSet rs = null;
try (Statement stmt = con.createStatement(); // scoop up requested events in groups organized by interval, type, and desription
) {
Stopwatch stopwatch = new Stopwatch();
stopwatch.start();
rs = stmt.executeQuery(query);
stopwatch.stop();
System.out.println(stopwatch.elapsedMillis() / 1000.0 + " seconds");
>>>>>>>
// scoop up requested events in groups organized by interval, type, and desription
try (ResultSet rs = con.createStatement().executeQuery(query);) { |
<<<<<<<
import org.sleuthkit.autopsy.actions.AddContentTagAction;
=======
>>>>>>>
import org.opencv.core.Core;
import org.opencv.core.Mat;
import org.opencv.highgui.VideoCapture;
import org.sleuthkit.autopsy.actions.AddContentTagAction;
<<<<<<<
private static final Image DEFAULT_ICON = new ImageIcon("/org/sleuthkit/autopsy/images/file-icon.png").getImage();
private static List<String> SUPP_EXTENSIONS = new ArrayList<>(Arrays.asList(ImageIO.getReaderFileSuffixes())); //final
private static List<String> SUPP_MIME_TYPES = new ArrayList<>(Arrays.asList(ImageIO.getReaderMIMETypes())); // final
private static List<String> SUPP_VIDEO_EXTENSIONS = Arrays.asList("mov", "m4v", "flv", "mp4", "3gp", "avi", "mpg", "mpeg","asf", "divx","rm","moov","wmv","vob","dat","m1v","m2v","m4v","mkv","mpe","yop","vqa","xmv","mve","wtv","webm","vivo","vc1","seq","thp","san","mjpg","smk","vmd","sol","cpk","sdp","sbg","rtsp","rpl","rl2","r3d","mlp","mjpeg","hevc","h265","265","h264","h263","h261","drc","avs","pva","pmp","ogg","nut","nuv","nsv","mxf","mtv","mvi","mxg","lxf","lvf","ivf","mve","cin","hnm","gxf","fli","flc","flx","ffm","wve","uv2","dxa","dv","cdxl","cdg","bfi","jv","bik","vid","vb","son","avs","paf","mm","flm","tmv","4xm");
private static List<String> SUPP_VIDEO_MIME_TYPES = Arrays.asList("video/avi","video/msvideo", "video/x-msvideo", "video/mp4", "video/x-ms-wmv", "mpeg","asf");
=======
private static final Image DEFAULT_ICON = new ImageIcon("/org/sleuthkit/autopsy/images/file-icon.png").getImage(); //NON-NLS
private static final List<String> SUPP_EXTENSIONS = Arrays.asList(ImageIO.getReaderFileSuffixes());
private static final List<String> SUPP_MIME_TYPES = new ArrayList<>(Arrays.asList(ImageIO.getReaderMIMETypes()));
static {
SUPP_MIME_TYPES.add("image/x-ms-bmp");
}
>>>>>>>
private static final Image DEFAULT_ICON = new ImageIcon("/org/sleuthkit/autopsy/images/file-icon.png").getImage(); //NON-NLS
private static final List<String> SUPP_IMAGE_EXTENSIONS = new ArrayList<>(Arrays.asList(ImageIO.getReaderFileSuffixes())); //final
private static final List<String> SUPP_IMAGE_MIME_TYPES = new ArrayList<>(Arrays.asList(ImageIO.getReaderMIMETypes())); // final
private static final List<String> SUPP_VIDEO_EXTENSIONS = Arrays.asList("mov", "m4v", "flv", "mp4", "3gp", "avi", "mpg", "mpeg", "asf", "divx", "rm", "moov", "wmv", "vob", "dat", "m1v", "m2v", "m4v", "mkv", "mpe", "yop", "vqa", "xmv", "mve", "wtv", "webm", "vivo", "vc1", "seq", "thp", "san", "mjpg", "smk", "vmd", "sol", "cpk", "sdp", "sbg", "rtsp", "rpl", "rl2", "r3d", "mlp", "mjpeg", "hevc", "h265", "265", "h264", "h263", "h261", "drc", "avs", "pva", "pmp", "ogg", "nut", "nuv", "nsv", "mxf", "mtv", "mvi", "mxg", "lxf", "lvf", "ivf", "mve", "cin", "hnm", "gxf", "fli", "flc", "flx", "ffm", "wve", "uv2", "dxa", "dv", "cdxl", "cdg", "bfi", "jv", "bik", "vid", "vb", "son", "avs", "paf", "mm", "flm", "tmv", "4xm");
private static final List<String> SUPP_VIDEO_MIME_TYPES = Arrays.asList("video/avi", "video/msvideo", "video/x-msvideo", "video/mp4", "video/x-ms-wmv", "mpeg", "asf");
static {
SUPP_IMAGE_MIME_TYPES.add("image/x-ms-bmp");
}
<<<<<<<
Image icon=null;
=======
Image icon;
// If a thumbnail file is already saved locally
// @@@ Bug here in that we do not refer to size in the cache.
>>>>>>>
//TODO: why do we allow Content here if we only handle AbstractFiles?
Image icon = null;
// If a thumbnail file is already saved locally
// @@@ Bug here in that we do not refer to size in the cache.
<<<<<<<
private static Image generateVideoIcon(Content content, int iconSize) {
Image icon = null;
//load opencv libraries
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
try {
if (System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64")) {
System.loadLibrary("opencv_ffmpeg248_64");
} else {
System.loadLibrary("opencv_ffmpeg248");
}
} catch (UnsatisfiedLinkError e) {
Logger.getLogger(AddContentTagAction.class.getName()).log(Level.SEVERE, "OpenCV Native code library failed to load", e);
return DEFAULT_ICON;
}
AbstractFile f = (AbstractFile) content;
final String extension = f.getNameExtension();
String fileName = content.getId() + "." + extension;
java.io.File jFile = new java.io.File(Case.getCurrentCase().getTempDirectory(), fileName);
try {
copyFileUsingStream(content, jFile); //create small file in TEMP directory from the content object
} catch (Exception ex) {
return DEFAULT_ICON;
}
fileName = jFile.toString(); //store filepath as String
VideoCapture videoFile = new VideoCapture(); // will contain the video
if (!videoFile.open(fileName)) {
return DEFAULT_ICON;
}
double fps = videoFile.get(5); // gets frame per second
double totalFrames = videoFile.get(7); // gets total frames
if (fps == 0 || totalFrames == 0) {
return DEFAULT_ICON;
}
double milliseconds = 1000 * (totalFrames / fps); //total milliseconds
if (milliseconds <= 0) {
return DEFAULT_ICON;
}
Mat mat = new Mat();
double timestamp = (milliseconds < 500) ? milliseconds : 500; //default time to check for is 500ms, unless the files is extremely small
if (!videoFile.set(0, timestamp)) {
return DEFAULT_ICON;
}
if (!videoFile.read(mat)) {
return DEFAULT_ICON; //if the image for some reason is bad, return default icon
}
byte[] data = new byte[mat.rows() * mat.cols() * (int) (mat.elemSize())];
mat.get(0, 0, data);
if (mat.channels() == 3) {
for (int k = 0; k < data.length; k += 3) {
byte temp = data[k];
data[k] = data[k + 2];
data[k + 2] = temp;
}
}
BufferedImage B_image = new BufferedImage(mat.cols(), mat.rows(), BufferedImage.TYPE_3BYTE_BGR);
B_image.getRaster().setDataElements(0, 0, mat.cols(), mat.rows(), data);
//image = SwingFXUtils.toFXImage(B_image, null); //convert bufferedImage to Image
videoFile.release(); // close the file
//if (image==null) return DEFAULT_ICON;
B_image = ScalrWrapper.resizeFast(B_image, iconSize);
if (B_image == null) {
return DEFAULT_ICON;
} else {
return B_image;
}
}
private static Image generateAndSaveIcon(Content content, int iconSize) {
=======
public static boolean isPngFileHeader(AbstractFile file) {
if (file.getSize() < 10) {
return false;
}
byte[] fileHeaderBuffer = new byte[8];
int bytesRead;
try {
bytesRead = file.read(fileHeaderBuffer, 0, 8);
} catch (TskCoreException ex) {
//ignore if can't read the first few bytes, not an image
return false;
}
if (bytesRead != 8) {
return false;
}
/*
* Check for the header. Since Java bytes are signed, we cast them
* to an int first.
*/
return (((fileHeaderBuffer[1] & 0xff) == 0x50) && ((fileHeaderBuffer[2] & 0xff) == 0x4E) &&
((fileHeaderBuffer[3] & 0xff) == 0x47) && ((fileHeaderBuffer[4] & 0xff) == 0x0D) &&
((fileHeaderBuffer[5] & 0xff) == 0x0A) && ((fileHeaderBuffer[6] & 0xff) == 0x1A) &&
((fileHeaderBuffer[7] & 0xff) == 0x0A));
}
/**
* Generate an icon and save it to specified location.
* @param content File to generate icon for
* @param iconSize
* @param saveFile Location to save thumbnail to
* @return Generated icon or null on error
*/
private static Image generateAndSaveIcon(Content content, int iconSize, File saveFile) {
>>>>>>>
public static boolean isPngFileHeader(AbstractFile file) {
if (file.getSize() < 10) {
return false;
}
byte[] fileHeaderBuffer = new byte[8];
int bytesRead;
try {
bytesRead = file.read(fileHeaderBuffer, 0, 8);
} catch (TskCoreException ex) {
//ignore if can't read the first few bytes, not an image
return false;
}
if (bytesRead != 8) {
return false;
}
/*
* Check for the header. Since Java bytes are signed, we cast them
* to an int first.
*/
return (((fileHeaderBuffer[1] & 0xff) == 0x50) && ((fileHeaderBuffer[2] & 0xff) == 0x4E)
&& ((fileHeaderBuffer[3] & 0xff) == 0x47) && ((fileHeaderBuffer[4] & 0xff) == 0x0D)
&& ((fileHeaderBuffer[5] & 0xff) == 0x0A) && ((fileHeaderBuffer[6] & 0xff) == 0x1A)
&& ((fileHeaderBuffer[7] & 0xff) == 0x0A));
}
private static Image generateVideoIcon(Content content, int iconSize) {
//load opencv libraries
System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
try {
if (System.getProperty("os.arch").equals("amd64") || System.getProperty("os.arch").equals("x86_64")) {
System.loadLibrary("opencv_ffmpeg248_64");
} else {
System.loadLibrary("opencv_ffmpeg248");
}
} catch (UnsatisfiedLinkError e) {
Logger.getLogger(AddContentTagAction.class.getName()).log(Level.SEVERE, "OpenCV Native code library failed to load", e);
return DEFAULT_ICON;
}
AbstractFile f = (AbstractFile) content;
final String extension = f.getNameExtension();
String fileName = content.getId() + "." + extension;
java.io.File jFile = new java.io.File(Case.getCurrentCase().getTempDirectory(), fileName);
try {
copyFileUsingStream(content, jFile); //create small file in TEMP directory from the content object
} catch (Exception ex) {
return DEFAULT_ICON;
}
fileName = jFile.toString(); //store filepath as String
VideoCapture videoFile = new VideoCapture(); // will contain the video
if (!videoFile.open(fileName)) {
return DEFAULT_ICON;
}
double fps = videoFile.get(5); // gets frame per second
double totalFrames = videoFile.get(7); // gets total frames
if (fps == 0 || totalFrames == 0) {
return DEFAULT_ICON;
}
double milliseconds = 1000 * (totalFrames / fps); //total milliseconds
if (milliseconds <= 0) {
return DEFAULT_ICON;
}
Mat mat = new Mat();
double timestamp = (milliseconds < 500) ? milliseconds : 500; //default time to check for is 500ms, unless the files is extremely small
if (!videoFile.set(0, timestamp)) {
return DEFAULT_ICON;
}
if (!videoFile.read(mat)) {
return DEFAULT_ICON; //if the image for some reason is bad, return default icon
}
byte[] data = new byte[mat.rows() * mat.cols() * (int) (mat.elemSize())];
mat.get(0, 0, data);
if (mat.channels() == 3) {
for (int k = 0; k < data.length; k += 3) {
byte temp = data[k];
data[k] = data[k + 2];
data[k + 2] = temp;
}
}
BufferedImage B_image = new BufferedImage(mat.cols(), mat.rows(), BufferedImage.TYPE_3BYTE_BGR);
B_image.getRaster().setDataElements(0, 0, mat.cols(), mat.rows(), data);
//image = SwingFXUtils.toFXImage(B_image, null); //convert bufferedImage to Image
videoFile.release(); // close the file
//if (image==null) return DEFAULT_ICON;
B_image = ScalrWrapper.resizeFast(B_image, iconSize);
if (B_image == null) {
return DEFAULT_ICON;
} else {
return B_image;
}
}
/**
* Generate an icon and save it to specified location.
*
* @param content File to generate icon for
* @param iconSize
* @param saveFile Location to save thumbnail to
*
* @return Generated icon or null on error
*/
private static Image generateAndSaveIcon(Content content, int iconSize, File saveFile) {
AbstractFile f = (AbstractFile) content;
final String extension = f.getNameExtension(); |
<<<<<<<
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.BiFunction;
=======
import java.text.MessageFormat;
import java.util.Optional;
import java.util.function.Function;
>>>>>>>
import java.text.MessageFormat;
import java.util.Optional;
import java.util.Set;
import java.util.function.Function;
<<<<<<<
public static Set<ArtifactEventType> getAllArtifactEventTypes() {
return allTypes.stream()
.filter((EventType t) -> t instanceof ArtifactEventType)
.map(ArtifactEventType.class::cast)
.collect(Collectors.toSet());
}
=======
public static final Logger LOGGER = Logger.getLogger(ArtifactEventType.class.getName());
static final EmptyExtractor EMPTY_EXTRACTOR = new EmptyExtractor();
>>>>>>>
public static final Logger LOGGER = Logger.getLogger(ArtifactEventType.class.getName());
static final EmptyExtractor EMPTY_EXTRACTOR = new EmptyExtractor();
public static Set<ArtifactEventType> getAllArtifactEventTypes() {
return allTypes.stream()
.filter((EventType t) -> t instanceof ArtifactEventType)
.map(ArtifactEventType.class::cast)
.collect(Collectors.toSet());
}
<<<<<<<
* one object. Primarily used to have a single return value for null null
* null null {@link SubType#buildEventDescription(org.sleuthkit.datamodel.BlackboardArtifact).
=======
* one object. Primarily used to have a single return value for
* {@link ArtifactEventType#buildEventDescription(ArtifactEventType, BlackboardArtifact)}.
>>>>>>>
* one object. Primarily used to have a single return value for
* {@link ArtifactEventType#buildEventDescription(ArtifactEventType, BlackboardArtifact)}. |
<<<<<<<
@Test
public void testStore() {
EncodedPayloadWithRecipients payload = mock(EncodedPayloadWithRecipients.class);
when(txService.encryptPayload(any(), any(), any())).thenReturn(payload);
enclave.store(new byte[0], new byte[0][0], new byte[0]);
verify(txService).encryptPayload(any(), any(), any());
verify(txService).storeEncodedPayload(payload);
}
@Test
public void testStoreWithRecipientStuyff() {
EncodedPayloadWithRecipients payload = mock(EncodedPayloadWithRecipients.class);
when(txService.encryptPayload(any(), any(), any())).thenReturn(payload);
byte[][] recipients = new byte[1][1];
recipients[0] = new byte[] {'P'};
enclave.store(new byte[0],recipients, new byte[0]);
verify(txService).encryptPayload(any(), any(), any());
verify(txService).storeEncodedPayload(payload);
}
=======
>>>>>>>
@Test
public void testStore() {
EncodedPayloadWithRecipients payload = mock(EncodedPayloadWithRecipients.class);
when(txService.encryptPayload(any(), any(), any())).thenReturn(payload);
enclave.store(new byte[0], new byte[0][0], new byte[0]);
verify(txService).encryptPayload(any(), any(), any());
verify(txService).storeEncodedPayload(payload);
}
@Test
public void testStoreWithRecipientStuyff() {
EncodedPayloadWithRecipients payload = mock(EncodedPayloadWithRecipients.class);
when(txService.encryptPayload(any(), any(), any())).thenReturn(payload);
byte[][] recipients = new byte[1][1];
recipients[0] = new byte[] {'P'};
enclave.store(new byte[0],recipients, new byte[0]);
verify(txService).encryptPayload(any(), any(), any());
verify(txService).storeEncodedPayload(payload);
} |
<<<<<<<
Optional<CorrelationAttribute> correlationAttributeOptional = EamArtifactUtil.getCorrelationAttributeFromBlackboardArtifact(aType, bbArtifact);
if (correlationAttributeOptional.isPresent()) {
eamArtifacts.add(correlationAttributeOptional.get());
=======
// Now always adds the instance details associated with this occurance.
CorrelationAttributeInstance correlationAttribute = EamArtifactUtil.makeInstanceFromBlackboardArtifact(aType, bbArtifact);
if (correlationAttribute != null) {
eamArtifacts.add(correlationAttribute);
>>>>>>>
Optional<CorrelationAttribute> correlationAttributeOptional = EamArtifactUtil.getCorrelationAttributeFromBlackboardArtifact(aType, bbArtifact);
if (correlationAttributeOptional.isPresent()) {
eamArtifacts.add(correlationAttributeOptional.get());
<<<<<<<
} else if (correlationTypeId == CorrelationAttribute.EMAIL_TYPE_ID
=======
} else if (correlationType.getId() == CorrelationAttributeInstance.EMAIL_TYPE_ID
>>>>>>>
} else if (correlationType.getId() == CorrelationAttributeInstance.EMAIL_TYPE_ID
<<<<<<<
} else if (correlationTypeId == CorrelationAttribute.DOMAIN_TYPE_ID
=======
} else if (correlationType.getId() == CorrelationAttributeInstance.DOMAIN_TYPE_ID
>>>>>>>
} else if (correlationType.getId() == CorrelationAttributeInstance.DOMAIN_TYPE_ID
<<<<<<<
} else if (correlationTypeId == CorrelationAttribute.PHONE_TYPE_ID
=======
} else if (correlationType.getId() == CorrelationAttributeInstance.PHONE_TYPE_ID
>>>>>>>
} else if (correlationType.getId() == CorrelationAttributeInstance.PHONE_TYPE_ID
<<<<<<<
} else if (correlationTypeId == CorrelationAttribute.USBID_TYPE_ID
=======
// Remove all non-numeric symbols to semi-normalize phone numbers, preserving leading "+" character
if (value != null) {
String newValue = value.replaceAll("\\D", "");
if (value.startsWith("+")) {
newValue = "+" + newValue;
}
value = newValue;
// If the resulting phone number is too small to be of use, return null
// (these 3-5 digit numbers can be valid, but are not useful for correlation)
if (value.length() <= 5) {
return null;
}
}
} else if (correlationType.getId() == CorrelationAttributeInstance.USBID_TYPE_ID
>>>>>>>
// Remove all non-numeric symbols to semi-normalize phone numbers, preserving leading "+" character
if (value != null) {
String newValue = value.replaceAll("\\D", "");
if (value.startsWith("+")) {
newValue = "+" + newValue;
}
value = newValue;
// If the resulting phone number is too small to be of use, return null
// (these 3-5 digit numbers can be valid, but are not useful for correlation)
if (value.length() <= 5) {
return null;
}
}
} else if (correlationType.getId() == CorrelationAttributeInstance.USBID_TYPE_ID
<<<<<<<
if(null != value){
CorrelationAttribute correlationAttribute = new CorrelationAttribute(correlationType, value);
return Optional.of(correlationAttribute);
=======
if (null != value) {
return makeCorrelationAttributeInstanceUsingTypeValue(bbArtifact, correlationType, value);
>>>>>>>
if(null != value){
CorrelationAttribute correlationAttribute = new CorrelationAttribute(correlationType, value);
return Optional.of(correlationAttribute);
if (null != value) {
return makeCorrelationAttributeInstanceUsingTypeValue(bbArtifact, correlationType, value);
<<<<<<<
public static CorrelationAttribute getCorrelationAttributeFromContent(Content content) throws EamDbException, CorrelationAttributeNormalizationException {
=======
public static CorrelationAttributeInstance getInstanceFromContent(Content content) {
>>>>>>>
public static CorrelationAttributeInstance getInstanceFromContent(Content content) {
<<<<<<<
eamArtifact.addInstance(cei);
return eamArtifact;
} catch (TskCoreException | EamDbException | NoCurrentCaseException | CorrelationAttributeNormalizationException ex) {
logger.log(Level.SEVERE, "Error making correlation attribute.", ex); //NON-NLS
=======
} catch (TskCoreException | EamDbException ex) {
logger.log(Level.SEVERE, "Error making correlation attribute.", ex);
return null;
} catch (NoCurrentCaseException ex) {
logger.log(Level.SEVERE, "Case is closed.", ex);
>>>>>>>
} catch (TskCoreException | EamDbException | NoCurrentCaseException | CorrelationAttributeNormalizationException ex) {
logger.log(Level.SEVERE, "Error making correlation attribute.", ex); //NON-NLS |
<<<<<<<
private int messageId = 0; // RJCTODO: Not thread safe
=======
private static final String MODULE_NAME = NbBundle.getMessage(ThunderbirdMboxFileIngestModule.class,
"ThunderbirdMboxFileIngestModule.moduleName");
private final String hashDBModuleName = NbBundle.getMessage(ThunderbirdMboxFileIngestModule.class,
"ThunderbirdMboxFileIngestModule.hashDbModuleName");
final public static String MODULE_VERSION = Version.getVersion();
private int messageId = 0;
>>>>>>>
private int messageId = 0; // RJCTODO: Not thread safe
<<<<<<<
IngestMessage msg = IngestMessage.createErrorMessage(messageId++, EmailParserModuleFactory.getModuleName(), EmailParserModuleFactory.getModuleName(), "Out of disk space. Can't copy " + abstractFile.getName() + " to parse.");
=======
IngestMessage msg = IngestMessage.createErrorMessage(messageId++, this, getName(),
NbBundle.getMessage(this.getClass(),
"ThunderbirdMboxFileIngestModule.processPst.errMsg.outOfDiskSpace",
abstractFile.getName()));
>>>>>>>
IngestMessage msg = IngestMessage.createErrorMessage(messageId++, EmailParserModuleFactory.getModuleName(), EmailParserModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(),
"ThunderbirdMboxFileIngestModule.processPst.errMsg.outOfDiskSpace",
abstractFile.getName()));
<<<<<<<
EmailParserModuleFactory.getModuleName(), "File-level Encryption"));
=======
MODULE_NAME,
NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.encryptionFileLevel")));
>>>>>>>
EmailParserModuleFactory.getModuleName(),
NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.encryptionFileLevel")));
<<<<<<<
postErrorMessage("Error while processing " + abstractFile.getName(),
"Only files from Outlook 2003 and later are supported.");
logger.log(Level.INFO, "PSTParser failed to parse {0}", abstractFile.getName());
return ResultCode.ERROR;
=======
postErrorMessage(
NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.processPst.errProcFile.msg",
abstractFile.getName()),
NbBundle.getMessage(this.getClass(),
"ThunderbirdMboxFileIngestModule.processPst.errProcFile.details"));
logger.log(Level.INFO, "PSTParser failed to parse {0}", abstractFile.getName());
return ProcessResult.ERROR;
>>>>>>>
postErrorMessage(
NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.processPst.errProcFile.msg",
abstractFile.getName()),
NbBundle.getMessage(this.getClass(),
"ThunderbirdMboxFileIngestModule.processPst.errProcFile.details"));
logger.log(Level.INFO, "PSTParser failed to parse {0}", abstractFile.getName());
return ResultCode.ERROR;
<<<<<<<
postErrorMessage("Error while processing " + abstractFile.getName(),
"Out of disk space. Can't copy file to parse.");
return ResultCode.OK;
=======
postErrorMessage(
NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.processMBox.errProcFile.msg",
abstractFile.getName()),
NbBundle.getMessage(this.getClass(),
"ThunderbirdMboxFileIngestModule.processMBox.errProfFile.details"));
return ProcessResult.OK;
>>>>>>>
postErrorMessage(
NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.processMBox.errProcFile.msg",
abstractFile.getName()),
NbBundle.getMessage(this.getClass(),
"ThunderbirdMboxFileIngestModule.processMBox.errProfFile.details"));
return ResultCode.OK;
<<<<<<<
public void startUp(IngestJobContext context) throws Exception {
this.context = context;
=======
public void complete() {
}
@Override
public String getName() {
return MODULE_NAME;
}
@Override
public String getDescription() {
return NbBundle.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.getDesc.text");
}
@Override
public String getVersion() {
return MODULE_VERSION;
}
@Override
public void init(IngestModuleInit initContext) throws IngestModuleException {
>>>>>>>
public void startUp(IngestJobContext context) throws Exception {
this.context = context;
<<<<<<<
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_MSG_ID.getTypeID(), EmailParserModuleFactory.getModuleName(), ((id < 0L) ? "Not available" : String.valueOf(id))));
=======
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_MSG_ID.getTypeID(), MODULE_NAME, ((id < 0L) ? NbBundle
.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.notAvail") : String.valueOf(id))));
>>>>>>>
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_MSG_ID.getTypeID(), EmailParserModuleFactory.getModuleName(), ((id < 0L) ? NbBundle
.getMessage(this.getClass(), "ThunderbirdMboxFileIngestModule.notAvail") : String.valueOf(id)))); |
<<<<<<<
attrsToRet.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_COMMENT, MODULE_NAME, tsvFileArtifactComments.get(fileName)));
=======
bbattributes.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_COMMENT, moduleName, tsvFileArtifactComments.get(fileName)));
>>>>>>>
attrsToRet.add(new BlackboardAttribute(ATTRIBUTE_TYPE.TSK_COMMENT, moduleName, tsvFileArtifactComments.get(fileName)));
<<<<<<<
switch (attrType.getValueType()) {
case JSON:
case STRING:
return parseAttrValue(value, attrType, fileName, false, false,
(v) -> new BlackboardAttribute(attrType, MODULE_NAME, v));
case INTEGER:
return parseAttrValue(value.trim(), attrType, fileName, true, false,
(v) -> new BlackboardAttribute(attrType, MODULE_NAME, (int) Double.valueOf(v).intValue()));
case LONG:
return parseAttrValue(value.trim(), attrType, fileName, true, false,
(v) -> new BlackboardAttribute(attrType, MODULE_NAME, (long) Double.valueOf(v).longValue()));
case DOUBLE:
return parseAttrValue(value.trim(), attrType, fileName, true, false,
(v) -> new BlackboardAttribute(attrType, MODULE_NAME, (double) Double.valueOf(v)));
case BYTE:
return parseAttrValue(value.trim(), attrType, fileName, true, false,
(v) -> new BlackboardAttribute(attrType, MODULE_NAME, new byte[]{Byte.valueOf(v)}));
case DATETIME:
return parseAttrValue(value.trim(), attrType, fileName, true, true,
(v) -> new BlackboardAttribute(attrType, MODULE_NAME, TIMESTAMP_FORMAT.parse(v).getTime() / 1000));
default:
// Log this and continue on with processing
logger.log(Level.WARNING, String.format("Attribute Type %s for file %s not defined.", attrType, fileName)); //NON-NLS
return null;
=======
String columnValue = columnValues[columnNumber];
if (attrType.matches("STRING")) {
bbattributes.add(new BlackboardAttribute(attributeType, moduleName, columnValue));
} else if (attrType.matches("INTEGER")) {
try {
// parse as double to handle values of format like '21.0' and then convert to int
bbattributes.add(new BlackboardAttribute(attributeType, moduleName, Double.valueOf(columnValue).intValue()));
} catch (NumberFormatException ex) {
logger.log(Level.WARNING, String.format("Unable to format %s as an integer.", columnValue), ex);
}
} else if (attrType.matches("LONG")) {
try {
// parse as double to handle values of format like '21.0' and then convert to long
bbattributes.add(new BlackboardAttribute(attributeType, moduleName, Double.valueOf(columnValue).longValue()));
} catch (NumberFormatException ex) {
logger.log(Level.WARNING, String.format("Unable to format %s as an long.", columnValue), ex);
}
} else if (attrType.matches("DOUBLE")) {
try {
bbattributes.add(new BlackboardAttribute(attributeType, moduleName, Double.valueOf(columnValue)));
} catch (NumberFormatException ex) {
logger.log(Level.WARNING, String.format("Unable to format %s as an double.", columnValue), ex);
}
} else if (attrType.matches("BYTE")) {
try {
bbattributes.add(new BlackboardAttribute(attributeType, moduleName, Byte.valueOf(columnValue)));
} catch (NumberFormatException ex) {
logger.log(Level.WARNING, String.format("Unable to format %s as an byte.", columnValue), ex);
}
} else if (attrType.matches("DATETIME")) {
// format of data should be the same in all the data and the format is 2020-03-28 01:00:17
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-d HH:mm:ss", US);
Long dateLong = Long.valueOf(0);
try {
Date newDate = dateFormat.parse(columnValue);
dateLong = newDate.getTime() / 1000;
bbattributes.add(new BlackboardAttribute(attributeType, moduleName, dateLong));
} catch (ParseException ex) {
// catching error and displaying date that could not be parsed
// we set the timestamp to 0 and continue on processing
logger.log(Level.WARNING, String.format("Failed to parse date/time %s for attribute type %s in file %s.", columnValue, attributeType.getDisplayName(), fileName)); //NON-NLS
}
} else if (attrType.matches("JSON")) {
bbattributes.add(new BlackboardAttribute(attributeType, moduleName, columnValue));
} else {
// Log this and continue on with processing
logger.log(Level.WARNING, String.format("Attribute Type %s not defined.", attrType)); //NON-NLS
>>>>>>>
switch (attrType.getValueType()) {
case JSON:
case STRING:
return parseAttrValue(value, attrType, fileName, false, false,
(v) -> new BlackboardAttribute(attrType, moduleName, v));
case INTEGER:
return parseAttrValue(value.trim(), attrType, fileName, true, false,
(v) -> new BlackboardAttribute(attrType, moduleName, (int) Double.valueOf(v).intValue()));
case LONG:
return parseAttrValue(value.trim(), attrType, fileName, true, false,
(v) -> new BlackboardAttribute(attrType, moduleName, (long) Double.valueOf(v).longValue()));
case DOUBLE:
return parseAttrValue(value.trim(), attrType, fileName, true, false,
(v) -> new BlackboardAttribute(attrType, moduleName, (double) Double.valueOf(v)));
case BYTE:
return parseAttrValue(value.trim(), attrType, fileName, true, false,
(v) -> new BlackboardAttribute(attrType, moduleName, new byte[]{Byte.valueOf(v)}));
case DATETIME:
return parseAttrValue(value.trim(), attrType, fileName, true, true,
(v) -> new BlackboardAttribute(attrType, moduleName, TIMESTAMP_FORMAT.parse(v).getTime() / 1000));
default:
// Log this and continue on with processing
logger.log(Level.WARNING, String.format("Attribute Type %s for file %s not defined.", attrType, fileName)); //NON-NLS
return null; |
<<<<<<<
import java.util.Set;
=======
import java.util.Map;
>>>>>>>
import java.util.Map;
<<<<<<<
private static final Set<IngestManager.IngestJobEvent> INGEST_JOB_EVENTS_OF_INTEREST = EnumSet.of(IngestManager.IngestJobEvent.CANCELLED, IngestManager.IngestJobEvent.COMPLETED);
private Path rootOutputDirectory;
=======
private Case caseForJob = null;
private AutoIngestDataSource dataSource = null;
private static final String LOG_DIR_NAME = "Command Output";
>>>>>>>
private Case caseForJob = null;
private AutoIngestDataSource dataSource = null;
private static final String LOG_DIR_NAME = "Command Output";
<<<<<<<
@Override
=======
/**
* Requests the list of command line commands from command line options
* processor and executes the commands one by one.
*/
>>>>>>>
/**
* Requests the list of command line commands from command line options
* processor and executes the commands one by one.
*/
@Override
<<<<<<<
* @param dataSource DataSource object
*
* @return object ID
=======
* @param baseCaseName Case name
* @param rootOutputDirectory Full path to directory in which case
* output folder will be created
* @throws CaseActionException
>>>>>>>
* @param baseCaseName Case name
* @param rootOutputDirectory Full path to directory in which case
* output folder will be created
* @throws CaseActionException |
<<<<<<<
* Utilities for creating and manipulating thumbnail and icon images.
*
* @author jwallace
=======
*
* Utilities for working with Images and creating thumbnails. Reuses thumbnails
* by storing them in the case's cache directory.
>>>>>>>
* Utilities for working with Images and creating thumbnails. Reuses thumbnails
* by storing them in the case's cache directory.
<<<<<<<
=======
private static final Logger LOGGER = Logger.getLogger(ImageUtils.class.getName());
/**
* save thumbnails to disk as this format
*/
private static final String FORMAT = "png"; //NON-NLS
>>>>>>>
private static final Logger LOGGER = Logger.getLogger(ImageUtils.class.getName());
/**
* save thumbnails to disk as this format
*/
private static final String FORMAT = "png"; //NON-NLS
<<<<<<<
private static final Logger logger = Logger.getLogger(ImageUtils.class.getName());
private static final Image DEFAULT_ICON = new ImageIcon("/org/sleuthkit/autopsy/images/file-icon.png").getImage(); //NON-NLS
private static final List<String> SUPP_EXTENSIONS = Arrays.asList(ImageIO.getReaderFileSuffixes());
private static final List<String> SUPP_MIME_TYPES = new ArrayList<>(Arrays.asList(ImageIO.getReaderMIMETypes()));
=======
private static final Logger logger = LOGGER;
private static final BufferedImage DEFAULT_THUMBNAIL;
private static final List<String> SUPPORTED_IMAGE_EXTENSIONS;
private static final TreeSet<String> SUPPORTED_IMAGE_MIME_TYPES;
private static final List<String> CONDITIONAL_MIME_TYPES = Arrays.asList("audio/x-aiff", "application/octet-stream");
private static final boolean openCVLoaded;
>>>>>>>
private static final Logger logger = LOGGER;
private static final BufferedImage DEFAULT_THUMBNAIL;
private static final List<String> SUPPORTED_IMAGE_EXTENSIONS;
private static final TreeSet<String> SUPPORTED_IMAGE_MIME_TYPES;
private static final List<String> CONDITIONAL_MIME_TYPES = Arrays.asList("audio/x-aiff", "application/octet-stream");
private static final boolean openCVLoaded;
<<<<<<<
*
* @return
=======
*
* @return
*
>>>>>>>
*
* @return
*
<<<<<<<
AbstractFile f = (AbstractFile) content;
if (f.getSize() == 0) {
=======
if (!(content instanceof AbstractFile)) {
>>>>>>>
if (!(content instanceof AbstractFile)) {
<<<<<<<
ArrayList<BlackboardAttribute> attributes = f.getGenInfoAttributes(ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG);
for (BlackboardAttribute attribute : attributes) {
if (SUPP_MIME_TYPES.contains(attribute.getValueString())) {
return true;
}
=======
String mimeType = getFileTypeDetector().getFileType(file);
if (Objects.nonNull(mimeType)) {
return supportedMimeTypes.contains(mimeType)
|| (conditionalMimes.contains(mimeType.toLowerCase()) && supportedExtension.contains(extension));
>>>>>>>
String mimeType = getFileTypeDetector().getFileType(file);
if (Objects.nonNull(mimeType)) {
return supportedMimeTypes.contains(mimeType)
|| (conditionalMimes.contains(mimeType.toLowerCase()) && supportedExtension.contains(extension));
<<<<<<<
Image icon;
// If a thumbnail file is already saved locally
// @@@ Bug here in that we do not refer to size in the cache.
File file = getFile(content.getId());
if (file.exists()) {
try {
BufferedImage bicon = ImageIO.read(file);
if (bicon == null) {
icon = DEFAULT_ICON;
} else if (bicon.getWidth() != iconSize) {
icon = generateAndSaveIcon(content, iconSize, file);
} else {
icon = bicon;
=======
return getThumbnail(content, iconSize);
}
/**
* Get a thumbnail of a specified size. Generates the image if it is not
* already cached.
*
* @param content
* @param iconSize
*
* @return a thumbnail for the given image or a default one if there was a
* problem making a thumbnail.
*/
public static Image getThumbnail(Content content, int iconSize) {
if (content instanceof AbstractFile) {
AbstractFile file = (AbstractFile) content;
// If a thumbnail file is already saved locally
File cacheFile = getCachedThumbnailLocation(content.getId());
if (cacheFile.exists()) {
try {
BufferedImage thumbnail = ImageIO.read(cacheFile);
if (isNull(thumbnail) || thumbnail.getWidth() != iconSize) {
return generateAndSaveThumbnail(file, iconSize, cacheFile);
} else {
return thumbnail;
}
} catch (Exception ex) {
LOGGER.log(Level.WARNING, "Error while reading image: " + content.getName(), ex); //NON-NLS
return generateAndSaveThumbnail(file, iconSize, cacheFile);
>>>>>>>
return getThumbnail(content, iconSize);
}
/**
* Get a thumbnail of a specified size. Generates the image if it is not
* already cached.
*
* @param content
* @param iconSize
*
* @return a thumbnail for the given image or a default one if there was a
* problem making a thumbnail.
*/
public static Image getThumbnail(Content content, int iconSize) {
if (content instanceof AbstractFile) {
AbstractFile file = (AbstractFile) content;
// If a thumbnail file is already saved locally
File cacheFile = getCachedThumbnailLocation(content.getId());
if (cacheFile.exists()) {
try {
BufferedImage thumbnail = ImageIO.read(cacheFile);
if (isNull(thumbnail) || thumbnail.getWidth() != iconSize) {
return generateAndSaveThumbnail(file, iconSize, cacheFile);
} else {
return thumbnail;
}
} catch (Exception ex) {
LOGGER.log(Level.WARNING, "Error while reading image: " + content.getName(), ex); //NON-NLS
return generateAndSaveThumbnail(file, iconSize, cacheFile);
<<<<<<<
*
* @return File object for cached image. Is guaranteed to exist.
=======
*
* @return File object for cached image. Is guaranteed to exist, as long as
* there was not an error generating or saving the thumbnail.
*
* @deprecated use {@link #getCachedThumbnailFile(org.sleuthkit.datamodel.Content, int)
* } instead.
*
>>>>>>>
*
* @return File object for cached image. Is guaranteed to exist, as long as
* there was not an error generating or saving the thumbnail.
*
* @deprecated use {@link #getCachedThumbnailFile(org.sleuthkit.datamodel.Content, int)
* } instead.
*
<<<<<<<
=======
/**
*
* Get a thumbnail of a specified size. Generates the image if it is not
* already cached.
*
* @param content
* @param iconSize
*
* @return File object for cached image. Is guaranteed to exist, as long as
* there was not an error generating or saving the thumbnail.
*/
@Nullable
public static File getCachedThumbnailFile(Content content, int iconSize) {
getThumbnail(content, iconSize);
return getCachedThumbnailLocation(content.getId());
}
>>>>>>>
/**
*
* Get a thumbnail of a specified size. Generates the image if it is not
* already cached.
*
* @param content
* @param iconSize
*
* @return File object for cached image. Is guaranteed to exist, as long as
* there was not an error generating or saving the thumbnail.
*/
@Nullable
public static File getCachedThumbnailFile(Content content, int iconSize) {
getThumbnail(content, iconSize);
return getCachedThumbnailLocation(content.getId());
}
<<<<<<<
*
* @return
=======
*
* @return
*
*
* @deprecated use {@link #getCachedThumbnailLocation(long) } instead
>>>>>>>
*
* @return
*
*
* @deprecated use {@link #getCachedThumbnailLocation(long) } instead
<<<<<<<
=======
/**
* Check if the given file is a png based on header.
*
* @param file
*
* @return true if png file, false otherwise
*/
>>>>>>>
/**
* Check if the given file is a png based on header.
*
* @param file
*
* @return true if png file, false otherwise
*/
<<<<<<<
private static Image generateAndSaveIcon(Content content, int iconSize, File saveFile) {
Image icon = null;
=======
private static Image generateAndSaveThumbnail(AbstractFile file, int iconSize, File cacheFile) {
BufferedImage thumbnail = null;
>>>>>>>
private static Image generateAndSaveThumbnail(AbstractFile file, int iconSize, File cacheFile) {
BufferedImage thumbnail = null;
<<<<<<<
BufferedImage biScaled = ScalrWrapper.resizeFast(bi, iconSize);
return biScaled;
} catch (IllegalArgumentException e) {
// if resizing does not work due to extremely small height/width ratio,
// crop the image instead.
BufferedImage biCropped = ScalrWrapper.cropImage(bi, Math.min(iconSize, bi.getWidth()), Math.min(iconSize, bi.getHeight()));
return biCropped;
} catch (OutOfMemoryError e) {
logger.log(Level.WARNING, "Could not scale image (too large): " + content.getName(), e); //NON-NLS
=======
try {
return ScalrWrapper.resizeFast(bi, iconSize);
} catch (IllegalArgumentException e) {
// if resizing does not work due to extreme aspect ratio,
// crop the image instead.
return ScalrWrapper.cropImage(bi, Math.min(iconSize, bi.getWidth()), Math.min(iconSize, bi.getHeight()));
}
} catch (OutOfMemoryError e) {
LOGGER.log(Level.WARNING, "Could not scale image (too large): " + content.getName(), e); //NON-NLS
>>>>>>>
try {
return ScalrWrapper.resizeFast(bi, iconSize);
} catch (IllegalArgumentException e) {
// if resizing does not work due to extreme aspect ratio,
// crop the image instead.
return ScalrWrapper.cropImage(bi, Math.min(iconSize, bi.getWidth()), Math.min(iconSize, bi.getHeight()));
}
} catch (OutOfMemoryError e) {
LOGGER.log(Level.WARNING, "Could not scale image (too large): " + content.getName(), e); //NON-NLS |
<<<<<<<
import org.sleuthkit.autopsy.corecomponents.ThumbnailViewNode.ThumbnailLoader;
=======
import org.sleuthkit.autopsy.corecomponents.ResultViewerPersistence.SortCriterion;
>>>>>>>
import org.sleuthkit.autopsy.corecomponents.ResultViewerPersistence.SortCriterion;
<<<<<<<
private static final Logger logger = Logger.getLogger(ThumbnailViewChildren.class.getName());
private final ThumbnailLoader thumbLoader;
=======
>>>>>>>
private final ThumbnailLoader thumbLoader; |
<<<<<<<
super(Children.createLazy(new Md5ChildCallable(data)), Lookups.singleton(data.getMd5()));
=======
super(Children.create(
new FileInstanceNodeFactory(data), true));
>>>>>>>
super(Children.create(
new FileInstanceNodeFactory(data), true));
<<<<<<<
map.put(CommonFileParentPropertyType.File.toString(), node.getMd5());
map.put(CommonFileParentPropertyType.InstanceCount.toString(), node.getCommonFileCount());
map.put(CommonFileParentPropertyType.Case.toString(), node.getCases());
=======
//map.put(CommonFileParentPropertyType.Case.toString(), "");
>>>>>>>
//map.put(CommonFileParentPropertyType.Case.toString(), "");
map.put(CommonFileParentPropertyType.Case.toString(), node.getCases());
<<<<<<<
protected Node createNodeForKey(FileInstanceNodeGenerator file) {
return file.generateNode();
=======
protected Node createNodeForKey(FileInstanceMetadata file) {
try {
Case currentCase = Case.getCurrentCaseThrows();
SleuthkitCase tskDb = currentCase.getSleuthkitCase();
AbstractFile abstractFile = tskDb.findAllFilesWhere(String.format("obj_id in (%s)", file.getObjectId())).get(0);
return new FileInstanceNode(abstractFile, file.getDataSourceName());
} catch (NoCurrentCaseException | TskCoreException ex) {
LOGGER.log(Level.SEVERE, String.format("Unable to create node for file with obj_id: %s.", new Object[]{file.getObjectId()}), ex);
}
return null;
>>>>>>>
protected Node createNodeForKey(FileInstanceMetadata file) {
try {
Case currentCase = Case.getCurrentCaseThrows();
SleuthkitCase tskDb = currentCase.getSleuthkitCase();
AbstractFile abstractFile = tskDb.findAllFilesWhere(String.format("obj_id in (%s)", file.getObjectId())).get(0);
return new FileInstanceNode(abstractFile, file.getDataSourceName());
} catch (NoCurrentCaseException | TskCoreException ex) {
LOGGER.log(Level.SEVERE, String.format("Unable to create node for file with obj_id: %s.", new Object[]{file.getObjectId()}), ex);
}
return null;
<<<<<<<
File(Bundle.CommonFileParentPropertyType_fileColLbl()),
InstanceCount(Bundle.CommonFileParentPropertyType_instanceColLbl()),
Case(Bundle.CommonFileParentPropertyType_caseColLbl()),
=======
>>>>>>>
Case(Bundle.CommonFileParentPropertyType_caseColLbl()), |
<<<<<<<
import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.BlackboardAttribute;
=======
import org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException;
>>>>>>>
import org.sleuthkit.datamodel.BlackboardArtifact;
import org.sleuthkit.datamodel.BlackboardAttribute;
import org.sleuthkit.autopsy.datasourcesummary.datamodel.SleuthkitCaseProvider.SleuthkitCaseProviderException; |
<<<<<<<
import javafx.scene.layout.Pane;
import javafx.scene.layout.Region;
import javafx.scene.text.Font;
import javafx.scene.text.FontPosture;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import org.controlsfx.control.PopOver;
=======
>>>>>>>
import javafx.scene.layout.Pane;
import javafx.scene.text.Font;
import javafx.scene.text.FontPosture;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.scene.text.TextFlow;
import org.controlsfx.control.PopOver;
<<<<<<<
/**
* Constructor
*
* @param controller The TimelineController for this visualization.
* @param specificPane The container for the specific axis labels.
* @param contextPane The container for the contextual axis labels.
* @param spacer The Region to use as a spacer to keep the axis labels
* aligned.
*/
@NbBundle.Messages({"CountsViewPane.numberOfEvents=Number of Events ({0})"})
public CountsViewPane(TimeLineController controller, Pane specificPane, Pane contextPane, Region spacer) {
super(controller, specificPane, contextPane, spacer);
setChart(new EventCountsChart(controller, dateAxis, countAxis, getSelectedNodes()));
getChart().setData(dataSeries);
Tooltip.install(getChart(), getDefaultTooltip());
setSettingsNodes(new CountsViewSettingsPane().getChildrenUnmodifiable());
dateAxis.getTickMarks().addListener((Observable tickMarks) -> layoutDateLabels());
dateAxis.categorySpacingProperty().addListener((Observable spacing) -> layoutDateLabels());
dateAxis.getCategories().addListener((Observable categories) -> layoutDateLabels());
spacer.minWidthProperty().bind(countAxis.widthProperty().add(countAxis.tickLengthProperty()).add(dateAxis.startMarginProperty().multiply(2)));
spacer.prefWidthProperty().bind(countAxis.widthProperty().add(countAxis.tickLengthProperty()).add(dateAxis.startMarginProperty().multiply(2)));
spacer.maxWidthProperty().bind(countAxis.widthProperty().add(countAxis.tickLengthProperty()).add(dateAxis.startMarginProperty().multiply(2)));
=======
public CountsViewPane(TimeLineController controller) {
super(controller);
chart = new EventCountsChart(controller, dateAxis, countAxis, selectedNodes);
chart.setData(dataSeries);
setCenter(chart);
Tooltip.install(chart, getDefaultTooltip());
settingsNodes = new ArrayList<>(new CountsViewSettingsPane().getChildrenUnmodifiable());
dateAxis.getTickMarks().addListener((Observable observable) -> layoutDateLabels());
dateAxis.categorySpacingProperty().addListener((Observable observable) -> layoutDateLabels());
dateAxis.getCategories().addListener((Observable observable) -> layoutDateLabels());
>>>>>>>
/**
* Constructor
*
* @param controller The TimelineController for this visualization.
* @param specificPane The container for the specific axis labels.
* @param contextPane The container for the contextual axis labels.
* @param spacer The Region to use as a spacer to keep the axis labels
* aligned.
*/
@NbBundle.Messages({
"# {0} - scale name",
"CountsViewPane.numberOfEvents=Number of Events ({0})"})
public CountsViewPane(TimeLineController controller) {
super(controller);
setChart(new EventCountsChart(controller, dateAxis, countAxis, getSelectedNodes()));
getChart().setData(dataSeries);
Tooltip.install(getChart(), getDefaultTooltip());
setSettingsNodes(new CountsViewSettingsPane().getChildrenUnmodifiable());
dateAxis.getTickMarks().addListener((Observable tickMarks) -> layoutDateLabels());
dateAxis.categorySpacingProperty().addListener((Observable spacing) -> layoutDateLabels());
dateAxis.getCategories().addListener((Observable categories) -> layoutDateLabels());
<<<<<<<
/*
* A Pane that contains widgets to adjust settings specific to a
* CountsViewPane
*/
=======
@Override
public double getAxisMargin() {
return dateAxis.getStartMargin() + dateAxis.getEndMargin();
}
>>>>>>>
@Override
public double getAxisMargin() {
return dateAxis.getStartMargin() + dateAxis.getEndMargin();
}
/*
* A Pane that contains widgets to adjust settings specific to a
* CountsViewPane
*/ |
<<<<<<<
=======
}
@Override
public synchronized String toString() {
StringBuilder sb = new StringBuilder();
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.rootDirs.text")).append(rootDirectoryTasks.size());
for (FileTask task : rootDirectoryTasks) {
sb.append(task.toString()).append(" ");
}
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.curDirs.text")).append(directoryTasks.size());
for (FileTask task : directoryTasks) {
sb.append(task.toString()).append(" ");
}
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.curFiles.text")).append(fileTasks.size());
for (FileTask task : fileTasks) {
sb.append(task.toString()).append(" ");
}
return sb.toString();
>>>>>>>
}
@Override
public synchronized String toString() {
StringBuilder sb = new StringBuilder();
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.rootDirs.text")).append(rootDirectoryTasks.size());
for (FileIngestTask task : rootDirectoryTasks) {
sb.append(task.toString()).append(" ");
}
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.curDirs.text")).append(directoryTasks.size());
for (FileIngestTask task : directoryTasks) {
sb.append(task.toString()).append(" ");
}
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.FileSched.toString.curFiles.text")).append(fileTasks.size());
for (FileIngestTask task : fileTasks) {
sb.append(task.toString()).append(" ");
}
return sb.toString();
<<<<<<<
synchronized FileIngestTask getNextTask() {
final FileIngestTask task = fileTasks.pollLast();
=======
@Override
public synchronized FileTask next() {
if (!hasNext()) {
throw new IllegalStateException(
NbBundle.getMessage(this.getClass(), "IngestScheduler.FileTask.next.exception.msg"));
}
//dequeue the last in the list
final FileTask task = fileTasks.pollLast();
>>>>>>>
synchronized FileIngestTask getNextTask() {
final FileIngestTask task = fileTasks.pollLast();
<<<<<<<
=======
@Override
public void remove() {
throw new UnsupportedOperationException(
NbBundle.getMessage(this.getClass(), "IngestScheduler.remove.exception.notSupported.msg"));
}
>>>>>>>
<<<<<<<
tasks.addLast(job);
=======
tasks.addLast(task);
}
@Override
public synchronized IngestJob next() throws IllegalStateException {
if (!hasNext()) {
throw new IllegalStateException(
NbBundle.getMessage(this.getClass(), "IngestScheduler.DataSourceScheduler.exception.next.msg"));
}
final IngestJob ret = tasks.pollFirst();
return ret;
>>>>>>>
tasks.addLast(job);
<<<<<<<
synchronized void emptyQueues() {
=======
@Override
public synchronized boolean hasNext() {
return !tasks.isEmpty();
}
@Override
public void remove() {
throw new UnsupportedOperationException(
NbBundle.getMessage(this.getClass(), "IngestScheduler.DataSourceScheduler.exception.remove.msg"));
}
synchronized void empty() {
>>>>>>>
synchronized void emptyQueues() {
<<<<<<<
=======
synchronized int getCount() {
return tasks.size();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.DataSourceScheduler.toString.size"))
.append(getCount());
for (IngestJob task : tasks) {
sb.append(task.toString()).append(" ");
}
return sb.toString();
}
>>>>>>>
synchronized int getCount() {
return tasks.size();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(NbBundle.getMessage(this.getClass(), "IngestScheduler.DataSourceScheduler.toString.size"))
.append(getCount());
for (IngestJob task : tasks) {
sb.append(task.toString()).append(" ");
}
return sb.toString();
} |
<<<<<<<
private final ThumbnailViewer thumbnailsViewer;
private final SummaryViewer summaryViewer;
private final ModifiableProxyLookup proxyLookup;
=======
private final MediaViewer mediaViewer;
private final ModifiableProxyLookup proxyLookup;
>>>>>>>
private final SummaryViewer summaryViewer;
private final MediaViewer mediaViewer;
private final ModifiableProxyLookup proxyLookup;
<<<<<<<
thumbnailsViewer = new ThumbnailViewer();
summaryViewer = new SummaryViewer();
proxyLookup = new ModifiableProxyLookup(messagesViewer.getLookup());
=======
mediaViewer = new MediaViewer();
proxyLookup = new ModifiableProxyLookup(messagesViewer.getLookup());
initComponents();
>>>>>>>
summaryViewer = new SummaryViewer();
mediaViewer = new MediaViewer();
proxyLookup = new ModifiableProxyLookup(messagesViewer.getLookup());
<<<<<<<
tabPane.add(thumbnailsViewer.getDisplayName(), thumbnailsViewer);
=======
tabPane.add(mediaViewer.getDisplayName(), mediaViewer);
>>>>>>>
tabPane.add(mediaViewer.getDisplayName(), mediaViewer); |
<<<<<<<
private final byte[] STRING_CHUNK_BUF = new byte[(int) MAX_STRING_CHUNK_SIZE];
=======
>>>>>>> |
<<<<<<<
private Map<UniquePathKey,OtherOccurrenceNodeData> getCorrelatedInstances(CorrelationAttributeInstance corAttr, String dataSourceName, String deviceId) {
=======
private Map<UniquePathKey, OtherOccurrenceNodeInstanceData> getCorrelatedInstances(CorrelationAttribute corAttr, String dataSourceName, String deviceId) {
>>>>>>>
private Map<UniquePathKey, OtherOccurrenceNodeInstanceData> getCorrelatedInstances(CorrelationAttributeInstance corAttr, String dataSourceName, String deviceId) {
<<<<<<<
for (CorrelationAttributeInstance corAttr : correlationAttributes) {
Map<UniquePathKey,OtherOccurrenceNodeData> correlatedNodeDataMap = new HashMap<>(0);
=======
for (CorrelationAttribute corAttr : correlationAttributes) {
Map<UniquePathKey, OtherOccurrenceNodeInstanceData> correlatedNodeDataMap = new HashMap<>(0);
>>>>>>>
for (CorrelationAttributeInstance corAttr : correlationAttributes) {
Map<UniquePathKey, OtherOccurrenceNodeInstanceData> correlatedNodeDataMap = new HashMap<>(0); |
<<<<<<<
=======
* Does initialization that would leak a reference to this if done in the
* constructor.
*/
private void init() {
}
/**
>>>>>>>
<<<<<<<
=======
>>>>>>> |
<<<<<<<
if (SwingUtilities.isEventDispatchThread()) {
setupTabs(nme.getNode());
} else {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
setupTabs(nme.getNode());
}
});
}
=======
setupTabs(nme.getNode());
updateMatches();
>>>>>>>
if (SwingUtilities.isEventDispatchThread()) {
setupTabs(nme.getNode());
updateMatches();
} else {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
setupTabs(nme.getNode());
updateMatches();
}
});
} |
<<<<<<<
supportedMimeTypes.addAll(Arrays.asList("application/x-123")); // NON-NLS
=======
/*
* TODO: windows .cur cursor files get misidentified as
* application/x-123, so we claim to support application/x-123 so we
* don't miss them: ie this is a hack to cover another bug. when this is
* fixed, we should remove application/x-123 from the list of supported
* mime types.
*/
supportedMimeTypes.addAll(Arrays.asList("application/x-123"));
>>>>>>>
/*
* TODO: windows .cur cursor files get misidentified as
* application/x-123, so we claim to support application/x-123 so we
* don't miss them: ie this is a hack to cover another bug. when this is
* fixed, we should remove application/x-123 from the list of supported
* mime types.
*/
supportedMimeTypes.addAll(Arrays.asList("application/x-123")); // NON-NLS
<<<<<<<
supportedMimeTypes.removeIf("application/octet-stream"::equals); //this is rearely usefull NON-NLS
=======
supportedMimeTypes.removeIf("application/octet-stream"::equals); //this is rarely usefull
>>>>>>>
supportedMimeTypes.removeIf("application/octet-stream"::equals); //this is rarely usefull NON-NLS |
<<<<<<<
import org.n52.sos.ds.hibernate.entities.Procedure;
import org.n52.sos.ds.hibernate.entities.interfaces.BlobObservation;
import org.n52.sos.ds.hibernate.entities.interfaces.BooleanObservation;
import org.n52.sos.ds.hibernate.entities.interfaces.CategoryObservation;
import org.n52.sos.ds.hibernate.entities.interfaces.CountObservation;
import org.n52.sos.ds.hibernate.entities.interfaces.GeometryObservation;
import org.n52.sos.ds.hibernate.entities.interfaces.NumericObservation;
import org.n52.sos.ds.hibernate.entities.interfaces.SweDataArrayObservation;
import org.n52.sos.ds.hibernate.entities.interfaces.TextObservation;
=======
import org.n52.sos.ds.hibernate.entities.observation.Observation;
import org.n52.sos.exception.CodedException;
import org.n52.sos.ogc.gml.AbstractFeature;
import org.n52.sos.ogc.gml.CodeWithAuthority;
import org.n52.sos.ogc.gml.time.Time;
import org.n52.sos.ogc.gml.time.TimeInstant;
import org.n52.sos.ogc.gml.time.TimePeriod;
>>>>>>>
import org.n52.sos.ds.hibernate.entities.observation.Observation;
<<<<<<<
import org.n52.sos.util.XmlHelper;
=======
import org.n52.sos.util.StringHelper;
>>>>>>>
<<<<<<<
private final Collection<AbstractObservation> observations;
=======
private final Collection<? extends Observation<?>> observations;
>>>>>>>
private final Collection<? extends Observation<?>> observations;
<<<<<<<
public ObservationOmObservationCreator(Collection<AbstractObservation> observations,
AbstractObservationRequest request, LocalizedProducer<OwsServiceProvider> serviceProvider,
Locale language, Session session) {
super(request, language, serviceProvider, session);
=======
public ObservationOmObservationCreator(Collection<? extends Observation<?>> observations,
AbstractObservationRequest request, Locale language, Session session) {
super(request, session);
>>>>>>>
public ObservationOmObservationCreator(Collection<? extends Observation<?>> observations,
AbstractObservationRequest request, LocalizedProducer<OwsServiceProvider> serviceProvider,
Locale language, Session session) {
super(request, language, serviceProvider, session);
<<<<<<<
private Collection<AbstractObservation> getObservations() {
=======
public ObservationOmObservationCreator(Collection<? extends Observation<?>> observations, AbstractObservationRequest request,
Session session) {
super(request, session);
this.request = request;
if (observations == null) {
this.observations = Collections.emptyList();
} else {
this.observations = observations;
}
}
private Collection<? extends Observation<?>> getObservations() {
>>>>>>>
private Collection<? extends Observation<?>> getObservations() {
<<<<<<<
protected OmObservation createObservation(AbstractObservation hObservation) throws OwsExceptionReport, ConverterException {
=======
protected OmObservation createObservation(Observation<?> hObservation) throws OwsExceptionReport, ConverterException {
>>>>>>>
protected OmObservation createObservation(Observation<?> hObservation) throws OwsExceptionReport, ConverterException { |
<<<<<<<
user: { ethData, btcData, btcMultisigUserData, tokensData, nimData, ltcData /* usdtOmniData, nimData */ },
=======
user: { ethData, btcData, btcMultisigUserData, bchData, tokensData, nimData /* usdtOmniData, nimData */ },
>>>>>>>
user: { ethData, btcData, btcMultisigUserData, tokensData, nimData /* usdtOmniData, nimData */ },
<<<<<<<
items: [ethData, btcData, btcMultisigUserData, ltcData /* usdtOmniData, nimData */],
=======
items: [ethData, btcData, btcMultisigUserData, bchData /* usdtOmniData, nimData */],
>>>>>>>
items: [ethData, btcData, btcMultisigUserData /* usdtOmniData, nimData */], |
<<<<<<<
const Center = ({ children, scrollable, keepFontSize, ...rest }) => {
=======
const Center = ({ children, scrollable, centerHorizontally, centerVertically, ...rest }) => {
>>>>>>>
const Center = ({ children, scrollable, centerHorizontally, centerVertically, keepFontSize, ...rest }) => {
<<<<<<<
'keepFontSize': keepFontSize,
=======
'centerHorizontally': centerHorizontally,
'centerVertically': centerVertically,
>>>>>>>
'centerHorizontally': centerHorizontally,
'centerVertically': centerVertically,
'keepFontSize': keepFontSize,
<<<<<<<
keepFontSize: PropTypes.bool,
=======
centerVertically: PropTypes.bool,
centerHorizontally: PropTypes.bool,
>>>>>>>
keepFontSize: PropTypes.bool,
centerVertically: PropTypes.bool,
centerHorizontally: PropTypes.bool,
<<<<<<<
keepFontSize: false,
=======
centerVertically: true,
centerHorizontally: true,
>>>>>>>
keepFontSize: false,
centerVertically: true,
centerHorizontally: true, |
<<<<<<<
import { Route } from 'react-router'
import { Switch } from 'react-router-dom'
import { isMobile } from 'react-device-detect'
=======
//import { Route } from 'react-router'
import { BrowserRouter, Switch, HashRouter, Route } from 'react-router-dom'
>>>>>>>
import { isMobile } from 'react-device-detect'
import { Switch, Route } from 'react-router-dom' |
<<<<<<<
import { Tablist, Tab } from 'evergreen-ui'
import SyntaxHighlighter from 'react-syntax-highlighter'
=======
import SyntaxHighlighter, { registerLanguage } from 'react-syntax-highlighter/dist/light'
import js from 'react-syntax-highlighter/dist/languages/javascript'
>>>>>>>
import { Tablist, Tab } from 'evergreen-ui'
import SyntaxHighlighter, { registerLanguage } from 'react-syntax-highlighter/dist/light'
import js from 'react-syntax-highlighter/dist/languages/javascript'
<<<<<<<
const tabs = ['Nightmare', 'Puppeteer']
const App = ({ onSelectTab, selectedTab, handleRestart, recording }) => {
let script = ''
if (selectedTab === 'Nightmare') {
script = getNightmare(recording)
} else if (selectedTab === 'Puppeteer') {
script = getPuppeteer(recording)
}
return (
<div>
<Tablist marginX={-4} marginBottom={16}>
{tabs.map((tab, index) => (
<Tab
key={tab}
id={tab}
isSelected={tab === selectedTab}
onSelect={() => onSelectTab(tab)}
aria-controls={`panel-${tab}`}
>
{tab}
</Tab>
))}
</Tablist>
<SyntaxHighlighter language='javascript' style={syntaxStyle}>
{script}
</SyntaxHighlighter>
<button className={styles.button} onClick={handleRestart}>Restart</button>
</div>
)
}
function getNightmare (recording) {
return `const Nightmare = require('nightmare')
=======
registerLanguage('javascript', js)
const App = props => (
<div>
<SyntaxHighlighter language='javascript' style={syntaxStyle}>
{`const Nightmare = require('nightmare')
>>>>>>>
registerLanguage('javascript', js)
const tabs = ['Nightmare', 'Puppeteer']
const App = ({ onSelectTab, selectedTab, handleRestart, recording }) => {
let script = ''
if (selectedTab === 'Nightmare') {
script = getNightmare(recording)
} else if (selectedTab === 'Puppeteer') {
script = getPuppeteer(recording)
}
return (
<div>
<Tablist marginX={-4} marginBottom={16}>
{tabs.map((tab, index) => (
<Tab
key={tab}
id={tab}
isSelected={tab === selectedTab}
onSelect={() => onSelectTab(tab)}
aria-controls={`panel-${tab}`}
>
{tab}
</Tab>
))}
</Tablist>
<SyntaxHighlighter language='javascript' style={syntaxStyle}>
{script}
</SyntaxHighlighter>
<button className={styles.button} onClick={handleRestart}>Restart</button>
</div>
)
}
function getNightmare (recording) {
return `const Nightmare = require('nightmare') |
<<<<<<<
/** In the document, there's related_content and it contains keys
* called 'mdn_url'. We need to transform them to relative links
* that works with our router.
=======
const PROJECT_ROOT = path.join(__dirname, "..", "..");
const STUMPTOWN_CONTENT_ROOT =
process.env.STUMPTOWN_CONTENT_ROOT || path.join(PROJECT_ROOT, "stumptown");
const STATIC_ROOT = path.join(PROJECT_ROOT, "client", "build");
const TOUCHFILE = path.join(PROJECT_ROOT, "client", "src", "touchthis.js");
const BUILD_JSON_SERVER =
process.env.BUILD_JSON_SERVER || "http://localhost:5555";
/**
* Transform the `related_content` object for this document. For each node:
* - rename `mdn_url` to `uri`
* - use `short_title` instead of `title`, if it is available
* - delete `short_description`
* - set `isActive` for the node whose `uri` matches this document's `mdn_url`
* - set `open` for nodes which are active or which have an active child
*
>>>>>>>
/**
* Transform the `related_content` object for this document. For each node:
* - rename `mdn_url` to `uri`
* - use `short_title` instead of `title`, if it is available
* - delete `short_description`
* - set `isActive` for the node whose `uri` matches this document's `mdn_url`
* - set `open` for nodes which are active or which have an active child
* |
<<<<<<<
const fakeV1APIRouter = require("./fake-v1-api");
const { builder, normalizeContentPath } = require("./builder");
=======
const { searchRoute } = require("./document-watch");
const flawsRoute = require("./flaws");
const { staticMiddlewares } = require("./middlewares");
>>>>>>>
const fakeV1APIRouter = require("./fake-v1-api");
const { searchRoute } = require("./document-watch");
const flawsRoute = require("./flaws");
const { staticMiddlewares } = require("./middlewares");
<<<<<<<
// Depending on if FAKE_V1_API is set, we either respond with JSON based
// on `.json` files on disk or we proxy the requests to Kuma.
app.use(
"/api/v1",
FAKE_V1_API
? fakeV1APIRouter
: proxy(PROXY_HOSTNAME, {
// More options are available on
// https://www.npmjs.com/package/express-http-proxy#options
proxyReqPathResolver: (req) => "/api/v1" + req.url,
})
);
// The client/build directory won't exist at the very very first time
// you start the server after a fresh git clone.
if (!fs.existsSync(STATIC_ROOT)) {
fs.mkdirSync(STATIC_ROOT);
}
=======
app.use(staticMiddlewares);
>>>>>>>
app.use(staticMiddlewares); |
<<<<<<<
mouseWheel,
keyDown
=======
mouseUp,
mouseWheel
>>>>>>>
mouseUp,
mouseWheel,
keyDown |
<<<<<<<
import * as cornerstone from '../cornerstone-core.js';
import requestPoolManager from '../requestPool/requestPoolManager.js';
import loadHandlerManager from '../stateManagement/loadHandlerManager.js';
import { addToolState, getToolState } from '../stateManagement/toolState.js';
import { setMaxSimultaneousRequests } from '../util/getMaxSimultaneousRequests.js';
=======
import requestPoolManager from '../requestPool/requestPoolManager';
import loadHandlerManager from '../stateManagement/loadHandlerManager';
import { addToolState, getToolState } from '../stateManagement/toolState';
import { setMaxSimultaneousRequests } from '../util/getMaxSimultaneousRequests';
>>>>>>>
import * as cornerstone from '../cornerstone-core.js';
import requestPoolManager from '../requestPool/requestPoolManager';
import loadHandlerManager from '../stateManagement/loadHandlerManager';
import { addToolState, getToolState } from '../stateManagement/toolState';
import { setMaxSimultaneousRequests } from '../util/getMaxSimultaneousRequests'; |
<<<<<<<
export { default as scaleOverlayTool } from './fancy-tools/scaleOverlay.js';
=======
export { default as freehandMouseTool } from './fancy-tools/freehandMouseTool.js';
>>>>>>>
export { default as scaleOverlayTool } from './fancy-tools/scaleOverlay.js';
export { default as freehandMouseTool } from './fancy-tools/freehandMouseTool.js'; |
<<<<<<<
import triggerEvent from '../../../util/triggerEvent.js';
=======
import getActiveTool from '../../../util/getActiveTool';
import BaseAnnotationTool from '../../base/BaseAnnotationTool';
>>>>>>>
import triggerEvent from '../../../util/triggerEvent.js';
import getActiveTool from '../../../util/getActiveTool';
import BaseAnnotationTool from '../../base/BaseAnnotationTool';
<<<<<<<
calculateLongestAndShortestDiameters(eventData, measurementData);
triggerEvent(element, EVENTS.MEASUREMENT_MODIFIED, modifiedEventData);
triggerEvent(element, EVENTS.MEASUREMENT_COMPLETED, modifiedEventData);
=======
external.cornerstone.triggerEvent(
element,
EVENTS.MEASUREMENT_MODIFIED,
modifiedEventData
);
>>>>>>>
triggerEvent(element, EVENTS.MEASUREMENT_MODIFIED, modifiedEventData);
triggerEvent(element, EVENTS.MEASUREMENT_COMPLETED, modifiedEventData); |
<<<<<<<
// TODO: expand-strict is obsolete, now identical to expand. Remove in future version
"brace_style": ["collapse", "expand", "end-expand", "collapse-preserve-inline", "expand-strict", "none"],
"unindent_chained_methods": Boolean,
=======
"brace_style": "brace_style", //See above for validation
>>>>>>>
"brace_style": "brace_style", //See above for validation
"unindent_chained_methods": Boolean,
<<<<<<<
msg.push(' -b, --brace-style [collapse|expand|collapse-preserve-inline|end-expand|none] ["collapse"]');
msg.push(' -u, --unindent-chained-methods Don\'t indent chained method calls');
=======
msg.push(' -b, --brace-style [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline]');
>>>>>>>
msg.push(' -b, --brace-style [collapse|expand|end-expand|none][,preserve-inline] [collapse,preserve-inline]');
msg.push(' -u, --unindent-chained-methods Don\'t indent chained method calls'); |
<<<<<<<
name: "Custom Extra Liners (empty)",
description: "",
matrix: [
{
options: [
{ name: "extra_liners", value: "[]" }
]
},
],
tests: [
{
fragment: '<html><head><meta></head><body><div><p>x</p></div></body></html>',
output: '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n <p>x</p>\n </div>\n</body>\n</html>'
}
],
}, {
name: "Custom Extra Liners (default)",
description: "",
matrix: [
{
options: [
{ name: "extra_liners", value: "null" }
]
},
],
tests: [
{ fragment: '<html><head></head><body></body></html>', output: '<html>\n\n<head></head>\n\n<body></body>\n\n</html>' }
],
}, {
name: "Custom Extra Liners (p, string)",
description: "",
matrix: [
{
options: [
{ name: "extra_liners", value: "'p,/p'" }
]
},
],
tests: [
{
fragment: '<html><head><meta></head><body><div><p>x</p></div></body></html>',
output: '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n\n <p>x\n\n </p>\n </div>\n</body>\n</html>'
}
],
}, {
name: "Custom Extra Liners (p)",
description: "",
matrix: [
{
options: [
{ name: "extra_liners", value: "['p', '/p']" }
]
},
],
tests: [
{
fragment: '<html><head><meta></head><body><div><p>x</p></div></body></html>',
output: '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n\n <p>x\n\n </p>\n </div>\n</body>\n</html>'
}
],
}, {
=======
name: "Attribute Wrap",
description: "Wraps attributes inside of html tags",
matrix: [
{
options: [
{ name: "wrap_attributes", value: "'force'" }
],
eof: '\\n',
indent_attr: ' ',
over80: '\\n'
}, {
options: [
{ name: "wrap_attributes", value: "'force'" },
{ name: "wrap_line_length", value: "80" }
],
eof: '\\n',
indent_attr: ' ',
over80: '\\n'
}, {
options: [
{ name: "wrap_attributes", value: "'force'" },
{ name: "wrap_attributes_indent_size", value: "8" },
],
eof: '\\n',
indent_attr: ' ',
over80: '\\n'
}, {
options: [
{ name: "wrap_attributes", value: "'auto'" },
{ name: "wrap_line_length", value: "80" }
],
eof: ' ',
indent_attr: '',
over80: '\\n'
}, {
options: [
{ name: "wrap_attributes", value: "'auto'" },
{ name: "wrap_line_length", value: "0" }
],
eof: ' ',
indent_attr: '',
over80: ' '
}
],
tests: [
{
fragment: '<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>',
output: '<div attr0{{eof}}{{indent_attr}}attr1="123"{{eof}}{{indent_attr}}data-attr2="hello t here">This is some text</div>'
},
{
fragment: '<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>',
output: '<div lookatthissuperduperlongattributenamewhoahcrazy0="true"{{eof}}{{indent_attr}}attr0{{eof}}{{indent_attr}}attr1="123"{{eof}}{{indent_attr}}data-attr2="hello t here"{{over80}}{{indent_attr}}heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>'
},
{
fragment: '<img attr0 attr1="123" data-attr2="hello t here"/>',
output: '<img attr0{{eof}}{{indent_attr}}attr1="123"{{eof}}{{indent_attr}}data-attr2="hello t here" />'
}
]
}, {
name: "Unformatted tags",
description: "Unformatted tag behavior",
options: [],
tests: [
{ fragment: '<ol>\n <li>b<pre>c</pre></li>\n</ol>' },
{ fragment: '<ol>\n <li>b<code>c</code></li>\n</ol>' },
]
}, {
>>>>>>>
name: "Custom Extra Liners (empty)",
description: "",
matrix: [
{
options: [
{ name: "extra_liners", value: "[]" }
]
},
],
tests: [
{
fragment: '<html><head><meta></head><body><div><p>x</p></div></body></html>',
output: '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n <p>x</p>\n </div>\n</body>\n</html>'
}
],
}, {
name: "Custom Extra Liners (default)",
description: "",
matrix: [
{
options: [
{ name: "extra_liners", value: "null" }
]
},
],
tests: [
{ fragment: '<html><head></head><body></body></html>', output: '<html>\n\n<head></head>\n\n<body></body>\n\n</html>' }
],
}, {
name: "Custom Extra Liners (p, string)",
description: "",
matrix: [
{
options: [
{ name: "extra_liners", value: "'p,/p'" }
]
},
],
tests: [
{
fragment: '<html><head><meta></head><body><div><p>x</p></div></body></html>',
output: '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n\n <p>x\n\n </p>\n </div>\n</body>\n</html>'
}
],
}, {
name: "Custom Extra Liners (p)",
description: "",
matrix: [
{
options: [
{ name: "extra_liners", value: "['p', '/p']" }
]
},
],
tests: [
{
fragment: '<html><head><meta></head><body><div><p>x</p></div></body></html>',
output: '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n\n <p>x\n\n </p>\n </div>\n</body>\n</html>'
}
],
}, {
name: "Attribute Wrap",
description: "Wraps attributes inside of html tags",
matrix: [
{
options: [
{ name: "wrap_attributes", value: "'force'" }
],
eof: '\\n',
indent_attr: ' ',
over80: '\\n'
}, {
options: [
{ name: "wrap_attributes", value: "'force'" },
{ name: "wrap_line_length", value: "80" }
],
eof: '\\n',
indent_attr: ' ',
over80: '\\n'
}, {
options: [
{ name: "wrap_attributes", value: "'force'" },
{ name: "wrap_attributes_indent_size", value: "8" },
],
eof: '\\n',
indent_attr: ' ',
over80: '\\n'
}, {
options: [
{ name: "wrap_attributes", value: "'auto'" },
{ name: "wrap_line_length", value: "80" }
],
eof: ' ',
indent_attr: '',
over80: '\\n'
}, {
options: [
{ name: "wrap_attributes", value: "'auto'" },
{ name: "wrap_line_length", value: "0" }
],
eof: ' ',
indent_attr: '',
over80: ' '
}
],
tests: [
{
fragment: '<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>',
output: '<div attr0{{eof}}{{indent_attr}}attr1="123"{{eof}}{{indent_attr}}data-attr2="hello t here">This is some text</div>'
},
{
fragment: '<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>',
output: '<div lookatthissuperduperlongattributenamewhoahcrazy0="true"{{eof}}{{indent_attr}}attr0{{eof}}{{indent_attr}}attr1="123"{{eof}}{{indent_attr}}data-attr2="hello t here"{{over80}}{{indent_attr}}heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>'
},
{
fragment: '<img attr0 attr1="123" data-attr2="hello t here"/>',
output: '<img attr0{{eof}}{{indent_attr}}attr1="123"{{eof}}{{indent_attr}}data-attr2="hello t here" />'
}
]
}, {
name: "Unformatted tags",
description: "Unformatted tag behavior",
options: [],
tests: [
{ fragment: '<ol>\n <li>b<pre>c</pre></li>\n</ol>' },
{ fragment: '<ol>\n <li>b<code>c</code></li>\n</ol>' },
]
}, { |
<<<<<<<
msg.push(' -b, --brace-style [collapse|expand|end-expand] ["collapse"]');
msg.push(' -I, --indent-inner-html Indent body and head sections. Default is false.');
msg.push(' -S, --indent-scripts [keep|separate|normal] ["normal"]');
msg.push(' -w, --wrap-line-length Wrap lines at next opportunity after N characters [0]');
msg.push(' -p, --preserve-newlines Preserve line-breaks (--no-preserve-newlines disables)');
msg.push(' -m, --max-preserve-newlines Number of line-breaks to be preserved in one chunk [10]');
msg.push(' -U, --unformatted List of tags (defaults to inline) that should not be reformatted');
msg.push(' -E, --extra_liners List of tags (defaults to [head,body,/html] that should have an extra newline');
=======
msg.push(' -b, --brace-style [collapse|expand|end-expand] ["collapse"]');
msg.push(' -I, --indent-inner-html Indent body and head sections. Default is false.');
msg.push(' -S, --indent-scripts [keep|separate|normal] ["normal"]');
msg.push(' -w, --wrap-line-length Wrap lines at next opportunity after N characters [0]');
msg.push(' -A, --wrap-attributes Wrap html tag attributes to new lines [auto|force] ["auto"]');
msg.push(' -i, --wrap-attributes-indent-size Indent wrapped tags to after N characters [indent-level]');
msg.push(' -p, --preserve-newlines Preserve line-breaks (--no-preserve-newlines disables)');
msg.push(' -m, --max-preserve-newlines Number of line-breaks to be preserved in one chunk [10]');
msg.push(' -U, --unformatted List of tags (defaults to inline) that should not be reformatted');
>>>>>>>
msg.push(' -b, --brace-style [collapse|expand|end-expand] ["collapse"]');
msg.push(' -I, --indent-inner-html Indent body and head sections. Default is false.');
msg.push(' -S, --indent-scripts [keep|separate|normal] ["normal"]');
msg.push(' -w, --wrap-line-length Wrap lines at next opportunity after N characters [0]');
msg.push(' -A, --wrap-attributes Wrap html tag attributes to new lines [auto|force] ["auto"]');
msg.push(' -i, --wrap-attributes-indent-size Indent wrapped tags to after N characters [indent-level]');
msg.push(' -p, --preserve-newlines Preserve line-breaks (--no-preserve-newlines disables)');
msg.push(' -m, --max-preserve-newlines Number of line-breaks to be preserved in one chunk [10]');
msg.push(' -U, --unformatted List of tags (defaults to inline) that should not be reformatted');
msg.push(' -E, --extra_liners List of tags (defaults to [head,body,/html] that should have an extra newline'); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.