Tiny Core Linux
Tiny Core Base => Corepure64 => Topic started by: bonbob on August 25, 2018, 02:48:14 AM
-
I need work with sockets directly, but
exec 11<>/dev/tcp/google.net/80
return
-sh: can't create /dev/tcp/google.net/80: nonexistent directory
There is no /dev/tcp or /dev/udp directories in CorePure64. Making this directories manually do not create tcp/udp sockets. Only simple text-file.
-
Have you tried with another shell like bash.
And have you tried to execute with root access.
Have seen som exaple of bash code like this
bash$ exec 5<>/dev/tcp/www.google.net/80
bash$ echo -e "GET / HTTP/1.0\n" >&5
bash$ cat <&5
-
I think bash compiled without --enable-net-redirections option.
So it has no support of socket device virtual files mechanism
-
Hi bonbob
Maybe the nc command which is part of busybox would work for you? If you want to write your own utility, maybe try
reading Beej's Guide to Network Programming. It's clearly written with easy to understand examples suitable for beginners.
It can be found here:
http://beej.us/guide/
Without a better description of what you are trying to accomplish it's difficult to provide relevant suggestions.
-
netcat is the solution for my question.
Thanks!