⚙️utils
Usage:
utils.{function}
This table exposes various utility functions.
base64_encode
Function
Encode a string to Base64 format.
Arguments
Name
Type
Description
str
string
Source string.
Returns
Type
Description
string
Base64-encoded string.
Example
local enc = utils.base64_encode('Hello!'); -- SGVsbG8hbase64_decode
Function
Decode Base64-encoded string.
Arguments
Name
Type
Description
str
string
Base64-encoded string.
Returns
Type
Description
string
Source string.
Example
get_unix_time
Function
Returns current time as UNIX timestamp.
Arguments
None.
Returns
Type
Description
int
Timestamp.
Example
murmur2
Function
Returns MURMUR2-hashed string.
Arguments
Name
Type
Description
str
string
Source string.
Returns
Type
Description
int
Hash.
Example
fnv1a
Function
Returns FNV1A-hashed string.
Arguments
Name
Type
Description
str
string
Source string.
Returns
Type
Description
int
Hash.
Example
find_export
FunctionInsecure only
Returns an address to an export in an image.
Arguments
Name
Type
Description
mod
string
Image to look in.
exp
string
Export symbol.
Returns
Type
Description
int
Address, or 0 on failure.
Example
find_pattern
FunctionInsecure only
Searches for a code pattern in an image.
Arguments
Name
Type
Description
mod
string
Image to search in.
pattern
string
Code pattern.
Returns
Type
Description
int
Address, or 0 on failure.
Example
clipboard_get
FunctionInsecure only
Returns current clipboard content.
Arguments
None.
Returns
Type
Description
string
Clipboard content.
Example
clipboard_set
FunctionInsecure only
Sets new clipboard content.
Arguments
Name
Type
Description
str
string
New content.
Returns
Nothing.
Example
Last updated