LTSL - pipes & sockets ?

The S&M crowd is getting naughty with the game files.

LTSL - pipes & sockets ?

Postby Katorone » Wed Jul 30, 2014 1:32 am

Will LTSL let us work with files and/or sockets?

Uses I'm considering:
- A custom log file where specific events are logged.
- A variation of the first, where an automatic html diary is generated by a mod.
- Sockets can be used to make modded multiplayer, or at least a cool proof of concept.
- And, I'd love the ability to write an IRC client or even a browser inside LT, so people can stay in touch with the community, without having to leave the game.

I'm sure there are many many more... So, please, can we have? :D :squirrel:


Edit: not to mention that sockets could be used to browse mod databases, get alerted of updates or even automatically download new versions. It should probably be enough to make socket(), bind(), connect() and listen() available through LTSL.
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
User avatar
Katorone
Vice Admiral
 
Posts: 2291
Joined: Tue Dec 25, 2012 5:08 am
Location: Belgium

Re: LTSL - pipes & sockets ?

Postby Cornflakes_91 » Wed Jul 30, 2014 2:29 am

TCP sockets open up a big can of worms regarding network security...
I see what you want to do Kato, but i thus word my concerns with opening up LT to the internet as a modding-only feature....

Nothing against pipes (as when pipes make LT problematic, your computer was problematic beforehand), they would make that custom control app for tablets that i want(ed) to make possible. ^^
User avatar
Cornflakes_91
Admiral
 
Posts: 8886
Joined: Wed Mar 06, 2013 1:53 am
Location: Austria

Re: LTSL - pipes & sockets ?

Postby Katorone » Wed Jul 30, 2014 4:45 am

A socket in itself is harmless. Are you worried about some attacker getting access to your computer through LT?
If you limit hard disk access to a chrooted environment, you wouldn't have to worry about that.
Also, the scripts are human readable, so peer review is possible and will happen.

Or are you thinking something else?
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
User avatar
Katorone
Vice Admiral
 
Posts: 2291
Joined: Tue Dec 25, 2012 5:08 am
Location: Belgium

Re: LTSL - pipes & sockets ?

Postby Cornflakes_91 » Wed Jul 30, 2014 5:22 am

Pretty much intrusion danger, yes.

But i dont know very much about sockets and TCP in general, im just using it xD
User avatar
Cornflakes_91
Admiral
 
Posts: 8886
Joined: Wed Mar 06, 2013 1:53 am
Location: Austria

Re: LTSL - pipes & sockets ?

Postby Katorone » Wed Jul 30, 2014 5:36 am

ah... well, don't have a panic attack then !
There's nothing wrong with sockets. Having sockets doesn't mean you'll need to worry about opening up an attack vector to your computer.

A socket can read or write. Most sockets used in mods will be the writing kind. They won't accept input all the time. It's the server-side script that would listen to client connections.
Hackers can't use these writing sockets to hack you, because the sockets aren't accepting any input. When they do, it's after a handshake, and it's established that the other party is trustworthy.

If you're really worried about this, I'm guessing you already took precautions. Having a decent (hardware) firewall like a router is a great way to not having to worry too much about opening ports for listening, since it's hard to bypass the router anyway. Besides that there are always the software firewalls that will alert you when an application is trying to make receive or initiate a connection.
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
User avatar
Katorone
Vice Admiral
 
Posts: 2291
Joined: Tue Dec 25, 2012 5:08 am
Location: Belgium

Re: LTSL - pipes & sockets ?

Postby Cornflakes_91 » Wed Jul 30, 2014 5:44 am

Just wording concerns.

Im also most likely too bad protected to have the right to make much noise in this direction ^^

If you say its fine, then it'll be fine ^^
User avatar
Cornflakes_91
Admiral
 
Posts: 8886
Joined: Wed Mar 06, 2013 1:53 am
Location: Austria

Re: LTSL - pipes & sockets ?

Postby Katorone » Wed Jul 30, 2014 5:45 am

Yeah... compare it to a browser. A browser doesn't listen to connections per sé, it just opens a connection to a webserver, fetches what it needs and closes the connection again.

And with peer review, I really don't think a culture of exploitative scripts would happen on LT. :)
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
User avatar
Katorone
Vice Admiral
 
Posts: 2291
Joined: Tue Dec 25, 2012 5:08 am
Location: Belgium

Re: LTSL - pipes & sockets ?

Postby Cornflakes_91 » Wed Jul 30, 2014 5:51 am

Im less thinking about "virus" scripts in LT but a general security weakness introduced by making LT network capable in general
User avatar
Cornflakes_91
Admiral
 
Posts: 8886
Joined: Wed Mar 06, 2013 1:53 am
Location: Austria

Re: LTSL - pipes & sockets ?

Postby Flatfingers » Wed Jul 30, 2014 8:38 pm

The point about database access is interesting.

I'm wondering now how LT will store the vast reams of data about the universe of a game. Josh mentioned in a recent devlog that he was considering adding data structures to LTSL, and I suppose you could store and expose active game data that way (universe = big honkin' list of lists).

But it might be advantageous to handle data -- at least the big stuff -- through some kind of structured database. In that case, LTSL would need some way to make database calls. You could bake those into LTSL, but I suppose sockets would be another way, and they'd offer additional capabilities.

Regarding file handling, doesn't LTSL already have to be able to read data from files? Not directly, but through a built-in function?
User avatar
Flatfingers
Vice Admiral
 
Posts: 4391
Joined: Sat Nov 24, 2012 12:45 am

Re: LTSL - pipes & sockets ?

Postby Katorone » Thu Jul 31, 2014 1:55 am

Flatfingers wrote:Regarding file handling, doesn't LTSL already have to be able to read data from files? Not directly, but through a built-in function?


Sure, it should already be able to handle files. But I don't know in how far it can be used by mods to read and write arbitrary files.
To me it would make sense to not let LTSL write to files outside of the mod or universe directory though. Not so much because I think it'll be abused, but because accidents happen. Secondly because I'd like my files together, and not spread over all kinds of structures modders could come up with. And, seeing as we're dealing with a cross platform game, it just makes sense. :)
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
User avatar
Katorone
Vice Admiral
 
Posts: 2291
Joined: Tue Dec 25, 2012 5:08 am
Location: Belgium

Re: LTSL - pipes & sockets ?

Postby Kekasi » Thu Aug 07, 2014 5:38 am

I asked Josh in IRC about what network functionality is visible to LTSL and he said currently there is none, but he will add it in post launch at the latest.

With files, it's almost a guarantee that there will be forms of reading and writing to files, solely because of config files.
An idea that is not dangerous is unworthy of being called an idea at all. - Oscar Wilde

We often refuse to accept an idea merely because the tone of voice in which it has been expressed is unsympathetic to us. - Friedrich Nietzsche
Kekasi
Ensign
 
Posts: 42
Joined: Fri Jan 31, 2014 9:55 am

Re: LTSL - pipes & sockets ?

Postby Katorone » Thu Aug 07, 2014 6:52 am

Thank you for asking and updating this thread. :D
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
User avatar
Katorone
Vice Admiral
 
Posts: 2291
Joined: Tue Dec 25, 2012 5:08 am
Location: Belgium

Re: LTSL - pipes & sockets ?

Postby DWMagus » Thu Aug 07, 2014 10:23 am

Even if it's something as simple as reading/writing to files, then that output can easily be changed to a network stream.
Image
Early Spring - 1055: Well, I made it to Boatmurdered, and my initial impressions can be set forth in three words: What. The. F*ck.
User avatar
DWMagus
Moderator
 
Posts: 5066
Joined: Wed Dec 05, 2012 3:25 pm
Location: Denver, CO, United States

Re: LTSL - pipes & sockets ?

Postby Daniel » Mon Aug 11, 2014 4:14 am

Kekasi wrote:With files, it's almost a guarantee that there will be forms of reading and writing to files, solely because of config files.


Could simply have the configuration as constants at the top of the script.
"The first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time." —Tom Cargill
Daniel
Lieutenant
 
Posts: 80
Joined: Sun Mar 02, 2014 12:28 am

Re: LTSL - pipes & sockets ?

Postby Cornflakes_91 » Mon Aug 11, 2014 4:46 am

Kekasi wrote:I asked Josh in IRC about what network functionality is visible to LTSL and he said currently there is none, but he will add it in post launch at the latest.

With files, it's almost a guarantee that there will be forms of reading and writing to files, solely because of config files.


Im pretty sure josh doesnt want his config variables spread over a hundred scripts but all stored in a nice little config file.

So we have (at least indirect) read access.

And as it would be a equal chore not being able to store changed configs we will have write access to files.

In sum im confident that we will have some kind of file access available
User avatar
Cornflakes_91
Admiral
 
Posts: 8886
Joined: Wed Mar 06, 2013 1:53 am
Location: Austria

Next

Return to Scripting & Modding



Who is online

Users browsing this forum: No registered users and 2 guests