Export data out of garry's mod

I need to get some data (valid UTF-8, and I can use base64 anyway) to an external program, using something like sockets, for now the only thing I found was using the http library (but that looks bad) or use files (less dirty, but doesn’t look as good as sockets for transmitting data).
So my question is : Is there any other way I can get data from a lua script running in gmod to an external program•?

Maybe you could use gm_bromsock?

Thanks, this looks like exactly what I wanted, is there anything that says how to install it on a dedicated server (linux VM)•?

Just throw the appropriate module in /lua/bin

This probably felt like a stupid question, I actually found this before I saw your answer https://wiki.garrysmod.com/page/Creating_Binary_Modules

Do you think this is a security issue, I mean, it lets you load arbitrary shared libraries…

Well, lua scripts too, but you can read those, while modules you cant at least if you read source code of it

Gmod tries to load the library and call gmod13_load(), and fails if the function isn’t available, so it’s not really a security issue

Yes, but lua scripts are sandboxed (removing dangerous functions) and gmod doesn’t load precompiled code to prevent malicious bytecode, so lua scripts should be much safer.

Checking if a function exists doesn’t fix the fact that arbitrary bytecode can be loaded, it can be safe only if it uses some very good sandboxing (like this https://github.com/mniip/sandbox even if this one prevents network sockets and only works on linux, but you get the point), but I doubt gmod uses any.

You wouldn’t use modules if there’s something you can do in Lua, that’s pretty basic to understand
Can’t see why are you bothering that much about if this allows you or it doesn’t allow you to run arbitrary code, modules are intended to allow you to have full control, thing that I would love for developers in Gmod within lua