[Release] pRuncode - Run Lua/Javascript Client/Server (VSCode like)

pRuncode

React app using “Monaco Editor” to run code in JS/Lua for fivem

Installing

  • Download the resource here.
  • Drop everything in a folder called pruncode in your resources folder.
  • Start the resource

Configuration

  • How to open the menu?
    Just type /runcode2 or press F5 (default key)
  • How to change the shortcut key?
    The bind is set in client/client.lua
  • How to give people/me access to the menu?
    In your server/whatever.cfg add this:
# if you are using groups
add_ace group.admin runcode2 allow
# if you are not using groups with your steam/rockstar/fivem identifier
add_ace identifier.steam:110000105c967cf runcode2 allow

You can also edit the script if you use your own permission system.

Next features

  • Autocompletions
  • Snippets etc…
  • C# maybe

Preview

preview

22 Likes

Fancy, nice job.

I fixed an exploit in the js server part, please update the script guys

Eww! This is useless without ESX or VRP support.

Seriously though, looks amazing. I’m excited. This will streamline testing :slight_smile:

Interesting to do this in-game but feels a bit frail - what if your snippet hangs/crashes the game, you’ll lose your snippet? :frowning:

Probably, a suggestion would be auto-save. :snail:
btw, nice resource, finally a thing to run multiline code ingame in a clear manner!

That’s damn impressive.
Good job!

nice one!

Well done, what a great job!

You already could run multiline lua code with the runcode ressource outside the client or server by going to http://myIP:port/runcode/ in your browser :stuck_out_tongue:

Btw, nice little release

Oh, never knew. lol.
Doesn’t work for me tho when runcode is running. Weird. :thinking:

“No reimplementations of core resources allowed. If you want to improve on a system resource, do so by actually providing a PR to said resource.”
Is the answer I got while posting almost the same thing…

see this https://github.com/citizenfx/cfx-server-data/commit/54f75bca86a9b95ac9a20f6199df44adf61a4cc6
lanth just updated/improved runcode resource
I’ll make some PR to make it perfect :stuck_out_tongue:

Quick question, have you considered all the security concerns of having runcode running in your server?
For instance the following thread?

the total of 0 such concerns?

have you considered all the security concerns of having no brain?

Well, I guess you really don’t care much about hostility after all.

Also, care to enlighten me with how that entire thread (with no comments from any Element) is wrong?

I just saw this. Come on here occasionally these days.

Runcode on its own is “reasonably” safe - unless the rcon password is broken. Still wouldn’t advise anyone to run it unless you have a strange and unique reason to use it.

Second note, I couldn’t help but be curious and looked at the code of this new runcode thing or whatever you’re calling it.

I can break it, if the whole CEF thing is still do-able anyone can do it, or if you have an executor that makes it even easier. The server side for this is a joke, unless I’m just suffering from tunnel vision on a phone.

I’ll post how tomorrow - late here. If I don’t someone message me and remind me since they show up in my email.

if you mean calling this event from the client

You can’t.
One thing I could add here is something to verify it this is invoked from the current resource, but pretty useless if you already have a breach in your server.

Also

Runcode on its own is “reasonably” safe - unless the rcon password is broken. Still wouldn’t advise anyone to run it unless you have a strange and unique reason to use it.

Don’t run any kind of runcode resource in your production server if you want to be 100% safe