News for hackers. Stuff that matters.
Re:Projected File System by bytK7 on Thursday February 22, 2024 @09:34AM (#39467659)
Indeed, bash already has socket access via /dev/tcp/HOST/PORT and /dev/udp/HOST/PORT, which allow opening a socket and reading from/writing to it as if it were an ordinary file.
Re:Projected File System by folmar on Thursday February 22, 2024 @09:55AM (#39467977)
Though this is implemented in bash itself and only works in bash, not in other programs.
Re:Projected File System by meinheld111 on Thursday February 22, 2024 @10:13AM (#39468268)
The number of unix environments w/o bash available is surprisingly small thou
Re:Projected File System by proaralyst on Thursday February 22, 2024 @10:48AM (#39468829)
It means you can't just call open('/dev/tcp/blah') from a program and get a TCP socket though, unfortunately
Re:Projected File System by ithkuil on Thursday February 22, 2024 @05:48PM (#39474418)
IIRC that only works for clients and can't be used for listening.

Also IIRC there is a bash loadable module that implements server sockets but that can't be relied upon if you're just shipping bash scripts meant to be run without the end user preparing the ground before running it.

Re:Projected File System by hughesjj on Friday February 23, 2024 @03:32AM (#39478273)
I mean, file handlers exist in Linux. That would be so cool if you could add a file/directory watch to an http endpoint/resource