gluasteal retrieves client-side & shared Lua files from Garry's Mod servers that you join. gluasteal also allows you to execute your own Lua code.
Works on Windows & Linux (32-bit & 64-bit). Still needs testing on macOS.
- Either Download pre-built from the Releases section or build from source.
- Inject library into Garry's Mod, at the main menu.
- Optionally, set up your Lua file to be loaded.
- Join a server.
Logs and Lua files will be written to the gluasteal folder, in your home directory.
- Windows: C:/Users/username/Documents/gluasteal/
- Linux: /home/username/gluasteal/
- Mac: /Users/username/gluasteal/
- Get an injector
- Add the dll to the injector
- Select the Garry's Mod process
- Inject at the main menu
Editing the Garry's Mod launch script (hl2.sh) to preload the gluasteal library.
LD_PRELOAD=$LD_PRELOAD:/home/lewis/gluasteal.so
Using DYLD_INSERT_LIBRARIES (see LD_PRELOAD above)
Place your Lua code in your gluasteal directory, in a file named gluasteal.lua This file is executed in a separate environment, not in _G. You are still able to access everything stored in _G.
This file will be executed every time a Garry's Mod Lua script is about to be executed. You can return false to stop the current file (gluasteal.SCRIPT) from being executed.
-- All scripts with the string 'derma' in their name will be blocked from executing
if (gluasteal.SCRIPT:match("derma")) then
return false
end
gluasteal.SCRIPT -- The path of the Garry's Mod Lua script that is about to be executed (e.g. "init.lua")
gluasteal.SOURCE -- The source code of the script that is about to be executed (e.g. "do return end")
gluasteal.VERSION -- The version of gluasteal being used
gluasteal.include -- A function to include other gluasteal Lua files, relative to the gluasteal directory - e.g. gluasteal.include("other.lua")
Note: gluasteal.SCRIPT and gluasteal.SOURCE will be an empty string in files included by gluasteal.include
If building with GCC, ensure you are using at least version 8 or above.
Using the Visual Studio Developer Command Prompt (requires VS build tools)
git clone https://github.com/c4fe/glua-steal
cd glua-steal
git submodule update --init --recursive
mkdir build
cd build
cmake --help Find a suitable generator, such as "Visual Studio 15 2017"
Select either Win32 or x64 below for the -A flag (32bit or 64bit)
cmake .. -A Win32/x64 -G <GENERATOR> -DCMAKE_TOOLCHAIN_FILE=../toolchains/msvc.cmake
msbuild gluasteal.sln /p:Configuration=Release
git clone https://github.com/c4fe/glua-steal
cd glua-steal
git submodule update --init --recursive
mkdir build && cd build
choose the 32bit or 64bit toolchain below (toolchains are in toolchains/ folder)
cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchains/gcc-<32bit/64bit>.cmake
make
Copyright (C) 2019 Lewis Clark
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.