From 4b900ef3de8125318b67ab2e440459ca476a55d9 Mon Sep 17 00:00:00 2001 From: C0nw0nk Date: Thu, 5 Mar 2020 21:50:38 +0000 Subject: [PATCH] Update anti_ddos_challenge.lua Fix : malformed URI Javascript error with escaping back slashes through Lua --- lua/anti_ddos_challenge.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/anti_ddos_challenge.lua b/lua/anti_ddos_challenge.lua index 710a34f..1a6288e 100644 --- a/lua/anti_ddos_challenge.lua +++ b/lua/anti_ddos_challenge.lua @@ -1316,14 +1316,14 @@ local function encrypt_javascript(string1, type, defer_async, num_encrypt, encry local encrypt_type_origin = encrypt_type --Store var passed to function in local var if tonumber(encrypt_type) == nil or tonumber(encrypt_type) <= 0 then - encrypt_type = math.random(1, 2) --Random encryption + encrypt_type = math.random(2, 2) --Random encryption end --I was inspired by http://www.hightools.net/javascript-encrypter.php so i built it myself if tonumber(encrypt_type) == 1 then hexadecimal_x = "%" .. sep(hex_output, "%x%x", "%") --hex output insert a char every 2 chars %x%x end if tonumber(encrypt_type) == 2 then - hexadecimal_x = "\\x" .. sep(hex_output, "%x%x", "\\x") --hex output insert a char every 2 chars %x%x + hexadecimal_x = string.char(92) .. "x" .. sep(hex_output, "%x%x", string.char(92) .. "x") --hex output insert a char every 2 chars %x%x end --TODO: Fix this.