diff --git a/src/core/Utils.mjs b/src/core/Utils.mjs index 787ef270..18b0e688 100755 --- a/src/core/Utils.mjs +++ b/src/core/Utils.mjs @@ -892,6 +892,23 @@ class Utils { } + /** + * Converts a string to it's title case equivalent. + * + * @param {string} str + * @returns string + * + * @example + * // return "A Tiny String" + * Utils.toTitleCase("a tIny String"); + */ + static toTitleCase(str) { + return str.replace(/\w\S*/g, function(txt) { + return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); + }); + } + + /** * Encodes a URI fragment (#) or query (?) using a minimal amount of percent-encoding. * diff --git a/src/core/operations/CTPH.mjs b/src/core/operations/CTPH.mjs index 7394faaa..6b6a487d 100644 --- a/src/core/operations/CTPH.mjs +++ b/src/core/operations/CTPH.mjs @@ -21,7 +21,7 @@ class CTPH extends Operation { this.name = "CTPH"; this.module = "Crypto"; this.description = "Context Triggered Piecewise Hashing, also called Fuzzy Hashing, can match inputs that have homologies. Such inputs have sequences of identical bytes in the same order, although bytes in between these sequences may be different in both content and length.

CTPH was originally based on the work of Dr. Andrew Tridgell and a spam email detector called SpamSum. This method was adapted by Jesse Kornblum and published at the DFRWS conference in 2006 in a paper 'Identifying Almost Identical Files Using Context Triggered Piecewise Hashing'."; - this.infoURL = "https://forensicswiki.xyz/wiki/index.php?title=Context_Triggered_Piecewise_Hashing"; + this.infoURL = "https://forensics.wiki/context_triggered_piecewise_hashing/"; this.inputType = "string"; this.outputType = "string"; this.args = []; diff --git a/src/core/operations/CompareCTPHHashes.mjs b/src/core/operations/CompareCTPHHashes.mjs index 40fec472..91956220 100644 --- a/src/core/operations/CompareCTPHHashes.mjs +++ b/src/core/operations/CompareCTPHHashes.mjs @@ -24,7 +24,7 @@ class CompareCTPHHashes extends Operation { this.name = "Compare CTPH hashes"; this.module = "Crypto"; this.description = "Compares two Context Triggered Piecewise Hashing (CTPH) fuzzy hashes to determine the similarity between them on a scale of 0 to 100."; - this.infoURL = "https://forensicswiki.xyz/wiki/index.php?title=Context_Triggered_Piecewise_Hashing"; + this.infoURL = "https://forensics.wiki/context_triggered_piecewise_hashing/"; this.inputType = "string"; this.outputType = "Number"; this.args = [ diff --git a/src/core/operations/CompareSSDEEPHashes.mjs b/src/core/operations/CompareSSDEEPHashes.mjs index 806b048e..9937d7e6 100644 --- a/src/core/operations/CompareSSDEEPHashes.mjs +++ b/src/core/operations/CompareSSDEEPHashes.mjs @@ -24,7 +24,7 @@ class CompareSSDEEPHashes extends Operation { this.name = "Compare SSDEEP hashes"; this.module = "Crypto"; this.description = "Compares two SSDEEP fuzzy hashes to determine the similarity between them on a scale of 0 to 100."; - this.infoURL = "https://forensicswiki.xyz/wiki/index.php?title=Ssdeep"; + this.infoURL = "https://forensics.wiki/ssdeep/"; this.inputType = "string"; this.outputType = "Number"; this.args = [ diff --git a/src/core/operations/SSDEEP.mjs b/src/core/operations/SSDEEP.mjs index df1557d5..6a76a68b 100644 --- a/src/core/operations/SSDEEP.mjs +++ b/src/core/operations/SSDEEP.mjs @@ -21,7 +21,7 @@ class SSDEEP extends Operation { this.name = "SSDEEP"; this.module = "Crypto"; this.description = "SSDEEP is a program for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies. Such inputs have sequences of identical bytes in the same order, although bytes in between these sequences may be different in both content and length.

SSDEEP hashes are now widely used for simple identification purposes (e.g. the 'Basic Properties' section in VirusTotal). Although 'better' fuzzy hashes are available, SSDEEP is still one of the primary choices because of its speed and being a de facto standard.

This operation is fundamentally the same as the CTPH operation, however their outputs differ in format."; - this.infoURL = "https://forensicswiki.xyz/wiki/index.php?title=Ssdeep"; + this.infoURL = "https://forensics.wiki/ssdeep"; this.inputType = "string"; this.outputType = "string"; this.args = []; diff --git a/src/web/HTMLOperation.mjs b/src/web/HTMLOperation.mjs index d0523aa4..ae61b58d 100755 --- a/src/web/HTMLOperation.mjs +++ b/src/web/HTMLOperation.mjs @@ -157,9 +157,9 @@ function titleFromWikiLink(urlStr) { pageTitle = ""; switch (urlObj.host) { - case "forensicswiki.xyz": + case "forensics.wiki": wikiName = "Forensics Wiki"; - pageTitle = urlObj.query.substr(6).replace(/_/g, " "); // Chop off 'title=' + pageTitle = Utils.toTitleCase(urlObj.path.replace(/\//g, "").replace(/_/g, " ")); break; case "wikipedia.org": wikiName = "Wikipedia";