$51 GRAYBYTE WORDPRESS FILE MANAGER $50

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/imunify360-webshield/site/lualib/

HOME
Current File : /opt/imunify360-webshield/site/lualib//text_format.lua
--
--------------------------------------------------------------------------------
--  FILE:  text_format.lua
--  DESCRIPTION:  protoc-gen-lua
--      Google's Protocol Buffers project, ported to lua.
--      https://code.google.com/p/protoc-gen-lua/
--
--      Copyright (c) 2010 , 林卓毅 (Zhuoyi Lin) netsnail@gmail.com
--      All rights reserved.
--
--      Use, modification and distribution are subject to the "New BSD License"
--      as listed at <url: http://www.opensource.org/licenses/bsd-license.php >.
--  COMPANY:  NetEase
--  CREATED:  2010年08月05日 15时14分13秒 CST
--------------------------------------------------------------------------------
--
local string = string
local math = math
local print = print
local getmetatable = getmetatable
local table = table
local ipairs = ipairs
local tostring = tostring

local descriptor = require "descriptor"

module "text_format"

function format(buffer)
    local len = string.len( buffer )	
    for i = 1, len, 16 do		
        local text = ""	
        for j = i, math.min( i + 16 - 1, len ) do	
            text = string.format( "%s  %02x", text, string.byte( buffer, j ) )			
        end			
        print( text )	
    end
end

local FieldDescriptor = descriptor.FieldDescriptor

msg_format_indent = function(write, msg, indent)
    for field, value in msg:ListFields() do
        local print_field = function(field_value)
            local name = field.name
            write(string.rep(" ", indent))
            if field.type == FieldDescriptor.TYPE_MESSAGE then
                local extensions = getmetatable(msg)._extensions_by_name
                if extensions[field.full_name] then
                    write("[" .. name .. "] {\n")
                else
                    write(name .. " {\n")
                end
                msg_format_indent(write, field_value, indent + 4)
                write(string.rep(" ", indent))
                write("}\n")
            else
                write(string.format("%s: %s\n", name, tostring(field_value)))
            end
        end
        if field.label == FieldDescriptor.LABEL_REPEATED then
            for _, k in ipairs(value) do
                print_field(k)
            end
        else
            print_field(value)
        end
    end
end

function msg_format(msg)
    local out = {}
    local write = function(value)
        out[#out + 1] = value
    end
    msg_format_indent(write, msg, 0)
    return table.concat(out)
end


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 8.06 AM
root / root
0755
containers.lua
2.23 KB
26 Nov 2025 10.43 PM
root / root
0644
decoder.lua
11.285 KB
26 Nov 2025 10.43 PM
root / root
0644
descriptor.lua
1.879 KB
26 Nov 2025 10.43 PM
root / root
0644
encoder.lua
14.616 KB
26 Nov 2025 10.43 PM
root / root
0644
ipset_message_pb.lua
16.579 KB
26 Nov 2025 10.43 PM
root / root
0644
listener.lua
1.26 KB
26 Nov 2025 10.43 PM
root / root
0644
pb.so
15.188 KB
26 Nov 2025 10.44 PM
root / root
0755
protobuf.lua
34.485 KB
26 Nov 2025 10.43 PM
root / root
0644
text_format.lua
2.41 KB
26 Nov 2025 10.43 PM
root / root
0644
type_checkers.lua
2.301 KB
26 Nov 2025 10.43 PM
root / root
0644
wire_format.lua
3.67 KB
26 Nov 2025 10.43 PM
root / root
0644
ws_message_pb.lua
18.033 KB
26 Nov 2025 10.43 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF