Quick actions

cmd+k|ctrl+k

Navigation

Languages

Obfuscate

Snippet info

Language

Lua

Visibility

public

Author

patrixwastaken

Created

2024-12-17T13:17:02.421348Z

Updated

2024-12-17T18:50:01.20886Z

                                                                                                                                                     _=
[[
Created By PatrixWasTaken
]]

local _local = {} -- A table to store ASCII values
local _string = [[print("Hello World!")]] -- The string to be processed

for _z = 1, #_string do -- Convert string characters to their ASCII values and store them in the table
    _local[_z] = string.byte(_string, _z)
end

local _x = "" -- A variable to hold the converted hexadecimal string
for _y = 1, #_local do -- Convert ASCII values to hexadecimal strings and concatenate them
    _x = _x .. "\\x" .. string.format("%X", _local[_y]) -- %X: Convert ASCII value to uppercase hexadecimal format
end

-- Print the converted hexadecimal string
print('"'.._x..'"')
INFO