All pastes #366342 Raw Edit

Anonymous

public c v1 · immutable
#366342 ·published 2007-02-21 17:04 UTC
rendered paste body
/* mission for http://pulltheplug.org/wargames/vortex/level00.html */#include <sys/types.h>#include <sys/socket.h>#include <unistd.h>#include <string.h>#include <netinet/in.h>#include <stdlib.h>#define IP "vortex.labs.pulltheplug.org"main(){    int sockfd;    sockfd=socket(PF_INET, SOCK_STREAM, 0);    struct sockaddr_in remote;    remote.sin_family=AF_INET;    remote.sin_port=htons(5842);    remote.sin_addr.s_addr=inet_addr(IP);    memset(&(remote.sin_zero), '\0', 8);    if((bind(sockfd, (struct sockaddr *)&remote, sizeof(struct sockaddr)))==-1)    {        printf("connection failed\n");        exit(EXIT_FAILURE);    }    else    {        printf("Connected successfully!\n");        exit(EXIT_SUCCESS);    }}// but how do i read in 4 unsigned integers ? :( */