mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-15 01:07:42 +00:00
Merge branch 'master' of https://github.com/sleuthkit/autopsy
This commit is contained in:
commit
a632a3e9d7
@ -75,7 +75,7 @@ public class BlackboardArtifactNode extends AbstractNode implements DisplayableI
|
|||||||
}
|
}
|
||||||
final String NO_DESCR = "no description";
|
final String NO_DESCR = "no description";
|
||||||
|
|
||||||
Map<Integer, Object> map = new LinkedHashMap<Integer, Object>();
|
Map<String, Object> map = new LinkedHashMap<String, Object>();
|
||||||
fillPropertyMap(map, artifact);
|
fillPropertyMap(map, artifact);
|
||||||
|
|
||||||
ss.put(new NodeProperty("File Name",
|
ss.put(new NodeProperty("File Name",
|
||||||
@ -83,9 +83,9 @@ public class BlackboardArtifactNode extends AbstractNode implements DisplayableI
|
|||||||
NO_DESCR,
|
NO_DESCR,
|
||||||
associated.accept(new NameVisitor())));
|
associated.accept(new NameVisitor())));
|
||||||
|
|
||||||
for(Map.Entry<Integer, Object> entry : map.entrySet()){
|
for(Map.Entry<String, Object> entry : map.entrySet()){
|
||||||
ss.put(new NodeProperty(BlackboardAttribute.ATTRIBUTE_TYPE.fromID(entry.getKey()).getDisplayName(),
|
ss.put(new NodeProperty(entry.getKey(),
|
||||||
BlackboardAttribute.ATTRIBUTE_TYPE.fromID(entry.getKey()).getDisplayName(),
|
entry.getKey(),
|
||||||
NO_DESCR,
|
NO_DESCR,
|
||||||
entry.getValue()));
|
entry.getValue()));
|
||||||
}
|
}
|
||||||
@ -106,30 +106,30 @@ public class BlackboardArtifactNode extends AbstractNode implements DisplayableI
|
|||||||
* @param map, with preserved ordering, where property names/values are put
|
* @param map, with preserved ordering, where property names/values are put
|
||||||
* @param content to extract properties from
|
* @param content to extract properties from
|
||||||
*/
|
*/
|
||||||
public static void fillPropertyMap(Map<Integer, Object> map, BlackboardArtifact artifact) {
|
public static void fillPropertyMap(Map<String, Object> map, BlackboardArtifact artifact) {
|
||||||
try {
|
try {
|
||||||
for(BlackboardAttribute attribute : artifact.getAttributes()){
|
for(BlackboardAttribute attribute : artifact.getAttributes()){
|
||||||
if(attribute.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID())
|
if(attribute.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_PATH_ID.getTypeID())
|
||||||
continue;
|
continue;
|
||||||
else switch(attribute.getValueType()){
|
else switch(attribute.getValueType()){
|
||||||
case STRING:
|
case STRING:
|
||||||
map.put(attribute.getAttributeTypeID(), attribute.getValueString());
|
map.put(attribute.getAttributeTypeDisplayName(), attribute.getValueString());
|
||||||
break;
|
break;
|
||||||
case INTEGER:
|
case INTEGER:
|
||||||
map.put(attribute.getAttributeTypeID(), attribute.getValueInt());
|
map.put(attribute.getAttributeTypeDisplayName(), attribute.getValueInt());
|
||||||
break;
|
break;
|
||||||
case LONG:
|
case LONG:
|
||||||
if(attribute.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID() ||
|
if(attribute.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_DATETIME.getTypeID() ||
|
||||||
attribute.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_LAST_ACCESSED.getTypeID()) {
|
attribute.getAttributeTypeID() == ATTRIBUTE_TYPE.TSK_LAST_ACCESSED.getTypeID()) {
|
||||||
map.put(attribute.getAttributeTypeID(), dateFormatter.format(new Date(attribute.getValueLong())));
|
map.put(attribute.getAttributeTypeDisplayName(), dateFormatter.format(new Date(attribute.getValueLong())));
|
||||||
} else
|
} else
|
||||||
map.put(attribute.getAttributeTypeID(), attribute.getValueLong());
|
map.put(attribute.getAttributeTypeDisplayName(), attribute.getValueLong());
|
||||||
break;
|
break;
|
||||||
case DOUBLE:
|
case DOUBLE:
|
||||||
map.put(attribute.getAttributeTypeID(), attribute.getValueDouble());
|
map.put(attribute.getAttributeTypeDisplayName(), attribute.getValueDouble());
|
||||||
break;
|
break;
|
||||||
case BYTE:
|
case BYTE:
|
||||||
map.put(attribute.getAttributeTypeID(), attribute.getValueBytes());
|
map.put(attribute.getAttributeTypeDisplayName(), attribute.getValueBytes());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user