netcat to a non-nc-capable device

Posted on 2006-05-19
Last Modified: 2012-06-27
I've got a box (lantronix 32 port terminal server) that takes serial ports and TCP'izes them so that one can telnet into the ip-port.  

What I'd like to do is capture the datastream coming out of the ip-port, and pipe it into a binary to hex converter.

It seems this is something netcat can do (that is, use netcat instead of telnet so that stdout is generated), but I've only used netcat <--> netcat connections.

Is it possible to tell netcat to "go connect to this port on this ip and stream the data to stdout"?  If so, what 's the syntax?

Secondly, is there a streaming binary to hexadecimal converter?  What's it called?  

Question by:amlp

    Author Comment

    ok turned out to be amazingly, non-intuitively simple:

    $ netcat <ip address> <port> | hexdump

    duh.  I just don't expect things to be easy and straightforward.
    LVL 51

    Expert Comment

    this only works as long as the TCP/IP connection is kept alive, otherwise netcat dies
    LVL 1

    Accepted Solution

    Closed, 250 points refunded.

    Community Support Moderator

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
    Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now