[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Global preferences - Lua

Preliminary code

You can enter some initial scripting that is executed every time that the Lua script engine is created. This can be used to set up a "sandbox", that is a safe environment for your scripts.

The default behaviour is to disable the "os" library (operating system calls), which could be used to execute arbitrary commands, and rename or delete files.

Also the "io" library is disabled, which could be used to read or overwrite existing files.

To revert to the default settings, delete everything from this window, and then close and re-execute MUSHclient.

Edit...

Click to edit the code in a larger window.

Allow DLLs to be loaded

Check this to allow DLLs to be loaded by Lua code.

Only check this if you are sure that you are not going to run untrusted scripts.

We suggest that before checking "Allow DLLs to be loaded" you edit the "sandbox" code and disallow use of the package library except for trusted worlds or plugins. For example, enter these lines in the sandbox:


package.loadlib = nil      --> disable loadlib function
package.loaders [3] = nil  --> disable DLL loader
package.loaders [4] = nil  --> disable all-in-one loader


The reason for the last two lines is that doing a "require" can trigger the DLL and all-in-one loaders, which are designed to load DLLs.


See Also ...

Topics

Arrays
Database (SQLite)
Lua base functions
Lua bc (big number) functions
Lua bit manipulation functions
Lua coroutine functions
Lua debug functions
Lua io functions
Lua LPEG library
Lua math functions
Lua os functions
Lua package functions
Lua PCRE regular expression functions
Lua script extensions
Lua SQLite (database) interface
Lua string functions
Lua syntax
Lua table functions
Lua utilities
Plugins
Scripting
Scripting callbacks - MXP
Scripting callbacks - plugins
Scripting data types
Scripting functions list
Scripting return codes
Utilities
Variables
World functions

Dialog

Global preferences - world lists and directories

(Help topic: dialog=IDD_GLOBAL_PREFSP13)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]