Server script without built-in sockets
Judd Pickell
pickell at gmail.com
Mon Oct 22 18:26:29 MST 2007
I wasn't aware of a linux distro that didn't have perl as part of its
release installation. I am curious now as to which ones don't? I am
usually working in suse, rh, ubuntu and debian, which last I checked
all did have it. So I wonder if you mean ones like puppylinux or small
usb drive running linux setups. Anyways.. you have my curiosity
piqued.
Sincerely,
Judd Pickell
On 10/22/07, Kurt Granroth <kurt+plug-discuss at granroth.com> wrote:
> Here's an esoteric question for those of you wanting a challenge. How
> can I turn an arbitrary non-networked bash script into a server?
>
> Okay, I'll head a followup question off at the pass... "why would I want
> to do something insane like turning a bash script into a network
> server?" The answer is "because". Really, there's no reason other than
> I want to :-P
>
> Now netcat handily has the exact option that I need: -e. With that, I
> could do something like:
>
> while 1; do netcat -l -p 16789 -e myscript.sh; done
>
> Alas, the netcat people are reasonable and security conscious folk so
> they prudently refuse to enable the -e option by default. In fact, to
> get that functionality, you must recompile netcat with the
> -DGAPING_SECURITY_HOLE compile flag! I love it :)
>
> But that doesn't help me because the solution that *I* want would
> require only software that I can reasonably assume would already be on
> any Linux system (no compiling!).
>
> I suppose I could write a couple line perl script to handle the incoming
> connections... but it seems sacrilegious for a shell script to require
> perl. Plus, not all Linux systems have perl.
>
> [x]inted would certainly fit the bill but using that requires root
> access so that's out.
>
> Am I out of luck, here? Or is there some commonly available utility out
> there that can open up a socket for me?
>
> Kurt
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
>
More information about the PLUG-discuss
mailing list