не где не могу найти грабер ников.Может у когото есть ? или хтото занет "С++" и может переделать вотети сорсы под l2.wnet.ua ,статистика - http://l2w2.wnet.ua/UserPanel/status.asp?action=showstatus
// nick grabber exmple
// old++
//
// d4rk@securitylab.ru#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <netdb.h>#define MAX_L_LEN 14
struct {
char *string;
char *host;
char *uri;
int c;
int ptr;
} hosts[] = {
{ "base4>", "www.antaras.ru", "/?id=2", 0, 0 },
{ "6DDC0>", "www.la2.ru", "/status/", 4, 2 },
};int connect_to_host(char *ip, unsigned short port) {
int sockfd;struct hostent *hs;
struct sockaddr_in sock;bzero(&sock, sizeof(sock));
sock.sin_family = AF_INET;
sock.sin_port = htons(port);if ((sock.sin_addr.s_addr = inet_addr(ip)) == -1) {
if ((hs = gethostbyname(ip)) == NULL)
return -1;sock.sin_family = hs->h_addrtype;
memcpy((caddr_t)&sock.sin_addr.s_addr, hs->h_addr, hs->h_length);
}if((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0)
return -1;if(connect(sockfd, (struct sockaddr *)&sock, sizeof(sock)) < 0)
return -1;return sockfd;
}int main(int argc, char *argv[]) {
int sock, port = 80, i = 0, a = 0, num = 0, count = 1;
ssize_t l;
int lim = 0x61a89;
//char *host = "www.antaras.ru"; //la2.ru/status/
//char *string = "base4>";
//char str2[] = "pg bgcolor=#E6DDC0>Ansaro</td>";
//char url[] =
char *ptr, *ptr2;
char *buff = malloc(lim + 1);
char login[30];
char *request = malloc(501);if((num = atoi(argv[1])) > 1) printf(" - argv[1] invalid\n");
snprintf(request, 500,
"GET %s HTTP/1.1\x0d\x0a"
"Host: %s:80\x0d\x0a"
"User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313\x0d\x0a"
"Accept: text/xml,text/html;q=0.9,text/plain;q=0.8;q=0.2,*/*;q=0.1\x0d\x0a"
"Accept-Language: en-us,en;q=0.5\x0d\x0a"
"Accept-Encoding: gzip,deflate,compress;q=0.9\x0d\x0a"
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\x0d\x0a"
"Keep-Alive: 0\x0d\x0a"
"Connection: keep-alive\x0d\x0a\x0d\x0a", hosts[num].uri, hosts[num].host);if((sock = connect_to_host(hosts[num].host, port))==-1) {
fprintf(stderr, " - error in connecting to server\n");
exit(0);
}if(send(sock, request, strlen(request), 0) < 0) {
fprintf(stderr, " - error in sending buffer\n");
exit(0);
}
while(((l = recv(sock, buff, lim, 0)) > 0)) {
a++;
ptr2 = buff;
while((ptr = strstr(buff, hosts[num].string)) != NULL) {
ptr+=6; i = 0; buff = ptr+20;
memcpy(&login,ptr,20);
login[16] = '\0';if((ptr = strstr(login, "<")) != NULL) *ptr = '\0';
//while(login[i] != '<') i++;
//login[i] = '\0';
if(!hosts[num].ptr) {
if(hosts[num].c) {
if(hosts[num].c == count) {
printf("%s\n",login);
count = 1;
} else count++;
} else printf("%s\n",login);
} else hosts[num].ptr--;
}
//if(a==1) { close(sock); exit(1); }
buff = ptr2;
//printf("%s\n",buff);
}
close(sock);
}
Очень прошу помочь,я далёк от С++ всем спасибо