tag:blogger.com,1999:blog-6504844.post8705455060723472832..comments2024-03-24T02:25:08.487-07:00Comments on My Stuff: Some useful socat commandsL.M. Lutfi Sh.http://www.blogger.com/profile/07163015487982507289noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-6504844.post-49092571167579469032019-03-06T14:31:55.396-08:002019-03-06T14:31:55.396-08:00When trying to run the
socat /dev/ttyS0,raw,echo...When trying to run the <br /><br />socat /dev/ttyS0,raw,echo=0,crnl /dev/ttyS1,raw,echo=0,crnl<br /><br />on mac OS I get the <br /><br />socat[13806] E open("/dev/ttyS0", 01002, 0666): Operation not permitted<br /><br />error as I have explained here<br /><br />https://stackoverflow.com/questions/55032715/socat-for-creating-virtual-serial-ports-on-macos-leads-to-permission-denied-anFoadhttps://www.blogger.com/profile/11277791308556502949noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-89006009319624235992018-09-30T06:07:46.427-07:002018-09-30T06:07:46.427-07:00Great post, you know how to read the manpagesGreat post, you know how to read the manpagesAnonymoushttps://www.blogger.com/profile/08210424379265321763noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-77831956768873221662018-07-30T22:06:48.856-07:002018-07-30T22:06:48.856-07:00Is there a way to keep the sources IP when socat i...Is there a way to keep the sources IP when socat is forwarding the port to its destination?Anonymoushttps://www.blogger.com/profile/01877640763031684029noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-70808751625096577802018-07-30T22:05:21.000-07:002018-07-30T22:05:21.000-07:00Is there a way I can keep the sources IP when soca...Is there a way I can keep the sources IP when socat is routing to dest?<br />Anonymoushttps://www.blogger.com/profile/01877640763031684029noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-26302016135010504532018-01-25T21:42:35.499-08:002018-01-25T21:42:35.499-08:00Hi I would like to ask a question... I've been...Hi I would like to ask a question... I've been trying to connect my pc to a machine I've been working on using serial to usb; however upon connecting the two device using socat connections. The data sent to the machine is like character symbol every 10 secs. How can I make the serial to usb send data every second instead of 1 second. Thanks for the answer!Anonymoushttps://www.blogger.com/profile/14089623476537521938noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-45230876188307249392016-12-18T13:27:02.699-08:002016-12-18T13:27:02.699-08:00Theme of blog is excellent there is almost everyth...Theme of blog is excellent there is almost everything to read, Brilliant post.<br /><a href="https://thetechsterblog.wordpress.com/2016/12/05/voice-artificial-intelligence-inside-the-home/" title="see here" rel="nofollow">see here</a><br />Anonymoushttps://www.blogger.com/profile/00248296275628982891noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-7784432153340650122013-11-10T14:46:12.888-08:002013-11-10T14:46:12.888-08:00Sorry I did'nt explain very well. In my case t...Sorry I did'nt explain very well. In my case the login is yet present on a remote device (a cisco router, in which the aux port is connected to an UPS serial port). When I telnet to the router it asks for a login and then passes flux to the serial port. If I try to do socat to bind tcp connection to a local pty, it fails (of course). Probably there's no way to login within socat. I will try to remove login from the router. Thanks anyway I will bookmark this page for the next socat need.alezhttps://www.blogger.com/profile/03008041630042158072noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-83852050594576436722013-11-08T15:21:39.090-08:002013-11-08T15:21:39.090-08:00See one of examples above that use param "REA...See one of examples above that use param "READLINE" and "EXEC:"L.M. Lutfi Sh.https://www.blogger.com/profile/07163015487982507289noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-4910036156674457632013-11-08T15:13:12.845-08:002013-11-08T15:13:12.845-08:00Hi. What about forwarding from a telnet connection...Hi. What about forwarding from a telnet connection with login ? I want to forward telnet data to a virtual serial port but only after having provided user/pass... something like netcat, echo, then socat ? alezhttps://www.blogger.com/profile/03008041630042158072noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-56745151808277361522013-07-10T00:15:22.477-07:002013-07-10T00:15:22.477-07:00To prevent the socat to terminate when we terminat...To prevent the socat to terminate when we terminate the telnet session (or whatever client app), pass parameter "fork" to tell the socat to fork a child per connection.<br /><br />e.g:<br /><br />socat /dev/ttyUSB0 tcp-listen:8081,forkL.M. Lutfi Sh.https://www.blogger.com/profile/07163015487982507289noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-46810794374539407122013-07-07T12:15:11.220-07:002013-07-07T12:15:11.220-07:00Example: to forward serial data on device ttyUSB2 ...Example: to forward serial data on device ttyUSB2 to telnet port 8081<br /><br />socat /dev/ttyUSB2 tcp4-listen:8081<br /><br />L.M. Lutfi Sh.https://www.blogger.com/profile/07163015487982507289noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-89165254450594174792013-05-14T02:09:36.813-07:002013-05-14T02:09:36.813-07:00Hi! How do i use socat to forward the serial data ...Hi! How do i use socat to forward the serial data that is suppose to send out from serial port to the ethernet port instead?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6504844.post-15495534379259649802011-07-09T05:23:28.293-07:002011-07-09T05:23:28.293-07:00This post is just a copy from the official documen...This post is just a copy from the official documentation of Socat.... nothing new, no investigative workAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6504844.post-15171029611679033992011-06-15T17:55:59.960-07:002011-06-15T17:55:59.960-07:00Interesting stuff, I must say. Thank you!Interesting stuff, I must say. Thank you!Cristiannoreply@blogger.comtag:blogger.com,1999:blog-6504844.post-32183994156967550992010-03-15T11:32:15.267-07:002010-03-15T11:32:15.267-07:00try use netstat -atry use netstat -aL.M. Lutfi Sh.https://www.blogger.com/profile/07163015487982507289noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-72215185382288437032010-03-15T09:00:38.229-07:002010-03-15T09:00:38.229-07:00It's very helpful.
If I have a socket file, d...It's very helpful.<br /><br />If I have a socket file, do you know how I can find out which process uses it, which port is used, and how I can listen to it?<br /><br />Thanks.Benhttps://www.blogger.com/profile/10154594803445900974noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-76190645683446566222009-08-12T15:19:50.846-07:002009-08-12T15:19:50.846-07:00Most likely your computer has a service running th...Most likely your computer has a service running that uses the port 8080. Try netstat to see what application is using it.L.M. Lutfi Sh.https://www.blogger.com/profile/07163015487982507289noreply@blogger.comtag:blogger.com,1999:blog-6504844.post-47958733056334928002009-08-12T15:12:32.037-07:002009-08-12T15:12:32.037-07:00Great post, but I have a question. Say I issue thi...Great post, but I have a question. Say I issue this command:<br /><br />socat TCP4-LISTEN:8080,fork SOCKS4:127.0.0.1:10.0.0.1:80,<br />socksport=9050<br /><br />When I try to use those ports for another host, lets say:<br /><br />socat TCP4-LISTEN:8080,fork SOCKS4:127.0.0.1:11.1.1.1:80,<br />socksport=9050<br /><br />I get an error saying the ports are in use (presumably from my first command).<br /><br />So is there a way to reset, or unset the ports that are being used?2eXtremehttps://www.blogger.com/profile/06951388592744714849noreply@blogger.com