Skip to content

Commit 91639ee

Browse files
authored
Merge pull request #1703 from gchq/feature/update-forensic-wiki-address
Update forensics wiki address
2 parents a045c4f + b78533b commit 91639ee

File tree

6 files changed

+23
-6
lines changed

6 files changed

+23
-6
lines changed

src/core/Utils.mjs

+17
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,23 @@ class Utils {
892892
}
893893

894894

895+
/**
896+
* Converts a string to it's title case equivalent.
897+
*
898+
* @param {string} str
899+
* @returns string
900+
*
901+
* @example
902+
* // return "A Tiny String"
903+
* Utils.toTitleCase("a tIny String");
904+
*/
905+
static toTitleCase(str) {
906+
return str.replace(/\w\S*/g, function(txt) {
907+
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
908+
});
909+
}
910+
911+
895912
/**
896913
* Encodes a URI fragment (#) or query (?) using a minimal amount of percent-encoding.
897914
*

src/core/operations/CTPH.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CTPH extends Operation {
2121
this.name = "CTPH";
2222
this.module = "Crypto";
2323
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.<br><br>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'.";
24-
this.infoURL = "https://forensicswiki.xyz/wiki/index.php?title=Context_Triggered_Piecewise_Hashing";
24+
this.infoURL = "https://forensics.wiki/context_triggered_piecewise_hashing/";
2525
this.inputType = "string";
2626
this.outputType = "string";
2727
this.args = [];

src/core/operations/CompareCTPHHashes.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CompareCTPHHashes extends Operation {
2424
this.name = "Compare CTPH hashes";
2525
this.module = "Crypto";
2626
this.description = "Compares two Context Triggered Piecewise Hashing (CTPH) fuzzy hashes to determine the similarity between them on a scale of 0 to 100.";
27-
this.infoURL = "https://forensicswiki.xyz/wiki/index.php?title=Context_Triggered_Piecewise_Hashing";
27+
this.infoURL = "https://forensics.wiki/context_triggered_piecewise_hashing/";
2828
this.inputType = "string";
2929
this.outputType = "Number";
3030
this.args = [

src/core/operations/CompareSSDEEPHashes.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class CompareSSDEEPHashes extends Operation {
2424
this.name = "Compare SSDEEP hashes";
2525
this.module = "Crypto";
2626
this.description = "Compares two SSDEEP fuzzy hashes to determine the similarity between them on a scale of 0 to 100.";
27-
this.infoURL = "https://forensicswiki.xyz/wiki/index.php?title=Ssdeep";
27+
this.infoURL = "https://forensics.wiki/ssdeep/";
2828
this.inputType = "string";
2929
this.outputType = "Number";
3030
this.args = [

src/core/operations/SSDEEP.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SSDEEP extends Operation {
2121
this.name = "SSDEEP";
2222
this.module = "Crypto";
2323
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.<br><br>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.<br><br>This operation is fundamentally the same as the CTPH operation, however their outputs differ in format.";
24-
this.infoURL = "https://forensicswiki.xyz/wiki/index.php?title=Ssdeep";
24+
this.infoURL = "https://forensics.wiki/ssdeep";
2525
this.inputType = "string";
2626
this.outputType = "string";
2727
this.args = [];

src/web/HTMLOperation.mjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ function titleFromWikiLink(urlStr) {
157157
pageTitle = "";
158158

159159
switch (urlObj.host) {
160-
case "forensicswiki.xyz":
160+
case "forensics.wiki":
161161
wikiName = "Forensics Wiki";
162-
pageTitle = urlObj.query.substr(6).replace(/_/g, " "); // Chop off 'title='
162+
pageTitle = Utils.toTitleCase(urlObj.path.replace(/\//g, "").replace(/_/g, " "));
163163
break;
164164
case "wikipedia.org":
165165
wikiName = "Wikipedia";

0 commit comments

Comments
 (0)