Menu

Using netcat

Help
Ben
2009-01-30
2012-12-14
  • Ben

    Ben - 2009-01-30

    Hi,

    I try to execute a linknx request using netcat, but it doesn't work.

    I think it's because of EOT character.

    Do you have example that works ?

    Thanks per advance,
    Ben

     
    • jef2000

      jef2000 - 2009-01-30

      Hi,

      I know that on some platforms netcat filters the EOT character (netcat on my WRT54GS does that), but on a desktop linux it seems to work.
      To generate the EOT character, you can use command like:
      printf "<write><object id='kitchen_light' value='on'/></write>\n\x4" | nc localhost 1028

      Regards,

      Jean-François

       
    • jef2000

      jef2000 - 2009-01-31

      Hi,

      I tried it at home today and it works on my linux desktop (Suse 10.2). I had to replace "nc" by "netcat". (on Redhat enterprise linux, the command is named "nc" instead of "netcat" )

      Regards,

      Jean-François

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.