Lua Cheat Sheet

Posted : admin On 1/29/2022
  1. Lua Regex Cheat Sheet
  2. Lua Cheat Sheet
  3. Lua Api Cheat Sheet
  1. Computer Games Cheat Sheets Roblox: General Scripting Cheat Sheet by Ozzypig General reference for scripting in Lua on Roblox. This cheat sheet is intended for beginner scripters.
  2. I’ve made a couple of cheat sheets on the topic of Roblox game development, specifically Lua coding using Roblox’s API. Here’s some links to my work! Roblox General Scripting This is a general reference for scripting in Lua on Roblox. This cheat sheet is intended for beginner scripters. Access this cheat sheet here. Roblox Gamepad Continue reading 'Cheat Sheets'.

Lua programming language assumes any combination of Boolean true and non-nil values as true, and if it is either boolean false or nil, then it is assumed as false value. It is to be noted that in Lua, zero will be considered as true. Lua programming language provides the following types of decision making statements.

Shell Escapes Cheatsheet

For when you forget or don't know how to take advantage of an eval() statement or spawn a shell in a specific language or escape some common programs.

Lua Cheat Sheet


Simple inline execution of commands, without semicolons:

Alternatively, using subprocess:

Lua Cheat Sheet

Executing from shell, using complete import:


From repl:

From shell:

Lua cheat sheet


From repl:

From shell:


From repl:

From shell:


Trying desperately to escape a restricted shell? Refer to the guide at

Lua Regex Cheat Sheet

Escaping more

Lua Cheat Sheet

This can be anywhere from some script being printed as an MOTD before disconnecting you during an SSH session, to something more subtle like a paged viewer being run with elevated privileges.

CheatLearning lua

Forcing systemctl, man, etc, to display with more

If you set the $SYSTEMD_PAGER or $PAGER env variable to more, when paged data is printed in a terminal, you can shrink your terminal to force more to show you only a portion of text rather than all text, letting you escape to shell with :!sh.

Spawning a shell with Nmap

You might be thinking, “What?” But in restricted shells, this can come in handy.

Ran out of options? Maybe what you need isn't to escape a shell, but rather to escalate privileges. Try using Security Sift's tool, which does a lot of the tedious work for you and gives suggestions at the end of the script on what exploits might work.

Lua Api Cheat Sheet

Still stuck? If all else fails, check out g0tmi1k's blog post on privilege escalation.