From fedd15b946bac85a38dfbd2751c3e20042397fce Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Sat, 16 Sep 2023 18:20:30 +0700 Subject: [PATCH] fix hbot --- .../land/chipmunk/chipmunkmod/util/BotValidationUtilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chipmunkmod/util/BotValidationUtilities.java b/src/main/java/land/chipmunk/chipmunkmod/util/BotValidationUtilities.java index 12d304f..a5ebcb0 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/util/BotValidationUtilities.java +++ b/src/main/java/land/chipmunk/chipmunkmod/util/BotValidationUtilities.java @@ -29,7 +29,7 @@ public class BotValidationUtilities { try { MessageDigest md = MessageDigest.getInstance("SHA-256"); String time = String.valueOf(System.currentTimeMillis() / 10000); - String input = command.replaceAll("&[0-9a-fklmnor]", "") + ";" + client.player.getUuidAsString() + ";" + time + ";" + key; + String input = prefix + command.replaceAll("&[0-9a-fklmnor]", "") + ";" + client.player.getUuidAsString() + ";" + time + ";" + key; byte[] hash = md.digest(input.getBytes(StandardCharsets.UTF_8)); BigInteger bigInt = new BigInteger(1, Arrays.copyOfRange(hash, 0, 4)); String stringHash = bigInt.toString(Character.MAX_RADIX);