Resource scrambler - Randomize all custom resource events [Anti lua-injector]

Hi, i have problem with esx_status when i scramble all of my resources status get error and didn’t work
I try to don’t scramble status but same shit :confused:

Please be more precise, what does not work ? Which error do you have ?

1 Like

I’m not sure if this also scrambles hardcoded events, if so, this could be problematic when scrambling the whole resources folder.

There is a list of system resources (including mysql-async), All these resources events are parsed so we know we don’t touch them.

Neat, thanks, but i’m not done criticisng yet!

You could just put all the “scrambled” events in scrambler-vac into a table and then iterate through that table to register each one in one go, instead of registering them one by one, example:

events = {
	"dont",
	"hack",
	"me",
	"pls"
}
for _, eventname in next, events do
		RegisterNetEvent(eventname)
		AddEventHandler(eventname, function()
				local _source = source
			  TriggerEvent('scrambler:injectionDetected', eventname, _source, true)
		end)
end

Just an idea to make the code a bit more clean :wink:

1 Like

Good idea, this will be cleaner !

I am afraid almost nobody told me if it works or not, I only tested it on one server dump.

I’ll push it to production on RottenV:R in a bit, i’ll report back if it works properly or not :wink:

2 Likes

well, i don’t know what happened, but it seems your program broke and fucked the permissions on the scrambled_resources directory, and i somehow cant take those permissions back, at all :frowning:

Thats weird I only, copy a directory and overwrite files in this directory copy, You ran it on linux or windows ?

windows, i’m not sure what happened here

http://gay.furfag.de/weird-roleplay-pics/vmifq6tsf3nw8h0.png

can you add yourself as owner ?

nope, but i fixed it, sometimes a reboot is all you need, still a weird issue though

I’d like to know what happened but I have no idea at all !

alright, just put it on the server, seems everything that should work seems to work fine, i didnt test everything though, but from what i managed to test, it works great!

1 Like

Nice ! Thank you for the testing :slight_smile:

New release v0.2.3 : https://github.com/indilo53/fxserver-resource-scrambler/releases/tag/0.2.3

  • Put event names in a table
FAILED PARSING ./scrambled_resources/[system]/[builders]/yarn/__resource.luaError: LuaState.DoString: Execution Of Lua Code Has Failed:
[string "server_only 'yes'..."]:1: attempt to call global 'server_only' (a nil value)

is this intended behaviour?

This will probably not create problems but let me add ‘server_only’ in loader.lua dummies https://github.com/indilo53/fxserver-resource-scrambler/blob/master/loader.lua#L6

This piece of code is inside a try catch so it just fails for that specific resource.

New release v0.2.4 : https://github.com/indilo53/fxserver-resource-scrambler/releases/tag/0.2.4

  • Add ‘server_only’ directive in dummies