From 4062e060ae6a0198873dc93211f8389893f288c4 Mon Sep 17 00:00:00 2001 From: Mykola Zhyhallo Date: Sat, 27 Jan 2024 18:04:50 +0100 Subject: [PATCH] Bytes fix --- lib/module/distress.ts | 12 ++++++------ lib/module/mhddosproxy.ts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/module/distress.ts b/lib/module/distress.ts index 3c07517..c853b33 100644 --- a/lib/module/distress.ts +++ b/lib/module/distress.ts @@ -127,17 +127,17 @@ export class Distress extends Module { value = value.toLowerCase() if (value.includes("kb")) { - return Number(value.split("kb")[0]) * 128 + return Number(value.split("kb")[0]) * 125 } else if (value.includes("mb")) { - return Number(value.split("mb")[0]) * 128 * 1024 + return Number(value.split("mb")[0]) * 125 * 1024 } else if (value.includes("gb")) { - return Number(value.split("gb")[0]) * 128 * 1024 * 1024 + return Number(value.split("gb")[0]) * 125 * 1024 * 1024 } else if (value.includes("tb")) { - return Number(value.split("tb")[0]) * 128 * 1024 * 1024 * 1024 + return Number(value.split("tb")[0]) * 125 * 1024 * 1024 * 1024 } else if (value.includes("pb")) { - return Number(value.split("pb")[0]) * 128 * 1024 * 1024 * 1024 * 1024 + return Number(value.split("pb")[0]) * 125 * 1024 * 1024 * 1024 * 1024 } else if (value.includes("eb")) { - return Number(value.split("eb")[0]) * 128 * 1024 * 1024 * 1024 * 1024 * 1024 + return Number(value.split("eb")[0]) * 125 * 1024 * 1024 * 1024 * 1024 * 1024 } else { return Number(value.split("b")[0]) } diff --git a/lib/module/mhddosproxy.ts b/lib/module/mhddosproxy.ts index 57f4718..5c31ae5 100644 --- a/lib/module/mhddosproxy.ts +++ b/lib/module/mhddosproxy.ts @@ -173,17 +173,17 @@ export class MHDDOSProxy extends Module { value = value.toLowerCase() if (value.includes("kb")) { - return Number(value.split(" ")[0]) * 128 + return Number(value.split(" ")[0]) * 125 } else if (value.includes("mb")) { - return Number(value.split(" ")[0]) * 128 * 1024 + return Number(value.split(" ")[0]) * 125 * 1024 } else if (value.includes("gb")) { - return Number(value.split(" ")[0]) * 128 * 1024 * 1024 + return Number(value.split(" ")[0]) * 125 * 1024 * 1024 } else if (value.includes("tb")) { - return Number(value.split(" ")[0]) * 128 * 1024 * 1024 * 1024 + return Number(value.split(" ")[0]) * 125 * 1024 * 1024 * 1024 } else if (value.includes("pb")) { - return Number(value.split(" ")[0]) * 128 * 1024 * 1024 * 1024 * 1024 + return Number(value.split(" ")[0]) * 125 * 1024 * 1024 * 1024 * 1024 } else if (value.includes("eb")) { - return Number(value.split(" ")[0]) * 128 * 1024 * 1024 * 1024 * 1024 * 1024 + return Number(value.split(" ")[0]) * 125 * 1024 * 1024 * 1024 * 1024 * 1024 } else { return Number(value.split(" ")[0]) }