Is it possible to use Winsock with a script to send a command to a remote host? I've been searching around on the web and it is very hard to find information on how to do this. I've found some sample code, but I don't know what kind of commands I can call on this winsock object (ie. what is the api?).
My goal is to have a client script to:
1) connect to the remote host
2) send a command... this will cause the remote host to run a command which takes approximately 5 minutes to complete.
3) capture any data sent back to the client and write to a file
4) client detects that server operation is done
5) client disconnects
is this possible with a script? or do I have to use something like VB? This is to be part of an automated process so I don't want to require any gui or user input.
Thanks in advance,
Beth
Here is some sample code that I found:
set winsock = createobject("MSWINSOCK.Winsock")
winsock.Remotehost = "127.0.0.1"
winsock.RemotePort = 695
My goal is to have a client script to:
1) connect to the remote host
2) send a command... this will cause the remote host to run a command which takes approximately 5 minutes to complete.
3) capture any data sent back to the client and write to a file
4) client detects that server operation is done
5) client disconnects
is this possible with a script? or do I have to use something like VB? This is to be part of an automated process so I don't want to require any gui or user input.
Thanks in advance,
Beth
Here is some sample code that I found:
set winsock = createobject("MSWINSOCK.Winsock")
winsock.Remotehost = "127.0.0.1"
winsock.RemotePort = 695