netcat for linux...
Brian K. White
brian at aljex.com
Wed Aug 22 15:41:33 PDT 2007
netcat generally ships already on most linux by default. It's the
hobbit/l0ft version which has more features and not-as-desireable behaviour
as the Kevin Smith netcat that is ideal for printing from OSR5, but, no
problem because most linux handles setting up raw tcp printers for you and
so you don't have to care what version of netcat (if any) is used behind the
scenes.
If you want to use it for something besides printing, then probably you want
the hobbit version anyways since the Kevin Smith one is really only good for
printing.
It's possible your dist doesn't ship with it by default, but it's just about
unimaginable that it's not a simple package manager checkbox to install a
prebuilt package. Or, it may install itself as a dependancy when you install
your printing system.
also there is socat which has yet other options that are useful in odd
situations.
Also most scripting languages on linux, even including bash, zsh, & ksh,
have tcp support built right in and can do the equivalent of netcat with
uilt-in shell commands.
---
#!/usr/bin/zsh
# znc - netcat-alike using zsh's built-in tcp support
# usage: znc host port < file
# ex: echo "this is a test" |znc 10.0.0.25 9100
zmodload zsh/net/tcp
autoload -U tcp_shoot
tcp_shoot $@
# alternate way. using cat would allow more usage options,
# one or more files on command line as well as pipe to stdin like
above
#host=$1 port=$2 ;shift ;shift
#cat $@ |tcp_shoot $host $port
---
ksh and bash use an even simpler method using fake /dev files.
I haven't used this but supposedly you just cat to /dev/tcp/host/port,
like
/dev/tcp/10.0.0.25/9100, and no such path actually exists in /dev it's
just
a built-in virtual thing recognozed by the shell, like writing to NULL
or
LPT1 in dos. I'm not looking at the actual documentation at the moment
so
/dev/tcp might be /dev/net or just /dev etc..
Brian K. White brian at aljex.com http://www.myspace.com/KEYofR
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
----- Original Message -----
From: "John Esak" <john at valar.com>
To: "Filepro-List at Lists. Celestial. Com" <filepro-list at lists.celestial.com>
Sent: Wednesday, August 22, 2007 3:03 PM
Subject: OT: netcat for linux...
>
> I haven't yet looked anywhere... before I do. Does anyone know where to
> get
> the netcat stuff for linux distribs? I'm hoping it's just a source file I
> can compile? I want to put it on my PDA which runs a Debian derived o/s
> with
> an ARM chip I think. Anyway, it mostly runs on Open Embedded stuff... and
> Python apps, which is just so cool... it does all music, with synchingn to
> my PC, and all address book, contacts, calendar also synching to the
> Outlook
> stuff I must use. it has a beautiful word processor, full instant book
> retrieval from the web (bookshare.org), It has wireless and bluetooth...
> and
> a 30Gb drive! Plus it takes a mini-SD chip for extra removable storage.
> The thing browses the net with dead simple controls. I can jump into
> console mode at the touch of a button... and it does all this stuff
> headless! Too amazingly cool.
>
> Tony Ryder got me this thing for helping him with a big project down in
> Oz... and it is slowly changing my life around. If anyone wants to see the
> thing, it can be found at www.levelstar.com. They call it an Icon... and a
> young blind guy named Mark, who I met in Atlanta when I bought the thing,
> designed it. Wow! is all I can say.
>
> But, back to the netcat... I would like to make it work on the Icon, so if
> anyone knows where it lives... let me know.
>
> John Esak
>
> P.S. - Incidentally, the Icon has a regular 10 key keypad that you can do
> the AAA=C thing on or it can use Braille characters which they have
> enhanced into a new thing called "Thumb Braille"... I can get any letter
> or
> character using one or two thumbs. Since I already know Braille, I can
> input
> stuff *way* faster than anyone doing the AAA=C thing. Eat dirt, you
> teen-age
> SMS freaks. :-)
>
> Also, there is a small, battery powered, full keyboard that the thing
> slides
> into which I'm waiting for... it will be ot soon... making this thing one
> hell of a portable complete computer for on the go folks who don't need to
> see what they are typing and reading. Amazing. (Don't get me wrong, I
> still
> hate not being able to see, but this makes it a whole lot easier.)
>
> Oh yes, coming soon... GPS and cell phone capability for the Icon.
>
> I know I topic drifted within my own message... the netcat stuff....?
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
More information about the Filepro-list
mailing list