Skip to content

Commit

Permalink
Bytes fix
Browse files Browse the repository at this point in the history
  • Loading branch information
opengs committed Jan 27, 2024
1 parent 24bb4f4 commit 4062e06
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions lib/module/distress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,17 @@ export class Distress extends Module<Config> {
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])
}
Expand Down
12 changes: 6 additions & 6 deletions lib/module/mhddosproxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,17 @@ export class MHDDOSProxy extends Module<Config> {
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])
}
Expand Down

0 comments on commit 4062e06

Please sign in to comment.