Is there any alternative for netcat utility? I want to run docker API and netcat utility is not installed on client system. docker command example - echo -e "GET /info HTTP/1.0\r\n" | nc -U /var/run/docker.sock
相关问题
- Docker task in Azure devops won't accept "$(pw
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
Have you got Perl? You could do something like this maybe:
Python is ubiquitous these days and the socket module is all you need.
Here are a few examples: You can use it to test connectivity on port 443 to a list of 3 hosts:
This one liner can read stdin or files and send to hostname termbin.com on port 9999 upload a file to termbin:
According to this,
can replace nc/netcat. It should work in any bash based terminal.
Example:
printf "Hello World!" | (exec 3<>/dev/tcp/termbin.com/9999; cat >&3; cat <&3; exec 3<&-)
returns a link.
socat
is a more powerful version ofnc
andnetcat
.