diff --git a/API-CHANGES.txt b/API-CHANGES.txt index 10748cc200..05ec33a1d8 100644 --- a/API-CHANGES.txt +++ b/API-CHANGES.txt @@ -3,5 +3,3 @@ Changes to make to API when we are ready to make backward incompatible changes: - HTMLReport has special API for more context on columns and special handling in REportGenerator. Change all reports to the new API. - Content.getUniquePath() should not thrown TskException. We should deal with it in the method. - Make the list of events that Case fires off to be part of an enum to group them together (like IngestManager does). -- Sub-modules in RecentActivity have a bunch of public/protected variables that do not need to be. (i.e. ExtractRegistry.rrFullFound). -- Delete BrowserType enum and BrowserActivityType in RecentActivity. diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/BrowserActivityType.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/BrowserActivityType.java deleted file mode 100644 index a54977273a..0000000000 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/BrowserActivityType.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2012 Basis Technology Corp. - * Contact: carrier sleuthkit org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.sleuthkit.autopsy.recentactivity; - -import java.util.EnumSet; -import java.util.HashMap; -import java.util.Map; - -/** - * - * No one seems to be using this - */ -@Deprecated -public enum BrowserActivityType { - Cookies(0), - Url(1), - Bookmarks(2); - private static final Map lookup - = new HashMap(); - - static { - for(BrowserActivityType bat : values()) - lookup.put(bat.type, bat); - } - - - private int type; - - private BrowserActivityType(int type) - { - this.type = type; - } - - public int getType() { return type; } - - public static BrowserActivityType get(int type) { - switch(type) { - case 0: return Cookies; - case 1: return Url; - case 2: return Bookmarks; - } - return null; - } - -} diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/BrowserType.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/BrowserType.java deleted file mode 100644 index ebdf41f48d..0000000000 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/BrowserType.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2012 Basis Technology Corp. - * Contact: carrier sleuthkit org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.sleuthkit.autopsy.recentactivity; - -import java.util.HashMap; -import java.util.Map; - -/** - * - * No one is using this. It should go away - */ -@Deprecated -public enum BrowserType { - IE(0), //Internet Explorer - FF(1), //Firefox - CH(2); //Chrome - private static final Map lookup - = new HashMap(); - - static { - for(BrowserType bt : values()) - lookup.put(bt.type, bt); - } - - - private int type; - - private BrowserType(int type) - { - this.type = type; - } - - public int getType() { return type; } - - public static BrowserType get(int type) { - switch(type) { - case 0: return IE; - case 1: return FF; - case 2: return CH; - } - return null; - } - -} diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Chrome.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Chrome.java index 5868c44146..100d3a9322 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Chrome.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Chrome.java @@ -55,7 +55,7 @@ import org.sleuthkit.datamodel.TskData; /** * Chrome recent activity extraction */ -public class Chrome extends Extract { +class Chrome extends Extract { private static final String historyQuery = "SELECT urls.url, urls.title, urls.visit_count, urls.typed_count, " + "last_visit_time, urls.hidden, visits.visit_time, (SELECT urls.url FROM urls WHERE urls.id=visits.url) as from_visit, visits.transition FROM urls, visits WHERE urls.id = visits.url"; @@ -65,8 +65,8 @@ public class Chrome extends Extract { private static final String downloadQueryVersion30 = "SELECT current_path as full_path, url, start_time, received_bytes FROM downloads, downloads_url_chains WHERE downloads.id=downloads_url_chains.id"; private static final String loginQuery = "select origin_url, username_value, signon_realm from logins"; private final Logger logger = Logger.getLogger(this.getClass().getName()); - public int ChromeCount = 0; - final public static String MODULE_VERSION = "1.0"; + private int ChromeCount = 0; + final private static String MODULE_VERSION = "1.0"; private IngestServices services; //hide public constructor to prevent from instantiation by ingest module loader diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Extract.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Extract.java index 8f3bce5716..66a628f389 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Extract.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Extract.java @@ -33,14 +33,14 @@ import org.sleuthkit.autopsy.ingest.IngestModuleDataSource; import org.sleuthkit.autopsy.report.SQLiteDBConnect; import org.sleuthkit.datamodel.*; -abstract public class Extract extends IngestModuleDataSource{ +abstract class Extract extends IngestModuleDataSource{ protected Case currentCase = Case.getCurrentCase(); // get the most updated case protected SleuthkitCase tskCase = currentCase.getSleuthkitCase(); public final Logger logger = Logger.getLogger(this.getClass().getName()); - protected final ArrayList errorMessages = new ArrayList<>(); - protected String moduleName = ""; - protected boolean dataFound = false; + private final ArrayList errorMessages = new ArrayList<>(); + String moduleName = ""; + boolean dataFound = false; //hide public constructor to prevent from instantiation by ingest module loader Extract() { diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java index 8edf90a654..570d14b5cf 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractIE.java @@ -68,7 +68,7 @@ import org.sleuthkit.autopsy.ingest.IngestModuleDataSource; import org.sleuthkit.autopsy.ingest.IngestModuleInit; import org.sleuthkit.datamodel.*; -public class ExtractIE extends Extract { +class ExtractIE extends Extract { private static final Logger logger = Logger.getLogger(ExtractIE.class.getName()); private IngestServices services; @@ -77,7 +77,7 @@ public class ExtractIE extends Extract { private String PASCO_LIB_PATH; private String JAVA_PATH; - final public static String MODULE_VERSION = "1.0"; + final private static String MODULE_VERSION = "1.0"; private static final SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); private ExecUtil execPasco; diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java index 8b0c89ade8..49da26db4f 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractRegistry.java @@ -57,14 +57,14 @@ import org.xml.sax.SAXException; * and the second is a set that were customized for Autopsy to produce a more structured * output of XML so that we can parse and turn into blackboard artifacts. */ -public class ExtractRegistry extends Extract { +class ExtractRegistry extends Extract { - public Logger logger = Logger.getLogger(this.getClass().getName()); + private Logger logger = Logger.getLogger(this.getClass().getName()); private String RR_PATH; private String RR_FULL_PATH; - boolean rrFound = false; // true if we found the Autopsy-specific version of regripper - boolean rrFullFound = false; // true if we found the full version of regripper - final public static String MODULE_VERSION = "1.0"; + private boolean rrFound = false; // true if we found the Autopsy-specific version of regripper + private boolean rrFullFound = false; // true if we found the full version of regripper + final private static String MODULE_VERSION = "1.0"; private ExecUtil execRR; //hide public constructor to prevent from instantiation by ingest module loader diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractUSB.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractUSB.java index ca5e5bfb6b..41c605df4c 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractUSB.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/ExtractUSB.java @@ -40,7 +40,7 @@ import org.sleuthkit.autopsy.coreutils.PlatformUtil; * Loads a file that maps USB IDs to names of makes and models. Uses Linux USB info. * This should be renamed because it isn't extracting. It's just mapping IDs to names. */ -public class ExtractUSB { +class ExtractUSB { private static final Logger logger = Logger.getLogger(ExtractUSB.class.getName()); private HashMap devices; private static final String DataFile = "USB_DATA.txt"; diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Firefox.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Firefox.java index 90925e4f5a..e5e4967525 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Firefox.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Firefox.java @@ -50,7 +50,7 @@ import org.sleuthkit.datamodel.TskCoreException; /** * Firefox recent activity extraction */ -public class Firefox extends Extract { +class Firefox extends Extract { private static final String historyQuery = "SELECT moz_historyvisits.id,url,title,visit_count,(visit_date/1000000) as visit_date,from_visit,(SELECT url FROM moz_places WHERE id=moz_historyvisits.from_visit) as ref FROM moz_places, moz_historyvisits WHERE moz_places.id = moz_historyvisits.place_id AND hidden = 0"; private static final String cookieQuery = "SELECT name,value,host,expiry,(lastAccessed/1000000) as lastAccessed,(creationTime/1000000) as creationTime FROM moz_cookies"; @@ -59,8 +59,7 @@ public class Firefox extends Extract { private static final String downloadQuery = "SELECT target, source,(startTime/1000000) as startTime, maxBytes FROM moz_downloads"; private static final String downloadQueryVersion24 = "SELECT url, content as target, (lastModified/1000000) as lastModified FROM moz_places, moz_annos WHERE moz_places.id = moz_annos.place_id AND moz_annos.anno_attribute_id = 3"; - public int FireFoxCount = 0; - final public static String MODULE_VERSION = "1.0"; + final private static String MODULE_VERSION = "1.0"; private IngestServices services; //hide public constructor to prevent from instantiation by ingest module loader diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java index 13d6827cc6..c5565bc3c8 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java @@ -51,7 +51,7 @@ public final class RAImageIngestModule extends IngestModuleDataSource { private StringBuilder subCompleted = new StringBuilder(); private ArrayList modules; private List browserModules; - final public static String MODULE_VERSION = Version.getVersion(); + final private static String MODULE_VERSION = Version.getVersion(); //public constructor is required //as multiple instances are created for processing multiple images simultenously diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/SearchEngineURLQueryAnalyzer.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/SearchEngineURLQueryAnalyzer.java index 6e9a11a85c..4477271dd9 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/SearchEngineURLQueryAnalyzer.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/SearchEngineURLQueryAnalyzer.java @@ -62,14 +62,14 @@ import org.xml.sax.SAXException; * To add search engines, edit SearchEngines.xml under RecentActivity * */ -public class SearchEngineURLQueryAnalyzer extends Extract { +class SearchEngineURLQueryAnalyzer extends Extract { private IngestServices services; - public static final String MODULE_NAME = "Search Engine URL Query Analyzer"; - public final static String MODULE_VERSION = "1.0"; + private static final String MODULE_NAME = "Search Engine URL Query Analyzer"; + private final static String MODULE_VERSION = "1.0"; - public static final String XMLFILE = "SEUQAMappings.xml"; + private static final String XMLFILE = "SEUQAMappings.xml"; private static final String XSDFILE = "SearchEngineSchema.xsd"; diff --git a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Util.java b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Util.java index 12ba3dca43..c5346df9b1 100644 --- a/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Util.java +++ b/RecentActivity/src/org/sleuthkit/autopsy/recentactivity/Util.java @@ -50,7 +50,7 @@ import org.sleuthkit.datamodel.TskCoreException; * * @author Alex */ -public class Util { +class Util { private static Logger logger = Logger.getLogger(Util.class.getName());