403Webshell
Server IP : 62.60.133.156  /  Your IP : 216.73.217.51
Web Server : LiteSpeed
System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
User : mimradmin ( 1166)
PHP Version : 7.4.33
Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : OFF |  Pkexec : OFF
Directory :  /opt/imunify360-webshield/lualib/resty/openssl/auxiliary/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /opt/imunify360-webshield/lualib/resty/openssl/auxiliary/compat.lua
local nkeys

do
  local pok, perr = pcall(require, "table.nkeys")
  if pok then
    nkeys = perr
  else
    nkeys = function(tbl)
      local cnt = 0
      for _ in pairs(tbl) do
          cnt = cnt + 1
      end
      return cnt
    end
  end
end

local noop = function() end

local log_warn, log_debug
local encode_base64url, decode_base64url

if ngx then
  log_warn = function(...)
    ngx.log(ngx.WARN, ...)
  end

  log_debug = function(...)
    ngx.log(ngx.DEBUG, ...)
  end

  local b64 = require("ngx.base64")
  encode_base64url = b64.encode_base64url
  decode_base64url = b64.decode_base64url

else
  log_warn = noop
  log_debug = noop

  local pok, basexx = pcall(require, "basexx")
  if pok then
    encode_base64url = basexx.to_url64
    decode_base64url = basexx.from_url64
  else
    encode_base64url = function()
      error("no base64 library is found, needs either ngx.base64 or basexx")
    end
    decode_base64url = encode_base64url
  end

end

local json
do
  local pok, perr = pcall(require, "cjson.safe")
  if pok then
    json = perr
  else
    local pok, perr = pcall(require, "dkjson")
    if pok then
      json = perr
    end
  end

  if not json then
    json = setmetatable({}, {
      __index = function()
        return function()
          error("no JSON library is found, needs either cjson or dkjson")
        end
      end,
    })
  end
end


return {
  nkeys = nkeys,
  log_warn = log_warn,
  log_debug = log_debug,
  encode_base64url = encode_base64url,
  decode_base64url = decode_base64url,
  json = json,
}

Youez - 2016 - github.com/yon3zu