From 7ed0f9dddde116d0dd097250a822abf6d4bf04a2 Mon Sep 17 00:00:00 2001 From: Alex Ebadirad Date: Thu, 2 Feb 2012 13:22:57 -0700 Subject: [PATCH 1/3] Small bug fix to IE, resulting in lingering pascoresult.txt file Signed-off-by: Alex Ebadirad --- .../autopsy/recentactivity/ExtractIE.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java index bd1e6fc9f3..81f9e248a9 100755 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java @@ -138,7 +138,7 @@ public class ExtractIE { // implements BrowserActivity { logger.log(Level.INFO, "Error while trying to write index.dat file " + datFile.getAbsolutePath(), e); } - boolean bPascProcSuccess = executePasco(temps, index, index); + boolean bPascProcSuccess = executePasco(temps, index); //At this point pasco2 proccessed the index files. //Now fetch the results, parse them and the delete the files. @@ -157,7 +157,7 @@ public class ExtractIE { // implements BrowserActivity { //Simple wrapper to JavaSystemCaller.Exec() to execute pasco2 jar // TODO: Hardcoded command args/path needs to be removed. Maybe set some constants and set env variables for classpath // I'm not happy with this code. Can't stand making a system call, is not an acceptable solution but is a hack for now. - private boolean executePasco(String indexFilePath, int fileIndex, long bbId) { + private boolean executePasco(String indexFilePath, int fileIndex) { if (pascoFound == false) return false; boolean success = true; @@ -170,8 +170,8 @@ public class ExtractIE { // implements BrowserActivity { command.add(" isi.pasco2.Main"); command.add(" -T history"); command.add("\"" + indexFilePath + "\""); - //command.add(" > " + PASCO_RESULTS_PATH + "\\pasco2Result" + Integer.toString(fileIndex) + ".txt"); - command.add(" > " + "\"" + PASCO_RESULTS_PATH + File.separator + Long.toString(bbId) + "\""); + command.add(" > " + PASCO_RESULTS_PATH + "\\pasco2Result" + Integer.toString(fileIndex) + ".txt"); + // command.add(" > " + "\"" + PASCO_RESULTS_PATH + File.separator + Long.toString(bbId) + "\""); String[] cmd = command.toArray(new String[0]); JavaSystemCaller.Exec.execute("java", cmd); @@ -202,7 +202,7 @@ public class ExtractIE { // implements BrowserActivity { if (pascoFiles.length > 0) { try { for (File file : pascoFiles) { - String bbartname = file.getName(); + // String bbartname = file.getName(); //bbartname = bbartname.substring(0, 4); // Make sure the file the is not empty or the Scanner will @@ -213,10 +213,10 @@ public class ExtractIE { // implements BrowserActivity { fileScanner.nextLine(); fileScanner.nextLine(); fileScanner.nextLine(); - long inIndexId = 0; + // long inIndexId = 0; while (fileScanner.hasNext()) { - long bbartId = Long.parseLong(bbartname + inIndexId++); + //long bbartId = Long.parseLong(bbartname + inIndexId++); String line = fileScanner.nextLine(); From c86e7901d793bc02ff85a2964c6c4594385e1bf2 Mon Sep 17 00:00:00 2001 From: Alex Ebadirad Date: Thu, 2 Feb 2012 14:03:33 -0700 Subject: [PATCH 2/3] Added quotes around pasco lib path Signed-off-by: Alex Ebadirad --- .../src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java | 1 - 1 file changed, 1 deletion(-) diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java index 81f9e248a9..20ec7f030c 100755 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java @@ -19,7 +19,6 @@ package org.sleuthkit.autopsy.recentactivity; //IO imports -import com.sun.corba.se.spi.activation.Server; import java.io.File; import java.io.FileInputStream; import java.io.IOException; From 80386bb3bdd9805f7e33517a366e5fa546d56c04 Mon Sep 17 00:00:00 2001 From: Alex Ebadirad Date: Thu, 2 Feb 2012 14:39:22 -0700 Subject: [PATCH 3/3] Fixed for real. Signed-off-by: Alex Ebadirad --- .../src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java index 20ec7f030c..626fd119ec 100755 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java @@ -169,7 +169,7 @@ public class ExtractIE { // implements BrowserActivity { command.add(" isi.pasco2.Main"); command.add(" -T history"); command.add("\"" + indexFilePath + "\""); - command.add(" > " + PASCO_RESULTS_PATH + "\\pasco2Result" + Integer.toString(fileIndex) + ".txt"); + command.add(" > \"" + PASCO_RESULTS_PATH + "\\pasco2Result" + Integer.toString(fileIndex) + ".txt\""); // command.add(" > " + "\"" + PASCO_RESULTS_PATH + File.separator + Long.toString(bbId) + "\""); String[] cmd = command.toArray(new String[0]);