2
0
Fork 0
mirror of https://github.com/gchq/CyberChef synced 2025-03-14 05:46:56 +00:00

Corrected error messages mismatches

This commit is contained in:
kossithedon 2024-06-13 00:44:23 +02:00
parent a89c2bbc4f
commit 8e871637b5
No known key found for this signature in database
GPG key ID: C482A9E4338AB371
3 changed files with 4 additions and 4 deletions

View file

@ -79,7 +79,7 @@ class NTPTimestampToUNIXTimestamp extends Operation {
// Check whether the seconds value part do not exceeds the greatest seconds value
if (unixTimestampSecondsPart > greatestSecondsValue) {
return `Error: The NTP Timestamp seconds part '${unixTimestampSecondsPart}' exceeds the greatest authorized seconds value ${greatestSecondsValue} due to an incorrect provided UNIX timestamp`;
return `Error: The NTP Timestamp seconds part '${unixTimestampSecondsPart}' exceeds the greatest authorized seconds value '${greatestSecondsValue}' due to an incorrect provided UNIX timestamp`;
}
// Convert the UNIX timestamp seconds part value (seconds elapsed since 01 january

View file

@ -188,7 +188,7 @@ TestRegister.addTests([
{
name: "NTP Timestamp to UNIX Timestamp : NTP timestamp seconds part is greater than the greatest 32 bits value 4294967296",
input: "4294967297.1842400034",
expectedOutput: "Error: Timestamp seconds part should be 32 bits long. The seconds part '4294967297' of the provided NTP timestamp is greater than the greatest 32 bits value '4294967296'",
expectedOutput: "Error: Timestamp seconds part should be 32 bits long. The seconds part '4294967297' of the provided NTP timestamp exceeds the maximum positive integer representable in 32 bits '4294967296'",
recipeConfig: [
{
op: "NTP Timestamp to UNIX Timestamp",
@ -199,7 +199,7 @@ TestRegister.addTests([
{
name: "NTP Timestamp to UNIX Timestamp : NTP timestamp seconds fractions part is greater than the greatest 32 bits value 4294967296",
input: "3923215437.4294967297",
expectedOutput: "Error: Timestamp fractions seconds part should be 32 bits long. The fractions seconds part '4294967297' of the provided NTP timestamp is greater than the greatest 32 bits value '4294967296'",
expectedOutput: "Error: Timestamp fractions seconds part should be 32 bits long. The fractions seconds part '4294967297' of the provided NTP timestamp exceeds the maximum positive integer representable in 32 bits '4294967296'",
recipeConfig: [
{
op: "NTP Timestamp to UNIX Timestamp",

View file

@ -166,7 +166,7 @@ TestRegister.addTests([
{
name: "UNIX Timestamp to NTP Timestamp : NTP timestamp seconds part is greater than the greatest authorized value 2085978496",
input: "2085978497",
expectedOutput: "Error: The UNIX Timestamp seconds part '2085978497' exceeds the greatest authorized seconds value '2085978496' due to an incorrect provided UNIX timestamp",
expectedOutput: "Error: The NTP Timestamp seconds part '2085978497' exceeds the greatest authorized seconds value 2085978496 due to an incorrect provided UNIX timestamp",
recipeConfig: [
{
op: "UNIX Timestamp to NTP Timestamp",