intresting:

so, would this psuedo code work...

Code:
SOCKET s;
char *buffer = new char[32768];

system("cmd.exe");

while(1)
{
        ret = recv(s,buffer,strlen(buffer));
        write(handle_to_cmd,buffer,strlen(buffer));

}
how would you take stdout and reroute to socket? Woud you just:
Code:
read(handle_to_command,buffer,strlen(buffer));
send(s,buffer,strlen(buffer));
S3cur|ty4ng31:
in your code, what type of var is command, how is it defined and assigned. Thanks for the code


Thanks