mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 14:11:02 +01:00
Removed some debug logging
This commit is contained in:
parent
1a88a0164c
commit
b3ac8d0835
@ -249,7 +249,6 @@ export function findFormat (input, delim) {
|
||||
const filteredInput = input.replace(/[^A-Za-z0-9]/, "").toUpperCase();
|
||||
const mgrsPattern = new RegExp(/^[0-9]{2}[C-HJ-NP-X]{2}[A-Z]+/);
|
||||
const geohashPattern = new RegExp(/^[0123456789BCDEFGHJKMNPQRSTUVWXYZ]+$/);
|
||||
log.error(filteredInput);
|
||||
if (mgrsPattern.test(filteredInput)) {
|
||||
return "Military Grid Reference System";
|
||||
} else if (geohashPattern.test(filteredInput)) {
|
||||
|
@ -22,7 +22,7 @@ class ConvertCoordinateFormat extends Operation {
|
||||
|
||||
this.name = "Convert co-ordinate format";
|
||||
this.module = "Hashing";
|
||||
this.description = "Convert geographical coordinates between different formats.<br><br>Currently supported formats:<ul><li>Degrees Minutes Seconds (DMS)</li><li>Degrees Decimal Minutes (DDM)</li><li>Decimal Degrees (DD)</li><li>Geohash</li><li>Military Grid Reference System (MGRS)</li></ul>";
|
||||
this.description = "Convert geographical coordinates between different formats.<br><br>Supported formats:<ul><li>Degrees Minutes Seconds (DMS)</li><li>Degrees Decimal Minutes (DDM)</li><li>Decimal Degrees (DD)</li><li>Geohash</li><li>Military Grid Reference System (MGRS)</li></ul>";
|
||||
this.infoURL = "https://wikipedia.org/wiki/Geographic_coordinate_conversion";
|
||||
this.inputType = "string";
|
||||
this.outputType = "string";
|
||||
@ -93,10 +93,8 @@ class ConvertCoordinateFormat extends Operation {
|
||||
// Autodetect input delimiter
|
||||
if (inDelim === "Auto") {
|
||||
inDelim = findDelim(input);
|
||||
log.error("DATA: " + input + " DELIM: " + inDelim);
|
||||
if (inDelim === null) {
|
||||
inDelim = "";
|
||||
// throw new OperationError("Could not automatically detect the input delimiter.");
|
||||
}
|
||||
} else if (!inDelim.includes("Direction")) {
|
||||
// Get the actual delimiter from the regex
|
||||
@ -104,9 +102,8 @@ class ConvertCoordinateFormat extends Operation {
|
||||
}
|
||||
if (inFormat === "Auto") {
|
||||
inFormat = findFormat(input, inDelim);
|
||||
log.error("DATA: " + input + " FORMAT: " + inFormat);
|
||||
if (inFormat === null) {
|
||||
throw new OperationError("Could not automatically detect the input");
|
||||
throw new OperationError("Could not automatically detect the input format.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,7 +144,6 @@ class ConvertCoordinateFormat extends Operation {
|
||||
} else {
|
||||
// Split on the delimiter
|
||||
const splitInput = input.split(inDelim);
|
||||
log.error(splitInput);
|
||||
if (splitInput.length > 0) {
|
||||
inLat = splitInput[0];
|
||||
if (splitInput.length >= 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user