From 157cf54e9a9de893980efca2a57043926621934a Mon Sep 17 00:00:00 2001 From: Devin148 Date: Mon, 10 Dec 2012 10:00:47 -0500 Subject: [PATCH 01/11] Rename web downloads column --- Core/src/org/sleuthkit/autopsy/report/ReportHTML.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java index acc8b0053c..f1b2ed79eb 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportHTML.java @@ -755,7 +755,7 @@ public class ReportHTML implements ReportModule { out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(folder + "downloads.html"), "UTF-8")); out.write(generateHead("Web Download Artifacts (" + countDownloads + ")")); String title = "
Web Downloads (" + countDownloads + ")
\n
\n"; - String tableHeader = getTableHead("URL", "Source URL", "Date Accessed", "Program", "Source File"); + String tableHeader = getTableHead("Destination", "Source URL", "Date Accessed", "Program", "Source File"); out.write(title); out.write(tableHeader); From 279b268dda50776e95ab66f29d0f40a80fd94fed Mon Sep 17 00:00:00 2001 From: Tim McIver Date: Mon, 10 Dec 2012 14:22:12 -0500 Subject: [PATCH 02/11] Updates to code that were required as a result of changes to DataModel that were in support of AUT-669. --- .../DataContentViewerMedia.java | 4 +- .../datamodel/AbstractFsContentNode.java | 14 +++---- .../autopsy/datamodel/DirectoryNode.java | 4 +- .../sleuthkit/autopsy/datamodel/FileNode.java | 4 +- .../datamodel/VirtualDirectoryNode.java | 41 +++++++++++++++---- .../autopsy/ingest/IngestScheduler.java | 9 ++-- .../autopsy/report/ReportBodyFile.java | 6 ++- 7 files changed, 54 insertions(+), 28 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java index 0b8e584edc..6afbc66aae 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java @@ -40,7 +40,7 @@ import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer; import org.sleuthkit.autopsy.datamodel.ContentUtils; import org.sleuthkit.datamodel.File; -import org.sleuthkit.datamodel.TskData; +import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM; /** * @@ -332,7 +332,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo return false; } - if (File.dirFlagToValue(file.getDirFlags()).equals(TskData.TSK_FS_NAME_FLAG_ENUM.TSK_FS_NAME_FLAG_UNALLOC.toString())) { + if (file.getDirFlag() == TSK_FS_NAME_FLAG_ENUM.UNALLOC) { return false; } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java index b9c7062f98..73233bfe91 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java @@ -18,11 +18,11 @@ */ package org.sleuthkit.autopsy.datamodel; -import java.text.SimpleDateFormat; import java.util.LinkedHashMap; import java.util.Map; import org.openide.nodes.Sheet; import org.sleuthkit.datamodel.FsContent; +import org.sleuthkit.datamodel.TskData.TSK_FS_META_MODE_ENUM; /** * Abstract class that implements the commonality between File and Directory @@ -236,15 +236,15 @@ public abstract class AbstractFsContentNode extends Abstrac map.put(FsContentPropertyType.ACCESS_TIME.toString(), ContentUtils.getStringTime(content.getAtime(), content)); map.put(FsContentPropertyType.CREATED_TIME.toString(), ContentUtils.getStringTime(content.getCrtime(), content)); map.put(FsContentPropertyType.SIZE.toString(), content.getSize()); - map.put(FsContentPropertyType.FLAGS_DIR.toString(), content.getDirFlagsAsString()); - map.put(FsContentPropertyType.FLAGS_META.toString(), content.getMetaFlagsAsString()); - map.put(FsContentPropertyType.MODE.toString(), content.getModeAsString()); + map.put(FsContentPropertyType.FLAGS_DIR.toString(), content.getDirFlag().toString()); + map.put(FsContentPropertyType.FLAGS_META.toString(), Integer.toString(content.getMetaFlagsInt())); + map.put(FsContentPropertyType.MODE.toString(), TSK_FS_META_MODE_ENUM.toString(content.getModes(), content.getMetaType())); map.put(FsContentPropertyType.USER_ID.toString(), content.getUid()); map.put(FsContentPropertyType.GROUP_ID.toString(), content.getGid()); map.put(FsContentPropertyType.META_ADDR.toString(), content.getMetaAddr()); - map.put(FsContentPropertyType.ATTR_ADDR.toString(), Long.toString(content.getAttrType()) + "-" + Long.toString(content.getAttrId())); - map.put(FsContentPropertyType.TYPE_DIR.toString(), content.getDirTypeAsString()); - map.put(FsContentPropertyType.TYPE_META.toString(), content.getMetaTypeAsString()); + map.put(FsContentPropertyType.ATTR_ADDR.toString(), Long.toString(content.getAttrType().getValue()) + "-" + Long.toString(content.getAttrId())); + map.put(FsContentPropertyType.TYPE_DIR.toString(), content.getDirType().getLabel()); + map.put(FsContentPropertyType.TYPE_META.toString(), content.getMetaType().toString()); map.put(FsContentPropertyType.KNOWN.toString(), content.getKnown().getName()); map.put(FsContentPropertyType.MD5HASH.toString(), content.getMd5Hash() == null ? "" : content.getMd5Hash()); } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java index ef9e2adcec..d52d477176 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java @@ -20,7 +20,7 @@ package org.sleuthkit.autopsy.datamodel; import javax.swing.Action; import org.sleuthkit.datamodel.Directory; -import org.sleuthkit.datamodel.TskData; +import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM; /** * This class is used to represent the "Node" for the directory. @@ -39,7 +39,7 @@ public class DirectoryNode extends AbstractFsContentNode { super(dir, directoryBrowseMode); // set name, display name, and icon - if (Directory.dirFlagToValue(dir.getDirFlags()).equals(TskData.TSK_FS_NAME_FLAG_ENUM.TSK_FS_NAME_FLAG_UNALLOC.toString())) { + if (dir.getDirFlag() == TSK_FS_NAME_FLAG_ENUM.UNALLOC) { this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-deleted.png"); } else { this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java index efa01982fb..7ba667cb99 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java @@ -20,7 +20,7 @@ package org.sleuthkit.autopsy.datamodel; import javax.swing.Action; import org.sleuthkit.datamodel.File; -import org.sleuthkit.datamodel.TskData; +import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM; /** * This class is used to represent the "Node" for the file. It has no children. @@ -39,7 +39,7 @@ public class FileNode extends AbstractFsContentNode { super(file, directoryBrowseMode); // set name, display name, and icon - if (file.getDirFlags() == (TskData.TSK_FS_NAME_FLAG_ENUM.TSK_FS_NAME_FLAG_UNALLOC.getDirFlag())) { + if (file.getDirFlag() == TSK_FS_NAME_FLAG_ENUM.UNALLOC) { this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png"); } else { this.setIconBaseWithExtension(getIconForFileType(file)); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java index 0cc76646ed..5e9ab5dc8c 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/VirtualDirectoryNode.java @@ -23,7 +23,7 @@ import java.util.Map; import org.openide.nodes.Sheet; import org.sleuthkit.autopsy.datamodel.LayoutFileNode.LayoutContentPropertyType; import org.sleuthkit.datamodel.VirtualDirectory; -import org.sleuthkit.datamodel.LayoutFile; +import org.sleuthkit.datamodel.TskData; /** * Node for layout dir @@ -83,8 +83,6 @@ public class VirtualDirectoryNode extends AbstractAbstractFileNode Date: Mon, 10 Dec 2012 17:14:28 -0500 Subject: [PATCH 03/11] Updated code in response to removal of FsContent.getDirType method in favor of FsContent.isDirNameFlagSet(). --- .../autopsy/corecomponents/DataContentViewerMedia.java | 2 +- .../sleuthkit/autopsy/datamodel/AbstractFsContentNode.java | 6 +++++- Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java | 2 +- Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java index 6afbc66aae..ea0a2c03a0 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java @@ -332,7 +332,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo return false; } - if (file.getDirFlag() == TSK_FS_NAME_FLAG_ENUM.UNALLOC) { + if (file.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) { return false; } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java index 73233bfe91..cd64fb9c10 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java @@ -23,6 +23,7 @@ import java.util.Map; import org.openide.nodes.Sheet; import org.sleuthkit.datamodel.FsContent; import org.sleuthkit.datamodel.TskData.TSK_FS_META_MODE_ENUM; +import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM; /** * Abstract class that implements the commonality between File and Directory @@ -229,6 +230,9 @@ public abstract class AbstractFsContentNode extends Abstrac * @param content to extract properties from */ public static void fillPropertyMap(Map map, FsContent content) { + + String dirFlagStr = content.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.ALLOC) ? + TSK_FS_NAME_FLAG_ENUM.ALLOC.toString() : TSK_FS_NAME_FLAG_ENUM.UNALLOC.toString(); map.put(FsContentPropertyType.NAME.toString(), getFsContentName(content)); map.put(FsContentPropertyType.LOCATION.toString(), DataConversion.getformattedPath(ContentUtils.getDisplayPath(content), 0, 1)); map.put(FsContentPropertyType.MOD_TIME.toString(), ContentUtils.getStringTime(content.getMtime(), content)); @@ -236,7 +240,7 @@ public abstract class AbstractFsContentNode extends Abstrac map.put(FsContentPropertyType.ACCESS_TIME.toString(), ContentUtils.getStringTime(content.getAtime(), content)); map.put(FsContentPropertyType.CREATED_TIME.toString(), ContentUtils.getStringTime(content.getCrtime(), content)); map.put(FsContentPropertyType.SIZE.toString(), content.getSize()); - map.put(FsContentPropertyType.FLAGS_DIR.toString(), content.getDirFlag().toString()); + map.put(FsContentPropertyType.FLAGS_DIR.toString(), dirFlagStr); map.put(FsContentPropertyType.FLAGS_META.toString(), Integer.toString(content.getMetaFlagsInt())); map.put(FsContentPropertyType.MODE.toString(), TSK_FS_META_MODE_ENUM.toString(content.getModes(), content.getMetaType())); map.put(FsContentPropertyType.USER_ID.toString(), content.getUid()); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java index d52d477176..5e2b9dd4da 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/DirectoryNode.java @@ -39,7 +39,7 @@ public class DirectoryNode extends AbstractFsContentNode { super(dir, directoryBrowseMode); // set name, display name, and icon - if (dir.getDirFlag() == TSK_FS_NAME_FLAG_ENUM.UNALLOC) { + if (dir.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) { this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/folder-icon-deleted.png"); } else { this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/Folder-icon.png"); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java index 7ba667cb99..c67965b68c 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/FileNode.java @@ -39,7 +39,7 @@ public class FileNode extends AbstractFsContentNode { super(file, directoryBrowseMode); // set name, display name, and icon - if (file.getDirFlag() == TSK_FS_NAME_FLAG_ENUM.UNALLOC) { + if (file.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC)) { this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/file-icon-deleted.png"); } else { this.setIconBaseWithExtension(getIconForFileType(file)); From fdb9fe991c6918dfcf9017156f8a9b18d271e7e1 Mon Sep 17 00:00:00 2001 From: 0xNF Date: Tue, 11 Dec 2012 11:08:49 -0500 Subject: [PATCH 04/11] Progress bar should no longer throw illegalstateexceptions regarding being 1 unit over 100%. UnallocStruct total bytes are now calculated at construction. --- .../directorytree/ExtractUnallocAction.java | 49 ++++++++++++------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java b/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java index 8513140675..bcde44e8ac 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java @@ -168,22 +168,25 @@ public final class ExtractUnallocAction extends AbstractAction { private List lus = new ArrayList(); private File currentlyProcessing; private int totalSizeinMegs; + long totalBytes = 0; - ExtractUnallocWorker(UnallocStruct us) { - this.lus.add(us); + ExtractUnallocWorker(UnallocStruct us) { //Getting the total megs this worker is going to be doing if (!lockedVols.contains(us.getFileName())) { - totalSizeinMegs = toMb(us.sizeInBytes()); + this.lus.add(us); + System.out.println("Size in Bytes: " + us.getSizeInBytes()); + totalBytes = us.getSizeInBytes(); + totalSizeinMegs = toMb(totalBytes); + System.out.println("Size in Megs: " + totalSizeinMegs); lockedVols.add(us.getFileName()); } } ExtractUnallocWorker(List lst) { - //Getting the total megs this worker is going to be doing - long totalBytes = 0; + //Getting the total megs this worker is going to be doing for (UnallocStruct lu : lst) { if (!lockedVols.contains(lu.getFileName())) { - totalBytes += lu.sizeInBytes(); + totalBytes += lu.getSizeInBytes(); lockedVols.add(lu.getFileName()); this.lus.add(lu); } @@ -196,7 +199,7 @@ public final class ExtractUnallocAction extends AbstractAction { if (bytes > 1024 && (bytes / 1024.0) <= Double.MAX_VALUE) { double Mb = ((bytes / 1024.0) / 1024.0);//Bytes -> Megabytes if (Mb <= Integer.MAX_VALUE) { - return (int) Math.floor(Mb); + return (int) Math.ceil(Mb); } } return 0; @@ -228,18 +231,21 @@ public final class ExtractUnallocAction extends AbstractAction { currentlyProcessing = u.getFile(); logger.log(Level.INFO, "Writing Unalloc file to " + currentlyProcessing.getPath()); FileOutputStream fos = new FileOutputStream(currentlyProcessing); - int count = 1; - for (LayoutFile f : u.getLayouts()) { + long bytes = 0; + int i = 0; + while(i < u.getLayouts().size() && bytes != u.getSizeInBytes()){ + LayoutFile f = u.getLayouts().get(i); long offset = 0L; - while (offset != f.getSize() && !canceled) { - offset += f.read(buf, offset, MAX_BYTES); //Offset + Bytes read - fos.write(buf); + while(offset != f.getSize() && !canceled){ if (++kbs % 128 == 0) { - mbs++; - progress.progress("processing " + mbs + " of " + totalSizeinMegs + " MBs", mbs); + mbs++; + progress.progress("processing " + mbs + " of " + totalSizeinMegs + " MBs", mbs-1); } + offset+= f.read(buf, offset, MAX_BYTES); + fos.write(buf); } - count++; + bytes+=f.getSize(); + i++; } fos.flush(); fos.close(); @@ -420,9 +426,9 @@ public final class ExtractUnallocAction extends AbstractAction { return 0; } if (o1.getId() > o2.getId()) { - return -1; - } else { return 1; + } else { + return -1; } } } @@ -434,6 +440,7 @@ public final class ExtractUnallocAction extends AbstractAction { private class UnallocStruct { private List llf; + private long SizeInBytes; private long VolumeId; private long ImageId; private String ImageName; @@ -453,6 +460,7 @@ public final class ExtractUnallocAction extends AbstractAction { this.ImageName = img.getName(); this.FileName = this.ImageName + "-Unalloc-" + this.ImageId + "-" + 0 + ".dat"; this.FileInstance = new File(Case.getCurrentCase().getCaseDirectory() + File.separator + "Export" + File.separator + this.FileName); + this.SizeInBytes = calcSizeInBytes(); } /** @@ -474,6 +482,7 @@ public final class ExtractUnallocAction extends AbstractAction { this.FileInstance = new File(Case.getCurrentCase().getCaseDirectory() + File.separator + "Export" + File.separator + this.FileName); this.llf = getUnallocFiles(volu); Collections.sort(llf, new SortObjId()); + this.SizeInBytes = calcSizeInBytes(); } //Getters @@ -481,13 +490,17 @@ public final class ExtractUnallocAction extends AbstractAction { return llf.size(); } - long sizeInBytes() { + private long calcSizeInBytes() { long size = 0L; for (LayoutFile f : llf) { size += f.getSize(); } return size; } + + long getSizeInBytes(){ + return this.SizeInBytes; + } long getVolumeId() { return this.VolumeId; From fa0409b5ab853a6b43129cd0d2868d769129e281 Mon Sep 17 00:00:00 2001 From: 0xNF Date: Tue, 11 Dec 2012 11:10:39 -0500 Subject: [PATCH 05/11] Removed unneccessary print statements --- .../sleuthkit/autopsy/directorytree/ExtractUnallocAction.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java b/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java index bcde44e8ac..01aa88b8ea 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java @@ -174,10 +174,8 @@ public final class ExtractUnallocAction extends AbstractAction { //Getting the total megs this worker is going to be doing if (!lockedVols.contains(us.getFileName())) { this.lus.add(us); - System.out.println("Size in Bytes: " + us.getSizeInBytes()); totalBytes = us.getSizeInBytes(); totalSizeinMegs = toMb(totalBytes); - System.out.println("Size in Megs: " + totalSizeinMegs); lockedVols.add(us.getFileName()); } } From d82fc6bb3afa22d1dc1764cbe9c3b6ec421d2839 Mon Sep 17 00:00:00 2001 From: Tim McIver Date: Tue, 11 Dec 2012 14:48:45 -0500 Subject: [PATCH 06/11] Updated code to reflect removal of method FsContent.getMetaFlagsInt(). --- .../datamodel/AbstractFsContentNode.java | 78 +++++++------------ 1 file changed, 30 insertions(+), 48 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java index cd64fb9c10..6e9439f40b 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java @@ -18,72 +18,62 @@ */ package org.sleuthkit.autopsy.datamodel; +import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; +import java.util.Set; import org.openide.nodes.Sheet; import org.sleuthkit.datamodel.FsContent; +import org.sleuthkit.datamodel.TskData.TSK_FS_META_FLAG_ENUM; import org.sleuthkit.datamodel.TskData.TSK_FS_META_MODE_ENUM; import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM; /** * Abstract class that implements the commonality between File and Directory * Nodes (same properties). - */ + */ public abstract class AbstractFsContentNode extends AbstractAbstractFileNode { - - // Note: this order matters for the search result, changed it if the order of property headers on the "KeywordSearchNode"changed + // Note: this order matters for the search result, changed it if the order of property headers on the "KeywordSearchNode"changed public static enum FsContentPropertyType { NAME { - @Override public String toString() { return "Name"; } }, LOCATION { - - @Override public String toString() { return "Location"; } }, MOD_TIME { - - @Override public String toString() { return "Mod. Time"; } }, CHANGED_TIME { - - @Override public String toString() { return "Change Time"; } }, ACCESS_TIME { - - @Override public String toString() { return "Access Time"; } }, CREATED_TIME { - - @Override public String toString() { return "Created Time"; } }, SIZE { - @Override public String toString() { return "Size"; @@ -96,80 +86,66 @@ public abstract class AbstractFsContentNode extends Abstrac } }, FLAGS_META { - @Override public String toString() { return "Flags(Meta)"; } }, MODE { - @Override public String toString() { return "Mode"; } }, USER_ID { - @Override public String toString() { return "UserID"; } }, GROUP_ID { - @Override + @Override public String toString() { return "GroupID"; } }, META_ADDR { - @Override public String toString() { return "Meta Addr."; } }, ATTR_ADDR { - - @Override public String toString() { return "Attr. Addr."; } }, TYPE_DIR { - - - @Override public String toString() { return "Type(Dir)"; } }, TYPE_META { - @Override public String toString() { return "Type(Meta)"; } }, KNOWN { - - @Override public String toString() { return "Known"; } }, MD5HASH { - - @Override public String toString() { return "MD5 Hash"; } - }, - } + } + } private boolean directoryBrowseMode; public static final String HIDE_PARENT = "hide_parent"; @@ -177,21 +153,21 @@ public abstract class AbstractFsContentNode extends Abstrac AbstractFsContentNode(T fsContent) { this(fsContent, true); } - - + /** * Constructor + * * @param fsContent the fsContent - * @param directoryBrowseMode how the user caused this node - * to be created: if by browsing the image contents, it is true. If by - * selecting a file filter (e.g. 'type' or 'recent'), it is false + * @param directoryBrowseMode how the user caused this node to be created: + * if by browsing the image contents, it is true. If by selecting a file + * filter (e.g. 'type' or 'recent'), it is false */ AbstractFsContentNode(T fsContent, boolean directoryBrowseMode) { super(fsContent); this.setDisplayName(AbstractFsContentNode.getFsContentName(fsContent)); this.directoryBrowseMode = directoryBrowseMode; } - + public boolean getDirectoryBrowseMode() { return directoryBrowseMode; } @@ -216,7 +192,7 @@ public abstract class AbstractFsContentNode extends Abstrac final String propString = propType.toString(); ss.put(new NodeProperty(propString, propString, NO_DESCR, map.get(propString))); } - if(directoryBrowseMode) { + if (directoryBrowseMode) { ss.put(new NodeProperty(HIDE_PARENT, HIDE_PARENT, HIDE_PARENT, HIDE_PARENT)); } @@ -225,23 +201,29 @@ public abstract class AbstractFsContentNode extends Abstrac /** * Fill map with FsContent properties - * - * @param map map with preserved ordering, where property names/values are put + * + * @param map map with preserved ordering, where property names/values are + * put * @param content to extract properties from */ public static void fillPropertyMap(Map map, FsContent content) { + + // created the dirFlag string + String dirFlagStr = content.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.ALLOC) + ? TSK_FS_NAME_FLAG_ENUM.ALLOC.toString() : TSK_FS_NAME_FLAG_ENUM.UNALLOC.toString(); + + // create the meta flag integer + int metaFlagsInt = TSK_FS_META_FLAG_ENUM.toInt(content.getMetaFlags()); - String dirFlagStr = content.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.ALLOC) ? - TSK_FS_NAME_FLAG_ENUM.ALLOC.toString() : TSK_FS_NAME_FLAG_ENUM.UNALLOC.toString(); map.put(FsContentPropertyType.NAME.toString(), getFsContentName(content)); map.put(FsContentPropertyType.LOCATION.toString(), DataConversion.getformattedPath(ContentUtils.getDisplayPath(content), 0, 1)); - map.put(FsContentPropertyType.MOD_TIME.toString(), ContentUtils.getStringTime(content.getMtime(), content)); + map.put(FsContentPropertyType.MOD_TIME.toString(), ContentUtils.getStringTime(content.getMtime(), content)); map.put(FsContentPropertyType.CHANGED_TIME.toString(), ContentUtils.getStringTime(content.getCtime(), content)); map.put(FsContentPropertyType.ACCESS_TIME.toString(), ContentUtils.getStringTime(content.getAtime(), content)); map.put(FsContentPropertyType.CREATED_TIME.toString(), ContentUtils.getStringTime(content.getCrtime(), content)); map.put(FsContentPropertyType.SIZE.toString(), content.getSize()); map.put(FsContentPropertyType.FLAGS_DIR.toString(), dirFlagStr); - map.put(FsContentPropertyType.FLAGS_META.toString(), Integer.toString(content.getMetaFlagsInt())); + map.put(FsContentPropertyType.FLAGS_META.toString(), Integer.toString(metaFlagsInt)); map.put(FsContentPropertyType.MODE.toString(), TSK_FS_META_MODE_ENUM.toString(content.getModes(), content.getMetaType())); map.put(FsContentPropertyType.USER_ID.toString(), content.getUid()); map.put(FsContentPropertyType.GROUP_ID.toString(), content.getGid()); @@ -252,12 +234,12 @@ public abstract class AbstractFsContentNode extends Abstrac map.put(FsContentPropertyType.KNOWN.toString(), content.getKnown().getName()); map.put(FsContentPropertyType.MD5HASH.toString(), content.getMd5Hash() == null ? "" : content.getMd5Hash()); } - + static String getFsContentName(FsContent fsContent) { String name = fsContent.getName(); - if(name.equals("..")) { + if (name.equals("..")) { name = DirectoryNode.DOTDOTDIR; - } else if(name.equals(".")) { + } else if (name.equals(".")) { name = DirectoryNode.DOTDIR; } return name; From 34ea07dccbbee60ef320b22982f12de4255352b6 Mon Sep 17 00:00:00 2001 From: 0xNF Date: Tue, 11 Dec 2012 17:26:35 -0500 Subject: [PATCH 07/11] File writing only writes as many bytes as were read. --- .../directorytree/ExtractUnallocAction.java | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java b/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java index 01aa88b8ea..02c7a4a1e0 100644 --- a/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java +++ b/Core/src/org/sleuthkit/autopsy/directorytree/ExtractUnallocAction.java @@ -24,6 +24,7 @@ import java.awt.event.ActionEvent; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; +import java.io.OutputStream; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -44,9 +45,9 @@ import org.sleuthkit.datamodel.ContentVisitor; import org.sleuthkit.datamodel.Directory; import org.sleuthkit.datamodel.FileSystem; import org.sleuthkit.datamodel.Image; -import org.sleuthkit.datamodel.VirtualDirectory; import org.sleuthkit.datamodel.LayoutFile; import org.sleuthkit.datamodel.TskCoreException; +import org.sleuthkit.datamodel.VirtualDirectory; import org.sleuthkit.datamodel.Volume; import org.sleuthkit.datamodel.VolumeSystem; @@ -223,30 +224,32 @@ public final class ExtractUnallocAction extends AbstractAction { //Begin the actual File IO progress.start(totalSizeinMegs); - int kbs = 0; //Each completion of the while loop adds one to kbs. 8kb * 128 = 1mb. + int kbs = 0; //Each completion of the while loop adds one to kbs. 16kb * 64 = 1mb. int mbs = 0; //Increments every 128th tick of kbs for (UnallocStruct u : this.lus) { currentlyProcessing = u.getFile(); logger.log(Level.INFO, "Writing Unalloc file to " + currentlyProcessing.getPath()); - FileOutputStream fos = new FileOutputStream(currentlyProcessing); + OutputStream dos = new FileOutputStream(currentlyProcessing); long bytes = 0; int i = 0; - while(i < u.getLayouts().size() && bytes != u.getSizeInBytes()){ + while(i < u.getLayouts().size() && bytes != u.getSizeInBytes()){ LayoutFile f = u.getLayouts().get(i); - long offset = 0L; - while(offset != f.getSize() && !canceled){ + long offsetPerFile = 0L; + int bytesRead; + while(offsetPerFile != f.getSize() && !canceled){ if (++kbs % 128 == 0) { mbs++; progress.progress("processing " + mbs + " of " + totalSizeinMegs + " MBs", mbs-1); } - offset+= f.read(buf, offset, MAX_BYTES); - fos.write(buf); + bytesRead = f.read(buf, offsetPerFile, MAX_BYTES); + offsetPerFile+= bytesRead; + dos.write(buf, 0, bytesRead); } bytes+=f.getSize(); i++; } - fos.flush(); - fos.close(); + dos.flush(); + dos.close(); if (canceled) { u.getFile().delete(); From c932cbbbc5937ef1e8b982d761dc6f529167bafb Mon Sep 17 00:00:00 2001 From: Tim McIver Date: Wed, 12 Dec 2012 17:49:56 -0500 Subject: [PATCH 08/11] Updated code to reflect changes in DataModel. --- .../autopsy/datamodel/AbstractFsContentNode.java | 13 +++---------- .../sleuthkit/autopsy/report/ReportBodyFile.java | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java index 6e9439f40b..9e576bbca1 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/AbstractFsContentNode.java @@ -207,13 +207,6 @@ public abstract class AbstractFsContentNode extends Abstrac * @param content to extract properties from */ public static void fillPropertyMap(Map map, FsContent content) { - - // created the dirFlag string - String dirFlagStr = content.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.ALLOC) - ? TSK_FS_NAME_FLAG_ENUM.ALLOC.toString() : TSK_FS_NAME_FLAG_ENUM.UNALLOC.toString(); - - // create the meta flag integer - int metaFlagsInt = TSK_FS_META_FLAG_ENUM.toInt(content.getMetaFlags()); map.put(FsContentPropertyType.NAME.toString(), getFsContentName(content)); map.put(FsContentPropertyType.LOCATION.toString(), DataConversion.getformattedPath(ContentUtils.getDisplayPath(content), 0, 1)); @@ -222,9 +215,9 @@ public abstract class AbstractFsContentNode extends Abstrac map.put(FsContentPropertyType.ACCESS_TIME.toString(), ContentUtils.getStringTime(content.getAtime(), content)); map.put(FsContentPropertyType.CREATED_TIME.toString(), ContentUtils.getStringTime(content.getCrtime(), content)); map.put(FsContentPropertyType.SIZE.toString(), content.getSize()); - map.put(FsContentPropertyType.FLAGS_DIR.toString(), dirFlagStr); - map.put(FsContentPropertyType.FLAGS_META.toString(), Integer.toString(metaFlagsInt)); - map.put(FsContentPropertyType.MODE.toString(), TSK_FS_META_MODE_ENUM.toString(content.getModes(), content.getMetaType())); + map.put(FsContentPropertyType.FLAGS_DIR.toString(), content.getDirFlagAsString()); + map.put(FsContentPropertyType.FLAGS_META.toString(), content.getMetaFlagsAsString()); + map.put(FsContentPropertyType.MODE.toString(), content.getModesAsString()); map.put(FsContentPropertyType.USER_ID.toString(), content.getUid()); map.put(FsContentPropertyType.GROUP_ID.toString(), content.getGid()); map.put(FsContentPropertyType.META_ADDR.toString(), content.getMetaAddr()); diff --git a/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java b/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java index 1034d4a6b9..1efb929315 100644 --- a/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java +++ b/Core/src/org/sleuthkit/autopsy/report/ReportBodyFile.java @@ -123,7 +123,7 @@ public class ReportBodyFile implements ReportModule { out.write("|"); out.write(Long.toString(file.getMetaAddr())); out.write("|"); - String modeString = TSK_FS_META_MODE_ENUM.toString(file.getModes(), file.getMetaType()); + String modeString = file.getModesAsString(); if(modeString != null) { out.write(modeString); } From f100a40f4f133af06e6c59db807825b150366f56 Mon Sep 17 00:00:00 2001 From: Tim McIver Date: Fri, 14 Dec 2012 15:08:41 -0500 Subject: [PATCH 09/11] Updated the HTMLEditorKit used by JTextPane in ExtractedContentPanel so that strings of characters that are too long to fit into the view port are properly wrapped. These changes satisfy the requirements of AUT-698. --- KeywordSearch/nbproject/genfiles.properties | 2 +- .../keywordsearch/ExtractedContentPanel.java | 67 +++++++++++++------ RecentActivity/nbproject/genfiles.properties | 4 +- 3 files changed, 48 insertions(+), 25 deletions(-) diff --git a/KeywordSearch/nbproject/genfiles.properties b/KeywordSearch/nbproject/genfiles.properties index 97886535c8..79d78fbb4b 100644 --- a/KeywordSearch/nbproject/genfiles.properties +++ b/KeywordSearch/nbproject/genfiles.properties @@ -3,6 +3,6 @@ build.xml.script.CRC32=87b97b04 build.xml.stylesheet.CRC32=a56c6a5b@1.46.2 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=8f39548f +nbproject/build-impl.xml.data.CRC32=8af8eb1a nbproject/build-impl.xml.script.CRC32=fe1f48d2 nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.50.1 diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java index b9894f83f5..1764f60bbd 100644 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/ExtractedContentPanel.java @@ -25,17 +25,15 @@ import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.util.ArrayList; import java.util.List; -import java.util.logging.Level; import org.sleuthkit.autopsy.coreutils.Logger; import javax.swing.JMenuItem; +import javax.swing.SizeRequirements; import javax.swing.SwingWorker; -import javax.swing.text.AbstractDocument; -import javax.swing.text.AttributeSet; import javax.swing.text.Element; -import javax.swing.text.StyleConstants; import javax.swing.text.View; import javax.swing.text.ViewFactory; -import javax.swing.text.html.HTML; +import javax.swing.text.html.InlineView; +import javax.swing.text.html.ParagraphView; import javax.swing.text.html.HTMLEditorKit; import javax.swing.text.html.HTMLEditorKit.HTMLFactory; import org.netbeans.api.progress.ProgressHandle; @@ -62,25 +60,50 @@ class ExtractedContentPanel extends javax.swing.JPanel { private void customizeComponents() { extractedTextPane.setEditorKit(new HTMLEditorKit() { - ViewFactory viewFactory = new HTMLFactory() { - @Override - public View create(Element elem) { - AttributeSet attrs = elem.getAttributes(); - Object elementName = attrs.getAttribute(AbstractDocument.ElementNameAttribute); - Object o = (elementName != null) ? null : attrs.getAttribute(StyleConstants.NameAttribute); - if (o instanceof HTML.Tag) { - HTML.Tag kind = (HTML.Tag) o; - if (kind == HTML.Tag.IMPLIED) { - return new javax.swing.text.html.ParagraphView(elem); - } - } - return super.create(elem); - } - }; - @Override public ViewFactory getViewFactory() { - return this.viewFactory; + + return new HTMLFactory() { + public View create(Element e) { + View v = super.create(e); + if (v instanceof InlineView) { + return new InlineView(e) { + public int getBreakWeight(int axis, float pos, float len) { + return GoodBreakWeight; + } + + public View breakView(int axis, int p0, float pos, float len) { + if (axis == View.X_AXIS) { + checkPainter(); + int p1 = getGlyphPainter().getBoundedPosition(this, p0, pos, len); + if (p0 == getStartOffset() && p1 == getEndOffset()) { + return this; + } + return createFragment(p0, p1); + } + return this; + } + }; + } else if (v instanceof ParagraphView) { + return new ParagraphView(e) { + protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) { + if (r == null) { + r = new SizeRequirements(); + } + float pref = layoutPool.getPreferredSpan(axis); + float min = layoutPool.getMinimumSpan(axis); + // Don't include insets, Box.getXXXSpan will include them. + r.minimum = (int) min; + r.preferred = Math.max(r.minimum, (int) pref); + r.maximum = Integer.MAX_VALUE; + r.alignment = 0.5f; + return r; + } + }; + } + return v; + } + }; } }); diff --git a/RecentActivity/nbproject/genfiles.properties b/RecentActivity/nbproject/genfiles.properties index fe69d96298..69ec9bf285 100644 --- a/RecentActivity/nbproject/genfiles.properties +++ b/RecentActivity/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=bcfe7e87 +build.xml.data.CRC32=11199bf7 build.xml.script.CRC32=d323407a build.xml.stylesheet.CRC32=a56c6a5b@2.50.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=bcfe7e87 +nbproject/build-impl.xml.data.CRC32=11199bf7 nbproject/build-impl.xml.script.CRC32=aef16a21 nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.50.1 From 8a2f329fd2cdd9a5399f0328f168539a98c73882 Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Mon, 17 Dec 2012 17:08:53 -0500 Subject: [PATCH 10/11] Made hash db messages have error or warning in front of them to draw more attention --- .../src/org/sleuthkit/autopsy/hashdatabase/IndexStatus.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/IndexStatus.java b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/IndexStatus.java index b29fd237e9..cf02a9f326 100644 --- a/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/IndexStatus.java +++ b/HashDatabase/src/org/sleuthkit/autopsy/hashdatabase/IndexStatus.java @@ -28,7 +28,7 @@ enum IndexStatus { /** * The index and database both exist, and the index is older. */ - INDEX_OUTDATED("Index is older than database"), + INDEX_OUTDATED("WARNING: Index is older than database"), /** * The index and database both exist, and the index is not older. */ @@ -40,11 +40,11 @@ enum IndexStatus { /** * The database exists but the index does not. */ - NO_INDEX("Index does not exist"), + NO_INDEX("ERROR: Index does not exist"), /** * Neither the index nor the database exists. */ - NONE("No index or database"), + NONE("ERROR: No index or database"), /** * The index is currently being generated */ From baaf8cbec9bea1fc2d062ee868e7621ca970cc77 Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Tue, 18 Dec 2012 16:45:16 -0500 Subject: [PATCH 11/11] Updated log message to record each file and added last priority status for non-file files --- .../autopsy/ingest/IngestManager.java | 5 ++-- .../autopsy/ingest/IngestScheduler.java | 27 +++++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java index df0aec6e8d..2ce44b0003 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestManager.java @@ -814,8 +814,7 @@ public class IngestManager { final AbstractFile fileToProcess = fileTask.file; - //logger.log(Level.INFO, "NEXT FILE: " + fileToProcess.getName()); - + logger.log(Level.INFO, "IngestManager: Processing: {0}", fileToProcess.getName()); progress.progress(fileToProcess.getName(), processedFiles); for (IngestModuleAbstractFile module : fileTask.scheduledTask.modules) { @@ -857,7 +856,7 @@ public class IngestManager { //--totalEnqueuedFiles; } //end of this AbstractFile - logger.log(Level.INFO, "Done background processing"); + logger.log(Level.INFO, "IngestManager: Finished processing files"); return null; } diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestScheduler.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestScheduler.java index 482fdd9762..bc506eef97 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestScheduler.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestScheduler.java @@ -663,21 +663,31 @@ class IngestScheduler { enum Priority { - LOW, MEDIUM, HIGH + LAST, LOW, MEDIUM, HIGH }; + static final List LAST_PRI_PATHS = new ArrayList(); static final List LOW_PRI_PATHS = new ArrayList(); static final List MEDIUM_PRI_PATHS = new ArrayList(); static final List HIGH_PRI_PATHS = new ArrayList(); + /* prioritize root directory folders based on the assumption that we are + * looking for user content. Other types of investigations may want different + * priorities. */ static { + // these files have no structure, so they go last + LAST_PRI_PATHS.add(Pattern.compile("^\\$Unalloc", Pattern.CASE_INSENSITIVE)); + LAST_PRI_PATHS.add(Pattern.compile("^pagefile", Pattern.CASE_INSENSITIVE)); + LAST_PRI_PATHS.add(Pattern.compile("^hiberfil", Pattern.CASE_INSENSITIVE)); + + // orphan files are often corrupt and windows does not typically have + // user content, so put them towards the bottom + LOW_PRI_PATHS.add(Pattern.compile("^\\$OrphanFiles", Pattern.CASE_INSENSITIVE)); LOW_PRI_PATHS.add(Pattern.compile("^Windows", Pattern.CASE_INSENSITIVE)); + // all other files go into the medium category too MEDIUM_PRI_PATHS.add(Pattern.compile("^Program Files", Pattern.CASE_INSENSITIVE)); - MEDIUM_PRI_PATHS.add(Pattern.compile("^\\$OrphanFiles", Pattern.CASE_INSENSITIVE)); - MEDIUM_PRI_PATHS.add(Pattern.compile("^\\$Unalloc", Pattern.CASE_INSENSITIVE)); - MEDIUM_PRI_PATHS.add(Pattern.compile("^pagefile", Pattern.CASE_INSENSITIVE)); - MEDIUM_PRI_PATHS.add(Pattern.compile("^hiberfil", Pattern.CASE_INSENSITIVE)); + // user content is top priority HIGH_PRI_PATHS.add(Pattern.compile("^Users", Pattern.CASE_INSENSITIVE)); HIGH_PRI_PATHS.add(Pattern.compile("^Documents and Settings", Pattern.CASE_INSENSITIVE)); HIGH_PRI_PATHS.add(Pattern.compile("^home", Pattern.CASE_INSENSITIVE)); @@ -715,6 +725,13 @@ class IngestScheduler { return AbstractFilePriotity.Priority.LOW; } } + + for (Pattern p : LAST_PRI_PATHS) { + Matcher m = p.matcher(path); + if (m.find()) { + return AbstractFilePriotity.Priority.LAST; + } + } //default is medium return AbstractFilePriotity.Priority.MEDIUM;