Skip to content
Snippets Groups Projects
Commit d7f3d862 authored by Sean-M's avatar Sean-M
Browse files

Updated CPPtoJavaCompare, now works properly

parent 0be10e42
Branches
Tags
No related merge requests found
...@@ -121,7 +121,7 @@ public FileWriter traverse(SleuthkitCase sk, String path) { ...@@ -121,7 +121,7 @@ public FileWriter traverse(SleuthkitCase sk, String path) {
private void tskTraverse(List<Content> lc, Appendable reslt) { private void tskTraverse(List<Content> lc, Appendable reslt) {
for (Content c : lc) { for (Content c : lc) {
try { try {
if (c instanceof FsContent) { if (c instanceof FsContent && !c.getUniquePath().endsWith(".") && !c.getUniquePath().endsWith("/")) {
try { try {
reslt.append(DataModelTestSuite.getFsCData((FsContent) c)); reslt.append(DataModelTestSuite.getFsCData((FsContent) c));
reslt.append("\n"); reslt.append("\n");
......
...@@ -201,7 +201,6 @@ private static void getTSKData(String standardPath, List<String> img) { ...@@ -201,7 +201,6 @@ private static void getTSKData(String standardPath, List<String> img) {
Scanner read = new Scanner(p.getInputStream()); Scanner read = new Scanner(p.getInputStream());
Scanner error1 = new Scanner(p.getErrorStream()); Scanner error1 = new Scanner(p.getErrorStream());
FileWriter out = new FileWriter(standardPath); FileWriter out = new FileWriter(standardPath);
read.nextLine();
while (read.hasNextLine()) { while (read.hasNextLine()) {
String line = read.nextLine(); String line = read.nextLine();
line = line.replace(" (deleted)", ""); line = line.replace(" (deleted)", "");
...@@ -393,7 +392,7 @@ protected static String getFsCData(FsContent fi) throws TskCoreException { ...@@ -393,7 +392,7 @@ protected static String getFsCData(FsContent fi) throws TskCoreException {
if (fi.isVirtual() && !fi.isDir()) { if (fi.isVirtual() && !fi.isDir()) {
prpnd = "v/"; prpnd = "v/";
} }
return ("0|" + name + "|" + fi.metaAddr + "|" + prpnd + fi.getModesAsString() + "|0|0|" + fi.getSize() + "|" + fi.getAtime() + "|" + fi.getMtime() + "|" + fi.getCtime() + "|" + fi.getCrtime()); return ("0|" + name + "|" + fi.metaAddr + "|" + prpnd + fi.getModesAsString() + "|" + fi.getUid() + "|0|" + fi.getSize() + "|" + fi.getAtime() + "|" + fi.getMtime() + "|" + fi.getCtime() + "|" + fi.getCrtime());
} }
/** /**
...@@ -421,7 +420,6 @@ public boolean accept(java.io.File f) { ...@@ -421,7 +420,6 @@ public boolean accept(java.io.File f) {
for (ImgTraverser tstrn : tests) { for (ImgTraverser tstrn : tests) {
String standardPath = DataModelTestSuite.standardPath(paths, tstrn.getClass().getSimpleName()); String standardPath = DataModelTestSuite.standardPath(paths, tstrn.getClass().getSimpleName());
System.out.println("Creating " + tstrn.getClass().getSimpleName() + " standard for: " + paths.get(0)); System.out.println("Creating " + tstrn.getClass().getSimpleName() + " standard for: " + paths.get(0));
String exFile = standardPath.replace(".txt", DataModelTestSuite.EX + ".txt");
DataModelTestSuite.createStandard(standardPath, tempDirPath, paths, tstrn); DataModelTestSuite.createStandard(standardPath, tempDirPath, paths, tstrn);
} }
String standardPathCPP = DataModelTestSuite.standardPath(paths, CPPtoJavaCompare.class.getSimpleName()); String standardPathCPP = DataModelTestSuite.standardPath(paths, CPPtoJavaCompare.class.getSimpleName());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment