Autopsy  4.19.3
Graphical digital forensics platform for The Sleuth Kit and other tools.
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer Class Reference


Public Member Functions

synchronized void close () throws Exception
synchronized DomainCategory getCategory (String domain, String host) throws DomainCategorizerException
synchronized void initialize () throws DomainCategorizerException

Private Member Functions

synchronized boolean isInitialized ()

Static Private Member Functions

static void addItem (Map< String, String > mapping, String line, int lineNumber)
static Map< String, String > loadMapping () throws IOException

Private Attributes

Map< String, String > mapping = null

Static Private Attributes

static final String COMMENT_PREFIX = "#"
static final String CSV_DELIMITER = ","
static final String DOMAIN_TYPE_CSV = "default_domain_categories.csv"
static final Logger logger = Logger.getLogger(DefaultDomainCategorizer.class.getName())

Detailed Description

The default domain category provider that makes use of the default csv resource. This implementation is used if no other DomainCategorizer can determine a category for a host/domain entry.

CSV entries describing these domain types are compiled from sources. webmail: disposable mail: messaging:

NOTE: The (at)SuppressWarnings("try") on the class is to suppress warnings relating to the fact that the close method can throw an InterruptedException since Exception can encompass the InterruptedException. See the following github issue and bugs for more information:,,

Definition at line 57 of file

Member Function Documentation

static void org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.addItem ( Map< String, String >  mapping,
String  line,
int  lineNumber 

Adds a mapping of domain suffix to category based on the csv line found in the file.

mappingThe suffix to category mapping.
lineThe line to be parsed.
lineNumberThe line number of this csv line.

Definition at line 98 of file

synchronized void org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.close ( ) throws Exception

These providers close methods are explicitly called when ingest is finished. Conceivably, the same instance of this class may have this method called multiple times and should handle that possibility gracefully.



Definition at line 181 of file

synchronized DomainCategory org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.getCategory ( String  domain,
String  host 
) throws DomainCategorizerException

Provides the DomainCategory for a given domain/host or null if none can be determined.

domainThe domain of the url.
hostThe host of the url.
The domain category if the domain/host combination was found or null if not.


Definition at line 154 of file

synchronized void org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.initialize ( ) throws DomainCategorizerException

Initializes this provider in preparation to handle 'getCategory' requests during ingest. Conceivably, the same instance of this class may have this called multiple times and should handle that possibility gracefully.



Definition at line 132 of file

synchronized boolean org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.isInitialized ( )

Returns true if this categorizer is properly initialized.

True if this categorizer is properly initialized.

Definition at line 149 of file

static Map<String, String> org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.loadMapping ( ) throws IOException

Loads the domain suffixes from the csv resource file into a mapping of domain suffix to category name.

The mapping.

Definition at line 71 of file

Member Data Documentation

final String org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.COMMENT_PREFIX = "#"

Definition at line 59 of file

final String org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.CSV_DELIMITER = ","

Definition at line 60 of file

final String org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.DOMAIN_TYPE_CSV = "default_domain_categories.csv"

Definition at line 61 of file

final Logger org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.logger = Logger.getLogger(DefaultDomainCategorizer.class.getName())

Definition at line 62 of file

Map<String, String> org.sleuthkit.autopsy.recentactivity.DefaultDomainCategorizer.mapping = null

Definition at line 129 of file

The documentation for this class was generated from the following file:

Copyright © 2012-2022 Basis Technology. Generated on: Sun Sep 25 2022
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.