vurv78 / autorun-rs Goto Github PK
View Code? Open in Web Editor NEWModern scripthook with lua execution and filesteal. Replacement for gluasteal and most lua executors
License: Apache License 2.0
Modern scripthook with lua execution and filesteal. Replacement for gluasteal and most lua executors
License: Apache License 2.0
this error is caught by all the lua stealer but is absolutely useless except to pollute..
on the internet a guy indicates how to correct it : https://www.unknowncheats.me/forum/garry-s-mod/485067-annoying-allocconsole-messages-fix.html
it would be good to correct it to make clean autorun
Nothing more to explain just doesnt work correctly.
<---> Autorun-rs <--->
Type [help] for the list of commands
Failed to allocate console. 5
<---> Autorun-rs <--->
Type [help] for the list of commands
Failed to open Autorun module. [Failed to set sender.]
Loaded into menu state.
Joining Server with IP XXXXXXXXXX!
warning: Unknown nb_ctl request: 4
warning: Unknown nb_ctl request: 4
warning: Unknown nb_ctl request: 4
warning: Unknown nb_ctl request: 4
warning: Unknown nb_ctl request: 4
warning: Unknown nb_ctl request: 4
thread '<unnamed>' panicked at 'byte index 3 is not a char boundary; it is inside '?' (bytes 2..3) of `note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: Rust panics must be rethrown
It crashed right after I loaded in, I was able to see a motd & the game in the background.
Using https://github.com/Vurv78/Autorun-rs/releases/tag/v0.6.0
Since 0.4.0, x86/32 Bit would just not open the Autorun console. Now with 0.6.0 it closes your game. Need to fix this
Thanks to @Xandertron for originally reporting this on the discord
Presumably broken by missing carriage return which gmod's fs/lua needs for whatever reason
the title is quite explicit, it would be convenient to be able to sometimes disable the lua stealer via a command in the external console, personally I join a lot of server and it takes space on my disk
Already added async-fs as a dependency, should be relatively easy to use that for asynchronous file i/o for lua dumping.
This will have all of the lua dumping take place in a different thread as to not affect the experience in game.
It randomly takes focus from the game which may even lock you frozen in it if you can't click out.
Have a folder dedicated for plugins/addons.
You could enable, disable these at any time through the cli
Additional potential features that are non-blocking to this issue
Thinking of the structure being like this:
C:\Users\<User>\autorun
├── \plugins\ # Main plugins folder
│ ├── \Safety\
│ │ ├── \scripts\ # Localized \scripts\ folder like the current system.
│ │ └── main.lua # Entrypoint
│ │ └── plugin.toml # Defines name, author, source, license, settings, etc.
This keeps happening at seemingly random times, but here's 3 reports generated by Autorun
https://www.toptal.com/developers/hastebin/yoyiwefaha.properties
Have a menu.lua
file that will be run when the game launches in all plugins
Essentially could act as a replacement for https://github.com/glua/gmod-menu-plugins
As well as for ROC (https://github.com/glua/gm_roc), except this would be between both realms.
Then there'd be ability to communicate with Autorun, with an api potentially like:
-- CLIENT
Autorun.sendToMenu(55, "hello", "world")
Autorun.getFromMenu(print)
-- MENU
Autorun.getFromClient(function(xyz)
print(xyz)
end)
Autorun.sendToClient(55)
--[[
Or an event based design
]]
-- CLIENT or MENU
Autorun.onEvent("xyz", function()
end)
-- CLIENT or MENU
Autorun.runEvent("xyz", 55)
Feel free to give API design ideas in here or on the discord.
Edited: tdlr, I'm stupid and trying to run lua on a different thread which 'randomly' causes crashes
thread '' panicked at 'Path DLL tried to load: C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\bin\lua_shared.dll, Error Reason: Could not open library: Module not found. (os error 126). Report this on github.', src\lib.rs:82:25
Allow for entrypoint through gmod13_open so Autorun could be injected by lua through 'require' in the same way as original scripthook was loaded.
Think it should be straightforward
After injecting or requiring autorun, leaving any server instantly crashes/closes my game. No warning no error.
The version i used is 0.7.0 latest release.
Automatically check for updates and print to your console if any are found.
Potentially could have it update itself but not sure if that'll be possible with the dll trying to replace itself..
Would allow for people to actually structure their code in modules rather than a massive single file. Safety is getting pretty huge
Still not sure about adding this kind of stuff because I'm afraid some might leak these to the global table where the functions could be abused.
Instead just hook game.getIPAddress or use the actual engine net functions to get server addresses when dumping lua files
Will make it so we don't need to do the stupid init_file_steal
call anymore.
Depends on #1 so.
Not sure if this has to do with Edition 2021 / Nightly rust / Nightly rustc. Error is incredibly cryptic and nothing is helping.. (Couldn't even find anything at the address given where this error happened)
[profile.dev]
debug = 0
Seems to have worked a little bit. Same error but it doesn't happen if gmod13_open entrypoint is cleared
C FFI is actually a nightmare
There hasn't been a release containing this commit so the latest release will work fine. Just not the generated builds in the actions tab.
the last update seems to break, I inject and the external console does not appear yet the injector confirms me that the injection was a success,
I use extrem injector v3.7.3 , I am on the 64 bit version of gmod
Make a /data/ folder in sautorun-rs for binary / text / images / whatever to be stored.
Then add sautorun.readFile()
or sautorun.openFile
We should have
This has been requested on the discord but putting here as a reminder.
Could either add support for it in the existing function or have it as a separate one, like Autorun.requirebin or something.
There needs to be a general plugin
command:
list
subcommand to list currently installed pluginsdisable|enable
subcommands to disable/enable.remove
subcommand to delete a pluginAlso, maybe there could be better integration than just dragging and dropping a folder into Autorun.
download
subcommand to directly download a plugin from githubupdate
subcommand to update a downloaded pluginWill add one field to the existing plugin.toml
layout, being repo
for github (potentially gitlab and others, later.) repo.
Don't want to get too complex for this to never happen, but there could also be automatic updates. Although this would be opt-in/out
First step is to make a very barebones feature set to avoid all windows dependencies (winapi, trayicon).
Gonna be pretty tough 🥲
Would be nice to support native lua 5.1 or luajit modules through luaopen_xyz
entrypoint instead of gmod13_open.
I noticed this on some servers, the filesteal doesn't catch anything and spam my external console
I uploaded the log part to anonfile because it was too big for pastebin..
https://anonfiles.com/B0lcN6D1x1/January_26_2022_02-48_pm_log
I've been avoiding this for a while but now that #25 was done it should be relatively simple.
Need to have a 'filesystem' or at least a way to Autorun.require and later use #24's file opening local to plugin's directories.
This should be relatively simple? Just set a string somewhere in the Autorun
env that'll define where the lua file is local to the autorun
folder.
Then you'd be able to properly do
Autorun.require("bar.lua")
for example inside of your plugin/src/autorun.lua
file to run plugin/src/bar.lua
instead of needing it to be in the autorun/scripts
directory.
Now that I think about it this is kind of similar to lua's package.path 🤔
/title
win 10, 64-bit chromium
Found an actual suitable crate for making tray icons.
This has a lot more features and the creator didn't actually abandon it.
be able to have an automatic refresh on a designated file, useful when you develop a script and you don't want to go back to the console every time.
the original idea came from a member on the discord and I found it interesting :
[](https://zupimages.net/up/22/16/wij2.png)
At some point the console just starts spam filling with:
[ERROR] Couldn't create sautorun-rs dirs with path [C:\Users\USER\sautorun-rs\lua_dumps\20:33:06
No idea what triggers it, it seems to take a while for it to happen
spam is quite severe, this is a console log of mine https://pastebin.com/F9LRirGn
I replaced my actual file path name with USER if you're wondering.
I discovered this while browsing on github, it could be interesting for you to discover it
https://github.com/djsime1/menu-plugins-redux
much cleaner than the basic plugin system
Discord link is broken
Already done.
Making an issue because rust dlopen doesn't allow fields with the WrapperApi derived to be public, which kind of doesn't allow this.
Pretty much the only thing keeping this from 0.2.0, and cargo isn't playing nice to import my own fork to test and maybe fix it for them...
szymonwieloch/rust-dlopen#31
Here's what's already added and being held back:
sautorun/hook.lua
. Letting you control whether it runs by returning true in it.sautorun/autorun.lua
before autorunwe need filesteal seartch by server name,
the option is set in the configuration file (aka settings.toml) however it returns a CLIENT in lua_dumps
it would be necessary to implement correct work so that all this functions suitably and finally to be able to excavate in different name of file by name of server.
Happens on both the Latest official branch and latest beta branch.
Using x64 architecture release for both branches, x64 beta branch for the game as well, and obviously yes, my PC is x64 architecture.
Latest Log:
March 02, 2022 04-11 pm.log
Here is the configuration I use.
cfg.zip
Only happened with the use of https://github.com/Vurv78/Safety May be coupled with this so I'm listing this here.
Interesting Note: No crashing happened if I loaded a singleplayer session and then went into a multiplayer, this also didn't affect gamemodes other than sandbox (I tried zombie survival)
it would be necessary to add colors in the external console for the different things as for example the information of launching or the titles as for example the plugins load ect, it's certainly a lot of detail but I think it's important
Right now it just runs it without being in any fenv which I thought lua would handle itself, guess not..
Add overriding code (If you return a string in hook.lua, it will run that code rather than sautorun.CODE
)
This will be on hold until #12 is hopefully resolved, if that takes too long it will be implemented and pushed.
Console does get cluttered often, would be nice to have a clear
command.
I want to load external modules which are located in my lua/bin folder but I don't understand how to do it with autorun.
yet in my lua file I indicate :
require("enginepred")
but the external console spits me "RunString:1: Module not found!
What to do ? I missed a step ? mhummmm
Recently found out what github artifacts are thanks to the feather repo, basically just uploading files created in an actions workflow.
We should make our workflows distribute the generated DLLs to actions so people don't have to download files that I compile for everyone's sake and so people (Who don't want to read code hashes) don't need to worry that I could be distributing malware or something.
When using the second argument in (RunString, RunStringEx, CompileString) filesteal allows you to create files in any directory on disk
Example
lua_run RunString([[print("wtf")]], "../../autorun.lua")
lua_run RunString([[print("wtf")]], "../../../../../../Program Files (x86)/Steam/steamapps/common/GarrysMod/garrysmod/lua/autorun/autorun.lua")
Small nitpicky suggestion but i might as well try.
Closing the console mid game currently results in:
It would add some QoL if you could close / hide it mid game so you don't have to have it open constantly. It currently makes tabbing into gmod annyoing and it would allow for a more permanent embed in gmod so you don't have to turn it on or off if you want to use it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.